diff --git a/gvfs-1.5.1-dont-leak-mountoperation.patch b/gvfs-1.5.1-dont-leak-mountoperation.patch new file mode 100644 index 0000000..3a097b1 --- /dev/null +++ b/gvfs-1.5.1-dont-leak-mountoperation.patch @@ -0,0 +1,34 @@ +From 438628c6794fc8f9203fbd99b534371a1aa6d11a Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Tue, 12 Jan 2010 12:36:11 +0000 +Subject: Don't leak mount job operation + +gvfs <= 1.5.1 does not properly call the finalize function of backends, +due to a missing unref call. This causes the cleanup functions of the +libraries underlying the backends to not get called. + +In case of the gphoto2 backend, this causes the kernel driver for dual +mode webcams (which have a kernel space webcam driver and a userspace +stillcam driver), to not get re-attached to the device when then the gvfs +mount gets unmounted. + +This patch fixes this by adding a g_object_unref (job) to +g_vfs_daemon_initiate_mount, which is needed as g_vfs_daemon_queue_job +takes a reference itself. + +https://bugzilla.gnome.org/show_bug.cgi?id=606194 +--- +diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c +index 15fffc7..909e1d7 100644 +--- a/daemon/gvfsdaemon.c ++++ b/daemon/gvfsdaemon.c +@@ -1081,6 +1081,7 @@ g_vfs_daemon_initiate_mount (GVfsDaemon *daemon, + + job = g_vfs_job_mount_new (mount_spec, mount_source, is_automount, request, backend); + g_vfs_daemon_queue_job (daemon, job); ++ g_object_unref (job); + } + + /** +-- +cgit v0.8.3.1 diff --git a/gvfs-1.5.1-gphoto2-no-storageinfo-support.patch b/gvfs-1.5.1-gphoto2-no-storageinfo-support.patch new file mode 100644 index 0000000..2ece30f --- /dev/null +++ b/gvfs-1.5.1-gphoto2-no-storageinfo-support.patch @@ -0,0 +1,33 @@ +Not all gphoto drivers implement get storage info (drivers for proprietary +protocols often don't). This patch fixes the gphoto2volumemonitor to still +recognize cams which gphoto driver does not implement get storage info. + +Signed-off-by: Hans de Goede +diff -up gvfs-1.5.1/monitor/gphoto2/ggphoto2volumemonitor.c~ gvfs-1.5.1/monitor/gphoto2/ggphoto2volumemonitor.c +--- gvfs-1.5.1/monitor/gphoto2/ggphoto2volumemonitor.c~ 2009-11-18 13:14:51.000000000 +0100 ++++ gvfs-1.5.1/monitor/gphoto2/ggphoto2volumemonitor.c 2010-01-06 11:46:16.000000000 +0100 +@@ -605,7 +605,7 @@ get_stores_for_camera (int bus_num, int + GPContext *context; + GPPortInfo info; + GPPortInfoList *il; +- int num_storage_info, n; ++ int num_storage_info, n, rc; + Camera *camera; + char *port; + guint i; +@@ -637,8 +637,14 @@ get_stores_for_camera (int bus_num, int + goto out; + + /* Get information about the storage heads */ +- if (gp_camera_get_storageinfo (camera, &storage_info, &num_storage_info, context) != 0) ++ rc = gp_camera_get_storageinfo (camera, &storage_info, &num_storage_info, context); ++ if (rc != 0) { ++ /* Not all gphoto drivers implement get storage info (drivers for proprietary ++ protocols often don't) */ ++ if (rc == GP_ERROR_NOT_SUPPORTED) ++ l = g_list_prepend (l, g_strdup ("/")); + goto out; ++ } + + /* Append the data to the list */ + for (i = 0; i < num_storage_info; i++) diff --git a/gvfs-1.5.1-obexftp-dbus-private-connection.patch b/gvfs-1.5.1-obexftp-dbus-private-connection.patch new file mode 100644 index 0000000..0f14874 --- /dev/null +++ b/gvfs-1.5.1-obexftp-dbus-private-connection.patch @@ -0,0 +1,47 @@ +From 56c3b9cf90bfd53a699b5951677fee9f83b26c2f Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Thu, 07 Jan 2010 18:08:00 +0000 +Subject: [obexftp] Use a private D-Bus connection for obex-data-server + +So as to avoid gvfs and our backend fighting over the session +bus connection, and causing crashers. + +https://bugzilla.gnome.org/show_bug.cgi?id=570366 +https://bugzilla.redhat.com/show_bug.cgi?id=539347 +--- +diff --git a/daemon/gvfsbackendobexftp.c b/daemon/gvfsbackendobexftp.c +index eb1b43b..8dc8bdf 100644 +--- a/daemon/gvfsbackendobexftp.c ++++ b/daemon/gvfsbackendobexftp.c +@@ -502,9 +502,28 @@ g_vfs_backend_obexftp_finalize (GObject *object) + static void + g_vfs_backend_obexftp_init (GVfsBackendObexftp *backend) + { ++ DBusConnection *conn; ++ DBusGConnection *connection; ++ DBusError error; + GError *err = NULL; + +- backend->connection = dbus_g_bus_get (DBUS_BUS_SESSION, &err); ++ /* Otherwise dbus-glib doesn't setup it value types */ ++ connection = dbus_g_bus_get (DBUS_BUS_SESSION, NULL); ++ ++ if (connection != NULL) ++ dbus_g_connection_unref (connection); ++ ++ /* Connect to the session bus via a private connection */ ++ dbus_error_init (&error); ++ conn = dbus_bus_get_private (DBUS_BUS_SESSION, &error); ++ if (conn == NULL) { ++ g_printerr ("Connecting to session bus failed: %s\n", err->message); ++ dbus_error_free (&error); ++ return; ++ } ++ dbus_connection_setup_with_g_main (conn, NULL); ++ ++ backend->connection = dbus_connection_get_g_connection (conn); + if (backend->connection == NULL) { + g_printerr ("Connecting to session bus failed: %s\n", err->message); + g_error_free (err); +-- +cgit v0.8.3.1 diff --git a/gvfs.spec b/gvfs.spec index 80022c4..bfc2854 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -1,7 +1,7 @@ Summary: Backends for the gio framework in GLib Name: gvfs Version: 1.5.1 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org @@ -40,6 +40,13 @@ Patch4: gvfs-1.4.3-smb-queryfs-old-samba.patch Patch5: gvfs-1.5.2-metadata-gssize.patch Patch6: gvfs-1.5.2-metadata-mtime.patch Patch7: gvfs-1.5.2-fuse-timestamps.patch +Patch14: gvfs-1.5.1-dont-leak-mountoperation.patch +# Recognize gphoto2 cameras which don't implement get storageinfo +# https://bugzilla.redhat.com/show_bug.cgi?id=552856 +Patch15: gvfs-1.5.1-gphoto2-no-storageinfo-support.patch +# from upstream +Patch16: gvfs-1.5.1-obexftp-dbus-private-connection.patch + Obsoletes: gnome-mount <= 0.8 @@ -142,6 +149,9 @@ and iPod Touches to applications using gvfs. %patch5 -p1 -b .metadata-gssize %patch6 -p1 -b .metadata-mtime %patch7 -p1 -b .fuse-timestamps +%patch14 -p1 -b .moutop-leak +%patch15 -p1 -b .gphoto2-storageinfo +%patch16 -p1 -b .obexftp-dbus %build @@ -307,6 +317,11 @@ killall -USR1 gvfsd >&/dev/null || : %{_datadir}/gvfs/remote-volume-monitors/afc.monitor %changelog +* Tue Jan 12 2010 Tomas Bzatek - 1.5.1-4 +- Don't leak mount job operation (#552842) +- Recognize gphoto2 cameras which don't implement get storageinfo (#552856) +- ObexFTP: Use a private D-Bus connection for obex-data-server (#539347) + * Tue Dec 15 2009 Tomas Bzatek - 1.5.1-3 - Rebuilt against new libiphone