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 = https://github.com/karelzak/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}/
47 -D_LARGEFILE64_SOURCE \
48 -D_FILE_OFFSET_BITS=64
50 configure_options += \
51 --with-systemdsystemunitdir=%{unitdir} \
63 --disable-makeinstall-chown \
69 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
70 -i $(grep -rl '/etc/adjtime' .)
75 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
80 %{BUILDROOT}/var/lib/libuuid \
81 %{BUILDROOT}/var/lib/hwclock \
82 %{BUILDROOT}/usr/share/man/man8 \
83 %{BUILDROOT}/run/uuidd \
86 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
87 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
89 touch %{BUILDROOT}/var/log/lastlog
91 # Remove deprecated commands
92 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
93 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
94 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
95 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
96 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
97 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
100 chmod -v -s %{BUILDROOT}%{bindir}/mount
101 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
102 chmod -v -s %{BUILDROOT}%{bindir}/umount
103 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
105 # su (set right capabilities)
106 chmod -v u-s %{BUILDROOT}%{bindir}/su
107 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
116 /etc/pam.d/system-auth
143 bash-completion <= 2.1-2
150 preprequires += coreutils
153 touch /var/log/lastlog
157 ln -s /proc/mounts /etc/mtab
161 # Package information for libblkid
163 summary = Block device ID library.
165 This is the block device identification library,
169 conflicts = filesystem < 002
176 # Package information for libblkid-devel
177 package libblkid-devel
178 summary = Development library and header of libblkid.
179 description = %{summary}
187 %{libdir}/libblkid.so
188 %{libdir}/pkgconfig/blkid.pc
189 %{mandir}/man3/*blkid*
193 # Package information for libuuid
195 summary = Universally unique ID library.
197 This is the universally unique ID library,
205 conflicts = filesystem < 002
212 # Package information for libuuid-devel
213 package libuuid-devel
214 summary = Development library and header of libuuid.
215 description = %{summary}
220 %{libdir}/pkgconfig/uuid.pc
221 %{mandir}/man3/*uuid*
225 # Package information for libmount
227 summary = Device mounting library.
229 This is the device mounting library,
233 conflicts = filesystem < 002
240 # Package information for libmount-devel
241 package libmount-devel
242 summary = Development library and header of libmount.
243 description = %{summary}
246 %{includedir}/libmount/
247 %{libdir}/libmount.so
248 %{libdir}/pkgconfig/mount.pc
249 %{mandir}/man3/*mount*
253 # Package information for libsmartcols.
255 summary = Formatting library for ls-like programs.
257 This is a library for ls-like terminal
258 programs, part of util-linux.
262 %{libdir}/libsmartcols.*
266 # Package information for libsmartcols-devel.
267 package libsmartcols-devel
268 summary = Development library and header of libsmartcols.
269 description = %{summary}
272 %{includedir}/libsmartcols/*
273 %{libdir}/libsmartcols.so
274 %{libdir}/pkgconfig/smartcols.pc
279 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
281 The uuidd package contains a userspace daemon (uuidd) which guarantees
282 uniqueness of time-based UUID generation even at very high rates on
290 %{mandir}/man8/uuidd.8*
291 %{sharedstatedir}/libuuid
296 prerequires += shadow-utils
303 getent group uuidd >/dev/null || groupadd -r uuidd
304 getent passwd uuidd >/dev/null || \
305 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
306 -c "UUID generator helper daemon" uuidd
310 systemctl daemon-reload >/dev/null 2>&1 || :
311 systemctl enable uuidd.service >/dev/null 2>&1 || :
315 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
316 systemctl stop uuidd.service >/dev/null 2>&1 || :
320 systemctl daemon-reload >/dev/null 2>&1 || :
324 systemctl daemon-reload >/dev/null 2>&1 || :
325 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
329 package python3-libmount
333 package %{name}-debuginfo