[util-linux-ng/f14/master] 2.18-4.2: fix #538551, #625064
kzak
kzak at fedoraproject.org
Thu Oct 7 11:31:19 UTC 2010
commit cb5474ca02f3ded58390055b8d486cc449280237
Author: Karel Zak <kzak at redhat.com>
Date: Thu Oct 7 13:29:41 2010 +0200
2.18-4.2: fix #538551, #625064
- fix #538551 - Dual-filesystem (ISO9660/HFS) CD-ROMs not mounted automatically
- fix #625064 - fuse-sshfs mounts are not displayed in Nautilus
Signed-off-by: Karel Zak <kzak at redhat.com>
util-linux-ng-2.18-mount-subtype.patch | 115 ++++++++++++++++++++++++++++++++
util-linux-ng-blkid-HFS.patch | 28 ++++++++
util-linux-ng.spec | 13 +++-
3 files changed, 154 insertions(+), 2 deletions(-)
---
diff --git a/util-linux-ng-2.18-mount-subtype.patch b/util-linux-ng-2.18-mount-subtype.patch
new file mode 100644
index 0000000..4b95f12
--- /dev/null
+++ b/util-linux-ng-2.18-mount-subtype.patch
@@ -0,0 +1,115 @@
+From dc0a335554eafa643c7fd123d99e14df72c515c3 Mon Sep 17 00:00:00 2001
+From: Miklos Szeredi <miklos at szeredi.hu>
+Date: Fri, 27 Aug 2010 16:58:44 +0200
+Subject: [PATCH] mount: handle filesystems with subtype
+
+Linux can handle filesystem types with "MAINTYPE.SUBTYPE" format,
+where the main type determines the actual filesystem driver while the
+subtype can be interpreted by the filesystem itself.
+
+When searching for mount helpers mount(8) and umount(8) should also
+interpret such types, falling back to (u)mount.MAINTYPE if
+(u)mount.MAINTYPE.SUBTYPE doesn't exist.
+
+This patch implements this, passing the type with "-t TYPE"
+to the mount program in this case.
+
+Reported-by: Josef Bacik <josef at redhat.com>
+Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=625064
+Signed-off-by: Miklos Szeredi <mszeredi at suse.cz>
+---
+ mount/mount.c | 19 ++++++++++++++++---
+ mount/umount.c | 17 +++++++++++++++--
+ 2 files changed, 31 insertions(+), 5 deletions(-)
+
+diff --git a/mount/mount.c b/mount/mount.c
+index f2b6ee2..84986e3 100644
+--- a/mount/mount.c
++++ b/mount/mount.c
+@@ -664,13 +664,22 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in
+
+ path = strtok(search_path, ":");
+ while (path) {
++ int type_opt = 0;
++
+ res = snprintf(mountprog, sizeof(mountprog), "%s/mount.%s",
+ path, type);
+ path = strtok(NULL, ":");
+ if (res >= sizeof(mountprog) || res < 0)
+ continue;
+
+- if (stat(mountprog, &statbuf))
++ res = stat(mountprog, &statbuf);
++ if (res == -1 && errno == ENOENT && strchr(type, '.')) {
++ /* If type ends with ".subtype" try without it */
++ *strrchr(mountprog, '.') = '\0';
++ type_opt = 1;
++ res = stat(mountprog, &statbuf);
++ }
++ if (res)
+ continue;
+
+ if (verbose)
+@@ -678,7 +687,7 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in
+
+ switch (fork()) {
+ case 0: { /* child */
+- char *oo, *mountargs[10];
++ char *oo, *mountargs[12];
+ int i = 0;
+
+ if (setgid(getgid()) < 0)
+@@ -703,7 +712,11 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in
+ mountargs[i++] = "-o"; /* 8 */
+ mountargs[i++] = oo; /* 9 */
+ }
+- mountargs[i] = NULL; /* 10 */
++ if (type_opt) {
++ mountargs[i++] = "-t"; /* 10 */
++ mountargs[i++] = (char *) type; /* 11 */
++ }
++ mountargs[i] = NULL; /* 12 */
+
+ if (verbose > 2) {
+ i = 0;
+diff --git a/mount/umount.c b/mount/umount.c
+index 5bd5360..0ad7c5f 100644
+--- a/mount/umount.c
++++ b/mount/umount.c
+@@ -103,11 +103,20 @@ check_special_umountprog(const char *spec, const char *node,
+ return 0;
+
+ if (strlen(type) < 100) {
++ int type_opt = 0;
++
+ sprintf(umountprog, "/sbin/umount.%s", type);
+- if (stat(umountprog, &statbuf) == 0) {
++ res = stat(umountprog, &statbuf);
++ if (res == -1 && errno == ENOENT && strchr(type, '.')) {
++ /* If type ends with ".subtype" try without it */
++ *strrchr(umountprog, '.') = '\0';
++ type_opt = 1;
++ res = stat(umountprog, &statbuf);
++ }
++ if (res == 0) {
+ res = fork();
+ if (res == 0) {
+- char *umountargs[8];
++ char *umountargs[10];
+ int i = 0;
+
+ if(setgid(getgid()) < 0)
+@@ -128,6 +137,10 @@ check_special_umountprog(const char *spec, const char *node,
+ umountargs[i++] = "-v";
+ if (remount)
+ umountargs[i++] = "-r";
++ if (type_opt) {
++ umountargs[i++] = "-t";
++ umountargs[i++] = (char *) type;
++ }
+ umountargs[i] = NULL;
+ execv(umountprog, umountargs);
+ exit(1); /* exec failed */
+--
+1.7.2.3
+
diff --git a/util-linux-ng-blkid-HFS.patch b/util-linux-ng-blkid-HFS.patch
new file mode 100644
index 0000000..be16e5d
--- /dev/null
+++ b/util-linux-ng-blkid-HFS.patch
@@ -0,0 +1,28 @@
+From 791a2fd67c118c3f07141e4cc95532fe908015a9 Mon Sep 17 00:00:00 2001
+From: Alexandre Peixoto Ferreira <alexandref75 at gmail.com>
+Date: Mon, 19 Jul 2010 18:04:33 -0500
+Subject: [PATCH] libblkid: set tolerant flag for HFS
+
+An CDROM can contain both HFS and ISO9660 views on the same filesystem.
+This confuses mount/KDE/Gnome.
+
+Signed-off-by: Karel Zak <kzak at redhat.com>
+---
+ shlibs/blkid/src/superblocks/hfs.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/shlibs/blkid/src/superblocks/hfs.c b/shlibs/blkid/src/superblocks/hfs.c
+index 8ebff68..033a65d 100644
+--- a/shlibs/blkid/src/superblocks/hfs.c
++++ b/shlibs/blkid/src/superblocks/hfs.c
+@@ -291,6 +291,7 @@ const struct blkid_idinfo hfs_idinfo =
+ .name = "hfs",
+ .usage = BLKID_USAGE_FILESYSTEM,
+ .probefunc = probe_hfs,
++ .flags = BLKID_IDINFO_TOLERANT,
+ .magics =
+ {
+ { .magic = "BD", .len = 2, .kboff = 1 },
+--
+1.7.2.3
+
diff --git a/util-linux-ng.spec b/util-linux-ng.spec
index 0f0810b..5e436f2 100644
--- a/util-linux-ng.spec
+++ b/util-linux-ng.spec
@@ -2,7 +2,7 @@
Summary: A collection of basic system utilities
Name: util-linux-ng
Version: 2.18
-Release: 4.1%{?dist}
+Release: 4.2%{?dist}
License: GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ and BSD with advertising and Public Domain
Group: System Environment/Base
URL: ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng
@@ -119,7 +119,10 @@ Patch11: util-linux-ng-2.17-mount-loopdev.patch
Patch12: util-linux-ng-2.18-cfdisk-cyl.patch
# don't truncate findmnt(1) output
Patch13: util-linux-ng-2.18-libmount-optsmerge.patch
-
+# 538551 - Dual-filesystem (ISO9660/HFS) CD-ROMs not mounted automatically
+Patch14: util-linux-ng-blkid-HFS.patch
+# 625064 - fuse-sshfs mounts are not displayed in Nautilus
+Patch15: util-linux-ng-2.18-mount-subtype.patch
%description
The util-linux-ng package contains a large variety of low-level system
@@ -239,6 +242,8 @@ cp %{SOURCE8} %{SOURCE9} .
%patch11 -p1
%patch12 -p1
%patch13 -p1
+%patch14 -p1
+%patch15 -p1
%build
unset LINGUAS || :
@@ -775,6 +780,10 @@ fi
%changelog
+* Thu Oct 7 2010 Karel Zak <kzak at redhat.com> 2.18-4.2
+- fix #538551 - Dual-filesystem (ISO9660/HFS) CD-ROMs not mounted automatically
+- fix #625064 - fuse-sshfs mounts are not displayed in Nautilus
+
* Thu Oct 7 2010 Karel Zak <kzak at redhat.com> 2.18-4.1
- fix 630340 - cfdisk cannot read default installer partitioning
- don't truncate findmnt(1) output (usptream v2.18-6-ga93e569)
More information about the scm-commits
mailing list