%define contrib 0 %define with_kbdrate 0 %define floppyver 0.16 %define major %(echo %version |cut -d. -f1-2) %define pre %nil %bcond_with embedded %bcond_without pam Name: util-linux Version: 2.20 %if "%pre" != "" Release: 0.%pre.1ark %else Release: 1ark %endif License: GPL Group: System/Base Summary: A collection of basic system utilities. BuildRequires: sed BuildRequires: pam-devel BuildRequires: ncurses-devel BuildRequires: ncurses-devel BuildRequires: zlib-devel %if "%pre" == "" Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%major/util-linux-%version.tar.bz2 %else Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%major/util-linux-%version-%pre.tar.bz2 %endif Source1: util-linux-2.7-login.pamd Source2: util-linux-2.7-chfn.pamd Source3: util-linux-2.7-chsh.pamd Source4: util-linux-2.7-login-local.pamd Source8: nologin.c Source9: nologin.8 Source10: kbdrate.tar.bz2 Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2 Source12: sln.8.lz Source13: arch.1.lz ##### Ark Linux-specific patches Patch1: util-linux-2.13-pre1-compile.patch Patch2: util-linux-2.11a-gecossize.patch Patch3: util-linux-2.17-fPIC.patch Patch4: util-linux-ee.patch Patch5: util-linux-2.13-pre7-compile.patch Patch6: util-linux-2.13-pam-compile.patch # Note on how to set up raw device mappings using RHL /etc/sysconfig/rawdevices Patch109: util-linux-2.11f-rawman.patch ########### END upstreamable Obsoletes: fdisk tunelp %ifarch alpha sparc sparc64 sparcv9 s390 Obsoletes: clock %endif %ifarch alpha Conflicts: initscripts <= 4.58, timeconfig <= 3.0.1 %endif BuildRoot: %{_tmppath}/%{name}-root Requires: pam >= 0.66-4, /etc/pam.d/system-auth %if %{with_kbdrate} Requires: usermode %endif Prereq: /sbin/install-info BuildRequires: texinfo Requires: %name-libs = %version-%release %track prog %name = { url = http://ftp.kernel.org/pub/linux/utils/util-linux-ng/v%major/ regex = util-linux-(__VER__)\.tar\.bz2 version = %version } prog %name-major = { url = http://ftp.kernel.org/pub/linux/utils/util-linux-ng/ regex = v(__VER__) version = %major } %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 libs Summary: Libraries that are part of %name Group: System/Libraries %description libs Libraries that are part of %name. This includes libuuid (a filesystem UUID generator) and libblkid. %package extras Summary: Non-vital, but useful, parts of util-linux Group: System/Base %description extras Non-vital, but useful, parts of util-linux %package devel Summary: Development files for %name Group: Development/Libraries/C/Base Requires: %name = %version-%release %description devel Development files for %name %package static Summary: Libraries for linking statically to %name libraries Group: Development/Libraries/C/Base/Static Requires: %name-devel = %version-%release %description static Libraries for linking statically to %name libraries %package -n mount Group: System/Base Summary: Programs for mounting and unmounting filesystems. ExclusiveOS: Linux %description -n mount The mount package contains the mount, umount, swapon, and swapoff programs. Accessible files on your system are arranged in one big tree or hierarchy. These files can be spread out over several devices. The mount command attaches a filesystem on some device to your system's file tree. The umount command detaches a filesystem from the tree. Swapon and swapoff, respectively, specify and disable devices and files for paging and swapping. %package -n losetup Summary: Programs for setting up and configuring loopback devices. Group: System Environment/Base %description -n losetup Linux supports a special block device called the loop device, which maps a normal file onto a virtual block device. This allows for the file to be used as a "virtual file system" inside another file. Losetup is used to associate loop devices with regular files or block devices, to detach loop devices and to query the status of a loop device. %prep %if "%pre" != "" %setup -q -a 10 -a 11 -n %name-%version-%pre %else %setup -q -a 10 -a 11 -n %name-%version %endif %patch1 -p1 -b .compile~ %patch2 -p1 -b .gecos %ifnarch %ix86 %patch3 -p1 -b .fPIC~ %endif %patch4 -p1 -b .ee~ #patch5 -p1 -b .compile~ #patch6 -p1 -b .pam_compile~ # nologin cp %{SOURCE8} %{SOURCE9} . %patch109 -p1 -b .rawman sed -i -e "s,@MKINSTALLDIRS@,`pwd`/config/mkinstalldirs,g" po/Make* aclocal autoheader automake -a autoconf libtoolize --force %build unset LINGUAS || : %configure --enable-kill --enable-partx --enable-raw --enable-login-utils --enable-write --enable-login-chown-vcs --disable-agetty --mandir=%_mandir --infodir=%_infodir --libdir=/%_lib --sbindir=/sbin --bindir=/bin \ %if %{without pam} --without-pam %endif make "OPT=$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" \ HAVE_PIVOT_ROOT=yes \ %{?_smp_mflags} %if %{without embedded} make CFLAGS="$RPM_OPT_FLAGS" -C partx %{?_smp_mflags} %endif %if %{with_kbdrate} pushd kbdrate %__cc $RPM_OPT_FLAGS -o kbdrate kbdrate.c popd %endif %if %{without embedded} pushd floppy-%{floppyver} %configure --disable-gtk2 make %{?_smp_mflags} popd %endif %__cc $RPM_OPT_FLAGS -o nologin nologin.c %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin} mkdir -p ${RPM_BUILD_ROOT}%{_bindir} mkdir -p ${RPM_BUILD_ROOT}%{_infodir} mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man{1,6,8,5} mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/{pam.d,security/console.apps} make \ INSTALLDIR="%__install -d -m 755" \ INSTALLSUID="%__install -m 755" \ INSTALLBIN="%__install -m 755" \ INSTALLMAN="%__install -m 644" \ install DESTDIR=${RPM_BUILD_ROOT} %if %{with pam} # Add support for login-local ( cd login-utils cp login.c login.c.net perl -pi -e "s/pam_start\(\"login\"/pam_start\(\"login-local\"/" login.c make %?_smp_mflags %__install -m 755 login ${RPM_BUILD_ROOT}/bin/login-local ) %endif %if %{without embedded} pushd floppy-%{floppyver} make install DESTDIR="$RPM_BUILD_ROOT" popd %endif ln -sf /sbin/mkfs.cramfs $RPM_BUILD_ROOT%_bindir/mkcramfs install -m 755 nologin ${RPM_BUILD_ROOT}/sbin install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 %if %{with_kbdrate} install -m 555 kbdrate/kbdrate ${RPM_BUILD_ROOT}/sbin install -m 644 kbdrate/kbdrate.8 ${RPM_BUILD_ROOT}%{_mandir}/man8 ln -s consolehelper ${RPM_BUILD_ROOT}/usr/bin/kbdrate %endif echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8 %if %{with_kbdrate} install -m644 kbdrate/kbdrate.apps $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kbdrate install -m644 kbdrate/kbdrate.pam $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kbdrate %endif %if %{with pam} { pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d install -m 644 ${RPM_SOURCE_DIR}/util-linux-2.7-login.pamd ./login install -m 644 ${RPM_SOURCE_DIR}/util-linux-2.7-login-local.pamd ./login-local install -m 644 ${RPM_SOURCE_DIR}/util-linux-2.7-chsh.pamd ./chsh install -m 644 ${RPM_SOURCE_DIR}/util-linux-2.7-chsh.pamd ./chfn popd } %endif ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock ln -sf ../../sbin/clock ${RPM_BUILD_ROOT}/usr/sbin/clock ln -sf hwclock ${RPM_BUILD_ROOT}/sbin/clock # Final cleanup rm -f $RPM_BUILD_ROOT%{_bindir}/cytune $RPM_BUILD_ROOT%{_mandir}/man8/cytune.8* for I in /sbin/cfdisk /sbin/fsck.minix /sbin/mkfs.{bfs,minix} /sbin/sln %{_bindir}/line %{_bindir}/pg; do rm -f $RPM_BUILD_ROOT$I done mv $RPM_BUILD_ROOT%_sbindir/fdformat $RPM_BUILD_ROOT%_bindir/ # Remove what we don't need rm -f $RPM_BUILD_ROOT%{_mandir}/man1/line.1* rm -f $RPM_BUILD_ROOT%{_mandir}/man1/pg.1* rm -f $RPM_BUILD_ROOT%{_mandir}/man8/cfdisk.8* rm -f $RPM_BUILD_ROOT%{_mandir}/man8/fsck.minix.8* rm -f $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.minix.8* rm -f $RPM_BUILD_ROOT%{_mandir}/man8/mkfs.bfs.8* # Touch the console.autologin file touch $RPM_BUILD_ROOT%{_sysconfdir}/security/console.autologin chmod 644 $RPM_BUILD_ROOT%{_sysconfdir}/security/console.autologin # Legacy compatibility cat >$RPM_BUILD_ROOT/bin/arch <<EOF #!/bin/sh exec uname -m EOF chmod +x $RPM_BUILD_ROOT/bin/arch ln $RPM_BUILD_ROOT/sbin/pivot_root $RPM_BUILD_ROOT/bin install -c -m 644 %SOURCE12 $RPM_BUILD_ROOT%_mandir/man8 install -c -m 644 %SOURCE13 $RPM_BUILD_ROOT%_mandir/man1 # Avoid tcsh requirement chmod -x $RPM_BUILD_ROOT%_datadir/getopt/*.tcsh %find_lang %{name} %clean # [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post /sbin/install-info %{_infodir}/ipc.info* %{_infodir}/dir %postun if [ "$1" = 0 ]; then /sbin/install-info --del %{_infodir}/ipc.info* %{_infodir}/dir fi %files libs # libuuid and friends... /%_lib/libblkid.so* /%_lib/libuuid.so* /%_lib/libmount.so* %_libdir/libblkid.so %_libdir/libuuid.so %_libdir/libmount.so %files -f %{name}.lang %defattr(-,root,root) %doc */README.* /bin/arch /bin/dmesg /bin/kill %attr(755,root,root) /bin/login %if %{with pam} %attr(755,root,root) /bin/login-local %endif /bin/more %if %{with pam} %config %{_sysconfdir}/pam.d/chfn %config %{_sysconfdir}/pam.d/chsh %config %{_sysconfdir}/pam.d/login %config(noreplace) %{_sysconfdir}/pam.d/login-local %endif %ghost %config(missingok,noreplace) %verify(not md5 size mtime) %{_sysconfdir}/security/console.autologin /bin/findmnt /bin/lsblk /sbin/fsfreeze /sbin/fstrim /sbin/swaplabel /sbin/blkid /sbin/findfs /sbin/fsck /sbin/switch_root /bin/mountpoint %_bindir/uuidgen %_sbindir/uuidd %_mandir/man1/uuidgen.1* %_mandir/man1/mountpoint.1* %_mandir/man8/blkid.8* %_mandir/man8/findfs.8* %_mandir/man8/fsck.8* %_mandir/man8/switch_root.8* %_mandir/man8/uuidd.8* %_mandir/man8/findmnt.8* %_mandir/man8/fsfreeze.8* %_mandir/man8/fstrim.8* %_mandir/man8/lsblk.8* %_mandir/man8/swaplabel.8* /sbin/blockdev /bin/pivot_root /sbin/pivot_root /sbin/ctrlaltdel %_sbindir/addpart %_sbindir/delpart %_sbindir/partx %_mandir/man8/partx.8* %_mandir/man8/addpart.8* %_mandir/man8/delpart.8* %ifnarch %no_sfdisk_archs /sbin/sfdisk %{_mandir}/man8/sfdisk.8* %doc fdisk/sfdisk.examples %endif %ifnarch %no_hwclock_and_fdisk_archs /sbin/fdisk %{_mandir}/man8/fdisk.8* /sbin/clock /sbin/hwclock /usr/sbin/hwclock %{_mandir}/man8/hwclock.8* %endif /sbin/mkfs /sbin/mkswap /sbin/nologin %{_mandir}/man8/nologin.8* /sbin/wipefs %_mandir/man8/wipefs.8* %_bindir/fallocate %_mandir/man1/fallocate.1* %_bindir/unshare %_mandir/man1/unshare.1* # Begin kbdrate stuff %if %{with_kbdrate} /sbin/kbdrate /usr/bin/kbdrate %{_mandir}/man8/kbdrate.8* %{_sysconfdir}/pam.d/kbdrate %{_sysconfdir}/security/console.apps/kbdrate %endif %_bindir/cal %attr(4711,root,root) %_bindir/chfn %attr(4711,root,root) %_bindir/chsh %_bindir/col %_bindir/colcrt %_bindir/colrm %_bindir/column %ifarch %cytune_archs %_bindir/cytune %_mandir/man8/cytune.8* %endif %_bindir/fdformat %_bindir/flock %_bindir/getopt %_bindir/hexdump %ifarch %ix86 x86_64 em64t %_bindir/i386 %_bindir/linux32 %_bindir/linux64 %_bindir/setarch %_mandir/man8/i386.8* %_mandir/man8/linux32.8* %_mandir/man8/linux64.8* %_mandir/man8/setarch.8* %ifarch x86_64 intel64 amd64 em64t %_bindir/x86_64 %_mandir/man8/x86_64.8* %endif %endif %{_bindir}/ipcrm %{_bindir}/ipcs %{_bindir}/isosize %{_bindir}/logger %{_bindir}/look %{_bindir}/mcookie %{_bindir}/namei %attr(4711,root,root) %{_bindir}/newgrp /sbin/raw %{_bindir}/rename %{_bindir}/renice %{_bindir}/rev %{_bindir}/script %{_bindir}/setsid %{_bindir}/setterm %ifarch sparc sparc64 sparcv9 %{_bindir}/sunhostid %endif %{_bindir}/ul %{_bindir}/whereis %{_bindir}/tailf %attr(2755,root,tty) %{_bindir}/write %_bindir/ionice %_mandir/man1/ionice.* %_sbindir/rtcwake %_mandir/man8/rtcwake.8* %{_sbindir}/readprofile %ifnarch s390 %{_sbindir}/tunelp %endif %{_sbindir}/vipw %{_sbindir}/vigr # We currently get this from SysVinit -- should probably use this one instead: # %_bindir/wall %_mandir/man1/arch.1* %_mandir/man1/cal.1* %_mandir/man1/chfn.1* %_mandir/man1/chsh.1* %_mandir/man1/col.1* %_mandir/man1/colcrt.1* %_mandir/man1/colrm.1* %_mandir/man1/column.1* %_mandir/man1/dmesg.1* %_mandir/man1/flock.1* %_mandir/man1/getopt.1* %_mandir/man1/hexdump.1* %_mandir/man1/ipcrm.1* %_mandir/man1/ipcs.1* %_mandir/man1/kill.1* %_mandir/man1/logger.1* %_mandir/man1/login.1* %_mandir/man1/look.1* %_mandir/man1/mcookie.1* %_mandir/man1/more.1* %_mandir/man1/namei.1* %_mandir/man1/newgrp.1* %_mandir/man1/readprofile.1* %_mandir/man1/rename.1* %_mandir/man1/renice.1* %_mandir/man1/rev.1* %_mandir/man1/script.1* %_mandir/man1/setsid.1* %_mandir/man1/setterm.1* %_mandir/man1/tailf.1* %_mandir/man1/ul.1* %_mandir/man1/whereis.1* %_mandir/man1/write.1* %{_mandir}/man8/blockdev.8* %{_mandir}/man8/ctrlaltdel.8* %{_mandir}/man8/fdformat.8* %{_mandir}/man8/isosize.8* %{_mandir}/man8/mkfs.8* %{_mandir}/man8/mkswap.8* %{_mandir}/man8/pivot_root.8* %{_mandir}/man8/raw.8* %{_mandir}/man8/rawdevices.8* # XXX this man page should be moved to glibc. %{_mandir}/man8/sln.8* %{_mandir}/man8/tunelp.8* %{_mandir}/man8/vigr.8* %{_mandir}/man8/vipw.8* %{_datadir}/getopt %files extras %_bindir/chkdupexe %_bindir/chrt %_bindir/ipcmk %_bindir/lscpu %_bindir/scriptreplay %_bindir/taskset %_bindir/wall %_sbindir/clock %_bindir/mkcramfs %_sbindir/ldattach /sbin/fsck.cramfs /sbin/mkfs.cramfs %_mandir/man1/scriptreplay.1* %_mandir/man1/chkdupexe.* %_mandir/man1/chrt.* %_mandir/man1/ipcmk.* %_mandir/man1/lscpu.* %_mandir/man1/taskset.* %_mandir/man1/wall.* %_mandir/man8/ldattach.8* %if %{without embedded} %_bindir/floppy %_mandir/man8/floppy.8* %endif %files devel %_libdir/pkgconfig/blkid.pc %_libdir/pkgconfig/uuid.pc %_libdir/pkgconfig/mount.pc %_includedir/blkid %_includedir/uuid %_includedir/libmount %_mandir/man3/uuid* %_mandir/man3/libblkid.3* %files static %_libdir/libblkid.a %_libdir/libuuid.a %_libdir/libmount.a %files -n mount %defattr(-,root,root) %attr(4755,root,root) /bin/mount %attr(4755,root,root) /bin/umount /sbin/swapon /sbin/swapoff %{_mandir}/man5/fstab.5* %{_mandir}/man8/mount.8* %{_mandir}/man8/swapoff.8* %{_mandir}/man8/swapon.8* %{_mandir}/man8/umount.8* %files -n losetup %defattr(-,root,root) %{_mandir}/man8/losetup.8* /sbin/losetup %changelog * Wed Aug 31 2011 Bernhard Rosenkraenzer <bero@arklinux.org> 2.20-1ark - 2.20 * Fri Feb 11 2011 Bernhard Rosenkraenzer <bero@arklinux.org> 2.19-1ark - 2.19 * Sat Jan 29 2011 Bernhard Rosenkraenzer <bero@arklinux.org> 2.19-0.rc3.1ark - 2.19-rc3 * Fri Jun 11 2010 Bernhard Rosenkraenzer <bero@arklinux.org> 2.18-0.rc1.1ark - 2.18-rc1 * Tue Mar 23 2010 Bernhard Rosenkraenzer <bero@arklinux.org> 2.17.2-1ark - 2.17.2 * Wed Mar 17 2010 Bernhard Rosenkraenzer <bero@arklinux.org> 2.17.1-2ark - Allow building in embedded configs * Mon Jan 25 2010 Bernhard Rosenkraenzer <bero@arklinux.org> 2.17-1ark - 2.17 - Force -fPIC for static libraries on non-x86_32 * Sat Dec 5 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 2.16.2-1ark - 2.16.2 * Sun Sep 13 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 2.16.1-2ark - Split libuuid and libblkid into separate packages so 64bit and 32bit versions can be installed in parallel * Tue Sep 8 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 2.16.1-1ark - 2.16.1 * Thu Jun 11 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 2.15.1-1ark - 2.15.1 * Mon Feb 9 2009 Bernhard Rosenkraenzer <bero@arklinux.org> 2.14.2-1ark - 2.14.2 * Wed Dec 17 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 2.14.1-2ark - Drop tcsh dependency - Deal with LZMA compressed man pages * Thu Oct 2 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 2.14.1-1ark - 2.14.1 - Get rid of pam_stack usage * Thu Jun 12 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 2.14-1ark - 2.14 * Tue Jan 22 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 2.13.1-1ark - util-linux-ng 2.13.1 * Thu Oct 19 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 2.13-0.pre7.2ark - Rebuild -- something went wrong last time * Sun Oct 15 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 2.13-0.pre7.1ark - pre7 * Fri Feb 24 2006 Bernhard Rosenkraenzer <bero@arklinux.org> 2.13-0.pre6.1ark - 2.13pre6 * Sun Sep 25 2005 Bernhard Rosenkraenzer <bero@arklinux.org> 2.13-0.pre4.1ark - 2.13pre4 * Tue Aug 9 2005 Bernhard Rosenkraenzer <bero@arklinux.org> 2.13-0.pre1.1ark - 2.13pre1 * Sun Jan 30 2005 Bernhard Rosenkraenzer <bero@arklinux.org> 2.12q-1ark - 2.12q - Rebuild against new e2fsprogs libs - Remove cryptoloop patch, cryptoloop has been removed from the kernel in favor of dm-crypt * Thu Sep 16 2004 David Tio <deux@arklinux.org> 2.12d-1ark - 2.12d * Sat Sep 11 2004 David Tio <deux@arklinux.org> 2.12c-1ark - 2.12c - added partx patch to make util-linux compiles * Sun Apr 4 2004 Bernhard Rosenkraenzer <bero@arklinux.org> 2.12a-2ark - Fix build with kernel 2.6 headers - Add cryptoloop support patch * Wed Mar 31 2004 Bernhard Rosenkraenzer <bero@arklinux.org> 2.12a-1ark - 2.12a - floppy 0.15 * Tue Sep 10 2003 David Sainty <saint@arklinux.org> 2.12-4ark - Adopt zdeems approach for local text console logins with config file /etc/security/console.autologin * Tue Sep 10 2003 David Sainty <saint@arklinux.org> 2.12-3ark - Add support for login-local binary and PAM file * Tue Sep 10 2003 David Sainty <saint@arklinux.org> 2.12-2ark - Change %{_sysconfdir}/pam.d/login so that by default, for Single User Mode, it does not check passwords for console logins. We need to see how this works out. - Use noreplace for pam.d/login * Mon Sep 08 2003 Sergio Visinoni <piffio@arklinux.org> 2.12-1ark - 2.12 * Wed Aug 20 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 2.12-0.pre.1ark - 2.12pre * Sun Jul 13 2003 Sergio Visinoni <piffio@arklinux.org> 2.11z-2ark - Build against the latest glibc headers to fix bug #180 * Sun Mar 30 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 2.11z-1ark - 2.11z