1 |
%define name util-linux-ng |
2 |
%define version 2.18 |
3 |
%define mainver 2.18 |
4 |
%define rc_ver 0 |
5 |
%define rel 4 |
6 |
%define subrel 2 |
7 |
%if %{rc_ver} |
8 |
%define release %mkrel 0.rc%{rc_ver}.%{rel} |
9 |
%define tarname %{name}-%{version}-rc%{rc_ver} |
10 |
%define distname %{tarname} |
11 |
%else |
12 |
%define release %mkrel %{rel} |
13 |
%define tarname %{name}-%{version} |
14 |
%define distname %{tarname} |
15 |
%endif |
16 |
|
17 |
%define lib_blkid_major 1 |
18 |
%define lib_blkid %mklibname blkid %{lib_blkid_major} |
19 |
%define lib_blkid_devel %mklibname blkid -d |
20 |
|
21 |
%define lib_uuid_major 1 |
22 |
%define lib_uuid %mklibname uuid %{lib_uuid_major} |
23 |
%define lib_uuid_devel %mklibname uuid -d |
24 |
|
25 |
%define lib_ext2fs %mklibname ext2fs 2 |
26 |
%define lib_ext2fs_devel %mklibname ext2fs -d |
27 |
|
28 |
%define lib_mount_major 1 |
29 |
%define lib_mount %mklibname mount %{lib_mount_major} |
30 |
%define lib_mount_devel %mklibname mount -d |
31 |
|
32 |
%define git_url git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git |
33 |
|
34 |
%define build_bootstrap 1 |
35 |
|
36 |
%if !%{build_bootstrap} |
37 |
%bcond_without uclibc |
38 |
%endif |
39 |
|
40 |
### Header |
41 |
Summary: A collection of basic system utilities |
42 |
Name: %{name} |
43 |
Version: %{version} |
44 |
Release: %{release} |
45 |
License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain |
46 |
Group: System/Base |
47 |
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng |
48 |
|
49 |
### Features |
50 |
%define include_raw 1 |
51 |
### Macros |
52 |
%define no_hwclock_archs s390 s390x |
53 |
### Paths |
54 |
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
55 |
|
56 |
### Dependences |
57 |
BuildRequires: gcc |
58 |
BuildRequires: sed |
59 |
%if !%{build_bootstrap} |
60 |
BuildRequires: e2fsprogs-devel >= 1.41.6-2 |
61 |
%endif |
62 |
BuildRequires: gettext-devel |
63 |
BuildRequires: pam-devel |
64 |
BuildRequires: ncurses-devel |
65 |
BuildRequires: ncursesw-devel |
66 |
BuildRequires: termcap-devel |
67 |
BuildRequires: texinfo |
68 |
BuildRequires: slang-devel |
69 |
BuildRequires: zlib-devel |
70 |
BuildRequires: libaudit-devel |
71 |
%if %{with uclibc} |
72 |
BuildRequires: uClibc-devel |
73 |
%endif |
74 |
|
75 |
### Sources |
76 |
Source0: ftp://ftp.kernel.org/pub/linux/utils/%{name}/v%{mainver}/%{tarname}.tar.bz2 |
77 |
# based on Fedora pam files, with pam_selinux stripped out |
78 |
Source1: util-linux-ng-login.pamd |
79 |
Source2: util-linux-ng-remote.pamd |
80 |
Source3: util-linux-ng-chsh-chfn.pamd |
81 |
Source4: util-linux-ng-60-raw.rules |
82 |
Source8: nologin.c |
83 |
Source9: nologin.8 |
84 |
Source10: uuidd.init |
85 |
|
86 |
### Obsoletes & Conflicts & Provides |
87 |
# old versions of util-linux have been splited to more sub-packages |
88 |
Obsoletes: mount <= 2.13-0.pre7.6 |
89 |
Obsoletes: losetup <= 2.13-0.pre7.6 |
90 |
Provides: mount = %{version}-%{release} |
91 |
Provides: losetup = %{version}-%{release} |
92 |
# fork and rename from util-linux to util-linux-ng |
93 |
Obsoletes: util-linux <= 2.13-0.pre7.6 |
94 |
Provides: util-linux = %{version}-%{release} |
95 |
# old versions of e2fsprogs provides blkid / uuidd |
96 |
Conflicts: e2fsprogs < 1.41.8-2 |
97 |
|
98 |
Obsoletes: fdisk < %{version}-%{release} |
99 |
Obsoletes: tunelp < %{version}-%{release} |
100 |
Obsoletes: schedutils < %{version}-%{release} |
101 |
Provides: fdisk = %{version}-%{release} |
102 |
Provides: tunelp = %{version}-%{release} |
103 |
Provides: schedutils = %{version}-%{release} |
104 |
%ifarch alpha %{sunsparc} ppc |
105 |
Obsoletes: clock < %{version}-%{release} |
106 |
%endif |
107 |
|
108 |
# setarch merge in util-linux-ng-2.13 |
109 |
Obsoletes: sparc32 < %{version}-%{release} |
110 |
Obsoletes: linux32 < %{version}-%{release} |
111 |
Provides: linux32 = %{version}-%{release} |
112 |
Provides: sparc32 = %{version}-%{release} |
113 |
Obsoletes: setarch <= 2.0 |
114 |
Provides: setarch = %{version}-%{release} |
115 |
Requires(preun): info-install |
116 |
Requires(post): info-install |
117 |
Requires(pre): mktemp |
118 |
# for /bin/awk |
119 |
Requires(pre): gawk |
120 |
# for /usr/bin/cmp |
121 |
Requires(pre): diffutils |
122 |
Requires(pre): coreutils |
123 |
Requires: pam >= 0.66-4 |
124 |
Requires: shadow-utils >= 4.0.3 |
125 |
Requires: %{lib_blkid} = %{version}-%{release} |
126 |
Requires: %{lib_mount} = %{version}-%{release} |
127 |
Requires: %{lib_uuid} = %{version}-%{release} |
128 |
%if %{include_raw} |
129 |
Requires: udev |
130 |
%endif |
131 |
|
132 |
# RHEL/Fedora specific mount options |
133 |
Patch1: util-linux-ng-2.15-mount-managed.patch |
134 |
# add note about ATAPI IDE floppy to fdformat.8 |
135 |
Patch3: util-linux-ng-2.13-fdformat-man-ide.patch |
136 |
# 151635 - makeing /var/log/lastlog |
137 |
Patch5: util-linux-ng-2.13-login-lastlog.patch |
138 |
# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8) |
139 |
Patch6: util-linux-ng-2.13-ctrlaltdel-man.patch |
140 |
# 231192 - ipcs is not printing correct values on pLinux |
141 |
Patch8: util-linux-ng-2.15-ipcs-32bit.patch |
142 |
# /etc/blkid.tab --> /etc/blkid/blkid.tab |
143 |
Patch11: util-linux-ng-2.16-blkid-cachefile.patch |
144 |
|
145 |
### Upstream patches |
146 |
# (bor) agetty -s support requested for systemd. This combines upstream |
147 |
# commits 848e5e, e143d1, bb1eea, e98f4a. We really need only the first |
148 |
# and the last, but they are too related and it is easier |
149 |
Patch20: util-linux-ng-2.18-agetty_options_-s_-c_with-fixes.patch |
150 |
# (bor) fsck -l support requested for systemd. This combines upstream |
151 |
# commits 0c0f93 and dd0bd9 for the same reasons as previous patch. |
152 |
Patch21: util-linux-ng-2.18-fsck_option_-l.patch |
153 |
|
154 |
### Mageia Specific patches |
155 |
|
156 |
# CVE-2011-1675 - mount fails to anticipate RLIMIT_FSIZE |
157 |
Patch59: util-linux-ng-2.17-mount-mtab.patch |
158 |
# CVE-2011-1677 - umount may fail to remove /etc/mtab~ lock file |
159 |
Patch60: util-linux-ng-2.17-umount-mtab.patch |
160 |
# CVE-2013-0157 - canonicalize paths in mount |
161 |
Patch61: util-linux-ng-2.18-mount-canonicalize.patch |
162 |
|
163 |
# misc documentation fixes for man pages |
164 |
Patch70: util-linux-2.12q-miscfixes.patch |
165 |
Patch111: util-linux-2.11t-mkfsman.patch |
166 |
Patch114: util-linux-2.11t-dumboctal.patch |
167 |
Patch115: util-linux-ng-2.15-fix-ioctl.patch |
168 |
Patch116: util-linux-2.12q-autodav.patch |
169 |
|
170 |
# crypto patches |
171 |
# loop-AES patch |
172 |
# reworked from http://loop-aes.sourceforge.net/updates/util-linux-ng-2.17-20100120.diff.bz2 |
173 |
Patch1100: util-linux-ng-2.18-loopAES.patch |
174 |
Patch1101: util-linux-2.12q-swapon-skip-encrypted.patch |
175 |
Patch1102: util-linux-2.12-lower-LOOP_PASSWORD_MIN_LENGTH-for-AES.patch |
176 |
# load cryptoloop and cypher modules when use cryptoapi |
177 |
Patch1103: util-linux-2.12a-cryptoapi-load-module.patch |
178 |
Patch1104: util-linux-ng-2.14.1-set-as-encrypted.patch |
179 |
|
180 |
# clock program for ppc |
181 |
Patch1200: util-linux-2.10r-clock-1.1-ppc.patch |
182 |
# leng options for clock-ppc |
183 |
Patch1201: util-linux-2.10s-clock-syntax-ppc.patch |
184 |
# Added r & w options to chfn (lsb mandate) |
185 |
Patch1202: util-linux-2.11o-chfn-lsb-usergroups.patch |
186 |
# fix build on alpha with newer kernel-headers |
187 |
Patch1203: util-linux-2.11m-cmos-alpha.patch |
188 |
# do not hide users option in mtab |
189 |
Patch1207: util-linux-ng-2.14.1-users.patch |
190 |
# (peroyvind) fixes for sparc |
191 |
Patch1212: util-linux-2.12r-sparc.patch |
192 |
# remove mode= from udf mounts (architecture done so that more may come) |
193 |
Patch1218: util-linux-ng-2.13-mount-remove-silly-options-in-auto.patch |
194 |
# (misc) enable option -x on fsck.cramfs , bug 48224 |
195 |
Patch1219: util-linux-ng-enable_fsck_cramfs.diff |
196 |
# Mandrivamove patches |
197 |
Patch1300: util-linux-ng-2.18-losetup-try-LOOP_CHANGE_FD-when-loop-already-busy.patch |
198 |
|
199 |
%description |
200 |
The util-linux-ng package contains a large variety of low-level system |
201 |
utilities that are necessary for a Linux system to function. Among |
202 |
others, Util-linux-ng contains the fdisk configuration tool and the login |
203 |
program. |
204 |
|
205 |
%package -n %{lib_blkid} |
206 |
Summary: Block device ID library |
207 |
Group: System/Libraries |
208 |
License: LGPLv2+ |
209 |
Conflicts: %{lib_ext2fs} < 1.41.6-2 |
210 |
|
211 |
%description -n %{lib_blkid} |
212 |
This is block device identification library, part of util-linux-ng. |
213 |
|
214 |
%package -n %{lib_blkid_devel} |
215 |
Summary: Block device ID library |
216 |
Group: Development/C |
217 |
License: LGPLv2+ |
218 |
Requires: %{lib_blkid} = %{version}-%{release} |
219 |
Conflicts: %{lib_ext2fs_devel} < 1.41.6-2 |
220 |
Provides: libblkid-devel = %{version}-%{release} |
221 |
|
222 |
%description -n %{lib_blkid_devel} |
223 |
This is the block device identification development library and headers, |
224 |
part of util-linux-ng. |
225 |
|
226 |
%package -n %{lib_uuid} |
227 |
Summary: Universally unique ID library |
228 |
Group: System/Libraries |
229 |
License: BSD |
230 |
Conflicts: %{lib_ext2fs} < 1.41.8-2 |
231 |
|
232 |
%description -n %{lib_uuid} |
233 |
This is the universally unique ID library, part of e2fsprogs. |
234 |
|
235 |
The libuuid library generates and parses 128-bit universally unique |
236 |
id's (UUID's).A UUID is an identifier that is unique across both |
237 |
space and time, with respect to the space of all UUIDs. A UUID can |
238 |
be used for multiple purposes, from tagging objects with an extremely |
239 |
short lifetime, to reliably identifying very persistent objects |
240 |
across a network. |
241 |
|
242 |
%package -n %{lib_uuid_devel} |
243 |
Summary: Universally unique ID library |
244 |
Group: Development/C |
245 |
License: BSD |
246 |
Conflicts: %{lib_ext2fs} < 1.41.8-2 |
247 |
Requires: %{lib_uuid} = %{version} |
248 |
Provides: libuuid-devel = %{version}-%{release} |
249 |
Conflicts: ossp_uuid-devel |
250 |
|
251 |
%description -n %{lib_uuid_devel} |
252 |
This is the universally unique ID development library and headers, |
253 |
part of e2fsprogs. |
254 |
|
255 |
The libuuid library generates and parses 128-bit universally unique |
256 |
id's (UUID's).A UUID is an identifier that is unique across both |
257 |
space and time, with respect to the space of all UUIDs. A UUID can |
258 |
be used for multiple purposes, from tagging objects with an extremely |
259 |
short lifetime, to reliably identifying very persistent objects |
260 |
across a network. |
261 |
|
262 |
%package -n uuidd |
263 |
Summary: Helper daemon to guarantee uniqueness of time-based UUIDs |
264 |
Group: System/Servers |
265 |
License: GPLv2 |
266 |
Requires(pre): shadow-utils |
267 |
|
268 |
%description -n uuidd |
269 |
The uuidd package contains a userspace daemon (uuidd) which guarantees |
270 |
uniqueness of time-based UUID generation even at very high rates on |
271 |
SMP systems. |
272 |
|
273 |
%package -n %{lib_mount} |
274 |
Summary: Universal mount library |
275 |
Group: System/Libraries |
276 |
License: LGPL2+ |
277 |
|
278 |
%description -n %{lib_mount} |
279 |
The libmount library is used to parse /etc/fstab, |
280 |
/etc/mtab and /proc/self/mountinfo files, |
281 |
manage the mtab file, evaluate mount options, etc. |
282 |
|
283 |
%package -n %{lib_mount_devel} |
284 |
Summary: Universally unique ID library |
285 |
Group: Development/C |
286 |
License: LGPL2+ |
287 |
Requires: %{lib_mount} = %{version}-%{release} |
288 |
Provides: libmount-devel = %{version}-%{release} |
289 |
|
290 |
%description -n %{lib_mount_devel} |
291 |
Development files and headers for libmount library. |
292 |
|
293 |
%prep |
294 |
%setup -q -n %{distname} |
295 |
cp %{SOURCE8} %{SOURCE9} . |
296 |
|
297 |
%patch1 -p1 |
298 |
%patch3 -p1 |
299 |
%patch5 -p1 |
300 |
%patch6 -p1 |
301 |
%patch8 -p1 -b .p8 |
302 |
|
303 |
# Mageia |
304 |
%patch59 -p1 |
305 |
%patch60 -p1 |
306 |
%patch61 -p1 |
307 |
%patch70 -p1 -b .miscfixes |
308 |
|
309 |
%ifarch ppc |
310 |
%patch1200 -p0 |
311 |
%patch1201 -p1 |
312 |
%endif |
313 |
|
314 |
#LSB (sb) |
315 |
%patch1202 -p1 |
316 |
|
317 |
#fix build on alpha with newer kernel-headers |
318 |
%ifarch alpha |
319 |
%patch1203 -p1 |
320 |
%endif |
321 |
|
322 |
%patch111 -p1 -b .mkfsman |
323 |
%patch114 -p0 -b .dumboctal |
324 |
%patch115 -p1 -b .fix-ioctl |
325 |
%patch116 -p0 -b .autodav |
326 |
|
327 |
%patch1100 -p1 -b .loopAES |
328 |
%patch1101 -p0 -b .swapon-encrypted |
329 |
%patch1102 -p0 -b .loopAES-password |
330 |
%patch1103 -p0 -b .load-module |
331 |
%patch1104 -p1 -b .set-as-encrypted |
332 |
|
333 |
%patch1300 -p1 -b .CHANGE-FD |
334 |
|
335 |
%patch1207 -p1 -b .users |
336 |
%patch1212 -p1 -b .sparc |
337 |
%patch1218 -p1 -b .silly |
338 |
%patch1219 -p0 |
339 |
|
340 |
%patch20 -p1 -b .agetty-s |
341 |
%patch21 -p1 -b .fsck-l |
342 |
|
343 |
# rebuild build system for loop-AES patch |
344 |
./autogen.sh |
345 |
|
346 |
%build |
347 |
%serverbuild |
348 |
unset LINGUAS || : |
349 |
|
350 |
# CFLAGS |
351 |
%define make_cflags -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 |
352 |
|
353 |
export CONFIGURE_TOP="`pwd`" |
354 |
|
355 |
%if %{with uclibc} |
356 |
mkdir -p uclibc |
357 |
pushd uclibc |
358 |
%configure2_5x CC="%{uclibc_cc}" \ |
359 |
CFLAGS="%{uclibc_cflags} %{make_cflags}" \ |
360 |
--enable-shared=no \ |
361 |
--enable-static=yes \ |
362 |
--without-ncurses \ |
363 |
--with-ncurses |
364 |
|
365 |
%make -C shlibs |
366 |
popd |
367 |
%endif |
368 |
|
369 |
mkdir -p system |
370 |
pushd system |
371 |
export CFLAGS="%{make_cflags} %{optflags} -Os" |
372 |
%configure2_5x \ |
373 |
--bindir=/bin \ |
374 |
--sbindir=/sbin \ |
375 |
--libdir=/%{_lib} \ |
376 |
--disable-wall \ |
377 |
--enable-partx \ |
378 |
--enable-login-utils \ |
379 |
--enable-kill \ |
380 |
--enable-write \ |
381 |
--enable-arch \ |
382 |
%if %{include_raw} |
383 |
--enable-raw \ |
384 |
%endif |
385 |
--disable-makeinstall-chown \ |
386 |
--disable-rpath \ |
387 |
--with-audit |
388 |
|
389 |
# build util-linux-ng |
390 |
%make |
391 |
|
392 |
popd |
393 |
|
394 |
# build nologin |
395 |
gcc %{optflags} -o nologin nologin.c |
396 |
|
397 |
%ifarch ppc |
398 |
gcc clock-ppc.c -o clock-ppc |
399 |
%endif |
400 |
|
401 |
# build docs |
402 |
pushd sys-utils |
403 |
makeinfo --number-sections ipc.texi |
404 |
popd |
405 |
|
406 |
%install |
407 |
rm -rf %{buildroot} |
408 |
mkdir -p %{buildroot}/{bin,sbin} |
409 |
mkdir -p %{buildroot}%{_bindir} |
410 |
mkdir -p %{buildroot}%{_infodir} |
411 |
mkdir -p %{buildroot}%{_mandir}/man{1,6,8,5} |
412 |
mkdir -p %{buildroot}%{_sbindir} |
413 |
mkdir -p %{buildroot}%{_sysconfdir}/{pam.d,security/console.apps,blkid} |
414 |
|
415 |
%if %{with uclibc} |
416 |
for lib in `find uclibc/shlibs -name libblkid.a -o -name libuuid.a`; do |
417 |
install -m644 $lib -D %{buildroot}%{uclibc_root}%{_libdir}/$(basename $lib) |
418 |
done |
419 |
%endif |
420 |
|
421 |
# install util-linux-ng |
422 |
%makeinstall_std -C system install DESTDIR=%{buildroot} MANDIR=%{buildroot}/%{_mandir} INFODIR=%{buildroot}/%{_infodir} |
423 |
|
424 |
# install nologin |
425 |
install -m 755 nologin %{buildroot}/sbin |
426 |
install -m 644 nologin.8 %{buildroot}%{_mandir}/man8 |
427 |
|
428 |
%if %{include_raw} |
429 |
echo '.so man8/raw.8' > %{buildroot}%{_mandir}/man8/rawdevices.8 |
430 |
{ |
431 |
# see RH bugzilla #216664 |
432 |
mkdir -p %{buildroot}%{_sysconfdir}/udev/rules.d |
433 |
pushd %{buildroot}%{_sysconfdir}/udev/rules.d |
434 |
install -m 644 %{SOURCE4} ./60-raw.rules |
435 |
popd |
436 |
} |
437 |
%endif |
438 |
|
439 |
# Correct mail spool path. |
440 |
perl -pi -e 's,/usr/spool/mail,/var/spool/mail,' %{buildroot}%{_mandir}/man1/login.1 |
441 |
|
442 |
%ifarch %{sunsparc} |
443 |
rm -rf %{buildroot}%{_bindir}/sunhostid |
444 |
cat << E-O-F > %{buildroot}%{_bindir}/sunhostid |
445 |
#!/bin/sh |
446 |
# this should be %{_bindir}/sunhostid or somesuch. |
447 |
# Copyright 1999 Peter Jones, <pjones@redhat.com> . |
448 |
# GPL and all that good stuff apply. |
449 |
( |
450 |
idprom=\`cat /proc/openprom/idprom\` |
451 |
echo \$idprom|dd bs=1 skip=2 count=2 |
452 |
echo \$idprom|dd bs=1 skip=27 count=6 |
453 |
echo |
454 |
) 2>/dev/null |
455 |
E-O-F |
456 |
chmod 755 %{buildroot}%{_bindir}/sunhostid |
457 |
%endif |
458 |
|
459 |
#gzip -9nf %{buildroot}%{_infodir}/ipc.info |
460 |
|
461 |
# PAM settings |
462 |
{ |
463 |
pushd %{buildroot}%{_sysconfdir}/pam.d |
464 |
install -m 644 %{SOURCE1} ./login |
465 |
install -m 644 %{SOURCE2} ./remote |
466 |
install -m 644 %{SOURCE3} ./chsh |
467 |
install -m 644 %{SOURCE3} ./chfn |
468 |
popd |
469 |
} |
470 |
|
471 |
# This has dependencies on stuff in /usr |
472 |
mv %{buildroot}{/sbin/,/usr/sbin}/cfdisk |
473 |
|
474 |
%ifarch ppc |
475 |
cp -f ./clock-ppc %{buildroot}/sbin/clock-ppc |
476 |
mv %{buildroot}/sbin/hwclock %{buildroot}/sbin/clock-rs6k |
477 |
ln -sf clock-rs6k %{buildroot}/sbin/hwclock |
478 |
%endif |
479 |
ln -sf ../../sbin/hwclock %{buildroot}/usr/sbin/hwclock |
480 |
ln -sf ../../sbin/clock %{buildroot}/usr/sbin/clock |
481 |
ln -sf hwclock %{buildroot}/sbin/clock |
482 |
|
483 |
# Our own initscript for uuidd |
484 |
install -D -m 755 %{SOURCE10} %{buildroot}/etc/rc.d/init.d/uuidd |
485 |
# And a dirs uuidd needs that the makefiles don't create |
486 |
install -d %{buildroot}/var/run/uuidd |
487 |
install -d %{buildroot}/var/lib/libuuid |
488 |
|
489 |
# remove libtool junk (TODO) |
490 |
rm -f %{buildroot}/%{_lib}/libblkid.la |
491 |
|
492 |
# move flock in /bin, required for udev |
493 |
# logger is useful in initscripts while /usr isn't mounted as well |
494 |
# ionice needed for readahead_early |
495 |
for p in flock logger ionice; do |
496 |
mv %{buildroot}{%{_bindir},/bin}/$p |
497 |
ln -sf ../../bin/$p %{buildroot}%{_bindir}/$p |
498 |
done |
499 |
|
500 |
# remove stuff we don't want |
501 |
rm -f %{buildroot}%{_mandir}/man1/{line,newgrp,pg}.1* |
502 |
rm -f %{buildroot}%{_bindir}/{line,newgrp,pg} |
503 |
|
504 |
# Final cleanup |
505 |
%ifarch %no_hwclock_archs |
506 |
rm -f %{buildroot}/sbin/{hwclock,clock} %{buildroot}%{_mandir}/man8/hwclock.8* %{buildroot}/usr/sbin/{hwclock,clock} |
507 |
%endif |
508 |
%ifarch s390 s390x |
509 |
rm -f %{buildroot}/usr/{bin,sbin}/{fdformat,tunelp,floppy} %{buildroot}%{_mandir}/man8/{fdformat,tunelp,floppy}.8* |
510 |
%endif |
511 |
|
512 |
# deprecated commands |
513 |
for I in /sbin/mkfs.bfs \ |
514 |
/usr/bin/chkdupexe \ |
515 |
%{_bindir}/scriptreplay |
516 |
do |
517 |
rm -f %{buildroot}$I |
518 |
done |
519 |
|
520 |
# deprecated man pages |
521 |
for I in man1/chkdupexe.1 \ |
522 |
man8/mkfs.bfs.8 man1/scriptreplay.1; do |
523 |
rm -rf %{buildroot}%{_mandir}/${I}* |
524 |
done |
525 |
|
526 |
# we install getopt/getopt-*.{bash,tcsh} as doc files |
527 |
# note: versions <=2.12 use path "%{_datadir}/misc/getopt/*" |
528 |
chmod 644 getopt/getopt-*.{bash,tcsh} |
529 |
rm -f %{buildroot}%{_datadir}/getopt/* |
530 |
rmdir %{buildroot}%{_datadir}/getopt |
531 |
|
532 |
# /usr/sbin -> /sbin |
533 |
for I in addpart delpart partx; do |
534 |
if [ -e %{buildroot}/usr/sbin/$I ]; then |
535 |
mv %{buildroot}/usr/sbin/$I %{buildroot}/sbin/$I |
536 |
fi |
537 |
done |
538 |
|
539 |
# /usr/bin -> /bin |
540 |
for I in taskset; do |
541 |
if [ -e %{buildroot}/usr/bin/$I ]; then |
542 |
mv %{buildroot}/usr/bin/$I %{buildroot}/bin/$I |
543 |
fi |
544 |
done |
545 |
|
546 |
# /sbin -> /bin |
547 |
for I in raw; do |
548 |
if [ -e %{buildroot}/sbin/$I ]; then |
549 |
mv %{buildroot}/sbin/$I %{buildroot}/bin/$I |
550 |
fi |
551 |
done |
552 |
|
553 |
# remove vipw and vigr, they belong in shadow-utils |
554 |
rm -f %{buildroot}%{_sbindir}/{vipw,vigr} %{buildroot}%{_mandir}/man8/{vigr,vipw}.* |
555 |
|
556 |
%find_lang %{name} |
557 |
|
558 |
# the files section supports only one -f option... |
559 |
mv %{name}.lang %{name}.files |
560 |
|
561 |
# create list of setarch(8) symlinks |
562 |
find %{buildroot}%{_bindir}/ -regextype posix-egrep -type l \ |
563 |
-regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)$" \ |
564 |
-printf "%{_bindir}/%f\n" >> %{name}.files |
565 |
|
566 |
find %{buildroot}%{_mandir}/man8 -regextype posix-egrep \ |
567 |
-regex ".*(linux32|linux64|s390|s390x|i386|ppc|ppc64|ppc32|sparc|sparc64|sparc32|sparc32bash|mips|mips64|mips32|ia64|x86_64)\.8.*" \ |
568 |
-printf "%{_mandir}/man8/%f*\n" >> %{name}.files |
569 |
|
570 |
%clean |
571 |
rm -rf %{buildroot} |
572 |
|
573 |
%post |
574 |
%_install_info ipc.info |
575 |
%ifarch ppc |
576 |
ISCHRP=`grep CHRP /proc/cpuinfo` |
577 |
if [ -z "$ISCHRP" ]; then |
578 |
ln -sf /sbin/clock-ppc /sbin/hwclock |
579 |
fi |
580 |
%endif |
581 |
|
582 |
%preun |
583 |
%_remove_install_info ipc.info |
584 |
|
585 |
%post -n %{lib_blkid} |
586 |
[ -e /etc/blkid.tab ] && mv /etc/blkid.tab /etc/blkid/blkid.tab || : |
587 |
[ -e /etc/blkid.tab.old ] && mv /etc/blkid.tab.old /etc/blkid/blkid.tab.old || : |
588 |
|
589 |
%pre -n uuidd |
590 |
%_pre_useradd uuidd /var/lib/libuuid /bin/false |
591 |
%_pre_groupadd uuidd uuidd |
592 |
|
593 |
%preun -n uuidd |
594 |
%_preun_service uuidd |
595 |
|
596 |
%files -f %{name}.files |
597 |
%defattr(-,root,root) |
598 |
%doc */README.* NEWS AUTHORS |
599 |
%doc getopt/getopt-*.{bash,tcsh} |
600 |
%doc docs/*-ReleaseNotes |
601 |
/bin/arch |
602 |
/bin/dmesg |
603 |
%attr(755,root,root) /bin/login |
604 |
/bin/more |
605 |
/bin/kill |
606 |
/bin/taskset |
607 |
/bin/ionice |
608 |
/bin/findmnt |
609 |
%if %{include_raw} |
610 |
/bin/raw |
611 |
%config %{_sysconfdir}/udev/rules.d/60-raw.rules |
612 |
%endif |
613 |
%config(noreplace) %{_sysconfdir}/pam.d/chfn |
614 |
%config(noreplace) %{_sysconfdir}/pam.d/chsh |
615 |
%config(noreplace) %{_sysconfdir}/pam.d/login |
616 |
%config(noreplace) %{_sysconfdir}/pam.d/remote |
617 |
/sbin/agetty |
618 |
%{_mandir}/man8/agetty.8* |
619 |
/sbin/blkid |
620 |
/sbin/blockdev |
621 |
/sbin/pivot_root |
622 |
/sbin/ctrlaltdel |
623 |
/sbin/addpart |
624 |
/sbin/delpart |
625 |
/sbin/partx |
626 |
/sbin/fsfreeze |
627 |
/sbin/swaplabel |
628 |
%{_mandir}/man8/partx.8* |
629 |
%{_mandir}/man8/addpart.8* |
630 |
%{_mandir}/man8/delpart.8* |
631 |
%{_mandir}/man8/findmnt.8* |
632 |
%{_mandir}/man8/fsfreeze.8* |
633 |
%{_mandir}/man8/swaplabel.8* |
634 |
%ifarch %ix86 alpha ia64 x86_64 s390 s390x ppc ppc64 %{sunsparc} %mips %arm |
635 |
/sbin/sfdisk |
636 |
%{_mandir}/man8/sfdisk.8* |
637 |
%doc fdisk/sfdisk.examples |
638 |
%{_sbindir}/cfdisk |
639 |
%{_mandir}/man8/cfdisk.8* |
640 |
%endif |
641 |
/sbin/fdisk |
642 |
%{_mandir}/man8/fdisk.8* |
643 |
%ifnarch %no_hwclock_archs |
644 |
/sbin/clock |
645 |
%{_sbindir}/clock |
646 |
/sbin/hwclock |
647 |
/usr/sbin/hwclock |
648 |
%{_mandir}/man8/hwclock.8* |
649 |
%endif |
650 |
%ifarch ppc |
651 |
/sbin/clock-ppc |
652 |
/sbin/clock-rs6k |
653 |
%endif |
654 |
/sbin/findfs |
655 |
/sbin/fsck |
656 |
/sbin/mkfs |
657 |
/sbin/mkswap |
658 |
/sbin/nologin |
659 |
%{_mandir}/man8/nologin.8* |
660 |
%{_bindir}/chrt |
661 |
%{_bindir}/ionice |
662 |
%{_bindir}/cal |
663 |
%attr(4711,root,root) %{_bindir}/chfn |
664 |
%attr(4711,root,root) %{_bindir}/chsh |
665 |
%{_bindir}/col |
666 |
%{_bindir}/colcrt |
667 |
%{_bindir}/colrm |
668 |
%{_bindir}/column |
669 |
%ifarch %ix86 alpha ppc ppc64 %{sunsparc} x86_64 %mips %arm |
670 |
%{_bindir}/cytune |
671 |
%{_mandir}/man8/cytune.8* |
672 |
%endif |
673 |
%{_bindir}/ddate |
674 |
%ifnarch s390 s390x |
675 |
%{_sbindir}/fdformat |
676 |
%endif |
677 |
/bin/flock |
678 |
%{_bindir}/flock |
679 |
%{_bindir}/fallocate |
680 |
%{_bindir}/getopt |
681 |
%{_bindir}/hexdump |
682 |
%{_bindir}/ipcrm |
683 |
%{_bindir}/ipcs |
684 |
%{_bindir}/isosize |
685 |
/bin/logger |
686 |
%{_bindir}/logger |
687 |
%{_bindir}/look |
688 |
%{_bindir}/mcookie |
689 |
%ifarch %ix86 alpha ia64 x86_64 s390 s390x ppc ppc64 %{sunsparc} %mips %arm |
690 |
/sbin/fsck.cramfs |
691 |
/sbin/mkfs.cramfs |
692 |
%endif |
693 |
/sbin/fsck.minix |
694 |
/sbin/mkfs.minix |
695 |
%{_bindir}/namei |
696 |
%{_bindir}/rename |
697 |
%{_bindir}/renice |
698 |
%{_bindir}/rev |
699 |
%{_bindir}/script |
700 |
%{_bindir}/setarch |
701 |
%{_bindir}/setsid |
702 |
%{_bindir}/setterm |
703 |
%ifarch %{sunsparc} |
704 |
%{_bindir}/sunhostid |
705 |
%endif |
706 |
%{_bindir}/tailf |
707 |
%{_bindir}/ul |
708 |
%{_bindir}/unshare |
709 |
%{_bindir}/uuidgen |
710 |
%{_bindir}/whereis |
711 |
%{_bindir}/ipcmk |
712 |
%{_bindir}/lscpu |
713 |
%attr(2755,root,tty) %{_bindir}/write |
714 |
%{_sbindir}/readprofile |
715 |
%ifnarch s390 s390x |
716 |
%{_sbindir}/tunelp |
717 |
%endif |
718 |
%{_sbindir}/rtcwake |
719 |
%{_sbindir}/ldattach |
720 |
%{_infodir}/ipc.info* |
721 |
%{_mandir}/man1/arch.1* |
722 |
%{_mandir}/man1/cal.1* |
723 |
%{_mandir}/man1/chfn.1* |
724 |
%{_mandir}/man1/chsh.1* |
725 |
%{_mandir}/man1/col.1* |
726 |
%{_mandir}/man1/colcrt.1* |
727 |
%{_mandir}/man1/colrm.1* |
728 |
%{_mandir}/man1/column.1* |
729 |
%{_mandir}/man1/ddate.1* |
730 |
%{_mandir}/man1/flock.1* |
731 |
%{_mandir}/man1/fallocate.1* |
732 |
%{_mandir}/man1/getopt.1* |
733 |
%{_mandir}/man1/hexdump.1* |
734 |
%{_mandir}/man1/kill.1* |
735 |
%{_mandir}/man1/logger.1* |
736 |
%{_mandir}/man1/login.1* |
737 |
%{_mandir}/man1/look.1* |
738 |
%{_mandir}/man1/mcookie.1* |
739 |
%{_mandir}/man1/more.1* |
740 |
%{_mandir}/man1/namei.1* |
741 |
%{_mandir}/man1/readprofile.1* |
742 |
%{_mandir}/man1/rename.1* |
743 |
%{_mandir}/man1/rev.1* |
744 |
%{_mandir}/man1/script.1* |
745 |
%{_mandir}/man1/setterm.1* |
746 |
%{_mandir}/man1/tailf.1* |
747 |
%{_mandir}/man1/ul.1* |
748 |
%{_mandir}/man1/uuidgen.1* |
749 |
%{_mandir}/man1/unshare.1* |
750 |
%{_mandir}/man1/whereis.1* |
751 |
%{_mandir}/man1/write.1* |
752 |
%{_mandir}/man1/chrt.1* |
753 |
%{_mandir}/man1/ionice.1* |
754 |
%{_mandir}/man1/taskset.1* |
755 |
%{_mandir}/man1/renice.1* |
756 |
%{_mandir}/man1/ipcrm.1* |
757 |
%{_mandir}/man1/ipcs.1* |
758 |
%{_mandir}/man1/setsid.1* |
759 |
%{_mandir}/man1/dmesg.1* |
760 |
%{_mandir}/man1/ipcmk.1* |
761 |
%{_mandir}/man1/lscpu.1* |
762 |
%{_mandir}/man8/blockdev.8* |
763 |
%{_mandir}/man8/blkid.8* |
764 |
%{_mandir}/man8/ctrlaltdel.8* |
765 |
%ifnarch s390 s390x |
766 |
%{_mandir}/man8/fdformat.8* |
767 |
%endif |
768 |
%{_mandir}/man8/findfs.8* |
769 |
%{_mandir}/man8/fsck.8* |
770 |
%{_mandir}/man8/isosize.8* |
771 |
%{_mandir}/man8/mkfs.8* |
772 |
%{_mandir}/man8/mkswap.8* |
773 |
%{_mandir}/man8/pivot_root.8* |
774 |
%if %{include_raw} |
775 |
%{_mandir}/man8/raw.8* |
776 |
%{_mandir}/man8/rawdevices.8* |
777 |
%endif |
778 |
%ifnarch s390 s390x |
779 |
%{_mandir}/man8/tunelp.8* |
780 |
%endif |
781 |
%{_mandir}/man8/setarch.8* |
782 |
%{_mandir}/man8/rtcwake.8* |
783 |
%{_mandir}/man8/ldattach.8* |
784 |
%{_mandir}/man8/wipefs.8* |
785 |
%{_mandir}/man8/fsck.minix.8* |
786 |
%{_mandir}/man8/mkfs.minix.8* |
787 |
%attr(4755,root,root) /bin/mount |
788 |
%attr(4755,root,root) /bin/umount |
789 |
/sbin/swapon |
790 |
/sbin/swapoff |
791 |
/sbin/switch_root |
792 |
%{_mandir}/man5/fstab.5* |
793 |
%{_mandir}/man8/mount.8* |
794 |
%{_mandir}/man8/swapoff.8* |
795 |
%{_mandir}/man8/swapon.8* |
796 |
%{_mandir}/man8/switch_root.8* |
797 |
%{_mandir}/man8/umount.8* |
798 |
%{_mandir}/man8/losetup.8* |
799 |
/sbin/losetup |
800 |
/sbin/wipefs |
801 |
|
802 |
%files -n uuidd |
803 |
%defattr(-,root,root) |
804 |
%{_initrddir}/uuidd |
805 |
%{_mandir}/man8/uuidd.8* |
806 |
%attr(-, uuidd, uuidd) %{_sbindir}/uuidd |
807 |
%dir %attr(2775, uuidd, uuidd) /var/lib/libuuid |
808 |
%dir %attr(2775, uuidd, uuidd) /var/run/uuidd |
809 |
|
810 |
%files -n %{lib_blkid} |
811 |
%defattr(-,root,root) |
812 |
%dir /etc/blkid |
813 |
/%{_lib}/libblkid.so.%{lib_blkid_major}* |
814 |
|
815 |
%files -n %{lib_blkid_devel} |
816 |
%defattr(-,root,root) |
817 |
%{_libdir}/libblkid.a |
818 |
%if %{with uclibc} |
819 |
%{uclibc_root}%{_libdir}/libblkid.a |
820 |
%endif |
821 |
%{_libdir}/libblkid.la |
822 |
%{_libdir}/libblkid.so |
823 |
%{_includedir}/blkid |
824 |
%{_mandir}/man3/libblkid.3* |
825 |
%{_libdir}/pkgconfig/blkid.pc |
826 |
|
827 |
%files -n %{lib_uuid} |
828 |
%defattr(-,root,root) |
829 |
/%{_lib}/libuuid.so.%{lib_uuid_major}* |
830 |
|
831 |
%files -n %{lib_uuid_devel} |
832 |
%defattr(-,root,root) |
833 |
%{_libdir}/libuuid.a |
834 |
%if %{with uclibc} |
835 |
%{uclibc_root}%{_libdir}/libuuid.a |
836 |
%endif |
837 |
%{_libdir}/libuuid.la |
838 |
%{_libdir}/libuuid.so |
839 |
%{_includedir}/uuid |
840 |
%{_mandir}/man3/uuid.3* |
841 |
%{_mandir}/man3/uuid_clear.3* |
842 |
%{_mandir}/man3/uuid_compare.3* |
843 |
%{_mandir}/man3/uuid_copy.3* |
844 |
%{_mandir}/man3/uuid_generate.3* |
845 |
%{_mandir}/man3/uuid_generate_random.3* |
846 |
%{_mandir}/man3/uuid_generate_time.3* |
847 |
%{_mandir}/man3/uuid_is_null.3* |
848 |
%{_mandir}/man3/uuid_parse.3* |
849 |
%{_mandir}/man3/uuid_time.3* |
850 |
%{_mandir}/man3/uuid_unparse.3* |
851 |
%{_libdir}/pkgconfig/uuid.pc |
852 |
|
853 |
%files -n %{lib_mount} |
854 |
%defattr(-,root,root) |
855 |
/%{_lib}/libmount.so.%{lib_mount_major}* |
856 |
|
857 |
%files -n %{lib_mount_devel} |
858 |
%defattr(-,root,root) |
859 |
%{_includedir}/mount |
860 |
%{_libdir}/libmount.so |
861 |
%{_libdir}/libmount.*a |
862 |
%{_libdir}/pkgconfig/mount.pc |
863 |
|
864 |
|