1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
12 url = https://github.com/karelzak/util-linux
13 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
14 summary = A collection of basic system utilities.
17 The util-linux package contains a large variety of low-level system
18 utilities that are necessary for a Linux system to function. Among
19 others, Util-linux contains the fdisk configuration tool and the login
23 source_dl = https://www.kernel.org/pub/linux/utils/%{name}/v%{version}/
43 -D_LARGEFILE64_SOURCE \
44 -D_FILE_OFFSET_BITS=64
46 configure_options += \
47 --with-systemdsystemunitdir=%{unitdir} \
57 --disable-makeinstall-chown \
63 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
64 -i $(grep -rl '/etc/adjtime' .)
69 gcc %{CFLAGS} %{LDFLAGS} -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
137 bash-completion <= 2.1-2
144 preprequires += coreutils
147 touch /var/log/lastlog
151 ln -s /proc/mounts /etc/mtab
155 # Package information for libblkid
157 summary = Block device ID library.
159 This is the block device identification library,
163 conflicts = filesystem < 002
170 # Package information for libblkid-devel
171 package libblkid-devel
172 summary = Development library and header of libblkid.
173 description = %{summary}
181 %{libdir}/libblkid.so
182 %{libdir}/pkgconfig/blkid.pc
183 %{mandir}/man3/*blkid*
187 # Package information for libuuid
189 summary = Universally unique ID library.
191 This is the universally unique ID library,
199 conflicts = filesystem < 002
206 # Package information for libuuid-devel
207 package libuuid-devel
208 summary = Development library and header of libuuid.
209 description = %{summary}
214 %{libdir}/pkgconfig/uuid.pc
215 %{mandir}/man3/*uuid*
219 # Package information for libmount
221 summary = Device mounting library.
223 This is the device mounting library,
227 conflicts = filesystem < 002
234 # Package information for libmount-devel
235 package libmount-devel
236 summary = Development library and header of libmount.
237 description = %{summary}
240 libblkid-devel = %{thisver}
244 %{includedir}/libmount/
245 %{libdir}/libmount.so
246 %{libdir}/pkgconfig/mount.pc
247 %{mandir}/man3/*mount*
251 # Package information for libsmartcols.
253 summary = Formatting library for ls-like programs.
255 This is a library for ls-like terminal
256 programs, part of util-linux.
260 %{libdir}/libsmartcols.*
264 # Package information for libsmartcols-devel.
265 package libsmartcols-devel
266 summary = Development library and header of libsmartcols.
267 description = %{summary}
270 %{includedir}/libsmartcols/*
271 %{libdir}/libsmartcols.so
272 %{libdir}/pkgconfig/smartcols.pc
276 # Package information for libfdisk.
278 summary = Partitioning library for fdisk-like programs.
279 description = %{summary}
286 # Package information for libfdisk-devel.
287 package libfidsk-devel
288 summary = Development library and headers of libfdisk.
289 description = %{summary}
292 %{includedir}/libfdisk/*
293 %{libdir}/libfdisk.so
294 %{libdir}/pkgconfig/fdisk.pc
299 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
301 The uuidd package contains a userspace daemon (uuidd) which guarantees
302 uniqueness of time-based UUID generation even at very high rates on
310 %{mandir}/man8/uuidd.8*
311 %{sharedstatedir}/libuuid
316 prerequires += shadow-utils
323 getent group uuidd >/dev/null || groupadd -r uuidd
324 getent passwd uuidd >/dev/null || \
325 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
326 -c "UUID generator helper daemon" uuidd
330 systemctl daemon-reload >/dev/null 2>&1 || :
331 systemctl enable uuidd.service >/dev/null 2>&1 || :
335 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
336 systemctl stop uuidd.service >/dev/null 2>&1 || :
340 systemctl daemon-reload >/dev/null 2>&1 || :
344 systemctl daemon-reload >/dev/null 2>&1 || :
345 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
349 package python3-libmount
353 package %{name}-debuginfo