[util-linux/f15] 2.19.1-1.3: #716483

kzak kzak at fedoraproject.org
Mon Jul 4 23:06:08 UTC 2011


commit 52a02ebeb9af7e9ad3c1716c7584ff33a5181822
Author: Karel Zak <kzak at redhat.com>
Date:   Mon Jul 4 23:45:38 2011 +0200

    2.19.1-1.3: #716483
    
    Signed-off-by: Karel Zak <kzak at redhat.com>

 util-linux-2.19-mount-mountpoint.patch |   76 ++++++++++++++++++++++++++++++++
 util-linux.spec                        |    8 +++-
 2 files changed, 83 insertions(+), 1 deletions(-)
---
diff --git a/util-linux-2.19-mount-mountpoint.patch b/util-linux-2.19-mount-mountpoint.patch
new file mode 100644
index 0000000..bd97aa7
--- /dev/null
+++ b/util-linux-2.19-mount-mountpoint.patch
@@ -0,0 +1,76 @@
+From 067e9b4934372f72b89b2c0442a3d28290834537 Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak at redhat.com>
+Date: Wed, 29 Jun 2011 09:02:50 +0200
+Subject: [PATCH] mount: first look for mountpoint
+
+  # mount <device|dir>
+
+The current code looks for a device and then for a mountpoint in
+/etc/fstab. This is not user friendly solution. People usually use
+
+ # mount /dir
+
+to mount any filesystem. It makes more sense to check for mountpoint
+and if not found then for device.
+
+This is also important for bind mounts, for example if you have in
+your fstab:
+
+	/dev/sda1	/mnt/foo	auto defaults
+	/mnt/foo	/mnt/bar	none bind
+
+then
+	# mount /mnt/foo
+
+should be interpreted as the first entry and /dev/sda1 should be
+mounted.
+
+Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=716483
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ mount/mount.8 |   11 +++++++++++
+ mount/mount.c |    4 ++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/mount/mount.8 b/mount/mount.8
+index 8982537..e9a52dd 100644
+--- a/mount/mount.8
++++ b/mount/mount.8
+@@ -101,6 +101,17 @@ the pathname
+ refers to the root of the filesystem on
+ .IR device .
+ 
++If only directory or device is given, for example:
++.RS
++
++.br
++.BI "mount /dir"
++.br
++
++.RE
++then mount looks for a mountpoint and if not found then for a device in the
++/etc/fstab file.
++
+ .B The listing and help.
+ .RS
+ Three forms of invocation do not actually mount anything:
+diff --git a/mount/mount.c b/mount/mount.c
+index 3ba705f..00637f5 100644
+--- a/mount/mount.c
++++ b/mount/mount.c
+@@ -2347,10 +2347,10 @@ getfs(const char *spec, const char *uuid, const char *label)
+ 	else if (label)
+ 		mc = getfs_by_label(label);
+ 	else {
+-		mc = getfs_by_spec(spec);
++		mc = getfs_by_dir(spec);
+ 
+ 		if (!mc)
+-			mc = getfs_by_dir(spec);
++			mc = getfs_by_spec(spec);
+ 	}
+ 	if (mc)
+ 		return mc;
+-- 
+1.7.5.4
+
diff --git a/util-linux.spec b/util-linux.spec
index 00d7e8e..01175fb 100644
--- a/util-linux.spec
+++ b/util-linux.spec
@@ -2,7 +2,7 @@
 Summary: A collection of basic system utilities
 Name: util-linux
 Version: 2.19.1
-Release: 1.2%{?dist}
+Release: 1.3%{?dist}
 License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
 Group: System Environment/Base
 URL: http://kernel.org/~kzak/util-linux/
@@ -93,6 +93,8 @@ Patch10: util-linux-2.19-libmount-mounted.patch
 Patch11: util-linux-2.19-mount-a-bind.patch
 # 709681 - failure to mount if a mount point ends with a slash in /etc/fstab
 Patch12: util-linux-2.19-mount-fsname.patch
+# 716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup
+Patch13: util-linux-2.19-mount-mountpoint.patch
 
 %description
 The util-linux package contains a large variety of low-level system
@@ -211,6 +213,7 @@ cp %{SOURCE8} %{SOURCE9} .
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 
 
 %build
@@ -757,6 +760,9 @@ fi
 
 
 %changelog
+* Mon Jul  4 2011 Karel Zak <kzak at redhat.com> 2.19.1-1.3
+- fix #716483 - /var/tmp --(BIND-mounted)--> /tmp disrupts/hangs bootup
+
 * Tue Jun 14 2011 Karel Zak <kzak at redhat.com> 2.19.1-1.2
 - fix #709681 - failure to mount if a mount point ends with a slash in /etc/fstab
 


More information about the scm-commits mailing list