r43978 - in /desktop/unstable/gvfs/debian: changelog patches/fix-cancellation.patch patches/fix-unmount-crash.patch patches/series

joss at users.alioth.debian.org joss at users.alioth.debian.org
Sun Nov 30 21:52:56 UTC 2014


Author: joss
Date: Sun Nov 30 21:52:56 2014
New Revision: 43978

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=43978
Log:
* New upstream translation and bugfix release.
* fix-unmout-crash.patch: patch from upstream git. Fix crashes when 
  unmounting shares with pending operations.
* fix-cancellation: patch from upstream git. Fix user cancellation of 
  file operations.

Added:
    desktop/unstable/gvfs/debian/patches/fix-cancellation.patch
    desktop/unstable/gvfs/debian/patches/fix-unmount-crash.patch
Modified:
    desktop/unstable/gvfs/debian/changelog
    desktop/unstable/gvfs/debian/patches/series

Modified: desktop/unstable/gvfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/changelog?rev=43978&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/changelog	[utf-8] (original)
+++ desktop/unstable/gvfs/debian/changelog	[utf-8] Sun Nov 30 21:52:56 2014
@@ -1,3 +1,13 @@
+gvfs (1.22.2-1) unstable; urgency=medium
+
+  * New upstream translation and bugfix release.
+  * fix-unmout-crash.patch: patch from upstream git. Fix crashes when 
+    unmounting shares with pending operations.
+  * fix-cancellation: patch from upstream git. Fix user cancellation of 
+    file operations.
+
+ -- Josselin Mouette <joss at debian.org>  Sun, 30 Nov 2014 22:18:27 +0100
+
 gvfs (1.22.1-1) unstable; urgency=medium
 
   * New upstream release.

Added: desktop/unstable/gvfs/debian/patches/fix-cancellation.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/fix-cancellation.patch?rev=43978&op=file
==============================================================================
--- desktop/unstable/gvfs/debian/patches/fix-cancellation.patch	(added)
+++ desktop/unstable/gvfs/debian/patches/fix-cancellation.patch	[utf-8] Sun Nov 30 21:52:56 2014
@@ -0,0 +1,130 @@
+From 4b85af0d4a7ad69773839bd248284beb80e4bcac Mon Sep 17 00:00:00 2001
+From: Ross Lagerwall <rosslagerwall at gmail.com>
+Date: Sun, 8 Dec 2013 12:28:55 +0200
+Subject: client: Use the correct serial with file transfer cancellation
+
+When using Copy, Move, Push and Pull with progress callbacks, the
+progress callbacks increment the connection serial, so retrieve the
+serial immediately after the dbus method call so that the correct serial
+is used for cancellation.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=720058
+
+diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
+index c3f8284..5a1613f 100644
+--- a/client/gdaemonfile.c
++++ b/client/gdaemonfile.c
+@@ -2801,6 +2801,7 @@ file_transfer (GFile                  *source,
+   GVfsDBusProgress *progress_skeleton;
+   GFile *file1, *file2;
+   GError *my_error;
++  guint32 serial;
+ 
+   res = FALSE;
+   progress_skeleton = NULL;
+@@ -2808,6 +2809,7 @@ file_transfer (GFile                  *source,
+   source_is_daemon = G_IS_DAEMON_FILE (source);
+   dest_is_daemon   = G_IS_DAEMON_FILE (destination);
+   send_progress    = progress_callback != NULL;
++  serial           = 0;
+ 
+   if (source_is_daemon && dest_is_daemon)
+     native_transfer = TRUE;
+@@ -2901,6 +2903,7 @@ retry:
+                                      cancellable,
+                                      copy_cb,
+                                      &data);
++          serial = g_dbus_connection_get_last_serial (connection);
+           g_main_loop_run (data.loop);
+           res = gvfs_dbus_mount_call_copy_finish (proxy, data.res, &my_error);
+         }
+@@ -2913,6 +2916,7 @@ retry:
+                                      cancellable,
+                                      copy_cb,
+                                      &data);
++          serial = g_dbus_connection_get_last_serial (connection);
+           g_main_loop_run (data.loop);
+           res = gvfs_dbus_mount_call_move_finish (proxy, data.res, &my_error);
+         }
+@@ -2929,6 +2933,7 @@ retry:
+                                  cancellable,
+                                  copy_cb,
+                                  &data);
++      serial = g_dbus_connection_get_last_serial (connection);
+       g_main_loop_run (data.loop);
+       res = gvfs_dbus_mount_call_push_finish (proxy, data.res, &my_error);
+     }
+@@ -2944,6 +2949,7 @@ retry:
+                                  cancellable,
+                                  copy_cb,
+                                  &data);
++      serial = g_dbus_connection_get_last_serial (connection);
+       g_main_loop_run (data.loop);
+       res = gvfs_dbus_mount_call_pull_finish (proxy, data.res, &my_error);
+     }
+@@ -2965,8 +2971,12 @@ retry:
+ 
+   if (! res)
+     {
+-      if (proxy && g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+-        _g_dbus_send_cancelled_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (proxy)));
++      if (serial != 0 &&
++          g_error_matches (my_error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
++        {
++          _g_dbus_send_cancelled_with_serial_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (proxy)),
++                                                   serial);
++        }
+       else
+       if (g_error_matches (my_error, G_VFS_ERROR, G_VFS_ERROR_RETRY))
+         {
+diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c
+index dc5f50f..0bf47b1 100644
+--- a/client/gvfsdaemondbus.c
++++ b/client/gvfsdaemondbus.c
+@@ -418,14 +418,12 @@ _g_dbus_async_unsubscribe_cancellable (GCancellable *cancellable, gulong cancell
+ }
+ 
+ void
+- _g_dbus_send_cancelled_sync (GDBusConnection *connection)
++_g_dbus_send_cancelled_with_serial_sync (GDBusConnection *connection,
++                                         guint32 serial)
+ {
+-  guint32 serial;
+   GVfsDBusDaemon *proxy;
+   GError *error = NULL;
+ 
+-  serial = g_dbus_connection_get_last_serial (connection);
+-
+   proxy = gvfs_dbus_daemon_proxy_new_sync (connection,
+                                            G_DBUS_PROXY_FLAGS_NONE,
+                                            NULL,
+@@ -448,6 +446,13 @@ void
+   g_object_unref (proxy);
+ }
+ 
++void
++_g_dbus_send_cancelled_sync (GDBusConnection *connection)
++{
++  _g_dbus_send_cancelled_with_serial_sync (connection,
++                                           g_dbus_connection_get_last_serial (connection));
++}
++
+ 
+ /*************************************************************************
+  *               get per-thread synchronous dbus connections             *
+diff --git a/client/gvfsdaemondbus.h b/client/gvfsdaemondbus.h
+index 24f5056..bd02d41 100644
+--- a/client/gvfsdaemondbus.h
++++ b/client/gvfsdaemondbus.h
+@@ -67,6 +67,8 @@ gulong          _g_dbus_async_subscribe_cancellable     (GDBusConnection
+ void            _g_dbus_async_unsubscribe_cancellable   (GCancellable                   *cancellable,
+                                                          gulong                          cancelled_tag);
+ void            _g_dbus_send_cancelled_sync             (GDBusConnection                *connection);
++void            _g_dbus_send_cancelled_with_serial_sync (GDBusConnection                *connection,
++                                                         guint32                         serial);
+ void            _g_propagate_error_stripped             (GError                        **dest,
+                                                          GError                         *src);
+ G_END_DECLS
+-- 
+cgit v0.10.1
+

Added: desktop/unstable/gvfs/debian/patches/fix-unmount-crash.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/fix-unmount-crash.patch?rev=43978&op=file
==============================================================================
--- desktop/unstable/gvfs/debian/patches/fix-unmount-crash.patch	(added)
+++ desktop/unstable/gvfs/debian/patches/fix-unmount-crash.patch	[utf-8] Sun Nov 30 21:52:56 2014
@@ -0,0 +1,117 @@
+From 87c9f6d80ac612caedb7b39b22b3d4ed2804bb0b Mon Sep 17 00:00:00 2001
+From: Ross Lagerwall <rosslagerwall at gmail.com>
+Date: Sun, 28 Sep 2014 19:52:51 +0100
+Subject: gvfsjobunmount: Block new requests before calling unmount() on a
+ thread
+
+Block new requests before calling unmount() on a separate thread to
+prevent a race where new jobs are received and processed while the
+unmount() is being executed.
+
+This is not necessary for try_unmount() because all the job handling is
+done on the same thread as the try_unmount() method and requests are
+blocked when the try_unmount() method completes.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=710986
+
+diff --git a/daemon/gvfsbackend.c b/daemon/gvfsbackend.c
+index 299a9bd..ac84e35 100644
+--- a/daemon/gvfsbackend.c
++++ b/daemon/gvfsbackend.c
+@@ -590,9 +590,9 @@ g_vfs_backend_add_auto_info (GVfsBackend *backend,
+ }
+ 
+ void
+-g_vfs_backend_set_block_requests (GVfsBackend *backend)
++g_vfs_backend_set_block_requests (GVfsBackend *backend, gboolean value)
+ {
+-  backend->priv->block_requests = TRUE;
++  backend->priv->block_requests = value;
+ }
+ 
+ gboolean
+@@ -1036,7 +1036,7 @@ forced_unregister_mount_callback (GVfsDBusMountTracker *proxy,
+ void
+ g_vfs_backend_force_unmount (GVfsBackend *backend)
+ {
+-  g_vfs_backend_set_block_requests (backend);
++  g_vfs_backend_set_block_requests (backend, TRUE);
+   g_vfs_backend_unregister_mount (backend,
+ 				  (GAsyncReadyCallback) forced_unregister_mount_callback,
+ 				  backend);
+diff --git a/daemon/gvfsbackend.h b/daemon/gvfsbackend.h
+index 82c8283..1669c27 100644
+--- a/daemon/gvfsbackend.h
++++ b/daemon/gvfsbackend.h
+@@ -511,7 +511,8 @@ void        g_vfs_backend_add_auto_info                  (GVfsBackend
+ 							  GFileInfo             *info,
+ 							  const char            *uri);
+ 
+-void        g_vfs_backend_set_block_requests             (GVfsBackend           *backend);
++void        g_vfs_backend_set_block_requests             (GVfsBackend           *backend,
++                                                          gboolean               value);
+ gboolean    g_vfs_backend_get_block_requests             (GVfsBackend           *backend);
+ 
+ gboolean    g_vfs_backend_unmount_with_operation_finish (GVfsBackend  *backend,
+diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
+index 205407c..2108ddf 100644
+--- a/daemon/gvfsjobunmount.c
++++ b/daemon/gvfsjobunmount.c
+@@ -229,9 +229,12 @@ unmount_cb (GVfsBackend  *backend,
+ 					      op_job->flags,
+ 					      op_job->mount_source);
+ 
+-       if (run_in_thread)
+-	g_vfs_daemon_run_job_in_thread (g_vfs_backend_get_daemon (backend),
+-					G_VFS_JOB (op_job));
++      if (run_in_thread)
++        {
++          g_vfs_backend_set_block_requests (backend, TRUE);
++          g_vfs_daemon_run_job_in_thread (g_vfs_backend_get_daemon (backend),
++                                          G_VFS_JOB (op_job));
++        }
+     }
+ }
+ 
+@@ -265,7 +268,12 @@ try (GVfsJob *job)
+ 			       op_job->flags,
+ 			       op_job->mount_source);
+   else
+-    return FALSE;
++    {
++      /* We're going to run the backend's unmount method on a thread, block
++       * new jobs coming in. */
++      g_vfs_backend_set_block_requests (backend, TRUE);
++      return FALSE;
++    }
+ }
+ 
+ static void
+@@ -304,18 +312,20 @@ static void
+ send_reply (GVfsJob *job)
+ {
+   GVfsJobUnmount *op_job = G_VFS_JOB_UNMOUNT (job);
++  GVfsBackend *backend = op_job->backend;
+ 
+   g_debug ("send_reply, failed: %d\n", job->failed);
+ 
+   if (job->failed)
+-    (*G_VFS_JOB_CLASS (g_vfs_job_unmount_parent_class)->send_reply) (G_VFS_JOB (op_job));
++    {
++      g_vfs_backend_set_block_requests (backend, FALSE);
++      (*G_VFS_JOB_CLASS (g_vfs_job_unmount_parent_class)->send_reply) (G_VFS_JOB (op_job));
++    }
+   else
+     {
+-      GVfsBackend *backend = op_job->backend;
+-
+       /* Setting the backend to block requests will also
+          set active GVfsChannels to block requets  */
+-      g_vfs_backend_set_block_requests (backend);
++      g_vfs_backend_set_block_requests (backend, TRUE);
+       g_vfs_backend_unregister_mount (backend,
+ 				      (GAsyncReadyCallback) unregister_mount_callback,
+ 				      job);
+-- 
+cgit v0.10.1
+

Modified: desktop/unstable/gvfs/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gvfs/debian/patches/series?rev=43978&op=diff
==============================================================================
--- desktop/unstable/gvfs/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/gvfs/debian/patches/series	[utf-8] Sun Nov 30 21:52:56 2014
@@ -5,3 +5,5 @@
 dont-crash-on-null-job.patch
 handle-inactive-vfs.patch
 ref-jobs-in-thread.patch
+fix-unmount-crash.patch
+fix-cancellation.patch




More information about the pkg-gnome-commits mailing list