############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = util-linux major_ver = 2.21 version = %{major_ver} release = 1 groups = System/Base url = http://kernel.org/~kzak/util-linux/ license = GPLv2 and GPLv2+ and BSD with advertising and Public Domain summary = A collection of basic system utilities. description The util-linux package contains a large variety of low-level system utilities that are necessary for a Linux system to function. Among others, Util-linux contains the fdisk configuration tool and the login program. end source_dl = ftp://ftp.kernel.org/pub/linux/utils/util-linux/v%{major_ver}/ build requires audit-devel gettext libcap-devel libselinux-devel libsepol-devel ncurses-devel pam-devel zlib-devel end CFLAGS += \ -D_LARGEFILE_SOURCE \ -D_LARGEFILE64_SOURCE \ -D_FILE_OFFSET_BITS=64 configure_options += \ --bindir=/bin \ --sbindir=/sbin \ --disable-wall \ --enable-kill \ --enable-login-utils \ --enable-partx \ --enable-write \ --enable-libmount-mount \ --with-selinux \ --with-audit \ --disable-makeinstall-chown \ --disable-static prepare_cmds sed -e 's@etc/adjtime@var/lib/hwclock/adjtime@g' \ -i $(grep -rl '/etc/adjtime' .) end # Build nolodin build_cmds gcc %{CFLAGS} -o nologin %{DIR_SOURCE}/nologin.c end install_cmds mkdir -pv %{BUILDROOT}/sbin \ %{BUILDROOT}/var/lib/hwclock \ %{BUILDROOT}/usr/share/man/man8 \ %{BUILDROOT}/var/log install -m 755 %{DIR_APP}/nologin %{BUILDROOT}/sbin install -m 644 %{DIR_SOURCE}/nologin.8 %{BUILDROOT}/usr/share/man/man8/ touch %{BUILDROOT}/var/log/lastlog # Remove deprecated commands rm -fv %{BUILDROOT}/{sbin,usr/share/man/man*}/{fsck,mkfs}.{bfs,minix}* \ %{BUILDROOT}/usr/{,s}bin/{chkdupexe,newgrp,vi{gr,pw}} \ %{BUILDROOT}/sbin/{sln,shutdown} %{BUILDROOT}/bin/{line,pg} rm -fv %{BUILDROOT}/usr/share/man/man1/{chkdupexe,line,pg,newgrp}.* \ %{BUILDROOT}/usr/share/man/man8/{vipw,vigr}.* rm -fv %{BUILDROOT}/usr/share/getopt/*.tcsh # Set capabilities chmod -v -s %{BUILDROOT}/bin/mount setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/mount chmod -v -s %{BUILDROOT}/bin/umount setcap CAP_DAC_OVERRIDE,CAP_SYS_ADMIN=ep %{BUILDROOT}/bin/umount end end packages package %{name} groups += Base requires /etc/pam.d/system-auth end obsoletes = util-linux-ng conflicts setup < 3.0-2 util-linux-ng sysvinit <= 2.86-2 end preprequires += coreutils script postin touch /var/log/lastlog # mtab symlink rm -f /etc/mtab ln -s /proc/mounts /etc/mtab end end # Package information for libblkid package libblkid summary = Block device ID library. description This is the block device identification library, part of util-linux. end files %{libdir}/libblkid.* end end # Package information for libblkid-devel package libblkid-devel summary = Development library and header of libblkid. description = %{summary} files %{includedir}/blkid/ %{libdir}/libblkid.so %{libdir}/pkgconfig/blkid.pc %{mandir}/man3/*blkid* end end # Package information for libuuid package libuuid summary = Universally unique ID library. description This is the universally unique ID library, part of util-linux. end files %{libdir}/libuuid.* end end # Package information for libuuid-devel package libuuid-devel summary = Development library and header of libuuid. description = %{summary} files %{includedir}/uuid/ %{libdir}/libuuid.so %{libdir}/pkgconfig/uuid.pc %{mandir}/man3/*uuid* end end # Package information for libmount package libmount summary = Device mounting library. description This is the device mounting library, part of util-linux. end files %{libdir}/libmount.* end end # Package information for libmount-devel package libmount-devel summary = Development library and header of libmount. description = %{summary} files %{includedir}/mount/ %{libdir}/libmount.so %{libdir}/pkgconfig/mount.pc %{mandir}/man3/*mount* end end package %{name}-debuginfo template DEBUGINFO end end