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