summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-09-25 23:14:59 +0000
committerroot <root@rshg054.dnsready.net>2011-09-25 23:14:59 +0000
commit21efc9511d14394cc1d8426e2e0a6c668964fbe9 (patch)
tree7e6141022e93959706f4a4cba61e40b0d083161b /core
parent38a0b12ffffc8842019f47425b60688253e709b0 (diff)
Sun Sep 25 23:14:59 UTC 2011
Diffstat (limited to 'core')
-rw-r--r--core/util-linux/PKGBUILD17
-rw-r--r--core/util-linux/dont-close-0.patch32
-rw-r--r--core/util-linux/fix-remount.patch37
3 files changed, 80 insertions, 6 deletions
diff --git a/core/util-linux/PKGBUILD b/core/util-linux/PKGBUILD
index 7ac817394..9d3587597 100644
--- a/core/util-linux/PKGBUILD
+++ b/core/util-linux/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 137777 2011-09-10 22:03:07Z tomegun $
+# $Id: PKGBUILD 138467 2011-09-24 11:28:45Z tomegun $
# Maintainer: Tom Gundersen <teg@jklm.no>
# Contributor: judd <jvinet@zeroflux.org>
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/core/util-linux/dont-close-0.patch b/core/util-linux/dont-close-0.patch
new file mode 100644
index 000000000..75cfc5c5e
--- /dev/null
+++ b/core/util-linux/dont-close-0.patch
@@ -0,0 +1,32 @@
+From 3a18db62e661fbb307ad3a53c18afabc92d3c63e Mon Sep 17 00:00:00 2001
+From: Petr Uzel <petr.uzel@suse.cz>
+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 <diego.ercolani@gmail.com>
+Analysed-by: Neil Brown <nfbrown@suse.com>
+Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
+---
+ 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/core/util-linux/fix-remount.patch b/core/util-linux/fix-remount.patch
new file mode 100644
index 000000000..67149ab46
--- /dev/null
+++ b/core/util-linux/fix-remount.patch
@@ -0,0 +1,37 @@
+From 277a6dd53569a409e05316a7bdaed0e78e326762 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+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 <eparis@redhat.com>
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ 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
+