Date: Monday, September 19, 2011 @ 18:01:06 Author: tomegun Revision: 138300
upgpkg: util-linux 2.20-3 add libmount support and two upstream patches Added: util-linux/trunk/dont-close-0.patch util-linux/trunk/fix-remount.patch Modified: util-linux/trunk/PKGBUILD --------------------+ PKGBUILD | 15 ++++++++++----- dont-close-0.patch | 32 ++++++++++++++++++++++++++++++++ fix-remount.patch | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 5 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2011-09-19 21:50:38 UTC (rev 138299) +++ PKGBUILD 2011-09-19 22:01:06 UTC (rev 138300) @@ -4,7 +4,7 @@ pkgname=util-linux pkgver=2.20 -pkgrel=2 +pkgrel=3 pkgdesc="Miscellaneous system utilities for Linux" url="http://userweb.kernel.org/~kzak/util-linux-ng/" arch=('i686' 'x86_64') @@ -19,14 +19,16 @@ agetty-typo.patch write-freopen.patch dmesg-non-printk.patch - dmesg-space.patch) + dmesg-space.patch + dont-close-0.patch + fix-remount.patch) optdepends=('perl: for chkdupexe support') build() { cd "${srcdir}/${pkgname}-${pkgver}" # patches from master - for patch in agetty-typo.patch write-freopen.patch dmesg-non-printk.patch dmesg-space.patch; do + for patch in agetty-typo.patch write-freopen.patch dmesg-non-printk.patch dmesg-space.patch dont-close-0.patch fix-remount.patch; do patch -Np1 -i "${srcdir}/${patch}" done @@ -37,7 +39,8 @@ --enable-write\ --enable-raw\ --disable-wall\ - --enable-partx + --enable-partx\ + --enable-libmount-mount make } @@ -53,4 +56,6 @@ '13838c6dd8df686e0f01ad0f236d2690' '465817ff8f7c08411c8011ee91b50318' 'f3ca75a1a22a2a739c5c22d92dc07ab0' - 'd9768f0b42d36d72c02ac7797b922ba1') + 'd9768f0b42d36d72c02ac7797b922ba1' + '37eae52af90c214dda73874c701fa246' + '344c780b9e08826dd8befe4271b41ed3') Added: dont-close-0.patch =================================================================== --- dont-close-0.patch (rev 0) +++ dont-close-0.patch 2011-09-19 22:01:06 UTC (rev 138300) @@ -0,0 +1,32 @@ +From 3a18db62e661fbb307ad3a53c18afabc92d3c63e Mon Sep 17 00:00:00 2001 +From: Petr Uzel <[email protected]> +Date: Tue, 13 Sep 2011 11:08:46 +0200 +Subject: [PATCH 1/2] lib: do not attempt to close(0) in sysfs_deinit() + +If the 'open' fails we 'goto err' which runs 'sysfs_deinit()' on a 'cxt' +which hasn't been fully initialised. The 'dir_fd' is still 0, so +sysfs_deinit calls "close(0)". + +Addresses: https://bugzilla.novell.com/show_bug.cgi?id=714151 +Reported-by: Diego Ercolani <[email protected]> +Analysed-by: Neil Brown <[email protected]> +Signed-off-by: Petr Uzel <[email protected]> +--- + lib/sysfs.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/lib/sysfs.c b/lib/sysfs.c +index eec1f24..ebb3bb5 100644 +--- a/lib/sysfs.c ++++ b/lib/sysfs.c +@@ -140,6 +140,7 @@ int sysfs_init(struct sysfs_cxt *cxt, dev_t devno, struct sysfs_cxt *parent) + int fd, rc = 0; + + memset(cxt, 0, sizeof(*cxt)); ++ cxt->dir_fd = -1; + + if (!sysfs_devno_path(devno, path, sizeof(path))) + goto err; +-- +1.7.6.1 + Added: fix-remount.patch =================================================================== --- fix-remount.patch (rev 0) +++ fix-remount.patch 2011-09-19 22:01:06 UTC (rev 138300) @@ -0,0 +1,37 @@ +From 277a6dd53569a409e05316a7bdaed0e78e326762 Mon Sep 17 00:00:00 2001 +From: Karel Zak <[email protected]> +Date: Tue, 13 Sep 2011 22:59:39 +0200 +Subject: [PATCH 2/2] mount: check for target before source on remount + +Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=737091 +Reported-by: Eric Paris <[email protected]> +Signed-off-by: Karel Zak <[email protected]> +--- + mount/fstab.c | 9 +++++++-- + 1 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/mount/fstab.c b/mount/fstab.c +index 8d88f68..77bf81c 100644 +--- a/mount/fstab.c ++++ b/mount/fstab.c +@@ -272,10 +272,15 @@ getmntfilebackward (const char *name, struct mntentchn *mcprev) { + mc0 = mtab_head(); + if (!mcprev) + mcprev = mc0; ++ + for (mc = mcprev->prev; mc && mc != mc0; mc = mc->prev) +- if (streq(mc->m.mnt_dir, name) || +- streq(mc->m.mnt_fsname, name)) ++ if (streq(mc->m.mnt_dir, name)) + return mc; ++ ++ for (mc = mcprev->prev; mc && mc != mc0; mc = mc->prev) ++ if (streq(mc->m.mnt_fsname, name)) ++ return mc; ++ + return NULL; + } + +-- +1.7.6.1 +
