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 = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/
46 -D_LARGEFILE64_SOURCE \
47 -D_FILE_OFFSET_BITS=64
49 configure_options += \
50 --with-systemdsystemunitdir=%{unitdir} \
61 --disable-makeinstall-chown \
67 sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \
68 -i $(grep -rl '/etc/adjtime' .)
73 gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c
78 %{BUILDROOT}/var/lib/libuuid \
79 %{BUILDROOT}/var/lib/hwclock \
80 %{BUILDROOT}/usr/share/man/man8 \
81 %{BUILDROOT}/run/uuidd \
84 install -m 755 %{DIR_APP}/nologin %{BUILDROOT}%{sbindir}
85 install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/
87 touch %{BUILDROOT}/var/log/lastlog
89 # Remove deprecated commands
90 rm -fv %{BUILDROOT}/{%{sbindir},usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \
91 %{BUILDROOT}{%{bindir},%{sbindir}}/{chkdupexe,newgrp,vi{gr,pw}} \
92 %{BUILDROOT}%{sbindir}/{sln,shutdown} %{BUILDROOT}%{bindir}/{line,pg}
93 rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \
94 %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.*
95 rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh
98 chmod -v -s %{BUILDROOT}%{bindir}/mount
99 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/mount
100 chmod -v -s %{BUILDROOT}%{bindir}/umount
101 setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}%{bindir}/umount
103 # su (set right capabilities)
104 chmod -v u-s %{BUILDROOT}%{bindir}/su
105 setcap cap_setgid,cap_setuid+ep %{BUILDROOT}%{bindir}/su
114 /etc/pam.d/system-auth
141 bash-completion <= 2.1-2
148 preprequires += coreutils
151 touch /var/log/lastlog
155 ln -s /proc/mounts /etc/mtab
159 # Package information for libblkid
161 summary = Block device ID library.
163 This is the block device identification library,
167 conflicts = filesystem < 002
174 # Package information for libblkid-devel
175 package libblkid-devel
176 summary = Development library and header of libblkid.
177 description = %{summary}
185 %{libdir}/libblkid.so
186 %{libdir}/pkgconfig/blkid.pc
187 %{mandir}/man3/*blkid*
191 # Package information for libuuid
193 summary = Universally unique ID library.
195 This is the universally unique ID library,
203 conflicts = filesystem < 002
210 # Package information for libuuid-devel
211 package libuuid-devel
212 summary = Development library and header of libuuid.
213 description = %{summary}
218 %{libdir}/pkgconfig/uuid.pc
219 %{mandir}/man3/*uuid*
223 # Package information for libmount
225 summary = Device mounting library.
227 This is the device mounting library,
231 conflicts = filesystem < 002
238 # Package information for libmount-devel
239 package libmount-devel
240 summary = Development library and header of libmount.
241 description = %{summary}
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
277 summary = Helper daemon to guarantee uniqueness of time-based UUIDs.
279 The uuidd package contains a userspace daemon (uuidd) which guarantees
280 uniqueness of time-based UUID generation even at very high rates on
288 %{mandir}/man8/uuidd.8*
289 %{sharedstatedir}/libuuid
294 prerequires += shadow-utils
301 getent group uuidd >/dev/null || groupadd -r uuidd
302 getent passwd uuidd >/dev/null || \
303 useradd -r -g uuidd -d %{sharedstatedir}/libuuid -s /sbin/nologin \
304 -c "UUID generator helper daemon" uuidd
308 systemctl daemon-reload >/dev/null 2>&1 || :
309 systemctl enable uuidd.service >/dev/null 2>&1 || :
313 systemctl --no-reload disable uuidd.service >/dev/null 2>&1 || :
314 systemctl stop uuidd.service >/dev/null 2>&1 || :
318 systemctl daemon-reload >/dev/null 2>&1 || :
322 systemctl daemon-reload >/dev/null 2>&1 || :
323 systemctl try-restart uuidd.service >/dev/null 2>&1 || :
327 package python3-libmount
331 package %{name}-debuginfo