rpms/gvfs/F-11 mount-prefix-0001-Include-mount-prefix-when-constructing-fuse-path.patch, NONE, 1.1 mount-prefix-0002-GDaemonMount-calculates-wrong-root-path-when-mount_p.patch, NONE, 1.1 mount-prefix-0003-Canonicalize-mount-prefix-to-prevent-mountspec-match.patch, NONE, 1.1 gvfs.spec, 1.142, 1.143 gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch, 1.1, NONE

Tomas Bzatek tbzatek at fedoraproject.org
Wed Aug 19 15:08:47 UTC 2009


Author: tbzatek

Update of /cvs/extras/rpms/gvfs/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10242

Modified Files:
	gvfs.spec 
Added Files:
	mount-prefix-0001-Include-mount-prefix-when-constructing-fuse-path.patch 
	mount-prefix-0002-GDaemonMount-calculates-wrong-root-path-when-mount_p.patch 
	mount-prefix-0003-Canonicalize-mount-prefix-to-prevent-mountspec-match.patch 
Removed Files:
	gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch 
Log Message:
* Wed Aug 19 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-12
- Fix remaining mount prefix issues (#509612)


mount-prefix-0001-Include-mount-prefix-when-constructing-fuse-path.patch:
 gdaemonvfs.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- NEW FILE mount-prefix-0001-Include-mount-prefix-when-constructing-fuse-path.patch ---
>From 2faf6d93fc2833d5b7f6da9288db1c8b98e4b7bd Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek at redhat.com>
Date: Tue, 18 Aug 2009 15:00:17 +0200
Subject: [PATCH 1/3] Include mount prefix when constructing fuse path

On complex URIs like 'dav://server/gallery/w/TestAlbum',
g_file_get_path () would return incomplete path without the
middle '/gallery/w' part (mount prefix). This patch ensures
full path to be returned.

See bug 590862 for details.
---
 client/gdaemonvfs.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/client/gdaemonvfs.c b/client/gdaemonvfs.c
index 5a138b3..0382727 100644
--- a/client/gdaemonvfs.c
+++ b/client/gdaemonvfs.c
@@ -386,7 +386,6 @@ convert_fuse_path (GVfs     *vfs,
       if (mount_info)
 	{
 	  g_object_unref (file);
-	  /* TODO: Do we need to look at the prefix of the mount_spec? */
 	  file = g_daemon_file_new (mount_info->mount_spec, mount_path);
 	  g_free (mount_path);
 	  g_mount_info_unref (mount_info);
@@ -993,6 +992,7 @@ _g_daemon_vfs_get_mount_info_by_fuse_sync (const char *fuse_path,
   DBusMessageIter iter;
   DBusError derror;
   int len;
+  const char *mount_path_end;
 	
   info = lookup_mount_info_by_fuse_path_in_cache (fuse_path,
 						  mount_path);
@@ -1031,9 +1031,12 @@ _g_daemon_vfs_get_mount_info_by_fuse_sync (const char *fuse_path,
 	{
 	  len = strlen (info->fuse_mountpoint);
 	  if (fuse_path[len] == 0)
-	    *mount_path = g_strdup ("/");
+	    mount_path_end = "/";
 	  else
-	    *mount_path = g_strdup (fuse_path + len);
+	    mount_path_end = fuse_path + len;
+
+	  *mount_path = g_build_filename (info->mount_spec->mount_prefix,
+					  mount_path_end, NULL);
 	}
       else
 	{
-- 
1.6.4


mount-prefix-0002-GDaemonMount-calculates-wrong-root-path-when-mount_p.patch:
 gdaemonmount.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE mount-prefix-0002-GDaemonMount-calculates-wrong-root-path-when-mount_p.patch ---
>From d77a5385a407264e5a62c629f847bd559e8ad598 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek at redhat.com>
Date: Tue, 18 Aug 2009 15:30:07 +0200
Subject: [PATCH 2/3] GDaemonMount calculates wrong root path when mount_prefix is set

When a mount is mounted with a mount_prefix != "/", GDaemonMount calculates
wrong root path, causing breakage of the .gvfs FUSE mount, and making the
mounts unclickable in Nautilus.

Patch by Mads Chr. Olesen, see bug 590730 for details.
---
 client/gdaemonmount.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/client/gdaemonmount.c b/client/gdaemonmount.c
index 703cbd6..2f7e2d6 100644
--- a/client/gdaemonmount.c
+++ b/client/gdaemonmount.c
@@ -110,7 +110,8 @@ g_daemon_mount_get_root (GMount *mount)
 {
   GDaemonMount *daemon_mount = G_DAEMON_MOUNT (mount);
 
-  return g_daemon_file_new (daemon_mount->mount_info->mount_spec, "/");
+  return g_daemon_file_new (daemon_mount->mount_info->mount_spec, 
+        daemon_mount->mount_info->mount_spec->mount_prefix);
 }
 
 static GIcon *
-- 
1.6.4


mount-prefix-0003-Canonicalize-mount-prefix-to-prevent-mountspec-match.patch:
 gmountspec.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- NEW FILE mount-prefix-0003-Canonicalize-mount-prefix-to-prevent-mountspec-match.patch ---
>From 7f167552dec842b74e71bdd91ee67a5b321cacd8 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek at redhat.com>
Date: Tue, 18 Aug 2009 15:33:51 +0200
Subject: [PATCH 3/3] Canonicalize mount prefix to prevent mountspec matching issues

This prevents mismatches during mount spec comparation, e.g. with
trailing slash in mount_prefix ("/subdir" vs. "/subdir/").

See bug 590730 for details.
---
 common/gmountspec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/gmountspec.c b/common/gmountspec.c
index d72e189..c55f996 100644
--- a/common/gmountspec.c
+++ b/common/gmountspec.c
@@ -71,7 +71,7 @@ g_mount_spec_new_from_data (GArray *items,
   if (mount_prefix == NULL)
     spec->mount_prefix = g_strdup ("/");
   else
-    spec->mount_prefix = mount_prefix;
+    spec->mount_prefix = g_mount_spec_canonicalize_path (mount_prefix);
 
   g_array_sort (spec->items, item_compare);
   
@@ -112,7 +112,7 @@ g_mount_spec_set_mount_prefix  (GMountSpec      *spec,
 				const char      *mount_prefix)
 {
   g_free (spec->mount_prefix);
-  spec->mount_prefix = g_strdup (mount_prefix);
+  spec->mount_prefix = g_mount_spec_canonicalize_path (mount_prefix);
 }
 
 
-- 
1.6.4



Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/F-11/gvfs.spec,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -p -r1.142 -r1.143
--- gvfs.spec	17 Aug 2009 14:52:33 -0000	1.142
+++ gvfs.spec	19 Aug 2009 15:08:47 -0000	1.143
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.2.3
-Release: 11%{?dist}
+Release: 12%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -43,9 +43,6 @@ Patch5: gvfs-1.2.3-sftp-40sec-timeout.pa
 # smb url don't work in the run application dialog 
 # http://bugzilla.gnome.org/show_bug.cgi?id=573994 
 Patch6: gvfs-1.3.4-smb-browse-fake-content-type.patch
-# Bad mount prefix stripping in g_daemon_file_get_path()
-# http://bugzilla.gnome.org/show_bug.cgi?id=590862
-Patch7: gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch
 # nautilus can't create "unamed folder X" if it exist on the target via sftp
 # https://bugzilla.redhat.com/show_bug.cgi?id=512611
 Patch8: gvfs-1.3.5-mkdir-exists-error.patch
@@ -98,6 +95,16 @@ Patch122: gvfs-1.3.1-audiocd-automount.p
 Patch200: webdav-username.patch
 Patch201: gvfs-1.2.4-fix-gphoto2-for-canon-5d.patch
 
+# Backported from master:
+#  Bad mount prefix stripping in g_daemon_file_get_path()
+#  http://bugzilla.gnome.org/show_bug.cgi?id=590862
+Patch301: mount-prefix-0001-Include-mount-prefix-when-constructing-fuse-path.patch
+#  GDaemonMount calculates wrong root path when mount_prefix is set
+#  http://bugzilla.gnome.org/show_bug.cgi?id=590730
+Patch302: mount-prefix-0002-GDaemonMount-calculates-wrong-root-path-when-mount_p.patch
+Patch303: mount-prefix-0003-Canonicalize-mount-prefix-to-prevent-mountspec-match.patch
+
+
 %description
 The gvfs package provides backend implementations for the gio
 framework in GLib. It includes ftp, sftp, cifs.
@@ -184,7 +191,6 @@ media players (Media Transfer Protocol) 
 %patch4 -p1 -b .cdda-query
 %patch5 -p1 -b .sftp-timeout
 %patch6 -p1 -b .smb-fake-content-type
-%patch7 -p1 -b .mount-prefix
 %patch8 -p1 -b .sftp-mkdir
 
 %patch101 -p1 -b .gdu-volume-monitor
@@ -209,6 +215,10 @@ media players (Media Transfer Protocol) 
 %patch200 -p1 -b .webdav-username
 %patch201 -p1 -b .gphoto2-basedir
 
+%patch301 -p1 -b .mount-prefix-path
+%patch302 -p1 -b .mount-prefix-gdaemonmount
+%patch303 -p1 -b .canonicalize-mountspec
+
 %build
 
 # Needed for gvfs-0.2.1-archive-integration.patch
@@ -351,6 +361,9 @@ update-desktop-database &> /dev/null ||:
 
 
 %changelog
+* Wed Aug 19 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-12
+- Fix remaining mount prefix issues (#509612)
+
 * Mon Aug 17 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-11
 - Fix Nautilus can't create "untitled folder" on sftp mounts (#512611)
 


--- gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch DELETED ---




More information about the fedora-extras-commits mailing list