1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
11 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
13 url = https://github.com/karelzak/util-linux
14 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
15 summary = A collection of basic system utilities.
18 The util-linux package contains a large variety of low-level system
19 utilities that are necessary for a Linux system to function. Among
20 others, Util-linux contains the fdisk configuration tool and the login
24 source_dl = https://www.kernel.org/pub/linux/utils/%{name}/v%{ver_maj}/
44 -D_LARGEFILE64_SOURCE \
45 -D_FILE_OFFSET_BITS=64
47 configure_options += \
48 --with-systemdsystemunitdir=%{unitdir} \
58 --disable-makeinstall-chown \
64 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
65 -i $(grep -rl '/etc/adjtime' .)
70 %{BUILDROOT}/var/lib/libuuid \
71 %{BUILDROOT}/var/lib/hwclock \
72 %{BUILDROOT}/usr/share/man/man8 \
75 touch %{BUILDROOT}/var/log/lastlog
77 # Remove deprecated commands
78 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
79 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
80 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
81 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
82 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
83 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
86 chmod -v -s %{BUILDROOT}%{bindir}/mount
87 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
88 chmod -v -s %{BUILDROOT}%{bindir}/umount
89 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
91 # su (set right capabilities)
92 chmod -v u-s %{BUILDROOT}%{bindir}/su
93 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
100 /etc/pam.d/system-auth
127 bash-completion <= 2.1-2
134 preprequires += coreutils
137 touch /var/log/lastlog
141 ln -s /proc/mounts /etc/mtab
145 # Package information for libblkid
147 summary = Block device ID library.
149 This is the block device identification library,
153 conflicts = filesystem < 002
160 # Package information for libblkid-devel
161 package libblkid-devel
162 summary = Development library and header of libblkid.
163 description = %{summary}
171 %{libdir}/libblkid.so
172 %{libdir}/pkgconfig/blkid.pc
173 %{mandir}/man3/*blkid*
177 # Package information for libuuid
179 summary = Universally unique ID library.
181 This is the universally unique ID library,
189 conflicts = filesystem < 002
196 # Package information for libuuid-devel
197 package libuuid-devel
198 summary = Development library and header of libuuid.
199 description = %{summary}
204 %{libdir}/pkgconfig/uuid.pc
205 %{mandir}/man3/*uuid*
209 # Package information for libmount
211 summary = Device mounting library.
213 This is the device mounting library,
217 conflicts = filesystem < 002
224 # Package information for libmount-devel
225 package libmount-devel
226 summary = Development library and header of libmount.
227 description = %{summary}
230 libblkid-devel = %{thisver}
234 %{includedir}/libmount/
235 %{libdir}/libmount.so
236 %{libdir}/pkgconfig/mount.pc
237 %{mandir}/man3/*mount*
241 # Package information for libsmartcols.
243 summary = Formatting library for ls-like programs.
245 This is a library for ls-like terminal
246 programs, part of util-linux.
250 %{libdir}/libsmartcols.*
254 # Package information for libsmartcols-devel.
255 package libsmartcols-devel
256 summary = Development library and header of libsmartcols.
257 description = %{summary}
260 %{includedir}/libsmartcols/*
261 %{libdir}/libsmartcols.so
262 %{libdir}/pkgconfig/smartcols.pc
266 # Package information for libfdisk.
268 summary = Partitioning library for fdisk-like programs.
269 description = %{summary}
276 # Package information for libfdisk-devel.
277 package libfidsk-devel
278 summary = Development library and headers of libfdisk.
279 description = %{summary}
282 %{includedir}/libfdisk/*
283 %{libdir}/libfdisk.so
284 %{libdir}/pkgconfig/fdisk.pc
289 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
291 The uuidd package contains a userspace daemon (uuidd) which guarantees
292 uniqueness of time-based UUID generation even at very high rates on
298 %{mandir}/man8/uuidd.8*
299 %{sharedstatedir}/libuuid
304 prerequires += shadow-utils
311 getent group uuidd >/dev/null || groupadd -r uuidd
312 getent passwd uuidd >/dev/null || \
313 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
314 -c "UUID generator helper daemon" uuidd
318 systemctl daemon-reload >/dev/null 2>&1 || :
319 systemctl enable uuidd.service >/dev/null 2>&1 || :
323 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
324 systemctl stop uuidd.service >/dev/null 2>&1 || :
328 systemctl daemon-reload >/dev/null 2>&1 || :
332 systemctl daemon-reload >/dev/null 2>&1 || :
333 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
337 package python3-libmount
341 package %{name}-debuginfo