[arch-commits] Commit in util-linux/trunk (2 files)

Tom Gundersen tomegun at archlinux.org
Wed Feb 29 11:44:48 EST 2012


    Date: Wednesday, February 29, 2012 @ 11:44:47
  Author: tomegun
Revision: 151649

upgpkg: util-linux 2.21-4

fix --make-private by making libmonut deal with empty source

Added:
  util-linux/trunk/libmount-allow-empty-source-for-mount-2-syscall.patch
Modified:
  util-linux/trunk/PKGBUILD

-------------------------------------------------------+
 PKGBUILD                                              |    9 ++-
 libmount-allow-empty-source-for-mount-2-syscall.patch |   48 ++++++++++++++++
 2 files changed, 54 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-02-29 11:11:41 UTC (rev 151648)
+++ PKGBUILD	2012-02-29 16:44:47 UTC (rev 151649)
@@ -4,7 +4,7 @@
 
 pkgname=util-linux
 pkgver=2.21
-pkgrel=3
+pkgrel=4
 pkgdesc="Miscellaneous system utilities for Linux"
 url="http://www.kernel.org/pub/linux/utils/util-linux/"
 arch=('i686' 'x86_64')
@@ -19,7 +19,8 @@
 	lib-canonicalize-always-remove-tailing-slash.patch
 	libmount-canonicalize-targets-from-fstab-on-mount-a.patch
 	mount-new-cleanup-mount-a-return-codes.patch
-	libmount-use-mount.-type-s-for-NFS-only.patch)
+	libmount-use-mount.-type-s-for-NFS-only.patch
+	libmount-allow-empty-source-for-mount-2-syscall.patch)
 optdepends=('perl: for chkdupexe support')
 
 build() {
@@ -33,6 +34,7 @@
   patch -p1 -i ../libmount-canonicalize-targets-from-fstab-on-mount-a.patch
   patch -p1 -i ../mount-new-cleanup-mount-a-return-codes.patch 
   patch -p1 -i ../libmount-use-mount.-type-s-for-NFS-only.patch
+  patch -p1 -i ../libmount-allow-empty-source-for-mount-2-syscall.patch
 
   ./configure --prefix=/usr \
               --libdir=/usr/lib \
@@ -61,4 +63,5 @@
          '8c1bf7b10e22e2b835441e6ae2d804d6'
          '7b92423c588ed35229a9a166349c29a9'
          'c483ab2d52609b5857d096b256a5075c'
-         'e31037773db7f3244b71db434f60e6f0')
+         'e31037773db7f3244b71db434f60e6f0'
+         '2de5ae7916e79970e90bf06542e43d86')

Added: libmount-allow-empty-source-for-mount-2-syscall.patch
===================================================================
--- libmount-allow-empty-source-for-mount-2-syscall.patch	                        (rev 0)
+++ libmount-allow-empty-source-for-mount-2-syscall.patch	2012-02-29 16:44:47 UTC (rev 151649)
@@ -0,0 +1,48 @@
+From 772cce373f693096c2ae6f156306acf9e20c09e8 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Tue, 28 Feb 2012 00:02:30 +0100
+Subject: [PATCH] libmount: allow empty source for mount(2) syscall
+
+Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=797438
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ libmount/src/context_mount.c |    4 +++-
+ sys-utils/mount.c            |    6 +++++-
+ 2 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c
+index a0c5951..098243b 100644
+--- a/libmount/src/context_mount.c
++++ b/libmount/src/context_mount.c
+@@ -451,8 +451,10 @@ static int do_mount(struct libmnt_context *cxt, const char *try_type)
+ 	src = mnt_fs_get_srcpath(cxt->fs);
+ 	target = mnt_fs_get_target(cxt->fs);
+ 
+-	if (!src || !target)
++	if (!target)
+ 		return -EINVAL;
++	if (!src)
++		src = "none";
+ 
+ 	type = try_type ? : mnt_fs_get_fstype(cxt->fs);
+ 
+diff --git a/sys-utils/mount.c b/sys-utils/mount.c
+index 3fbac04..23abc91 100644
+--- a/sys-utils/mount.c
++++ b/sys-utils/mount.c
+@@ -347,7 +347,11 @@ try_readonly:
+ 			return MOUNT_EX_USAGE;
+ 		}
+ 
+-		if (src == NULL || tgt == NULL) {
++		/*
++		 * TODO: add mnt_context_fstab_applied() to check if we found
++		 *       target/source in the file.
++		 */
++		if (!tgt) {
+ 			if (mflags & MS_REMOUNT)
+ 				warnx(_("%s not mounted"), src ? src : tgt);
+ 			else
+-- 
+1.7.9.2
+



More information about the arch-commits mailing list