- Update to 0.2.4

This commit is contained in:
Tomas Bzatek 2008-05-27 08:34:25 +00:00
parent d2ee280851
commit 9ae84f7b23
10 changed files with 7 additions and 356 deletions

View File

@ -1 +1 @@
gvfs-0.2.3.tar.bz2
gvfs-0.2.4.tar.bz2

View File

@ -1,12 +0,0 @@
diff -up gvfs-0.2.3/daemon/gvfsbackendgphoto2.c.gphoto-unmount-hang gvfs-0.2.3/daemon/gvfsbackendgphoto2.c
--- gvfs-0.2.3/daemon/gvfsbackendgphoto2.c.gphoto-unmount-hang 2008-04-16 22:53:04.000000000 -0400
+++ gvfs-0.2.3/daemon/gvfsbackendgphoto2.c 2008-04-16 22:52:39.000000000 -0400
@@ -1394,6 +1394,8 @@ do_mount (GVfsBackend *backend,
return;
}
+ dbus_connection_set_exit_on_disconnect (gphoto2_backend->dbus_connection, FALSE);
+
gphoto2_backend->hal_ctx = libhal_ctx_new ();
if (gphoto2_backend->hal_ctx == NULL)
{

View File

@ -1,78 +0,0 @@
Index: hal/ghalvolumemonitor.c
===================================================================
--- hal/ghalvolumemonitor.c (revision 1736)
+++ hal/ghalvolumemonitor.c (working copy)
@@ -845,6 +845,32 @@
}
static gboolean
+should_mount_be_ignored (HalPool *pool, HalDevice *d)
+{
+ const char *device_mount_point;
+
+ device_mount_point = hal_device_get_property_string (d, "volume.mount_point");
+ if (device_mount_point != NULL && strlen (device_mount_point) > 0)
+ {
+ GUnixMountEntry *mount_entry;
+
+ /*g_warning ("device_mount_point = '%s'", device_mount_point);*/
+
+ mount_entry = g_unix_mount_at (device_mount_point, NULL);
+ if (mount_entry != NULL) {
+ if (!g_unix_mount_guess_should_display (mount_entry))
+ {
+ g_unix_mount_free (mount_entry);
+ return TRUE;
+ }
+ g_unix_mount_free (mount_entry);
+ }
+ }
+
+ return FALSE;
+}
+
+static gboolean
should_volume_be_ignored (HalPool *pool, HalDevice *d, GList *fstab_mount_points)
{
gboolean volume_ignore;
@@ -893,6 +919,9 @@
if (mount_point != NULL && !_g_unix_mount_point_guess_should_display (mount_point))
return TRUE;
+ if (hal_device_get_property_bool (d, "volume.is_mounted"))
+ return should_mount_be_ignored (pool, d);
+
return FALSE;
}
@@ -1207,13 +1236,29 @@
{
GList *new_mounts;
GList *removed, *added;
- GList *l;
+ GList *l, *ll;
GHalMount *mount;
GHalVolume *volume;
const char *device_path;
const char *mount_path;
new_mounts = g_unix_mounts_get (NULL);
+
+ /* remove mounts we want to ignore - we do it here so we get to reevaluate
+ * on the next update whether they should still be ignored
+ */
+ for (l = new_mounts; l != NULL; l = ll)
+ {
+ GUnixMountEntry *mount_entry = l->data;
+ ll = l->next;
+
+ /* keep in sync with should_mount_be_ignored() */
+ if (!g_unix_mount_guess_should_display (mount_entry))
+ {
+ g_unix_mount_free (mount_entry);
+ new_mounts = g_list_delete_link (new_mounts, l);
+ }
+ }
new_mounts = g_list_sort (new_mounts, (GCompareFunc) g_unix_mount_compare);

View File

@ -1,14 +0,0 @@
diff -up gvfs-0.2.3/client/gvfsfusedaemon.c.64clean gvfs-0.2.3/client/gvfsfusedaemon.c
--- gvfs-0.2.3/client/gvfsfusedaemon.c.64clean 2008-04-11 23:00:42.000000000 -0400
+++ gvfs-0.2.3/client/gvfsfusedaemon.c 2008-04-11 23:01:17.000000000 -0400
@@ -55,8 +55,8 @@
#define DEBUG_ENABLED 0
-#define GET_FILE_HANDLE(fi) (GUINT_TO_POINTER ((guint) (fi)->fh))
-#define SET_FILE_HANDLE(fi, fh) ((fi)->fh = (guint64) GPOINTER_TO_UINT (fh))
+#define GET_FILE_HANDLE(fi) ((gpointer) (fi)->fh)
+#define SET_FILE_HANDLE(fi, fh) ((fi)->fh = (guint64) (fh))
typedef struct {
time_t creation_time;

View File

@ -1,95 +0,0 @@
Index: daemon/gvfsbackendarchive.c
===================================================================
--- daemon/gvfsbackendarchive.c (revision 1746)
+++ daemon/gvfsbackendarchive.c (working copy)
@@ -322,6 +322,13 @@
g_file_info_set_content_type (info, "inode/directory");
g_file_info_set_attribute_string (info, G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, "inode/directory");
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, FALSE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE, TRUE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, FALSE);
+
icon = g_themed_icon_new ("folder");
g_file_info_set_icon (info, icon);
g_object_unref (icon);
@@ -340,19 +347,19 @@
g_file_info_set_attribute_uint64 (info,
G_FILE_ATTRIBUTE_TIME_ACCESS,
archive_entry_atime (entry));
- g_file_info_set_attribute_uint64 (info,
+ g_file_info_set_attribute_uint32 (info,
G_FILE_ATTRIBUTE_TIME_ACCESS_USEC,
archive_entry_atime_nsec (entry) / 1000);
g_file_info_set_attribute_uint64 (info,
G_FILE_ATTRIBUTE_TIME_CHANGED,
archive_entry_ctime (entry));
- g_file_info_set_attribute_uint64 (info,
+ g_file_info_set_attribute_uint32 (info,
G_FILE_ATTRIBUTE_TIME_CHANGED_USEC,
archive_entry_ctime_nsec (entry) / 1000);
g_file_info_set_attribute_uint64 (info,
G_FILE_ATTRIBUTE_TIME_MODIFIED,
archive_entry_mtime (entry));
- g_file_info_set_attribute_uint64 (info,
+ g_file_info_set_attribute_uint32 (info,
G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC,
archive_entry_mtime_nsec (entry) / 1000);
@@ -387,6 +394,13 @@
g_file_info_set_size (info,
archive_entry_size (entry));
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_READ, TRUE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, FALSE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, FALSE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE, type == G_FILE_TYPE_DIRECTORY);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, FALSE);
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, FALSE);
+
/* FIXME: add info for these
dev_t archive_entry_dev(struct archive_entry *);
dev_t archive_entry_devmajor(struct archive_entry *);
@@ -508,11 +522,11 @@
return;
}
- archive->file = g_file_new_for_uri (filename);
+ archive->file = g_file_new_for_commandline_arg (filename);
g_free (filename);
}
else
- archive->file = g_file_new_for_uri (file);
+ archive->file = g_file_new_for_commandline_arg (file);
DEBUG ("Trying to mount %s\n", g_file_get_uri (archive->file));
@@ -714,6 +728,19 @@
g_vfs_job_succeeded (G_VFS_JOB (job));
}
+static gboolean
+try_query_fs_info (GVfsBackend *backend,
+ GVfsJobQueryFsInfo *job,
+ const char *filename,
+ GFileInfo *info,
+ GFileAttributeMatcher *attribute_matcher)
+{
+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, TRUE);
+ g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL);
+ g_vfs_job_succeeded (G_VFS_JOB (job));
+ return TRUE;
+}
+
static void
g_vfs_backend_archive_class_init (GVfsBackendArchiveClass *klass)
{
@@ -729,4 +756,5 @@
backend_class->read = do_read;
backend_class->enumerate = do_enumerate;
backend_class->query_info = do_query_info;
+ backend_class->try_query_fs_info = try_query_fs_info;
}

View File

@ -1,24 +0,0 @@
diff -up gvfs-0.2.3/client/gdaemonvfs.c.dbus-exit gvfs-0.2.3/client/gdaemonvfs.c
--- gvfs-0.2.3/client/gdaemonvfs.c.dbus-exit 2008-04-18 21:29:52.000000000 -0400
+++ gvfs-0.2.3/client/gdaemonvfs.c 2008-04-18 21:29:28.000000000 -0400
@@ -298,6 +298,8 @@ g_daemon_vfs_init (GDaemonVfs *vfs)
vfs->wrapped_vfs = g_vfs_get_local ();
+ dbus_connection_set_exit_on_disconnect (vfs->async_bus, FALSE);
+
_g_dbus_connection_integrate_with_main (vfs->async_bus);
modules = g_io_modules_load_all_in_directory (GVFS_MODULE_DIR);
diff -up gvfs-0.2.3/hal/hal-pool.c.dbus-exit gvfs-0.2.3/hal/hal-pool.c
--- gvfs-0.2.3/hal/hal-pool.c.dbus-exit 2008-04-18 21:27:36.000000000 -0400
+++ gvfs-0.2.3/hal/hal-pool.c 2008-04-18 21:28:05.000000000 -0400
@@ -308,6 +308,8 @@ hal_pool_new (char **cap_only)
goto out;
}
+ dbus_connection_set_exit_on_disconnect (dbus_connection, FALSE);
+
hal_ctx = libhal_ctx_new ();
if (hal_ctx == NULL)
{

View File

@ -1,96 +0,0 @@
Index: client/gvfsfusedaemon.c
===================================================================
--- client/gvfsfusedaemon.c (revision 1746)
+++ client/gvfsfusedaemon.c (working copy)
@@ -71,6 +71,8 @@
} FileOp;
typedef struct {
+ gint refcount;
+
GMutex *mutex;
FileOp op;
gpointer stream;
@@ -188,12 +190,26 @@
FileHandle *file_handle;
file_handle = g_new0 (FileHandle, 1);
+ file_handle->refcount = 1;
file_handle->mutex = g_mutex_new ();
file_handle->op = FILE_OP_NONE;
return file_handle;
}
+static FileHandle *
+file_handle_ref (FileHandle *file_handle)
+{
+ g_atomic_int_inc (&file_handle->refcount);
+ return file_handle;
+}
+
+static gboolean
+file_handle_unref (FileHandle *file_handle)
+{
+ return g_atomic_int_dec_and_test (&file_handle->refcount);
+}
+
static void
file_handle_close_stream (FileHandle *file_handle)
{
@@ -278,21 +294,19 @@
g_static_mutex_unlock (&global_mutex);
}
-static gboolean
+static void
free_file_handle_for_path (const gchar *path)
{
FileHandle *fh;
- fh = get_file_handle_for_path (path);
+ g_static_mutex_lock (&global_mutex);
+ fh = g_hash_table_lookup (global_fh_table, path);
if (fh)
{
- g_static_mutex_lock (&global_mutex);
- g_hash_table_remove (global_fh_table, path);
- g_static_mutex_unlock (&global_mutex);
- return TRUE;
+ if (file_handle_unref (fh))
+ g_hash_table_remove (global_fh_table, path);
}
-
- return FALSE;
+ g_static_mutex_unlock (&global_mutex);
}
static MountRecord *
@@ -923,6 +937,7 @@
/* File exists */
+ file_handle_ref (fh);
SET_FILE_HANDLE (fi, fh);
debug_print ("vfs_open: flags=%o\n", fi->flags);
@@ -1013,6 +1028,7 @@
/* Success */
+ file_handle_ref (fh);
SET_FILE_HANDLE (fi, fh);
g_assert (fh->stream == NULL);
@@ -1047,7 +1063,10 @@
debug_print ("vfs_release: %s\n", path);
if (fh)
- free_file_handle_for_path (path);
+ {
+ if (!file_handle_unref (fh))
+ free_file_handle_for_path (path);
+ }
return 0;
}

View File

@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 0.2.3
Release: 10%{?dist}
Version: 0.2.4
Release: 1%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@ -34,22 +34,9 @@ Requires(postun): desktop-file-utils
BuildRequires: automake autoconf
BuildRequires: libtool
Patch1: gvfs-0.2.2-archive-integration.patch
Patch2: gvfs-64clean.patch
Patch3: regexxer-crash.patch
Patch4: gvfs-0.2.2-only-show-allowed-mounts.patch
Patch5: gphoto-unmount-hang.patch
Patch6: gvfs-gphoto-automount.patch
Patch7: gvfs-unmount-scheme.patch
# http://mail.gnome.org/archives/gvfs-list/2008-April/msg00017.html
Patch8: gvfs-fuse-threading.patch
#
Patch9: gvfs-dbus-exit.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=528950
Patch10: gvfs-archive-minor-fixes-2.patch
%description
The gvfs package provides backend implementations for the gio
framework in GLib. It includes ftp, sftp, cifs.
@ -78,15 +65,8 @@ to access the gvfs filesystems.
%prep
%setup -q
%patch1 -p0 -b .archive-integration
%patch2 -p1 -b .64clean
%patch3 -p1 -b .regexxer-crash
%patch4 -p0 -b .only-show-allowed-mounts
%patch5 -p1 -b .gphoto-unmount-hang
%patch6 -p1 -b .gphoto-automount
%patch7 -p1 -b .unmount-scheme
%patch8 -p0 -b .fuse-threading
%patch9 -p1 -b .dbus-exit
%patch10 -p0 -b .archive-fixes
%build
@ -201,6 +181,9 @@ update-desktop-database &> /dev/null ||:
%changelog
* Tue May 27 2008 Tomas Bzatek <tbzatek@redhat.com> - 0.2.4-1
- Update to 0.2.4
* Thu Apr 24 2008 Matthias Clasen <mclasen@redhat.com> - 0.2.3-10
- Add application/zip to the supported mime types for the archive
backend (launchpad #211697)

View File

@ -1,13 +0,0 @@
diff -up gvfs-0.2.3/common/gmounttracker.c.regexxer-crash gvfs-0.2.3/common/gmounttracker.c
--- gvfs-0.2.3/common/gmounttracker.c.regexxer-crash 2008-04-14 00:41:08.000000000 -0400
+++ gvfs-0.2.3/common/gmounttracker.c 2008-04-14 00:41:26.000000000 -0400
@@ -236,7 +236,8 @@ g_mount_tracker_finalize (GObject *objec
tracker = G_MOUNT_TRACKER (object);
- g_mutex_free (tracker->lock);
+ if (tracker->lock)
+ g_mutex_free (tracker->lock);
g_list_foreach (tracker->mounts,
(GFunc)g_mount_info_unref, NULL);

View File

@ -1 +1 @@
cefc1279b98838f26bc7878029ed13b3 gvfs-0.2.3.tar.bz2
08fc85c24ccaf15913dbcc43ea4d8ae8 gvfs-0.2.4.tar.bz2