1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
9 version = %{major_ver}.%{minor_ver}
12 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
14 url = http://kernel.org/~kzak/util-linux/
15 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
16 summary = A collection of basic system utilities.
19 The util-linux package contains a large variety of low-level system
20 utilities that are necessary for a Linux system to function. Among
21 others, Util-linux contains the fdisk configuration tool and the login
25 source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
43 -D_LARGEFILE64_SOURCE \
44 -D_FILE_OFFSET_BITS=64
46 configure_options += \
47 --with-systemdsystemunitdir=%{unitdir} \
54 --enable-socket-activation \
55 --enable-libmount-mount \
59 --disable-makeinstall-chown \
63 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
64 -i $(grep -rl '/etc/adjtime' .)
69 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
74 %{BUILDROOT}/var/lib/libuuid \
75 %{BUILDROOT}/var/lib/hwclock \
76 %{BUILDROOT}/usr/share/man/man8 \
77 %{BUILDROOT}/run/uuidd \
80 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
81 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
83 touch %{BUILDROOT}/var/log/lastlog
85 # Remove deprecated commands
86 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
87 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
88 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
89 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
90 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
91 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
94 chmod -v -s %{BUILDROOT}%{bindir}/mount
95 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
96 chmod -v -s %{BUILDROOT}%{bindir}/umount
97 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
99 # su (set right capabilities)
100 chmod -v u-s %{BUILDROOT}%{bindir}/su
101 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
110 /etc/pam.d/system-auth
142 preprequires += coreutils
145 touch /var/log/lastlog
149 ln -s /proc/mounts /etc/mtab
153 # Package information for libblkid
155 summary = Block device ID library.
157 This is the block device identification library,
161 conflicts = filesystem < 002
168 # Package information for libblkid-devel
169 package libblkid-devel
170 summary = Development library and header of libblkid.
171 description = %{summary}
179 %{libdir}/libblkid.so
180 %{libdir}/pkgconfig/blkid.pc
181 %{mandir}/man3/*blkid*
185 # Package information for libuuid
187 summary = Universally unique ID library.
189 This is the universally unique ID library,
197 conflicts = filesystem < 002
204 # Package information for libuuid-devel
205 package libuuid-devel
206 summary = Development library and header of libuuid.
207 description = %{summary}
212 %{libdir}/pkgconfig/uuid.pc
213 %{mandir}/man3/*uuid*
217 # Package information for libmount
219 summary = Device mounting library.
221 This is the device mounting library,
225 conflicts = filesystem < 002
232 # Package information for libmount-devel
233 package libmount-devel
234 summary = Development library and header of libmount.
235 description = %{summary}
238 %{includedir}/libmount/
239 %{libdir}/libmount.so
240 %{libdir}/pkgconfig/mount.pc
241 %{mandir}/man3/*mount*
246 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
248 The uuidd package contains a userspace daemon (uuidd) which guarantees
249 uniqueness of time-based UUID generation even at very high rates on
257 %{mandir}/man8/uuidd.8*
258 %{sharedstatedir}/libuuid
263 prerequires += shadow-utils
266 getent group uuidd >/dev/null || groupadd -r uuidd
267 getent passwd uuidd >/dev/null || \
268 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
269 -c "UUID generator helper daemon" uuidd
273 systemctl daemon-reload >/dev/null 2>&1 || :
274 systemctl enable uuidd.service >/dev/null 2>&1 || :
278 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
279 systemctl stop uuidd.service >/dev/null 2>&1 || :
283 systemctl daemon-reload >/dev/null 2>&1 || :
287 systemctl daemon-reload >/dev/null 2>&1 || :
288 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
292 package %{name}-debuginfo