From 3e902627a1ac59d530f2f6b5ad6042b7c274e261 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Jan 25 2010 14:35:42 +0000 Subject: - Update to 1.5.2 -- need to wait for glib2-2.23.2 packages, this is untested commit --- diff --git a/.cvsignore b/.cvsignore index 2333f99..046e153 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -gvfs-1.5.1.tar.bz2 +gvfs-1.5.2.tar.bz2 diff --git a/gvfs-1.4.3-smb-queryfs-old-samba.patch b/gvfs-1.4.3-smb-queryfs-old-samba.patch deleted file mode 100644 index 0399b5d..0000000 --- a/gvfs-1.4.3-smb-queryfs-old-samba.patch +++ /dev/null @@ -1,42 +0,0 @@ -From dd3e17181854c91f7c9123360652ae2ec28ea03e Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Mon, 30 Nov 2009 15:24:10 +0100 -Subject: [PATCH] [SMB] Fix free space calculation for older samba servers - -Samba servers older than 3.0.28 report zero values. ---- - daemon/gvfsbackendsmb.c | 18 +++++++++++------- - 1 files changed, 11 insertions(+), 7 deletions(-) - -diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c -index f53b8cb..88dac26 100644 ---- a/daemon/gvfsbackendsmb.c -+++ b/daemon/gvfsbackendsmb.c -@@ -1615,13 +1615,17 @@ do_query_fs_info (GVfsBackend *backend, - - if (res == 0) - { -- /* FIXME: inconsistent return values (libsmbclient-3.4.2) -- * - for linux samba hosts, f_frsize is zero and f_bsize is a real block size -- * - for some Windows hosts (XP), f_frsize and f_bsize should be multiplied to get real block size -- */ -- g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, st.f_bsize * st.f_blocks * ((st.f_frsize == 0) ? 1 : st.f_frsize)); -- g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE, st.f_bsize * st.f_bfree * ((st.f_frsize == 0) ? 1 : st.f_frsize)); -- g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, st.f_flag & SMBC_VFS_FEATURE_RDONLY); -+ /* older samba versions ( < 3.0.28) return zero values in struct statvfs */ -+ if (st.f_blocks > 0) -+ { -+ /* FIXME: inconsistent return values (libsmbclient-3.4.2) -+ * - for linux samba hosts, f_frsize is zero and f_bsize is a real block size -+ * - for some Windows hosts (XP), f_frsize and f_bsize should be multiplied to get real block size -+ */ -+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, st.f_bsize * st.f_blocks * ((st.f_frsize == 0) ? 1 : st.f_frsize)); -+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE, st.f_bsize * st.f_bfree * ((st.f_frsize == 0) ? 1 : st.f_frsize)); -+ g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, st.f_flag & SMBC_VFS_FEATURE_RDONLY); -+ } - } - } - #endif --- -1.6.5.2 - diff --git a/gvfs-1.5.1-dont-leak-mountoperation.patch b/gvfs-1.5.1-dont-leak-mountoperation.patch deleted file mode 100644 index 3a097b1..0000000 --- a/gvfs-1.5.1-dont-leak-mountoperation.patch +++ /dev/null @@ -1,34 +0,0 @@ -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-obexftp-dbus-private-connection.patch b/gvfs-1.5.1-obexftp-dbus-private-connection.patch deleted file mode 100644 index 0f14874..0000000 --- a/gvfs-1.5.1-obexftp-dbus-private-connection.patch +++ /dev/null @@ -1,47 +0,0 @@ -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-1.5.2-fuse-timestamps.patch b/gvfs-1.5.2-fuse-timestamps.patch deleted file mode 100644 index a7171eb..0000000 --- a/gvfs-1.5.2-fuse-timestamps.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 59bea4126cf23c575323c59a4cb1123f7cb44e2b Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Thu, 19 Nov 2009 14:48:56 +0000 -Subject: fuse: Fix setting timestamps - -We need to set time in seconds and microseconds separately. -Moreover, backends may not fully support setting all attributes -so don't report failure when at least one succeeded. - -At the moment, only SMB supports setting G_FILE_ATTRIBUTE_TIME_MODIFIED. ---- -diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c -index 6e82e15..3893937 100644 ---- a/client/gvfsfusedaemon.c -+++ b/client/gvfsfusedaemon.c -@@ -2083,40 +2083,53 @@ vfs_utimens (const gchar *path, const struct timespec tv [2]) - if (file) - { - guint64 atime; -+ guint32 atime_usec; - guint64 mtime; -+ guint32 mtime_usec; -+ GFileInfo *info; - - if (tv) - { -- atime = (guint64) tv [0].tv_sec * 1000000 + (guint64) tv [0].tv_nsec / (guint64) 1000; -- mtime = (guint64) tv [1].tv_sec * 1000000 + (guint64) tv [1].tv_nsec / (guint64) 1000; -+ atime = (guint64) tv [0].tv_sec; -+ atime_usec = (guint32) tv [0].tv_nsec / (guint32) 1000; -+ mtime = (guint64) tv [1].tv_sec; -+ mtime_usec = (guint32) tv [1].tv_nsec / (guint32) 1000; - } - else - { - struct timeval tiv; - - gettimeofday (&tiv, NULL); -- atime = (guint64) tiv.tv_sec * (guint64) 1000000 + (guint64) tiv.tv_usec; -+ atime = (guint64) tiv.tv_sec; -+ atime_usec = (guint32) tiv.tv_usec; - mtime = atime; -+ mtime_usec = atime_usec; - } - -- g_file_set_attribute (file, G_FILE_ATTRIBUTE_TIME_ACCESS_USEC, -- G_FILE_ATTRIBUTE_TYPE_UINT64, &atime, -- 0, NULL, &error); -+ info = g_file_info_new (); -+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED, mtime); -+ g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, mtime_usec); -+ g_file_info_set_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_ACCESS, atime); -+ g_file_info_set_attribute_uint32 (info, G_FILE_ATTRIBUTE_TIME_ACCESS_USEC, atime_usec); - -- if (!error) -- { -- g_file_set_attribute (file, G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, -- G_FILE_ATTRIBUTE_TYPE_UINT64, &mtime, -- 0, NULL, &error); -- } -+ g_file_set_attributes_from_info (file, info, 0, NULL, &error); - - if (error) - { -- result = -errno_from_error (error); -+ /* As long as not all backends support all attributes we set, -+ report failure only if neither mtime and atime have been set. */ -+ if (g_file_info_get_attribute_status (info, G_FILE_ATTRIBUTE_TIME_ACCESS) == G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING && -+ g_file_info_get_attribute_status (info, G_FILE_ATTRIBUTE_TIME_MODIFIED) == G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING) -+ { -+ /* Note: we only get first error from the attributes we try to set, might not be accurate -+ (a limitation of g_file_set_attributes_from_info()). */ -+ result = -errno_from_error (error); -+ } - g_error_free (error); - } - - g_object_unref (file); -+ g_object_unref (info); - } - else if (path_is_mount_list (path)) - { --- -cgit v0.8.2 diff --git a/gvfs-1.5.2-metadata-fix-rotated.patch b/gvfs-1.5.2-metadata-fix-rotated.patch deleted file mode 100644 index 2be9b66..0000000 --- a/gvfs-1.5.2-metadata-fix-rotated.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 5e0cd74ada6749ab7e489db2fa22bd8cb5d2881c Mon Sep 17 00:00:00 2001 -From: Christian Kellner -Date: Wed, 18 Nov 2009 13:40:38 +0000 -Subject: Reread metadata only when the inodes are different - -This will protect against bugs where the stable file has the rotated bug set (which should never happen but see bug #600057) ---- -diff --git a/metadata/metatree.c b/metadata/metatree.c -index 36abb9b..4a0e5f5 100644 ---- a/metadata/metatree.c -+++ b/metadata/metatree.c -@@ -158,6 +158,7 @@ struct _MetaTree { - int fd; - char *data; - gsize len; -+ ino_t inode; - - guint32 tag; - gint64 time_t_base; -@@ -469,6 +470,7 @@ meta_tree_init (MetaTree *tree) - - tree->fd = fd; - tree->len = statbuf.st_size; -+ tree->inode = statbuf.st_ino; - tree->data = data; - tree->header = (MetaFileHeader *)data; - -@@ -614,12 +616,24 @@ meta_tree_unref (MetaTree *tree) - static gboolean - meta_tree_needs_rereading (MetaTree *tree) - { -+ struct stat statbuf; -+ - if (tree->fd == -1) - return TRUE; - - if (tree->header != NULL && - GUINT32_FROM_BE (tree->header->rotated) == 0) - return FALSE; /* Got a valid tree and its not rotated */ -+ -+ /* Sanity check to avoid infinite loops when a stable file -+ has the rotated bit set to 1 (see gnome bugzilla bug #600057) */ -+ -+ if (lstat (tree->filename, &statbuf) != 0) -+ return FALSE; -+ -+ if (tree->inode == statbuf.st_ino) -+ return FALSE; -+ - return TRUE; - } - --- -cgit v0.8.2 diff --git a/gvfs-1.5.2-metadata-fsync-directory.patch b/gvfs-1.5.2-metadata-fsync-directory.patch deleted file mode 100644 index bcafb03..0000000 --- a/gvfs-1.5.2-metadata-fsync-directory.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 6592ecb3b95146b84072cf276eb98fba324b11ad Mon Sep 17 00:00:00 2001 -From: Christian Kellner -Date: Wed, 18 Nov 2009 14:33:36 +0000 -Subject: Fsync the directory when rotating the metadata - -This is needed so we never end up having a stable file with the -rotated bit set. Should fix bug #600057. ---- -diff --git a/metadata/metabuilder.c b/metadata/metabuilder.c -index a4a2043..bffdd16 100644 ---- a/metadata/metabuilder.c -+++ b/metadata/metabuilder.c -@@ -1010,8 +1010,8 @@ meta_builder_write (MetaBuilder *builder, - { - GString *out; - guint32 random_tag; -- int fd, fd2; -- char *tmp_name; -+ int fd, fd2, fd_dir; -+ char *tmp_name, *dirname; - - out = metadata_create_static (builder, &random_tag); - -@@ -1035,6 +1035,17 @@ meta_builder_write (MetaBuilder *builder, - goto out; - } - -+ /* Sync the directory to make sure that the entry in the directory containing -+ the new medata file has also reached disk. */ -+ dirname = g_path_get_dirname (filename); -+ fd_dir = open (dirname, O_RDONLY); -+ if (fd_dir > -1) -+ { -+ fsync (fd_dir); -+ close (fd_dir); -+ } -+ g_free (dirname); -+ - /* Mark old file (if any) as rotated) */ - if (fd2 != -1) - { --- -cgit v0.8.2 diff --git a/gvfs-1.5.2-metadata-gssize.patch b/gvfs-1.5.2-metadata-gssize.patch deleted file mode 100644 index 93a7d00..0000000 --- a/gvfs-1.5.2-metadata-gssize.patch +++ /dev/null @@ -1,24 +0,0 @@ -From f45b677201abb6b8471fa5bc935afda420c28c39 Mon Sep 17 00:00:00 2001 -From: Alexander Larsson -Date: Thu, 19 Nov 2009 10:53:10 +0000 -Subject: Don't store write() return val in unsigned variable - -The conversion to unsigned means we failed to recognize errors, -since if (ret < 0) was never hit. This is the suspected cause -for data loss in bug 598561. ---- -diff --git a/metadata/metabuilder.c b/metadata/metabuilder.c -index bffdd16..cca2443 100644 ---- a/metadata/metabuilder.c -+++ b/metadata/metabuilder.c -@@ -799,7 +799,7 @@ write_metadata (GString *out, - static gboolean - write_all_data_and_close (int fd, char *data, gsize len) - { -- gsize written; -+ gssize written; - gboolean res; - - res = FALSE; --- -cgit v0.8.2 diff --git a/gvfs-1.5.2-metadata-mtime.patch b/gvfs-1.5.2-metadata-mtime.patch deleted file mode 100644 index 5c9f2fd..0000000 --- a/gvfs-1.5.2-metadata-mtime.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 32dc3707bbb93153f9bd3df32259b7bf0e9cd579 Mon Sep 17 00:00:00 2001 -From: Alexander Larsson -Date: Thu, 19 Nov 2009 10:56:44 +0000 -Subject: If there are no mtimes in the file, use 0 as mtime base - -Before we used to store -1 (0xffffffff) as the mtime base in this case. -This value is not used if there are no mtimes though, so this is more -like a cosmetic change. ---- -diff --git a/metadata/metabuilder.c b/metadata/metabuilder.c -index cca2443..e27d1d3 100644 ---- a/metadata/metabuilder.c -+++ b/metadata/metabuilder.c -@@ -940,7 +940,8 @@ metadata_create_static (MetaBuilder *builder, - - /* Store the base as the min value in use minus one so that - 0 is free to mean "not defined" */ -- time_t_min = time_t_min - 1; -+ if (time_t_min != 0) -+ time_t_min = time_t_min - 1; - - /* Pick the base as the minimum, unless that leads to - a 32bit overflow */ --- -cgit v0.8.2 diff --git a/gvfs-1.5.2-trash-finalize.patch b/gvfs-1.5.2-trash-finalize.patch deleted file mode 100644 index 5157163..0000000 --- a/gvfs-1.5.2-trash-finalize.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d618141ea5161d05e388e9fbfa4148a6abd976b1 Mon Sep 17 00:00:00 2001 -From: Alexander Larsson -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 diff --git a/gvfs.spec b/gvfs.spec index ca48609..9bcccc2 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -1,14 +1,14 @@ Summary: Backends for the gio framework in GLib Name: gvfs -Version: 1.5.1 -Release: 6%{?dist} +Version: 1.5.2 +Release: 1%{?dist} License: LGPLv2+ Group: System Environment/Libraries URL: http://www.gtk.org Source: http://download.gnome.org/sources/gvfs/1.5/gvfs-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pkgconfig -BuildRequires: glib2-devel >= 2.21.2 +BuildRequires: glib2-devel >= 2.23.2 BuildRequires: dbus-glib-devel BuildRequires: /usr/bin/ssh BuildRequires: libcdio-devel >= 0.78.2 @@ -36,20 +36,9 @@ BuildRequires: libtool 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 -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 -Patch17: gvfs-1.5.2-trash-finalize.patch @@ -147,17 +136,8 @@ 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 -%patch5 -p1 -b .metadata-gssize -%patch6 -p1 -b .metadata-mtime -%patch7 -p1 -b .fuse-timestamps -%patch14 -p1 -b .moutop-leak +# %patch1 -p1 -b .nuke-hal-volume-monitor %patch15 -p1 -b .gphoto2-storageinfo -%patch16 -p1 -b .obexftp-dbus -%patch17 -p1 -b .trash-finalize %build @@ -319,6 +299,9 @@ killall -USR1 gvfsd >&/dev/null || : %{_datadir}/gvfs/remote-volume-monitors/afc.monitor %changelog +* Mon Jan 25 2010 Tomas Bzatek - 1.5.2-1 +- Update to 1.5.2 + * Fri Jan 22 2010 Adrian Reber - 1.5.1-6 - Rebuild for libcdio-0.82 diff --git a/sources b/sources index a10bbba..555789d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -46a7efa529d2fb8a0beee213da650b4d gvfs-1.5.1.tar.bz2 +bdf58cab5241e1d631ec16099a044df6 gvfs-1.5.2.tar.bz2