From d739da01541d53414129d3171df221cfe2440fe5 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Sep 2011 23:14:47 +0000 Subject: Tue Sep 20 23:14:47 UTC 2011 --- testing/util-linux/PKGBUILD | 17 ++++++++++------ testing/util-linux/dont-close-0.patch | 32 ++++++++++++++++++++++++++++++ testing/util-linux/fix-remount.patch | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 testing/util-linux/dont-close-0.patch create mode 100644 testing/util-linux/fix-remount.patch (limited to 'testing') diff --git a/testing/util-linux/PKGBUILD b/testing/util-linux/PKGBUILD index c73a8cd30..8b63895c4 100644 --- a/testing/util-linux/PKGBUILD +++ b/testing/util-linux/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 137553 2011-09-09 11:23:27Z tomegun $ +# $Id: PKGBUILD 138305 2011-09-19 22:14:14Z tomegun $ # Maintainer: Tom Gundersen # Contributor: judd 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 @@ source=(ftp://ftp.kernel.org/pub/linux/utils/${pkgname}/v${pkgver}/${pkgname}-${ 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 @@ build() { --enable-write\ --enable-raw\ --disable-wall\ - --enable-partx + --enable-partx\ + --enable-libmount-mount make } @@ -53,4 +56,6 @@ md5sums=('4dcacdbdafa116635e52b977d9d0e879' '13838c6dd8df686e0f01ad0f236d2690' '465817ff8f7c08411c8011ee91b50318' 'f3ca75a1a22a2a739c5c22d92dc07ab0' - 'd9768f0b42d36d72c02ac7797b922ba1') + 'd9768f0b42d36d72c02ac7797b922ba1' + '37eae52af90c214dda73874c701fa246' + '344c780b9e08826dd8befe4271b41ed3') diff --git a/testing/util-linux/dont-close-0.patch b/testing/util-linux/dont-close-0.patch new file mode 100644 index 000000000..75cfc5c5e --- /dev/null +++ b/testing/util-linux/dont-close-0.patch @@ -0,0 +1,32 @@ +From 3a18db62e661fbb307ad3a53c18afabc92d3c63e Mon Sep 17 00:00:00 2001 +From: Petr Uzel +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 +Analysed-by: Neil Brown +Signed-off-by: Petr Uzel +--- + 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 + diff --git a/testing/util-linux/fix-remount.patch b/testing/util-linux/fix-remount.patch new file mode 100644 index 000000000..67149ab46 --- /dev/null +++ b/testing/util-linux/fix-remount.patch @@ -0,0 +1,37 @@ +From 277a6dd53569a409e05316a7bdaed0e78e326762 Mon Sep 17 00:00:00 2001 +From: Karel Zak +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 +Signed-off-by: Karel Zak +--- + 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 + -- cgit v1.2.3-54-g00ecf