- Update to 1.3.6

This commit is contained in:
Tomas Bzatek 2009-09-07 10:33:02 +00:00
parent dccc590e63
commit 86ae1fc251
13 changed files with 8 additions and 496 deletions

View File

@ -1 +1 @@
gvfs-1.3.5.tar.bz2
gvfs-1.3.6.tar.bz2

View File

@ -1,44 +0,0 @@
From c89b238b4a03e08ca8c793c5689948b1fa9c2722 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Fri, 15 May 2009 14:29:28 +0200
Subject: [PATCH] Avoid deadlock when pulling resolved record from cache
When the host has already been resolved and is present in the cache,
it's returned immediately. But we always started the mainloop even
if it was quit before, resulting in endless waiting for an event
which had been received before that.
---
common/gvfsdnssdresolver.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/common/gvfsdnssdresolver.c b/common/gvfsdnssdresolver.c
index 7794042..957d2cb 100644
--- a/common/gvfsdnssdresolver.c
+++ b/common/gvfsdnssdresolver.c
@@ -1249,14 +1249,21 @@ g_vfs_dns_sd_resolver_resolve_sync (GVfsDnsSdResolver *resolver,
g_return_val_if_fail (G_VFS_IS_DNS_SD_RESOLVER (resolver), FALSE);
data = g_new0 (ResolveDataSync, 1);
- data->loop = g_main_loop_new (NULL, FALSE);
+ /* mark the main loop as running to have an indication whether
+ * g_main_loop_quit() was called before g_main_loop_run()
+ */
+ data->loop = g_main_loop_new (NULL, TRUE);
g_vfs_dns_sd_resolver_resolve (resolver,
cancellable,
(GAsyncReadyCallback) resolve_sync_cb,
data);
- g_main_loop_run (data->loop);
+ /* start the loop only if it wasn't quit before
+ * (i.e. in case when pulling the record from cache)
+ */
+ if (g_main_loop_is_running (data->loop))
+ g_main_loop_run (data->loop);
ret = data->ret;
if (data->error != NULL)
--
1.6.2.2

View File

@ -1,30 +0,0 @@
diff -up gvfs-1.2.3/daemon/gvfsbackendsftp.c.orig gvfs-1.2.3/daemon/gvfsbackendsftp.c
--- gvfs-1.2.3/daemon/gvfsbackendsftp.c.orig 2009-04-20 12:41:37.000000000 +0200
+++ gvfs-1.2.3/daemon/gvfsbackendsftp.c 2009-06-08 16:22:08.000000000 +0200
@@ -74,6 +74,8 @@
#define USE_PTY 1
#endif
+#define SFTP_READ_TIMEOUT 40 /* seconds */
+
static GQuark id_q;
typedef enum {
@@ -598,7 +600,7 @@ wait_for_reply (GVfsBackend *backend, in
FD_ZERO (&ifds);
FD_SET (stdout_fd, &ifds);
- tv.tv_sec = 20;
+ tv.tv_sec = SFTP_READ_TIMEOUT;
tv.tv_usec = 0;
ret = select (stdout_fd+1, &ifds, NULL, NULL, &tv);
@@ -859,7 +861,7 @@ handle_login (GVfsBackend *backend,
FD_SET (stdout_fd, &ifds);
FD_SET (prompt_fd, &ifds);
- tv.tv_sec = 20;
+ tv.tv_sec = SFTP_READ_TIMEOUT;
tv.tv_usec = 0;
ret = select (MAX (stdout_fd, prompt_fd)+1, &ifds, NULL, NULL, &tv);

View File

@ -1,37 +0,0 @@
From 54a2ed675de586102462415fce72ed28aa7e2388 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Fri, 7 Aug 2009 11:29:11 +0200
Subject: [PATCH] =?UTF-8?q?Bug=20589434=20=E2=80=93=20gvfsd-sftp=20crashed=20with=20SIGSEGV=20in=20strlen()?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Pass correct pointer to the choices struct
---
daemon/gvfsbackendsftp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index 3b510a7..b32d11b 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -1034,7 +1034,6 @@ handle_login (GVfsBackend *backend,
strstr (buffer, "Key fingerprint:") != NULL)
{
const gchar *choices[] = {_("Log In Anyway"), _("Cancel Login")};
- const gchar *v_choices = (const gchar *)choices;
const gchar *choice_string;
gchar *hostname = NULL;
gchar *fingerprint = NULL;
@@ -1055,7 +1054,7 @@ handle_login (GVfsBackend *backend,
if (!g_mount_source_ask_question (mount_source,
message,
- &v_choices,
+ (const gchar **) &choices,
2,
&aborted,
&choice) ||
--
1.6.4

View File

@ -1,44 +0,0 @@
From 3ba4f3e3deae84cbd5ffe8e7bfd2803d96e7e2e6 Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Wed, 5 Aug 2009 16:50:28 +0200
Subject: [PATCH] Don't strip mount prefix when returning local mapped path
On complex URIs like 'dav://server/gallery/w/TestAlbum',
g_file_get_path () would return malformed path with the middle
path '/gallery/w' stripped. This patch ensures full path to be
returned.
See bug #590862 for more details.
---
client/gdaemonfile.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index 8e14929..be9baef 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -167,7 +167,6 @@ g_daemon_file_get_path (GFile *file)
{
GDaemonFile *daemon_file = G_DAEMON_FILE (file);
GMountInfo *mount_info;
- const char *rel_path;
char *path;
/* This is a sync i/o call, which is a bit unfortunate, as
@@ -185,12 +184,7 @@ g_daemon_file_get_path (GFile *file)
path = NULL;
if (mount_info->fuse_mountpoint)
- {
- rel_path = daemon_file->path +
- strlen (mount_info->mount_spec->mount_prefix);
-
- path = g_build_filename (mount_info->fuse_mountpoint, rel_path, NULL);
- }
+ path = g_build_filename (mount_info->fuse_mountpoint, daemon_file->path, NULL);
g_mount_info_unref (mount_info);
--
1.6.4

View File

@ -1,39 +0,0 @@
From a3979cd918d366be7850ca558b3040b8d2d0322d Mon Sep 17 00:00:00 2001
From: Peter Waller <peter.waller@gmail.com>
Date: Tue, 04 Aug 2009 09:14:30 +0000
Subject: Bug 589915 - gedit crashed with SEGV in strlen()
FIx a crash introduced by commit c372064a where it was forgotten do
adapt the function signature of a callback
---
diff --git a/client/gdaemonfileoutputstream.c b/client/gdaemonfileoutputstream.c
index e47c2e8..c5263e1 100644
--- a/client/gdaemonfileoutputstream.c
+++ b/client/gdaemonfileoutputstream.c
@@ -1474,6 +1474,7 @@ async_close_done (GOutputStream *stream,
gpointer op_data,
GAsyncReadyCallback callback,
gpointer user_data,
+ GCancellable *cancellable,
GError *io_error)
{
GDaemonFileOutputStream *file;
@@ -1481,7 +1482,6 @@ async_close_done (GOutputStream *stream,
CloseOperation *op;
gboolean result;
GError *error;
- GCancellable *cancellable = NULL; /* TODO: get cancellable */
file = G_DAEMON_FILE_OUTPUT_STREAM (stream);
@@ -1544,7 +1544,7 @@ g_daemon_file_output_stream_close_async (GOutputStream *stream,
op, io_priority,
(GAsyncReadyCallback)callback, data,
cancellable,
- (AsyncIteratorDone)async_close_done);
+ async_close_done);
}
static gboolean
--
cgit v0.8.2

View File

@ -1,34 +0,0 @@
From fa09fd4e5dda701c8862ce2d7762698b907cf90f Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Fri, 31 Jul 2009 16:58:54 +0200
Subject: [PATCH] smb-browse: fake content type to allow query default handler
Hardcode the "inode/directory" content-type
Fixes #573994
---
daemon/gvfsbackendsmbbrowse.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/daemon/gvfsbackendsmbbrowse.c b/daemon/gvfsbackendsmbbrowse.c
index 6d0c07e..2eebdd2 100644
--- a/daemon/gvfsbackendsmbbrowse.c
+++ b/daemon/gvfsbackendsmbbrowse.c
@@ -1229,6 +1229,7 @@ get_file_info_from_entry (GVfsBackendSmbBrowse *backend, BrowseEntry *entry, GFi
g_file_info_set_edit_name (info, entry->name_utf8);
g_file_info_set_attribute_string (info, "smb::comment", entry->comment);
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL, TRUE);
+ g_file_info_set_content_type (info, "inode/directory");
icon = NULL;
if (entry->smbc_type == SMBC_WORKGROUP)
@@ -1355,6 +1356,7 @@ try_query_info (GVfsBackend *backend,
g_file_info_set_file_type (info, G_FILE_TYPE_DIRECTORY);
g_file_info_set_name (info, "/");
g_file_info_set_display_name (info, g_vfs_backend_get_display_name (backend));
+ g_file_info_set_content_type (info, "inode/directory");
icon = g_vfs_backend_get_icon (backend);
if (icon != NULL)
g_file_info_set_icon (info, icon);
--
1.6.3.3

View File

@ -1,14 +0,0 @@
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 *

View File

@ -1,32 +0,0 @@
From 3fe8a3b48eb45392db2489434fb1b3682ccdc5ab Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@redhat.com>
Date: Mon, 17 Aug 2009 15:40:52 +0200
Subject: [PATCH] sftp: return proper error when directory exists
Nautilus depends on properly reported errors when an operation fails.
In this case, user was not able to create new directory on sftp share
when "untitled folder" already existed.
So let's mask sftp's universal SSH_FX_FAILURE error for SSH_FXP_MKDIR.
Specification says: "An error will be returned if a file or directory
with the specified path already exists."
---
daemon/gvfsbackendsftp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index f810b31..cf33eaf 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -4350,7 +4350,7 @@ make_directory_reply (GVfsBackendSftp *backend,
gpointer user_data)
{
if (reply_type == SSH_FXP_STATUS)
- result_from_status (job, reply, -1, -1);
+ result_from_status (job, reply, G_IO_ERROR_EXISTS, -1);
else
g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_FAILED,
_("Invalid reply received"));
--
1.6.4

View File

@ -1,85 +0,0 @@
From 3e62465b2aee2ca71302f00ccf815a48e87626ee Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek@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

View File

@ -1,129 +0,0 @@
diff --git a/configure.ac b/configure.ac
index 9bfb8ad..887cf95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,7 +236,7 @@ AC_ARG_ENABLE(gdu, [ --disable-gdu build without GDU volume monitor])
msg_gdu=no
GDU_LIBS=
GDU_CFLAGS=
-GDU_REQUIRED=0.4
+GDU_REQUIRED=0.5
if test "x$enable_gdu" != "xno"; then
PKG_CHECK_EXISTS([gdu >= $GDU_REQUIRED], msg_gdu=yes)
diff --git a/monitor/gdu/ggduvolume.c b/monitor/gdu/ggduvolume.c
index a20b0bb..865a7b7 100644
--- a/monitor/gdu/ggduvolume.c
+++ b/monitor/gdu/ggduvolume.c
@@ -337,51 +337,12 @@ update_volume (GGduVolume *volume)
volume->should_automount = FALSE;
}
- /* Avoid automounting volumes from
- *
- * 1. drives on a 'virtual' or unset bus
- * 2. volumes without a drive
- *
- * This is to avoid interference with things like Fedora's
- * livecd-tools that use device-mapper to set up images. See
- * https://bugzilla.redhat.com/show_bug.cgi?id=494144 for more
- * background.
- *
- * In the future we might want to relax 1. so automounting
- * things like Linux MD and LVM2 devices work.
+ /* Respect the presentation hint for whether the volume should be automounted - normally
+ * nopolicy is only FALSE for "physical" devices - e.g. only "physical" devices will
+ * be set to be automounted.
*/
- if (volume->drive != NULL)
- {
- GduPresentable *drive_presentable;
- drive_presentable = g_gdu_drive_get_presentable (volume->drive);
- if (drive_presentable != NULL)
- {
- GduDevice *drive_device;
- drive_device = gdu_presentable_get_device (drive_presentable);
- if (drive_device != NULL)
- {
- const gchar *bus;
- bus = gdu_device_drive_get_connection_interface (drive_device);
- if (bus == NULL || strlen (bus) == 0 || g_strcmp0 (bus, "virtual") == 0)
- {
- volume->should_automount = FALSE;
- }
- g_object_unref (drive_device);
- }
- else
- {
- volume->should_automount = FALSE;
- }
- }
- else
- {
- volume->should_automount = FALSE;
- }
- }
- else
- {
- volume->should_automount = FALSE;
- }
+ if (gdu_device_get_presentation_nopolicy (device))
+ volume->should_automount = FALSE;
g_free (activation_uri);
}
@@ -650,22 +611,28 @@ g_gdu_volume_get_mount (GVolume *volume)
/* ---------------------------------------------------------------------------------------------------- */
static gchar **
-get_mount_options (GduDevice *device)
+get_mount_options (GduDevice *device,
+ gboolean allow_user_interaction)
{
- gchar **ret;
+ GPtrArray *p;
+
+ p = g_ptr_array_new ();
/* one day we might read this from user settings */
if (g_strcmp0 (gdu_device_id_get_usage (device), "filesystem") == 0 &&
g_strcmp0 (gdu_device_id_get_type (device), "vfat") == 0)
{
- ret = g_new0 (gchar *, 2);
- ret[0] = g_strdup ("flush");
- ret[1] = NULL;
+ g_ptr_array_add (p, g_strdup ("flush"));
}
- else
- ret = NULL;
- return ret;
+ if (!allow_user_interaction)
+ {
+ g_ptr_array_add (p, g_strdup ("auth_no_user_interaction"));
+ }
+
+ g_ptr_array_add (p, NULL);
+
+ return (gchar **) g_ptr_array_free (p, FALSE);
}
/* ---------------------------------------------------------------------------------------------------- */
@@ -787,7 +754,7 @@ mount_cleartext_device (MountOpData *data,
else
{
gchar **mount_options;
- mount_options = get_mount_options (data->device_to_mount);
+ mount_options = get_mount_options (data->device_to_mount, data->mount_operation != NULL);
gdu_device_op_filesystem_mount (data->device_to_mount, mount_options, mount_cb, data);
g_strfreev (mount_options);
}
@@ -1205,7 +1172,7 @@ g_gdu_volume_mount (GVolume *_volume,
{
gchar **mount_options;
data->device_to_mount = g_object_ref (device);
- mount_options = get_mount_options (data->device_to_mount);
+ mount_options = get_mount_options (data->device_to_mount, data->mount_operation != NULL);
gdu_device_op_filesystem_mount (data->device_to_mount, mount_options, mount_cb, data);
g_strfreev (mount_options);
}

View File

@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.3.5
Release: 2%{?dist}
Version: 1.3.6
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -20,7 +20,7 @@ BuildRequires: gnome-keyring-devel
BuildRequires: intltool
BuildRequires: gettext-devel
BuildRequires: GConf2-devel
BuildRequires: gnome-disk-utility-devel >= 0.4
BuildRequires: gnome-disk-utility-devel >= 0.5
BuildRequires: PolicyKit-devel
# This is a hack until the xfce4-notifyd dependency issue is fixed
# https://fedorahosted.org/rel-eng/ticket/1788
@ -38,8 +38,6 @@ Patch1: gvfs-archive-integration.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=591005
Patch10: 0001-Add-AFC-backend.patch
Patch11: gvfs-non-interactive-mounts.patch
%description
The gvfs package provides backend implementations for the gio
framework in GLib. It includes ftp, sftp, cifs.
@ -132,7 +130,6 @@ and iPod Touches to applications using gvfs.
%setup -q
%patch1 -p1 -b .archive-integration
%patch10 -p1 -b .afc
%patch11 -p1 -b .non-interactive-mounts
%build
@ -286,6 +283,9 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
%changelog
* Mon Sep 7 2009 Tomas Bzatek <tbzatek@redhat.com> - 1.3.6-1
- Update to 1.3.6
* Wed Aug 26 2009 Matthias Clasen <mclasen@redhat.com> - 1.3.5-2
- Don't mount interactively during login

View File

@ -1 +1 @@
3d3d43f381716d973880ef55abea1aa6 gvfs-1.3.5.tar.bz2
743f5ae84cd13273ee0197f4cfd6d5a9 gvfs-1.3.6.tar.bz2