1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
9 #version = %{major_ver}
10 version = %{major_ver}.%{minor_ver}
13 maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
15 url = https://github.com/karelzak/util-linux
16 license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain
17 summary = A collection of basic system utilities.
20 The util-linux package contains a large variety of low-level system
21 utilities that are necessary for a Linux system to function. Among
22 others, Util-linux contains the fdisk configuration tool and the login
26 source_dl = https://www.kernel.org/pub/linux/utils/%{name}/v%{major_ver}/
45 -D_LARGEFILE64_SOURCE \
46 -D_FILE_OFFSET_BITS=64
48 configure_options += \
49 --with-systemdsystemunitdir=%{unitdir} \
59 --disable-makeinstall-chown \
65 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
66 -i $(grep -rl '/etc/adjtime' .)
71 gcc %{CFLAGS} %{LDFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
76 %{BUILDROOT}/var/lib/libuuid \
77 %{BUILDROOT}/var/lib/hwclock \
78 %{BUILDROOT}/usr/share/man/man8 \
79 %{BUILDROOT}/run/uuidd \
82 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
83 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
85 touch %{BUILDROOT}/var/log/lastlog
87 # Remove deprecated commands
88 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
89 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
90 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
91 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
92 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
93 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
96 chmod -v -s %{BUILDROOT}%{bindir}/mount
97 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
98 chmod -v -s %{BUILDROOT}%{bindir}/umount
99 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
101 # su (set right capabilities)
102 chmod -v u-s %{BUILDROOT}%{bindir}/su
103 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
112 /etc/pam.d/system-auth
139 bash-completion <= 2.1-2
146 preprequires += coreutils
149 touch /var/log/lastlog
153 ln -s /proc/mounts /etc/mtab
157 # Package information for libblkid
159 summary = Block device ID library.
161 This is the block device identification library,
165 conflicts = filesystem < 002
172 # Package information for libblkid-devel
173 package libblkid-devel
174 summary = Development library and header of libblkid.
175 description = %{summary}
183 %{libdir}/libblkid.so
184 %{libdir}/pkgconfig/blkid.pc
185 %{mandir}/man3/*blkid*
189 # Package information for libuuid
191 summary = Universally unique ID library.
193 This is the universally unique ID library,
201 conflicts = filesystem < 002
208 # Package information for libuuid-devel
209 package libuuid-devel
210 summary = Development library and header of libuuid.
211 description = %{summary}
216 %{libdir}/pkgconfig/uuid.pc
217 %{mandir}/man3/*uuid*
221 # Package information for libmount
223 summary = Device mounting library.
225 This is the device mounting library,
229 conflicts = filesystem < 002
236 # Package information for libmount-devel
237 package libmount-devel
238 summary = Development library and header of libmount.
239 description = %{summary}
242 %{includedir}/libmount/
243 %{libdir}/libmount.so
244 %{libdir}/pkgconfig/mount.pc
245 %{mandir}/man3/*mount*
249 # Package information for libsmartcols.
251 summary = Formatting library for ls-like programs.
253 This is a library for ls-like terminal
254 programs, part of util-linux.
258 %{libdir}/libsmartcols.*
262 # Package information for libsmartcols-devel.
263 package libsmartcols-devel
264 summary = Development library and header of libsmartcols.
265 description = %{summary}
268 %{includedir}/libsmartcols/*
269 %{libdir}/libsmartcols.so
270 %{libdir}/pkgconfig/smartcols.pc
274 # Package information for libfdisk.
276 summary = Partitioning library for fdisk-like programs.
277 description = %{summary}
284 # Package information for libfdisk-devel.
285 package libfidsk-devel
286 summary = Development library and headers of libfdisk.
287 description = %{summary}
290 %{includedir}/libfdisk/*
291 %{libdir}/libfdisk.so
292 %{libdir}/pkgconfig/fdisk.pc
297 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
299 The uuidd package contains a userspace daemon (uuidd) which guarantees
300 uniqueness of time-based UUID generation even at very high rates on
308 %{mandir}/man8/uuidd.8*
309 %{sharedstatedir}/libuuid
314 prerequires += shadow-utils
321 getent group uuidd >/dev/null || groupadd -r uuidd
322 getent passwd uuidd >/dev/null || \
323 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
324 -c "UUID generator helper daemon" uuidd
328 systemctl daemon-reload >/dev/null 2>&1 || :
329 systemctl enable uuidd.service >/dev/null 2>&1 || :
333 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
334 systemctl stop uuidd.service >/dev/null 2>&1 || :
338 systemctl daemon-reload >/dev/null 2>&1 || :
342 systemctl daemon-reload >/dev/null 2>&1 || :
343 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
347 package python3-libmount
351 package %{name}-debuginfo