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