- Avoid crash on race to mount gvfstrash (#555337)

- Nuke HAL volume monitor
This commit is contained in:
Tomas Bzatek 2010-01-18 15:09:57 +00:00
parent e9af85216f
commit 6718086210
3 changed files with 53 additions and 5 deletions

15
disable-hal-monitor.patch Normal file
View File

@ -0,0 +1,15 @@
diff -up gvfs-1.4.3/monitor/Makefile.am.bak gvfs-1.4.3/monitor/Makefile.am
--- gvfs-1.4.3/monitor/Makefile.am.bak 2010-01-13 16:51:15.000000000 +0100
+++ gvfs-1.4.3/monitor/Makefile.am 2010-01-13 17:29:08.000000000 +0100
@@ -1,10 +1,6 @@
-DIST_SUBDIRS = proxy hal gdu gphoto2 afc
+DIST_SUBDIRS = proxy gdu gphoto2 afc
SUBDIRS = proxy
-if USE_HAL
-SUBDIRS += hal
-endif
-
if USE_GDU
SUBDIRS += gdu
endif

View File

@ -0,0 +1,27 @@
From d618141ea5161d05e388e9fbfa4148a6abd976b1 Mon Sep 17 00:00:00 2001
From: Alexander Larsson <alexl@redhat.com>
Date: Mon, 18 Jan 2010 12:48:08 +0000
Subject: Avoid crash on race to mount gvfstrash
If the trash is already mounted (due to e.g. a race) when registering the
new trash backend we error out and free the trash backend. This caused
the g_assert_not_reached() in trash_watcher_free to hit.
---
diff --git a/daemon/trashlib/trashwatcher.c b/daemon/trashlib/trashwatcher.c
index a2cabfd..9661ce4 100644
--- a/daemon/trashlib/trashwatcher.c
+++ b/daemon/trashlib/trashwatcher.c
@@ -280,7 +280,10 @@ trash_watcher_new (TrashRoot *root)
void
trash_watcher_free (TrashWatcher *watcher)
{
- g_assert_not_reached ();
+ /* We just leak everything here, as this is not normally hit.
+ This used to be a g_assert_not_reached(), and that got hit when
+ mounting the trash backend failed due to the trash already being
+ mounted. */
}
void
--
cgit v0.8.3.1

View File

@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.5.1
Release: 4%{?dist}
Release: 5%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -12,6 +12,7 @@ BuildRequires: glib2-devel >= 2.21.2
BuildRequires: dbus-glib-devel
BuildRequires: /usr/bin/ssh
BuildRequires: libcdio-devel >= 0.78.2
# obexftp backend is the last user requiring hal
BuildRequires: hal-devel >= 0.5.10
BuildRequires: libgudev-devel
BuildRequires: libsoup-devel >= 2.26.0
@ -33,6 +34,8 @@ BuildRequires: automake autoconf
BuildRequires: libtool
# http://bugzilla.gnome.org/show_bug.cgi?id=567235
Patch0: gvfs-archive-integration.patch
# disable HAL volume monitor, yet still detect hal headers for obexftp
Patch1: disable-hal-monitor.patch
# from upstream
Patch2: gvfs-1.5.2-metadata-fix-rotated.patch
Patch3: gvfs-1.5.2-metadata-fsync-directory.patch
@ -46,6 +49,7 @@ Patch14: gvfs-1.5.1-dont-leak-mountoperation.patch
Patch15: gvfs-1.5.1-gphoto2-no-storageinfo-support.patch
# from upstream
Patch16: gvfs-1.5.1-obexftp-dbus-private-connection.patch
Patch17: gvfs-1.5.2-trash-finalize.patch
@ -143,6 +147,7 @@ and iPod Touches to applications using gvfs.
%prep
%setup -q
%patch0 -p1 -b .archive-integration
%patch1 -p1 -b .nuke-hal-volume-monitor
%patch2 -p1 -b .metadata-rotated
%patch3 -p1 -b .metadata-dir-fsync
%patch4 -p1 -b .smb-queryfs-older
@ -152,6 +157,7 @@ and iPod Touches to applications using gvfs.
%patch14 -p1 -b .moutop-leak
%patch15 -p1 -b .gphoto2-storageinfo
%patch16 -p1 -b .obexftp-dbus
%patch17 -p1 -b .trash-finalize
%build
@ -221,13 +227,10 @@ killall -USR1 gvfsd >&/dev/null || :
%{_datadir}/gvfs/mounts/ftp.mount
%{_datadir}/dbus-1/services/gvfs-daemon.service
%{_datadir}/dbus-1/services/gvfs-metadata.service
%{_datadir}/dbus-1/services/org.gtk.Private.HalVolumeMonitor.service
%{_datadir}/dbus-1/services/org.gtk.Private.GduVolumeMonitor.service
%{_datadir}/gvfs/remote-volume-monitors/hal.monitor
%{_datadir}/gvfs/remote-volume-monitors/gdu.monitor
%{_libdir}/libgvfscommon.so.*
%{_libdir}/libgvfscommon-dnssd.so.*
# %{_libdir}/gio/modules/libgiohal-volume-monitor.so
%{_libdir}/gio/modules/libgioremote-volume-monitor.so
%{_libdir}/gio/modules/libgvfsdbus.so
%{_libdir}/gio/modules/libgiogconf.so
@ -244,7 +247,6 @@ killall -USR1 gvfsd >&/dev/null || :
%{_libexecdir}/gvfsd-dnssd
%{_libexecdir}/gvfsd-network
%{_libexecdir}/gvfsd-metadata
%{_libexecdir}/gvfs-hal-volume-monitor
%{_libexecdir}/gvfs-gdu-volume-monitor
%{_bindir}/gvfs-cat
%{_bindir}/gvfs-copy
@ -317,6 +319,10 @@ killall -USR1 gvfsd >&/dev/null || :
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
%changelog
* Mon Jan 18 2010 Tomas Bzatek <tbzatek@redhat.com> - 1.5.1-5
- Avoid crash on race to mount gvfstrash (#555337)
- Nuke HAL volume monitor
* Tue Jan 12 2010 Tomas Bzatek <tbzatek@redhat.com> - 1.5.1-4
- Don't leak mount job operation (#552842)
- Recognize gphoto2 cameras which don't implement get storageinfo (#552856)