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