Whamcloud - gitweb
debugfs: dump "fid" and "lma" xattrs on inode stat
[tools/e2fsprogs.git] / e2fsprogs.spec.in
1 %define _root_sbindir   /sbin
2 %define _root_libdir    /%{_lib}
3 %define _root_localedir /usr/share/locale
4 %define _root_etcdir    /etc
5
6 Summary: Utilities for managing ext2/ext3/ext4 filesystems
7 Name: e2fsprogs
8 Version: @E2FSPROGS_PKGVER@
9 Release: 0%{_vendor}
10 License: GPLv2 and LGPLv2
11 Group: System Environment/Base
12 Source:  ftp://download.sourceforge.net/pub/sourceforge/e2fsprogs/e2fsprogs-%{version}.tar.gz
13 Url: http://downloads.whamcloud.com/public/
14 Prereq: /sbin/ldconfig
15 BuildRoot: %{_tmppath}/%{name}-root
16 %if %{_vendor} == "suse"
17 Group: System/Filesystems
18 @LFSCK_CMT@Requires: db >= @DB4VERSION@
19 @LFSCK_CMT@BuildRequires: db-devel >= 4.1 texinfo
20 Provides: e2fsbn ext2fs libcom_err = %{version} ldiskfsprogs = %{version}
21 Obsoletes: ext2fs libcom_err < %{version}
22 %else
23 Group: System Environment/Base
24 @LFSCK_CMT@Requires: db4 >= @DB4VERSION@
25 @LFSCK_CMT@BuildRequires: db4-devel >= 4.1 texinfo
26 Provides: e2fsprogs-libs = %{version} ldiskfsprogs = %{version}
27 Obsoletes: e4fsprogs e2fsprogs-libs < %{version}
28 %endif
29
30 %description
31 The e2fsprogs package contains a number of utilities for creating,
32 checking, modifying, and correcting any inconsistencies in ext2, ext3,
33 and ext4 filesystems.  E2fsprogs contains e2fsck (used to repair
34 filesystem inconsistencies after an unclean shutdown), mke2fs (used to
35 initialize a partition to contain an empty ext2 filesystem), debugfs
36 (used to examine the internal structure of a filesystem, to manually
37 repair a corrupted filesystem or to create test cases for e2fsck),
38 tune2fs (used to modify filesystem parameters), resize2fs to grow and
39 shrink unmounted ext2 filesystems, and most of the other core ext2fs
40 filesystem utilities.
41
42 You should install the e2fsprogs package if you are using any ext2,
43 ext3, or ext4 filesystems (if you're not sure, you probably should
44 install this package).  You may also need to install it (even if you
45 don't use ext2/ext3/ext4) for the libuuid and libblkid libraries and
46 fsck tool that are included here.
47
48 %package devel
49 Summary: Ext2 filesystem-specific static libraries and headers.
50 Group: Development/Libraries
51 Requires: e2fsprogs = %{version}
52 Prereq: /sbin/install-info
53
54 %description devel
55 E2fsprogs-devel contains the libraries and header files needed to
56 develop ext2, ext3, or ext4 filesystem-specific programs.
57
58 You should install e2fsprogs-devel if you want to develop
59 ext2. ext3. or ext4 filesystem-specific programs.  If you install
60 e2fsprogs-devel, you'll also want to install e2fsprogs.
61
62 %package -n uuidd
63 Summary: helper daemon to guarantee uniqueness of time-based UUIDs
64 Group: System Environment/Daemons
65 License: GPLv2
66 Requires: e2fsprogs = %{version}
67 Requires(pre): shadow-utils
68
69 %description -n uuidd
70 The uuidd package contains a userspace daemon (uuidd) which guarantees
71 uniqueness of time-based UUID generation even at very high rates on
72 SMP systems.
73
74 %prep
75 %setup
76
77 %build
78 %configure --enable-elf-shlibs --enable-nls --disable-defrag \
79         @WITH_LUSTRE@ @ENABLE_LFSCK@ \
80         %{?extra_config_flags:%extra_config_flags}
81 make
82 make check
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 export PATH=/sbin:$PATH
87 make install install-libs DESTDIR="$RPM_BUILD_ROOT" \
88         root_sbindir=%{_root_sbindir} root_libdir=%{_root_libdir}
89 /sbin/ldconfig -n ${RPM_BUILD_ROOT}%{_libdir}
90
91 # Add a dir that uuidd needs that the Makefiles don't create
92 install -d $RPM_BUILD_ROOT/var/lib/libuuid
93
94 %find_lang %{name}
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %post -p /sbin/ldconfig
100
101 %postun -p /sbin/ldconfig
102
103 %post devel
104 if [ -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
105     /sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir
106 fi
107 exit 0
108
109 %postun devel
110 if [ $1 = 0 -a -x /sbin/install-info -a -f %{_infodir}/libext2fs.info.gz ]; then
111    /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir
112 fi
113 exit 0
114
115 %pre -n uuidd
116 getent group uuidd >/dev/null || groupadd -r uuidd
117 getent passwd uuidd >/dev/null || \
118 useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \
119     -c "UUID generator helper daemon" uuidd
120 exit 0
121
122 %files -f %{name}.lang
123 %defattr(-,root,root)
124 %doc README RELEASE-NOTES
125
126 %{_root_sbindir}/badblocks
127 %{_root_sbindir}/blkid
128 %{_root_sbindir}/debugfs
129 %{_root_sbindir}/dumpe2fs
130 %{_root_sbindir}/e2fsck
131 %{_root_sbindir}/e2image
132 %{_root_sbindir}/e2label
133 %{_root_sbindir}/e2undo
134 %{_root_sbindir}/findfs
135 %{_root_sbindir}/fsck
136 %{_root_sbindir}/fsck.ext2
137 %{_root_sbindir}/fsck.ext3
138 %{_root_sbindir}/fsck.ext4
139 %{_root_sbindir}/fsck.ext4dev
140 @LFSCK_CMT@%{_sbindir}/lfsck
141 %{_root_sbindir}/logsave
142 %{_root_sbindir}/mke2fs
143 %{_root_etcdir}/mke2fs.conf
144 %{_root_sbindir}/mkfs.ext2
145 %{_root_sbindir}/mkfs.ext3
146 %{_root_sbindir}/mkfs.ext4
147 %{_root_sbindir}/mkfs.ext4dev
148 %{_root_sbindir}/resize2fs
149 %{_root_sbindir}/tune2fs
150 %{_sbindir}/filefrag
151 %{_sbindir}/mklost+found
152 %{_sbindir}/e2freefrag
153
154 %{_root_libdir}/libblkid.so.*
155 %{_root_libdir}/libcom_err.so.*
156 %{_root_libdir}/libe2p.so.*
157 %{_root_libdir}/libext2fs.so.*
158 %{_root_libdir}/libss.so.*
159 %{_root_libdir}/libuuid.so.*
160
161 %{_libdir}/e2initrd_helper
162
163 %{_bindir}/chattr
164 %{_bindir}/lsattr
165 %{_bindir}/uuidgen
166 %{_mandir}/man1/chattr.1*
167 %{_mandir}/man1/lsattr.1*
168 %{_mandir}/man1/uuidgen.1*
169
170 %{_mandir}/man5/e2fsck.conf.5*
171 %{_mandir}/man5/mke2fs.conf.5*
172
173 %{_mandir}/man8/badblocks.8*
174 %{_mandir}/man8/blkid.8*
175 %{_mandir}/man8/debugfs.8*
176 %{_mandir}/man8/dumpe2fs.8*
177 %{_mandir}/man8/e2fsck.8*
178 @LFSCK_CMT@%{_mandir}/man8/lfsck.8*
179 %{_mandir}/man8/findfs.8*
180 %{_mandir}/man8/fsck.ext2.8*
181 %{_mandir}/man8/fsck.ext3.8*
182 %{_mandir}/man8/fsck.ext4.8*
183 %{_mandir}/man8/fsck.ext4dev.8*
184 %{_mandir}/man8/e2image.8*
185 %{_mandir}/man8/e2label.8*
186 %{_mandir}/man8/e2undo.8*
187 %{_mandir}/man8/fsck.8*
188 %{_mandir}/man8/logsave.8*
189 %{_mandir}/man8/mke2fs.8*
190 %{_mandir}/man8/mkfs.ext2.8*
191 %{_mandir}/man8/mkfs.ext3.8*
192 %{_mandir}/man8/mkfs.ext4.8*
193 %{_mandir}/man8/mkfs.ext4dev.8*
194 %{_mandir}/man8/mklost+found.8*
195 %{_mandir}/man8/resize2fs.8*
196 %{_mandir}/man8/tune2fs.8*
197 %{_mandir}/man8/filefrag.8*
198 %{_mandir}/man8/e2freefrag.8*
199
200 %files devel
201 %defattr(-,root,root)
202 %{_infodir}/libext2fs.info*
203 %{_bindir}/compile_et
204 %{_bindir}/mk_cmds
205
206 %{_libdir}/libblkid.a
207 %{_libdir}/libblkid.so
208 %{_libdir}/libcom_err.a
209 %{_libdir}/libcom_err.so
210 %{_libdir}/libe2p.a
211 %{_libdir}/libe2p.so
212 %{_libdir}/libext2fs.a
213 %{_libdir}/libext2fs.so
214 %{_libdir}/libquota.a
215 %{_libdir}/libss.a
216 %{_libdir}/libss.so
217 %{_libdir}/libuuid.a
218 %{_libdir}/libuuid.so
219
220 %{_libdir}/pkgconfig/blkid.pc
221 %{_libdir}/pkgconfig/com_err.pc
222 %{_libdir}/pkgconfig/e2p.pc
223 %{_libdir}/pkgconfig/ext2fs.pc
224 %{_libdir}/pkgconfig/quota.pc
225 %{_libdir}/pkgconfig/ss.pc
226 %{_libdir}/pkgconfig/uuid.pc
227
228 %{_datadir}/et
229 %{_datadir}/ss
230 %{_includedir}/blkid
231 %{_includedir}/e2p
232 %{_includedir}/et
233 %{_includedir}/com_err.h
234 %{_includedir}/ext2fs
235 %{_includedir}/quota
236 %{_includedir}/ss
237 %{_includedir}/uuid
238 %{_mandir}/man1/compile_et.1*
239 %{_mandir}/man1/mk_cmds.1*
240 %{_mandir}/man3/com_err.3*
241 %{_mandir}/man3/libblkid.3*
242 %{_mandir}/man3/uuid.3*
243 %{_mandir}/man3/uuid_clear.3*
244 %{_mandir}/man3/uuid_compare.3*
245 %{_mandir}/man3/uuid_copy.3*
246 %{_mandir}/man3/uuid_generate.3*
247 %{_mandir}/man3/uuid_generate_random.3*
248 %{_mandir}/man3/uuid_generate_time.3*
249 %{_mandir}/man3/uuid_is_null.3*
250 %{_mandir}/man3/uuid_parse.3*
251 %{_mandir}/man3/uuid_time.3*
252 %{_mandir}/man3/uuid_unparse.3*
253
254 %files -n uuidd
255 %defattr(-,root,root)
256 # if you want to run via init
257 # /etc/init.d/uuidd
258 %{_mandir}/man8/uuidd.8*
259 %attr(6755, uuidd, uuidd) %{_sbindir}/uuidd
260 %dir %attr(2775, uuidd, uuidd) /var/lib/libuuid
261