%define majorminor %(echo %version | cut -d. -f 1-2) # '/bin/raw' is deprecated (applications needing raw device access # should open regular block devices with O_DIRECT) %define build_raw 1 %define uuidd_groupid 65052 %define uuidd_userid 65052 Name: util-linux Version: 2.28.1 Release: 1mamba Epoch: 1 Summary: Miscellaneous utilities for Linux Group: System/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://www.kernel.org/pub/linux/utils/util-linux/ Source0: http://www.kernel.org/pub/linux/utils/util-linux/v%{majorminor}/util-linux-%{version}.tar.xz Source1: util-linux-nologin.c Source2: util-linux-nologin.8 Source3: util-linux-ng-60-raw.rules Source4: util-linux-pam-su Source5: util-linux-pam-login Source6: util-linux-pam-su-l Source7: util-linux-login.access Source8: util-linux-login.defs Source9: util-linux-pam-runuser Source10: util-linux-pam-runuser-l Source11: util-linux-pam-remote Source12: util-linux-pam-chfn Source13: util-linux-pam-chsh Patch0: %{name}-ng-2.12q-adjtime_path.patch Patch1: %{name}-ng-2.15-reiserfs_fix_name.patch Patch2: util-linux-2.22-su_paths.patch Patch3: util-linux-2.24.2-blkid-pkgconfig-add-uuid.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: elfutils-devel BuildRequires: glibc-devel BuildRequires: libaudit-devel BuildRequires: libcap-ng-devel BuildRequires: libgcrypt-devel BuildRequires: libgpg-error-devel BuildRequires: liblzma-devel BuildRequires: libncurses-devel BuildRequires: libpam-devel BuildRequires: libpcre-devel BuildRequires: libpython-devel BuildRequires: libpython27-devel %if "%{stage1}" != "1" BuildRequires: libselinux-devel %endif BuildRequires: libsepol-devel BuildRequires: libsystemd-devel BuildRequires: libtermcap-devel BuildRequires: libudev-devel BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: bash BuildRequires: gettext-devel BuildRequires: libsepol-devel BuildRequires: libslang-devel BuildRequires: pam-devel BuildRequires: perl-devel BuildRequires: texinfo BuildRequires: zlib-devel Requires(post):%{__install_info} Provides: util-linux-ng = %{?epoch:%epoch:}%{version}-%{release} Obsoletes: util-linux-ng Provides: uuidd Obsoletes: uuidd Provides: eject Obsoletes: eject Requires: libuuid = %{?epoch:%epoch:}%{version}-%{release} Requires: libblkid = %{?epoch:%epoch:}%{version}-%{release} Requires: libmount = %{?epoch:%epoch:}%{version}-%{release} %systemd_requires BuildRoot: %{_tmppath}/%{name}-%{version}-root %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. %package -n libblkid Summary: Block device identification library Group: System/Libraries Requires: libmount = %{?epoch:%epoch:}%{version}-%{release} %description -n libblkid Block device identification library. %package -n libblkid-devel Summary: The development file for application which use libblkid Group: Development/Libraries Requires: libblkid = %{?epoch:%epoch:}%{version}-%{release} %description -n libblkid-devel Block device identification library. This package provides the development file for application which use libblkid. %package -n libsmartcols Summary: Pretty output library Group: System/Libraries %description -n libsmartcols Pretty output library. %package -n libsmartcols-devel Summary: The development file for application which use libsmartcols Group: Development/Libraries Requires: libsmartcols = %{?epoch:%epoch:}%{version}-%{release} %description -n libsmartcols-devel Pretty output library. This package provides the development file for application which use libsmartcols. %package -n libuuid Summary: Universal unique id library Group: System/Libraries %description -n libuuid Universal unique id library. %package -n libuuid-devel Summary: The development file for application which use libuuid Group: Development/Libraries Requires: libuuid = %{?epoch:%epoch:}%{version}-%{release} %description -n libuuid-devel Universal unique id library. This package provides the development file for application which use libuuid. %package -n libmount Summary: Mount library Group: System/Libraries Requires: libblkid = %{?epoch:%epoch:}%{version}-%{release} %description -n libmount Mount library. %package -n libmount-devel Summary: The development file for application which use libmount Group: Development/Libraries Requires: libmount = %{?epoch:%epoch:}%{version}-%{release} %description -n libmount-devel Mount library. This package provides the development file for application which use libmount. %package -n libfdisk Summary: Fdisk library Group: System/Libraries %description -n libfdisk Fdisk library. %package -n libfdisk-devel Summary: The development file for application which use libfdisk Group: Development/Libraries Requires: libfdisk = %{?epoch:%epoch:}%{version}-%{release} %description -n libfdisk-devel Fdisk library. This package provides the development file for application which use libfdisk. %prep %setup -q #%patch0 -p1 -b .adjtime_path #%patch1 -p1 #%patch2 -p1 %patch3 -p1 cp %{S:1} nologin.c %build %configure \ --bindir=/bin \ --sbindir=/sbin \ --disable-use-tty-group \ --disable-elvtune \ --disable-login-utils \ --disable-kill \ --enable-partx \ %if %{build_raw} --enable-raw \ %endif --enable-wall \ --enable-write \ --enable-arch \ %if "%{stage1}" != "1" --with-selinux \ %endif --disable-makeinstall-chown \ --disable-rpath \ --with-ncurses # --libdir=/%{_lib} \ %make CC="%{_target_platform}-gcc -std=gnu99" READLINE_LIBS="-lreadline -lncurses" # build nologin %{_target_platform}-gcc %{optflags} -o nologin nologin.c %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} #install -d %{buildroot}/var/lib/hwclock %makeinstall # note: versions <=2.12 use path "%{_datadir}/misc/getopt/*" install -d %{buildroot}%{_datadir}/misc/getopt/ #mv %{buildroot}%{_datadir}/getopt/* \ # %{buildroot}%{_datadir}/misc/getopt/ ## note: do not install tcsh scripts to avoid dependencies on tcsh #rm %{buildroot}%{_datadir}/misc/getopt/getopt-parse.tcsh # fix some wrong paths install -d %{buildroot}/sbin for f in addpart delpart partx; do mv %{buildroot}%{_sbindir}/$f %{buildroot}/sbin/$f done install -d %{buildroot}/bin %if %{build_raw} mv %{buildroot}/sbin/raw %{buildroot}/bin/raw install -D -m644 %{S:3} %{buildroot}%{_sysconfdir}/udev/rules.d/60-raw.rules %endif mv %{buildroot}%{_bindir}/taskset %{buildroot}/bin/taskset # install nologin install -D -m 755 nologin %{buildroot}/sbin/nologin install -D -m 644 %{S:2} %{buildroot}%{_mandir}/man8/nologin.8 %if %{build_raw} echo '.so man8/raw.8' > %{buildroot}%{_mandir}/man8/rawdevices.8 %endif %find_lang %{name} # remove unpackaged files rm %{buildroot}/sbin/fsck.minix rm %{buildroot}/sbin/mkfs.{bfs,minix} install -d %{buildroot}/%{_localstatedir}/lib/libuuid # clock.txt from uuidd is a ghost file touch %{buildroot}%{_localstatedir}/lib/libuuid/clock.txt # install su and login pam files install -D -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/pam.d/su install -D -m 0644 %{S:5} %{buildroot}%{_sysconfdir}/pam.d/login install -D -m 0644 %{S:6} %{buildroot}%{_sysconfdir}/pam.d/su-l install -D -m 0644 %{S:7} %{buildroot}%{_sysconfdir}/login.access install -D -m 0644 %{S:8} %{buildroot}%{_sysconfdir}/login.defs install -D -m 0644 %{S:9} %{buildroot}%{_sysconfdir}/pam.d/runuser install -D -m 0644 %{S:10} %{buildroot}%{_sysconfdir}/pam.d/runuser-l install -D -m 0644 %{S:11} %{buildroot}%{_sysconfdir}/pam.d/remote install -D -m 0644 %{S:12} %{buildroot}%{_sysconfdir}/pam.d/chfn install -D -m 0644 %{S:13} %{buildroot}%{_sysconfdir}/pam.d/chsh # socket directory (see systemd file) install -d %{buildroot}%{_localstatedir}/uuid %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %pre /usr/sbin/groupadd -g %{uuidd_groupid} uuidd 2>/dev/null /usr/sbin/useradd -u %{uuidd_userid} -g uuidd \ -d /var/lib/libuuid -s /bin/false -c "UUID generator helper daemon" uuidd 2>/dev/null exit 0 %post %systemd_post if [ $1 -ge 1 ]; then systemctl -q enable fstrim.timer fi : %post -n libblkid -p /sbin/ldconfig %postun -n libblkid -p /sbin/ldconfig %post -n libmount -p /sbin/ldconfig %postun -n libmount -p /sbin/ldconfig %post -n libuuid -p /sbin/ldconfig %postun -n libuuid -p /sbin/ldconfig %files -f %{name}.lang %defattr(-,root,root) %{_sysconfdir}/pam.d/chfn %{_sysconfdir}/pam.d/chsh %{_sysconfdir}/pam.d/login %{_sysconfdir}/pam.d/remote %{_sysconfdir}/pam.d/runuser %{_sysconfdir}/pam.d/runuser-l %{_sysconfdir}/pam.d/su %{_sysconfdir}/pam.d/su-l %config %{_sysconfdir}/login.access %config %{_sysconfdir}/login.defs #/bin/arch /bin/dmesg /bin/findmnt /bin/lsblk /bin/login /bin/su /bin/wdctl /sbin/sulogin /bin/more /bin/mountpoint %if %{build_raw} /bin/raw %config(noreplace) %{_sysconfdir}/udev/rules.d/60-raw.rules %endif /bin/taskset %attr(4755,root,root) /bin/mount %attr(4755,root,root) /bin/umount /sbin/addpart /sbin/agetty /sbin/blkdiscard /sbin/blkid /sbin/blockdev /sbin/cfdisk /sbin/ctrlaltdel /sbin/chcpu /sbin/delpart /sbin/fdisk /sbin/findfs /sbin/fsck /sbin/fsck.cramfs #/sbin/fsck.minix /sbin/fstrim /sbin/fsfreeze /sbin/hwclock /sbin/losetup /sbin/mkfs #/sbin/mkfs.bfs /sbin/mkfs.cramfs #/sbin/mkfs.minix /sbin/mkswap /sbin/nologin /sbin/partx /sbin/pivot_root /sbin/runuser /sbin/sfdisk /sbin/swapoff /sbin/swapon /sbin/swaplabel /sbin/switch_root /sbin/wipefs /sbin/zramctl %{_bindir}/cal %{_bindir}/chfn %{_bindir}/chrt %{_bindir}/chsh %{_bindir}/col %{_bindir}/colcrt %{_bindir}/colrm %{_bindir}/column #%{_bindir}/cytune #%{_bindir}/ddate #%{_bindir}/fdformat %{_bindir}/eject %{_bindir}/fallocate %{_bindir}/flock %{_bindir}/getopt %{_bindir}/hexdump %ifarch i586 x86_64 %{_bindir}/i386 %endif %ifarch x86_64 %{_bindir}/x86_64 %endif %ifarch ppc %{_bindir}/ppc* %endif %{_bindir}/ionice %{_bindir}/ipcrm %{_bindir}/ipcs %{_bindir}/ipcmk %{_bindir}/isosize %{_bindir}/last %{_bindir}/lastb #%{_bindir}/line %{_bindir}/linux32 %{_bindir}/linux64 %{_bindir}/logger %{_bindir}/look %{_bindir}/lscpu %{_bindir}/lsipc %{_bindir}/lslocks %{_bindir}/lslogins %{_bindir}/lsns %{_bindir}/mcookie %{_bindir}/mesg %{_bindir}/namei %{_bindir}/nsenter %{_bindir}/setpriv %{_bindir}/pg %{_bindir}/prlimit %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev %{_bindir}/script %{_bindir}/scriptreplay %{_bindir}/setarch %{_bindir}/setsid %{_bindir}/setterm %{_bindir}/tailf %{_bindir}/ul %{_bindir}/uname26 %{_bindir}/unshare %{_bindir}/utmpdump %{_bindir}/uuidgen %{_bindir}/wall %{_bindir}/whereis %{_bindir}/write %{_sbindir}/fdformat %{_sbindir}/ldattach #%{_sbindir}/ramsize #%{_sbindir}/rdev %{_sbindir}/readprofile %{_sbindir}/resizepart #%{_sbindir}/rootflags %{_sbindir}/rtcwake #%{_sbindir}/tunelp %{_sbindir}/uuidd #%{_sbindir}/vidmode /lib/systemd/system/uuidd.service /lib/systemd/system/uuidd.socket /lib/systemd/system/fstrim.service /lib/systemd/system/fstrim.timer #%{_infodir}/ipc.info.* %{_datadir}/bash-completion/completions/* %dir %{_localstatedir}/uuid %dir %{_localstatedir}/lib/libuuid %ghost %{_localstatedir}/lib/libuuid/clock.txt %{_mandir}/man1/* %{_mandir}/man5/fstab.* %{_mandir}/man5/terminal-colors.d.5* %{_mandir}/man8/* #%lang(ru) %{_mandir}/ru/man1/ddate.* #%dir /var/lib/hwclock %dir %{_docdir}/util-linux/getopt %{_docdir}/util-linux/getopt/getopt-parse.bash %{_docdir}/util-linux/getopt/getopt-parse.tcsh %doc AUTHORS README.licensing %files -n libblkid %defattr(-,root,root) %{_libdir}/libblkid.so.* %files -n libblkid-devel %defattr(-,root,root) %{_includedir}/blkid/blkid.h %{_libdir}/libblkid.a %{_libdir}/libblkid.la %{_libdir}/libblkid.so %{_libdir}/pkgconfig/blkid.pc %{_mandir}/man3/libblkid.* #%doc NEWS README %files -n libmount %defattr(-,root,root) %{_libdir}/libmount.so.* %dir %{python_sitearch}/libmount %{python_sitearch}/libmount/__init__.py* %{python_sitearch}/libmount/pylibmount.la %{python_sitearch}/libmount/pylibmount.so %files -n libmount-devel %defattr(-,root,root) %{_includedir}/libmount/libmount.h %{_libdir}/libmount.a %{_libdir}/libmount.la %{_libdir}/libmount.so %{_libdir}/pkgconfig/mount.pc %files -n libsmartcols %defattr(-,root,root) %{_libdir}/libsmartcols.so.* %files -n libsmartcols-devel %defattr(-,root,root) %dir %{_includedir}/libsmartcols %{_includedir}/libsmartcols/libsmartcols.h %{_libdir}/libsmartcols.a %{_libdir}/libsmartcols.la %{_libdir}/libsmartcols.so %{_libdir}/pkgconfig/smartcols.pc %files -n libuuid %defattr(-,root,root) %{_libdir}/libuuid.so.* %files -n libuuid-devel %defattr(-,root,root) #%{_bindir}/chkdupexe %{_includedir}/uuid/uuid.h %{_libdir}/libuuid.a %{_libdir}/libuuid.la %{_libdir}/libuuid.so %{_libdir}/pkgconfig/uuid.pc %{_mandir}/man3/uuid*.* %files -n libfdisk %defattr(-,root,root) /%{_libdir}/libfdisk.so.* %files -n libfdisk-devel %defattr(-,root,root) %dir %{_includedir}/libfdisk %{_includedir}/libfdisk/libfdisk.h %{_libdir}/libfdisk.a %{_libdir}/libfdisk.la %{_libdir}/libfdisk.so %{_libdir}/pkgconfig/fdisk.pc %changelog * Fri Aug 12 2016 Automatic Build System 2.28.1-1mamba - automatic version update by autodist * Thu May 19 2016 Automatic Build System 2.28-1mamba - automatic version update by autodist * Tue Nov 24 2015 Automatic Build System 2.27.1-1mamba - automatic version update by autodist * Thu Apr 30 2015 Automatic Build System 2.26.2-1mamba - automatic version update by autodist * Tue Mar 24 2015 Automatic Build System 2.26.1-1mamba - automatic version update by autodist * Sun Feb 22 2015 Automatic Build System 2.26-1mamba - automatic version update by autodist * Wed Jan 14 2015 Silvan Calarco 2.25.2-2mamba - enable fstrim.timer on install/upgrade * Fri Oct 24 2014 Automatic Build System 2.25.2-1mamba - automatic version update by autodist * Thu Sep 04 2014 Automatic Build System 2.25.1-1mamba - automatic version update by autodist * Sat Aug 02 2014 Silvan Calarco 2.25-2mamba - provide pam files for chfn and chsh * Tue Jul 29 2014 Automatic Build System 2.25-1mamba - automatic version update by autodist * Thu Jun 26 2014 Silvan Calarco 2.24.2-3mamba - add -luuid to blkid.pc * Tue May 06 2014 Silvan Calarco 2.24.2-2mamba - provide pam files for runuser, runuser-l and remote (login) * Thu Apr 24 2014 Automatic Build System 2.24.2-1mamba - automatic version update by autodist * Tue Jan 21 2014 Automatic Build System 2.24.1-1mamba - automatic version update by autodist * Sun Oct 27 2013 Automatic Build System 2.24-1mamba - automatic version update by autodist * Wed Jul 31 2013 Automatic Build System 2.23.2-1mamba - automatic version update by autodist * Thu Jun 27 2013 Silvan Calarco 2.23.1-2mamba - add %{_localstatedir}/uuid dir required by uuidd.socket * Tue May 28 2013 Automatic Build System 2.23.1-1mamba - automatic version update by autodist * Mon Apr 29 2013 Automatic Build System 2.23-1mamba - automatic version update by autodist * Thu Dec 13 2012 Automatic Build System 2.22.2-1mamba - automatic version update by autodist * Thu Oct 11 2012 Automatic Build System 2.22.1-1mamba - automatic version update by autodist * Sat Sep 15 2012 Silvan Calarco 2.22-4mamba - install /etc/login.defs and /etc/login.access taken from shadow * Wed Sep 12 2012 Silvan Calarco 2.22-3mamba - install su-l pam file required by su * Sun Sep 09 2012 Silvan Calarco 2.22-2mamba - obsolete eject - added pam file for login (moved from shadow-common) * Sat Sep 08 2012 Automatic Build System 2.22-1mamba - automatic version update by autodist * Fri May 25 2012 Automatic Build System 2.21.2-1mamba - automatic version update by autodist * Mon Apr 02 2012 Automatic Build System 2.21.1-1mamba - automatic version update by autodist * Sat Mar 24 2012 Automatic Build System 2.21-1mamba - update to 2.21 * Sat Jan 28 2012 Davide Madrisan 2.20-3mamba - move libraries to /lib because they are used by binaries located in /bin and /sbin * Sat Oct 22 2011 Silvan Calarco 2.20-2mamba - enable maintained wall and remove from sysvinit * Fri Oct 21 2011 Automatic Build System 2.20-1mamba - automatic version update by autodist * Fri May 13 2011 Automatic Build System 2.19.1-1mamba - automatic update by autodist * Sat Feb 12 2011 Silvan Calarco 2.19-1mamba - update to 2.19 - upstream renamed back to util-linux from util-linux-ng * Wed Dec 01 2010 Silvan Calarco 2.18-2mamba - move chkdupexe to devel package to remove whole package dependency on perl * Thu Jul 01 2010 Automatic Build System 2.18-1mamba - automatic update to 2.18 by autodist * Mon Mar 29 2010 Automatic Build System 2.17.2-1mamba - automatic update to 2.17.2 by autodist * Mon Feb 22 2010 Automatic Build System 2.17.1-1mamba - automatic update to 2.17.1 by autodist * Wed Jan 27 2010 Automatic Build System 2.17-1mamba - automatic update to 2.17 by autodist * Tue Dec 01 2009 Automatic Build System 2.16.2-1mamba - automatic update to 2.16.2 by autodist * Mon Sep 07 2009 Automatic Build System 2.16.1-1mamba - automatic update to 2.16.1 by autodist * Sun Jul 26 2009 Silvan Calarco 2.16-2mamba - uuidd: port pre script from e2fsprogs and obsolete uuidd package * Sat Jul 25 2009 Automatic Build System 2.16-1mamba - automatic update to 2.16 by autodist * Sat Jun 13 2009 Automatic Build System 2.15.1-1mamba - automatic update to 2.15.1 by autodist * Wed May 20 2009 Silvan Calarco 2.15-3mamba - blkid: added patch to detect reiserfs with name 'reiserfs' instead of 'reiser' * Mon May 18 2009 Silvan Calarco 2.15-2mamba - rebuilt with internal libblkid; added library packages * Wed May 06 2009 Automatic Build System 2.15-1mamba - automatic update to 2.15 by autodist * Mon Feb 09 2009 Silvan Calarco 2.14.2-1mamba - automatic update by autodist * Thu Sep 11 2008 Silvan Calarco 2.14.1-1mamba - automatic update to 2.14.1 by autodist * Tue Jun 10 2008 Aleph0 2.14-1mamba - update to 2.14 (also fixes CVE-2008-1926) - add missing build requirement: libsepol-devel - fdformat: install to /usr/sbin instead to /usr/bin * Wed Apr 30 2008 Aleph0 2.13.1.1-1mamba - update to 2.13.1.1 (also fixes CVE-2007-3102) * Sat Feb 23 2008 Silvan Calarco 2.13.1-2mamba - fix installation of udev raw rules file * Thu Jan 17 2008 Aleph0 2.13.1-1mamba - update to 2.13.1 - package renamed to util-linux-ng - fixes CVE-2007-5191, CVE-2007-0822, CVE-2006-7108 - enable build of the arch tool (superseeded our patch) - enable support for selinux - conditionally build the deprecated tool /bin/raw * Sat Jul 07 2007 Silvan Calarco 2.13-4mamba - nfs.5 man entry renamed to fstab-nfs.5 * Mon Apr 02 2007 Aleph0 2.13pre7-3mamba - security fix against CVE-2007-0822 * Thu Feb 01 2007 Aleph0 2.13pre7-2qilnx - removed minix and sco (mkfs.bfs) filesystems stuff * Wed Jan 24 2007 Aleph0 2.13pre7-1qilnx - update to version 2.13pre7 by autospec - added nologin binary and manpage - disable elvtune: only works with 2.2 and 2.4 kernels * Mon Sep 26 2005 Davide Madrisan 2.12r-1qilnx - update to version 2.12r by autospec - patch for QSA-2005-107 removed (merged upstream) * Tue Sep 20 2005 Davide Madrisan 2.12q-3qilnx - specfile fixes: use %%find_lang, install/uninstall info pages - security fix: QSA-2005-107 (CAN-2005-2876) * Fri Sep 09 2005 Silvan Calarco 2.12q-2qilnx - added cross-platform build options * Mon Sep 05 2005 Silvan Calarco 2.12q-1qilnx - update to version 2.12q by autospec - add cross-build support - give system default build options * Thu Aug 26 2004 Davide Madrisan 2.12b-1qilnx - update to version 2.12b by autospec * Tue Jul 27 2004 Davide Madrisan 2.12a-1qilnx - version update - %%install: forced USE_TTY_GROUP=no for the 'wall' and 'write' tools * Mon Mar 01 2004 Davide Madrisan 2.12-1qilnx - new version rebuild * Sat Nov 30 2003 Davide Madrisan 2.11z-3qilnx - specfile updates * Tue Apr 22 2003 Silvan Calarco 2.11z-2qilnx - removed tcsh scripts to avoid a tcsh dependance - added directory /var/lib/hwclock - removed build of kill because it's in procps package * Wed Apr 09 2003 Luca Tinelli 2.11z-1qilnx - first build