Browse Source

util-linux:
- update to 2.22.1
- add upstream patches
- move su/runuser from coreutils (add C:)
- move eject from eject (add O:)
- move sulogin/utmpdump from SysVinit-tools (C:)
- enable raw by default

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@7167 ec354946-7b23-47d6-9f5a-488ba84defc7

daisuke 11 years ago
parent
commit
1587cf471d
1 changed files with 128 additions and 35 deletions
  1. 128 35
      u/util-linux/util-linux-vl.spec

+ 128 - 35
u/util-linux/util-linux-vl.spec

@@ -2,14 +2,13 @@
 Summary: A collection of basic system utilities
 Summary(ja): 基本システムユーティリティー集
 Name: util-linux
-Version: 2.20.1
+Version: 2.22.1
 Release: 1%{?_dist_release}
-License: GPLv2 and GPLv2+ and BSD with advertising and Public Domain
+License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain
 Group: System Environment/Base
-URL: http://kernel.org/~kzak/util-linux/
+URL: http://en.wikipedia.org/wiki/Util-linux
 
 ### Features
-%define include_raw 0
 %define with_selinux 0
 %define with_audit 1
 %define mtab_symlink 1
@@ -38,9 +37,10 @@ BuildRequires: texinfo
 BuildRequires: zlib-devel
 BuildRequires: popt-devel
 BuildRequires: libutempter-devel
+BuildRequires: libudev-devel
 
 ### Sources
-Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.20/%{name}-%{version}.tar.xz
+Source0: ftp://ftp.kernel.org/pub/linux/utils/util-linux/v2.22/%{name}-%{version}.tar.xz
 Source1: util-linux-ng-login.pamd
 Source5: util-linux-ng-login-noselinux.pamd
 Source2: util-linux-ng-remote.pamd
@@ -51,11 +51,27 @@ Source8: nologin.c
 Source9: nologin.8
 Source10: uuidd.init
 Source11: http://download.sourceforge.net/floppyutil/floppy-%{floppyver}.tar.bz2
+Source12: util-linux-su.pamd
+Source13: util-linux-su-l.pamd
+Source14: util-linux-runuser.pamd
+Source15: util-linux-runuser-l.pamd
+
 
 ### Obsoletes & Conflicts & Provides
 %ifarch alpha
 Conflicts: initscripts <= 4.58
 %endif
+
+# su(1) and runuser(1) merged into util-linux v2.22
+Conflicts: coreutils < 8.20
+
+# eject has been merged into util-linux v2.22
+Obsoletes: eject <= 2.1.5
+Provides: eject = 2.1.6
+
+# sulogin, utmpdump merged into util-linux v2.22
+Conflicts: SysVinit-tools < 2.88dsf-3
+
 Conflicts: kernel < 2.2.12-7
 # old versions of e2fsprogs contain fsck, uuidgen
 Conflicts: e2fsprogs < 1.41.8-5
@@ -95,9 +111,7 @@ Requires: libmount = %{version}-%{release}
 Requires: audit-libs >= 1.0.6
 %endif
 Requires: ConsoleKit-libs
-%if %{include_raw}
 Requires: udev
-%endif
 
 # Vine
 Requires(post,preun): alternatives
@@ -116,19 +130,45 @@ Patch1: util-linux-2.20-fdformat-man-ide.patch
 # 169628 - /usr/bin/floppy doesn't work with /dev/fd0
 Patch2: util-linux-2.19-floppy-generic.patch
 
-### Fedora/RHEL specific patches -- need to die!
-###
-# 199745 - Non-existant simpleinit(8) mentioned in ctrlaltdel(8)
-Patch4: util-linux-ng-2.13-ctrlaltdel-man.patch
-# /etc/blkid.tab --> /etc/blkid/blkid.tab
-Patch5: util-linux-2.20-blkid-cachefile.patch
-
 ### Ready for upstream?
 ###
 # 151635 - makeing /var/log/lastlog
-Patch7: util-linux-ng-2.13-login-lastlog.patch
+Patch7: util-linux-ng-2.21-login-lastlog.patch
 # 231192 - ipcs is not printing correct values on pLinux
-Patch8: util-linux-2.20-ipcs-32bit.patch
+Patch8: util-linux-2.21-ipcs-32bit.patch
+
+### Upstream patches from proposed stable/v2.22.2 branch
+### (remove after update to the final 2.22.2)
+###
+Patch101: 0001-libmount-don-t-use-umount-optimization-for-l-or-f.patch
+Patch102: 0002-wipefs-use-O_EXCL.patch
+Patch103: 0003-swapon-remove-loop-declaration-smatch-scan.patch
+Patch104: 0004-libblkid-fix-compiler-warning-Wstrict-aliasing.patch
+Patch105: 0005-mount-add-c-abbreviation-for-no-canonicalize-to-man-.patch
+Patch106: 0006-mount-add-long-options-for-L-and-U-to-man-page.patch
+Patch107: 0007-lib-loopdev-improve-debug-messages.patch
+Patch108: 0008-lib-loopdev-check-for-sys.patch
+Patch109: 0009-fsck.cramfs-compile-with-DINCLUDE_FS_TESTS-for-make-.patch
+Patch110: 0010-login-fix-compiler-warning-Wunused-result.patch
+Patch111: 0011-misc-make-readlink-usage-more-robust.patch
+
+### Upstream patches from master branch (will be v2.23) for su(1) and new
+### runuser(1) implementation. This is required for the recent coreutils where
+### is no more su(1).
+###
+Patch200: 0200-su-add-group-and-supp-group-options.patch
+Patch201: 0201-su-move-generic-su-code-to-su-common.c.patch
+Patch202: 0202-runuser-new-command-derived-from-su-1.patch
+Patch203: 0203-su-more-robust-getpwuid-for-GNU-Hurt-coreutils-71b7d.patch
+Patch204: 0204-su-verify-writing-to-streams-was-successful.patch
+Patch205: 0205-su-move-long-options-to-main.patch
+Patch206: 0206-su-add-segmentation-fault-reporting-of-the-child-pro.patch
+Patch207: 0207-su-fixed-a-typo-in-pam-error-message.patch
+Patch208: 0208-runuser-add-u-to-not-execute-shell.patch
+Patch209: 0209-build-sys-move-runuser-to-sbin-dir.patch
+Patch210: 0210-su-fix-COMMAND-not-specified-error.patch
+
+
 
 %description
 The util-linux-ng package contains a large variety of low-level system
@@ -307,11 +347,32 @@ cp %{SOURCE8} %{SOURCE9} .
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch4 -p1
-%patch5 -p1
 %patch7 -p1
 %patch8 -p1
 
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
+%patch104 -p1
+%patch105 -p1
+%patch106 -p1
+%patch107 -p1
+%patch108 -p1
+%patch109 -p1
+%patch110 -p1
+%patch111 -p1
+
+%patch200 -p1
+%patch201 -p1
+%patch202 -p1
+%patch203 -p1
+%patch204 -p1
+%patch205 -p1
+%patch206 -p1
+%patch207 -p1
+%patch208 -p1
+%patch209 -p1
+%patch210 -p1
 
 %build
 unset LINGUAS || :
@@ -329,9 +390,9 @@ export SUID_LDFLAGS="-pie"
 	--enable-kill \
 	--enable-write \
 	--enable-ddate \
-%if %{include_raw}
+	--enable-chfn-chsh \
 	--enable-raw \
-%endif
+	--with-udev \
 %if %{with_selinux}
 	--with-selinux \
 %else
@@ -387,16 +448,14 @@ popd
 install -m 755 nologin ${RPM_BUILD_ROOT}/sbin
 install -m 644 nologin.8 ${RPM_BUILD_ROOT}%{_mandir}/man8
 
-%if %{include_raw}
 echo '.so man8/raw.8' > $RPM_BUILD_ROOT%{_mandir}/man8/rawdevices.8
 {
 	# see RH bugzilla #216664
-	mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d
-	pushd ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d
+	mkdir -p ${RPM_BUILD_ROOT}/lib/udev/rules.d
+	pushd ${RPM_BUILD_ROOT}/lib/udev/rules.d
 	install -m 644 %{SOURCE4} ./60-raw.rules
 	popd
 }
-%endif
 
 # Our own initscript for uuidd
 install -D -m 755 %{SOURCE10} ${RPM_BUILD_ROOT}/etc/rc.d/init.d/uuidd
@@ -419,7 +478,11 @@ rm -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la
 %endif
 	install -m 644 %{SOURCE3} ./chsh
 	install -m 644 %{SOURCE3} ./chfn
-	popd
+        install -m 644 %{SOURCE12} ./su
+        install -m 644 %{SOURCE13} ./su-l
+        install -m 644 %{SOURCE14} ./runuser
+        install -m 644 %{SOURCE15} ./runuser-l
+popd
 }
 
 ln -sf ../../sbin/hwclock ${RPM_BUILD_ROOT}/usr/sbin/hwclock
@@ -460,7 +523,7 @@ done
 mv floppy-%{floppyver}/README floppy-%{floppyver}/README.floppy
 
 # we install getopt/getopt-*.{bash,tcsh} as doc files
-chmod 644 getopt/getopt-*.{bash,tcsh}
+chmod 644 misc-utils/getopt-*.{bash,tcsh}
 rm -f ${RPM_BUILD_ROOT}%{_datadir}/getopt/*
 rmdir ${RPM_BUILD_ROOT}%{_datadir}/getopt
 
@@ -592,16 +655,23 @@ fi
 
 %files -f %{name}.files
 %defattr(-,root,root)
-%doc */README.* NEWS AUTHORS licenses/* README*
-%doc getopt/getopt-*.{bash,tcsh}
+%doc */README.* NEWS AUTHORS README*
+%doc Documentation/deprecated.txt Documentation/licenses/*
+%doc misc-utils/getopt-*.{bash,tcsh}
 
 %config(noreplace)	%{_sysconfdir}/pam.d/chfn
 %config(noreplace)	%{_sysconfdir}/pam.d/chsh
 %config(noreplace)	%{_sysconfdir}/pam.d/login
 %config(noreplace)	%{_sysconfdir}/pam.d/remote
+%config(noreplace)      %{_sysconfdir}/pam.d/su
+%config(noreplace)      %{_sysconfdir}/pam.d/su-l
+%config(noreplace)      %{_sysconfdir}/pam.d/runuser
+%config(noreplace)      %{_sysconfdir}/pam.d/runuser-l
+%config(noreplace)      /lib/udev/rules.d
 
 %attr(4755,root,root)	/bin/mount
 %attr(4755,root,root)	/bin/umount
+%attr(4755,root,root)	/bin/su
 %attr(755,root,root)	/bin/login
 %attr(4711,root,root)	%{_bindir}/chfn
 %attr(4711,root,root)	%{_bindir}/chsh
@@ -617,11 +687,14 @@ fi
 /bin/more
 /bin/mountpoint
 /bin/taskset
+/bin/raw
+/bin/wdctl
 
 /sbin/addpart
 /sbin/agetty
 /sbin/blkid
 /sbin/blockdev
+/sbin/chcpu
 /sbin/ctrlaltdel
 /sbin/delpart
 /sbin/fdisk
@@ -637,6 +710,8 @@ fi
 /sbin/nologin
 /sbin/partx
 /sbin/pivot_root
+/sbin/runuser
+/sbin/sulogin
 /sbin/swaplabel
 /sbin/swapoff
 /sbin/swapon
@@ -650,6 +725,7 @@ fi
 %{_bindir}/colrm
 %{_bindir}/column
 %{_bindir}/ddate
+%{_bindir}/eject
 %{_bindir}/fallocate
 %{_bindir}/flock
 %{_bindir}/getopt
@@ -663,8 +739,10 @@ fi
 %{_bindir}/logger
 %{_bindir}/look
 %{_bindir}/lscpu
+%{_bindir}/lslocks
 %{_bindir}/mcookie
 %{_bindir}/namei
+%{_bindir}/prlimit
 %{_bindir}/rename
 %{_bindir}/renice
 %{_bindir}/rev
@@ -676,12 +754,14 @@ fi
 %{_bindir}/tailf
 %{_bindir}/ul
 %{_bindir}/unshare
+%{_bindir}/utmpdump
 %{_bindir}/uuidgen
 %{_bindir}/whereis
 
 %{_sbindir}/ldattach
 %{_sbindir}/readprofile
 %{_sbindir}/rtcwake
+%{_sbindir}/resizepart
 
 %{_mandir}/man1/cal.1*
 %{_mandir}/man1/chfn.1*
@@ -693,6 +773,7 @@ fi
 %{_mandir}/man1/column.1*
 %{_mandir}/man1/ddate.1*
 %{_mandir}/man1/dmesg.1*
+%{_mandir}/man1/eject.1*
 %{_mandir}/man1/fallocate.1*
 %{_mandir}/man1/flock.1*
 %{_mandir}/man1/getopt.1*
@@ -710,18 +791,21 @@ fi
 %{_mandir}/man1/more.1*
 %{_mandir}/man1/namei.1*
 %{_mandir}/man1/mountpoint.1*
-%{_mandir}/man1/readprofile.1*
+%{_mandir}/man1/prlimit.1*
 %{_mandir}/man1/rename.1*
 %{_mandir}/man1/renice.1*
 %{_mandir}/man1/rev.1*
+%{_mandir}/man1/runuser.1*
 %{_mandir}/man1/script.1*
 %{_mandir}/man1/scriptreplay.1*
 %{_mandir}/man1/setsid.1*
 %{_mandir}/man1/setterm.1*
+%{_mandir}/man1/su.1*
 %{_mandir}/man1/tailf.1*
 %{_mandir}/man1/taskset.1*
 %{_mandir}/man1/ul.1*
 %{_mandir}/man1/unshare.1*
+%{_mandir}/man1/utmpdump.1*
 %{_mandir}/man1/uuidgen.1*
 %{_mandir}/man1/whereis.1*
 %{_mandir}/man1/write.1*
@@ -734,6 +818,7 @@ fi
 %{_mandir}/man8/blkid.8*
 %{_mandir}/man8/blockdev.8*
 %{_mandir}/man8/ctrlaltdel.8*
+%{_mandir}/man8/chcpu.8*
 %{_mandir}/man8/delpart.8*
 %{_mandir}/man8/fdisk.8*
 %{_mandir}/man8/findfs.8*
@@ -745,27 +830,27 @@ fi
 %{_mandir}/man8/ldattach.8*
 %{_mandir}/man8/losetup.8*
 %{_mandir}/man8/lsblk.8*
+%{_mandir}/man8/lslocks.8*
 %{_mandir}/man8/mkfs.8*
 %{_mandir}/man8/mkswap.8*
 %{_mandir}/man8/mount.8*
 %{_mandir}/man8/nologin.8*
 %{_mandir}/man8/partx.8*
 %{_mandir}/man8/pivot_root.8*
+%{_mandir}/man8/readprofile.8*
+%{_mandir}/man8/resizepart.8*
 %{_mandir}/man8/rtcwake.8*
 %{_mandir}/man8/setarch.8*
+%{_mandir}/man8/sulogin.8*
 %{_mandir}/man8/swaplabel.8*
 %{_mandir}/man8/swapoff.8*
 %{_mandir}/man8/swapon.8*
 %{_mandir}/man8/switch_root.8*
 %{_mandir}/man8/umount.8*
+%{_mandir}/man8/wdctl.8*
 %{_mandir}/man8/wipefs.8*
-
-%if %{include_raw}
-/bin/raw
-%config(noreplace)	%{_sysconfdir}/udev/rules.d/60-raw.rules
 %{_mandir}/man8/raw.8*
 %{_mandir}/man8/rawdevices.8*
-%endif
 
 %ifnarch s390 s390x
 /sbin/clock
@@ -781,7 +866,7 @@ fi
 %endif
 
 %ifnarch sparc sparcv9 sparc64
-%doc fdisk/sfdisk.examples
+%doc Documentation/sfdisk.txt
 /sbin/cfdisk
 /sbin/sfdisk
 %{_mandir}/man8/cfdisk.8*
@@ -883,6 +968,14 @@ fi
 %endif
 
 %changelog
+* Tue Nov 27 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.22.1-1
+- update to 2.22.1
+- add upstream patches
+- move su/runuser from coreutils (add C:)
+- move eject from eject (add O:)
+- move sulogin/utmpdump from SysVinit-tools (C:)
+- enable raw by default
+
 * Tue Feb 21 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 2.20.1-1
 - update to 2.20.1
 - enable audit