rpms/gvfs/devel gvfs-1.3.5-gdaemonmount-root-path.patch, NONE, 1.1 gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch, NONE, 1.1 gvfs.spec, 1.147, 1.148
Tomas Bzatek
tbzatek at fedoraproject.org
Thu Aug 13 14:16:57 UTC 2009
Author: tbzatek
Update of /cvs/extras/rpms/gvfs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9487
Modified Files:
gvfs.spec
Added Files:
gvfs-1.3.5-gdaemonmount-root-path.patch
gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch
Log Message:
* Thu Aug 13 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.3.4-5
- More complete fix for DAV mount path prefix issues
gvfs-1.3.5-gdaemonmount-root-path.patch:
gdaemonmount.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- NEW FILE gvfs-1.3.5-gdaemonmount-root-path.patch ---
Index: client/gdaemonmount.c
===================================================================
--- trunk/client/gdaemonmount.c (revision 2378)
+++ trunk/client/gdaemonmount.c (working copy)
@@ -108,7 +108,8 @@
{
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 *
gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch:
gmountspec.c | 31 +++++++++++++++++++++++++------
1 file changed, 25 insertions(+), 6 deletions(-)
--- NEW FILE gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch ---
>From 3e62465b2aee2ca71302f00ccf815a48e87626ee Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek at redhat.com>
Date: Thu, 13 Aug 2009 15:30:35 +0200
Subject: [PATCH] Always set mount prefix ending with path separator
Mount prefix should always end with path separator ("/") to prevent
duplicate mounts, which would only have different prefix strings
(e.g. one with "/subdir" and the other with "/subdir/").
---
common/gmountspec.c | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/common/gmountspec.c b/common/gmountspec.c
index d72e189..16c0e66 100644
--- a/common/gmountspec.c
+++ b/common/gmountspec.c
@@ -42,6 +42,19 @@ item_compare (const void *_a, const void *_b)
return strcmp (a->key, b->key);
}
+/*
+ * Ensure trailing "/" to avoid redirections and mount_spec duplication.
+ * Returns newly allocated string.
+ */
+static gchar *
+ensure_trailing_path_separator (const gchar *path)
+{
+ if (path == NULL || g_str_has_suffix (path, "/"))
+ return g_strdup (path);
+ else
+ return g_strconcat (path, "/", NULL);
+}
+
GMountSpec *
g_mount_spec_new (const char *type)
{
@@ -69,9 +82,14 @@ g_mount_spec_new_from_data (GArray *items,
spec->ref_count = 1;
spec->items = items;
if (mount_prefix == NULL)
- spec->mount_prefix = g_strdup ("/");
+ {
+ spec->mount_prefix = g_strdup ("/");
+ }
else
- spec->mount_prefix = mount_prefix;
+ {
+ spec->mount_prefix = ensure_trailing_path_separator (mount_prefix);
+ g_free (mount_prefix);
+ }
g_array_sort (spec->items, item_compare);
@@ -112,7 +130,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 = ensure_trailing_path_separator (mount_prefix);
}
@@ -247,7 +265,8 @@ g_mount_spec_from_dbus (DBusMessageIter *iter)
spec = g_mount_spec_new (NULL);
g_free (spec->mount_prefix);
- spec->mount_prefix = mount_prefix;
+ spec->mount_prefix = ensure_trailing_path_separator (mount_prefix);
+ g_free (mount_prefix);
if (dbus_message_iter_get_arg_type (&spec_iter) != DBUS_TYPE_ARRAY ||
dbus_message_iter_get_element_type (&spec_iter) != DBUS_TYPE_STRUCT)
@@ -541,7 +560,8 @@ g_mount_spec_new_from_string (const gchar *str,
if (strcmp (tokens[0], "prefix") == 0)
{
g_free (item.key);
- mount_prefix = item.value;
+ mount_prefix = ensure_trailing_path_separator (item.value);
+ g_free (item.value);
}
else
{
--
1.6.4
Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/devel/gvfs.spec,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -p -r1.147 -r1.148
--- gvfs.spec 11 Aug 2009 16:23:14 -0000 1.147
+++ gvfs.spec 13 Aug 2009 14:16:57 -0000 1.148
@@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.3.4
-Release: 4%{?dist}
+Release: 5%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -38,6 +38,10 @@ Patch1: gvfs-archive-integration.patch
# Bad mount prefix stripping in g_daemon_file_get_path()
# http://bugzilla.gnome.org/show_bug.cgi?id=590862
Patch4: gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch
+# GDaemonMount calculates wrong root path when mount_prefix is set
+# http://bugzilla.gnome.org/show_bug.cgi?id=590730
+Patch5: gvfs-1.3.5-gdaemonmount-root-path.patch
+Patch6: gvfs-1.3.5-mountspec-prefix-ensure-ending-path-separator.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=497631
Patch8: gvfs-1.2.2-dnssd-deadlock.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=504339
@@ -138,6 +142,8 @@ and iPod Touches to applications using g
%setup -q
%patch1 -p1 -b .archive-integration
%patch4 -p1 -b .mount-prefix
+%patch5 -p1 -b .root-path
+%patch6 -p1 -b .prefix-slash
%patch8 -p1 -b .dnssd-deadlock
%patch9 -p1 -b .sftp-timeout
%patch10 -p1 -b .afc
@@ -295,6 +301,9 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
%changelog
+* Thu Aug 13 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.3.4-5
+- More complete fix for DAV mount path prefix issues
+
* Tue Aug 11 2009 Bastien Nocera <bnocera at redhat.com> 1.3.4-4
- Fix crash on startup for the afc volume monitor
More information about the scm-commits
mailing list