From 7c916cbc67043f7527369a55c768afd84fcfd3738bb725829a2fd8c32192a0d6 Mon Sep 17 00:00:00 2001 From: Luciano Santos Date: Fri, 30 Jun 2023 18:38:56 +0000 Subject: [PATCH] Accepting request 1096132 from GNOME:Next New stable rel OBS-URL: https://build.opensuse.org/request/show/1096132 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gvfs?expand=0&rev=381 --- ...2c0179f834d8bc3bd84ce78ee495050f2676.patch | 55 ------------ ...b701fc95abeaa8a8ca3d9059378a9490f738.patch | 84 ------------------- ...69f63c5def1528dda2e7833db5774aa08e22.patch | 31 ------- gvfs-1.50.4.tar.xz | 3 - gvfs-1.50.5.tar.xz | 3 + gvfs.changes | 20 +++++ gvfs.spec | 9 +- 7 files changed, 24 insertions(+), 181 deletions(-) delete mode 100644 41862c0179f834d8bc3bd84ce78ee495050f2676.patch delete mode 100644 85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch delete mode 100644 fc2669f63c5def1528dda2e7833db5774aa08e22.patch delete mode 100644 gvfs-1.50.4.tar.xz create mode 100644 gvfs-1.50.5.tar.xz diff --git a/41862c0179f834d8bc3bd84ce78ee495050f2676.patch b/41862c0179f834d8bc3bd84ce78ee495050f2676.patch deleted file mode 100644 index c753763..0000000 --- a/41862c0179f834d8bc3bd84ce78ee495050f2676.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 41862c0179f834d8bc3bd84ce78ee495050f2676 Mon Sep 17 00:00:00 2001 -From: rong wang -Date: Thu, 23 Mar 2023 10:26:24 +0800 -Subject: [PATCH] trash: Sync trash dir items when files change - -In the case of an application monitoring the trash can, delete a file -on the mounted device to the trash can, and then unmount the device. -At this time, if you check the status of the trash can, you will find -that the number of files queried is inconsistent with the number of -files obtained through the enumeration job. This is because the number -of files queried includes some files that do not exist when the device -is unmounted. The solution is to synchronize the status of the trash -can in time to ensure that the trash can does not record files that do -not exist. ---- - daemon/trashlib/trashdir.c | 21 +++++++++++++++++++-- - 1 file changed, 19 insertions(+), 2 deletions(-) - -diff --git a/daemon/trashlib/trashdir.c b/daemon/trashlib/trashdir.c -index c470d3bdf..0d7d2b1be 100644 ---- a/daemon/trashlib/trashdir.c -+++ b/daemon/trashlib/trashdir.c -@@ -163,10 +163,27 @@ trash_dir_changed (GFileMonitor *monitor, - TrashDir *dir = user_data; - - if (event_type == G_FILE_MONITOR_EVENT_CREATED) -- trash_root_add_item (dir->root, file, dir->topdir, dir->is_homedir); -+ { -+ dir->items = g_slist_insert_sorted (dir->items, -+ g_object_ref (file), -+ (GCompareFunc) compare_basename); -+ trash_root_add_item (dir->root, file, dir->topdir, dir->is_homedir); -+ } - - else if (event_type == G_FILE_MONITOR_EVENT_DELETED) -- trash_root_remove_item (dir->root, file, dir->is_homedir); -+ { -+ GSList *node; -+ -+ node = g_slist_find_custom (dir->items, -+ file, -+ (GCompareFunc) compare_basename); -+ if (node) -+ { -+ g_object_unref (node->data); -+ dir->items = g_slist_delete_link (dir->items, node); -+ } -+ trash_root_remove_item (dir->root, file, dir->is_homedir); -+ } - - else if (event_type == G_FILE_MONITOR_EVENT_PRE_UNMOUNT || - event_type == G_FILE_MONITOR_EVENT_UNMOUNTED || --- -GitLab - diff --git a/85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch b/85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch deleted file mode 100644 index 42fdb59..0000000 --- a/85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 85bfb701fc95abeaa8a8ca3d9059378a9490f738 Mon Sep 17 00:00:00 2001 -From: Corey Berla -Date: Tue, 11 Apr 2023 16:14:15 -0700 -Subject: [PATCH] smb: Allow renaming a file to the same name with a different - case - -We check to see if the desired file name already exists before doing -a renaming by stat'ing the file (to prevent smb from destroying an -existing file). Since smb is not case sensitive, the check for an -existing file mistakenly returns true if we are only changing the -filename's case. - -Add a second check to see whether we are simply changing the -case of the filename. - -Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/672 - - -(cherry picked from commit a845ba0220fef72815ce091b92f74767d8025541) ---- - daemon/gvfsbackendsmb.c | 31 +++++++++++++++++++++---------- - 1 file changed, 21 insertions(+), 10 deletions(-) - -diff --git a/daemon/gvfsbackendsmb.c b/daemon/gvfsbackendsmb.c -index d999a2a6..87cb2cae 100644 ---- a/daemon/gvfsbackendsmb.c -+++ b/daemon/gvfsbackendsmb.c -@@ -1892,6 +1892,9 @@ do_set_display_name (GVfsBackend *backend, - { - GVfsBackendSmb *op_backend = G_VFS_BACKEND_SMB (backend); - char *from_uri, *to_uri; -+ g_autofree char *basename = NULL; -+ g_autofree char *old_name_case = NULL; -+ g_autofree char *new_name_case = NULL; - char *dirname, *new_path; - int res, errsv; - struct stat st; -@@ -1899,6 +1902,7 @@ do_set_display_name (GVfsBackend *backend, - smbc_stat_fn smbc_stat; - - dirname = g_path_get_dirname (filename); -+ basename = g_path_get_basename (filename); - - /* TODO: display name is in utf8, atm we assume libsmb uris - are in utf8, but this might not be true if the user changed -@@ -1910,18 +1914,25 @@ do_set_display_name (GVfsBackend *backend, - from_uri = create_smb_uri (op_backend->server, op_backend->port, op_backend->share, filename); - to_uri = create_smb_uri (op_backend->server, op_backend->port, op_backend->share, new_path); - -- -- /* We can't rely on libsmbclient reporting EEXIST, let's always stat first. -- * https://bugzilla.gnome.org/show_bug.cgi?id=616645 -+ /* If we are simply changing the case of an existing file, we don't need to -+ * worry about overwriting another file. - */ -- smbc_stat = smbc_getFunctionStat (op_backend->smb_context); -- res = smbc_stat (op_backend->smb_context, to_uri, &st); -- if (res == 0) -+ old_name_case = g_utf8_casefold (basename, -1); -+ new_name_case = g_utf8_casefold (display_name, -1); -+ if (g_strcmp0 (old_name_case, new_name_case) != 0) - { -- g_vfs_job_failed (G_VFS_JOB (job), -- G_IO_ERROR, G_IO_ERROR_EXISTS, -- _("Can’t rename file, filename already exists")); -- goto out; -+ /* We can't rely on libsmbclient reporting EEXIST, let's always stat first. -+ * https://bugzilla.gnome.org/show_bug.cgi?id=616645 -+ */ -+ smbc_stat = smbc_getFunctionStat (op_backend->smb_context); -+ res = smbc_stat (op_backend->smb_context, to_uri, &st); -+ if (res == 0) -+ { -+ g_vfs_job_failed (G_VFS_JOB (job), -+ G_IO_ERROR, G_IO_ERROR_EXISTS, -+ _("Can’t rename file, filename already exists")); -+ goto out; -+ } - } - - smbc_rename = smbc_getFunctionRename (op_backend->smb_context); --- -GitLab - diff --git a/fc2669f63c5def1528dda2e7833db5774aa08e22.patch b/fc2669f63c5def1528dda2e7833db5774aa08e22.patch deleted file mode 100644 index 9bcdd23..0000000 --- a/fc2669f63c5def1528dda2e7833db5774aa08e22.patch +++ /dev/null @@ -1,31 +0,0 @@ -From fc2669f63c5def1528dda2e7833db5774aa08e22 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= -Date: Sat, 29 Apr 2023 22:30:36 +0000 -Subject: [PATCH] mtp: Emit delete event on device when disconnected - -Otherwise clients won't realize the root file is gone. - -Related to https://gitlab.gnome.org/GNOME/nautilus/-/issues/371 ---- - daemon/gvfsbackendmtp.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/daemon/gvfsbackendmtp.c b/daemon/gvfsbackendmtp.c -index fd297be1d..0bc35b7ab 100644 ---- a/daemon/gvfsbackendmtp.c -+++ b/daemon/gvfsbackendmtp.c -@@ -638,6 +638,11 @@ on_uevent (GUdevClient *client, gchar *action, GUdevDevice *device, gpointer use - (char *)path); - } - -+ /* Finally, emit delete event to tell the clients the device root file is gone. */ -+ g_hash_table_foreach (op_backend->monitors, -+ emit_delete_event, -+ (char *)"/"); -+ - op_backend->force_unmounted = TRUE; - g_atomic_int_set (&op_backend->unmount_started, TRUE); - g_vfs_backend_force_unmount ((GVfsBackend*)op_backend); --- -GitLab - diff --git a/gvfs-1.50.4.tar.xz b/gvfs-1.50.4.tar.xz deleted file mode 100644 index 8ea53c8..0000000 --- a/gvfs-1.50.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ab9059a676a537edbea21388c2aafe1a7e2c8f1ac2dfdc6d64550233075457fd -size 1226728 diff --git a/gvfs-1.50.5.tar.xz b/gvfs-1.50.5.tar.xz new file mode 100644 index 0000000..1d1aef0 --- /dev/null +++ b/gvfs-1.50.5.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b86f09b7331c8642ecebf46a3cda0692f5eb26086f132326a5483c2ebf86a4cb +size 1226548 diff --git a/gvfs.changes b/gvfs.changes index 834b8c4..189be91 100644 --- a/gvfs.changes +++ b/gvfs.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Jun 30 12:49:52 UTC 2023 - Bjørn Lie + +- Update to version 1.50.5: + + smbbrowse: Fix empty device listing after unrelated mount + failure. + + udisks: Fix missing unmount notifications. + + trash: + - Fix nfs4 and cifs monitoring. + - Fix wrongly reported item-count. + + smb: Allow renaming a file to the same name with a different + case. + + mtp: Emit delete event on device disconnection. + + Some other fixes and improvements. + + Updated translations. +- Drop patches fixed upstream: + + fc2669f63c5def1528dda2e7833db5774aa08e22.patch + + 85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch + + 41862c0179f834d8bc3bd84ce78ee495050f2676.patch + ------------------------------------------------------------------- Sun Jun 11 20:55:10 UTC 2023 - Bjørn Lie diff --git a/gvfs.spec b/gvfs.spec index 860717e..f53d7d8 100644 --- a/gvfs.spec +++ b/gvfs.spec @@ -18,7 +18,7 @@ %bcond_without cdda Name: gvfs -Version: 1.50.4 +Version: 1.50.5 Release: 0 Summary: Virtual File System functionality for GLib License: GPL-3.0-only AND LGPL-2.0-or-later @@ -27,13 +27,6 @@ URL: https://wiki.gnome.org/Projects/gvfs Source0: https://download.gnome.org/sources/gvfs/1.50/%{name}-%{version}.tar.xz Source99: baselibs.conf -# PATCH-FIX-UPSTREAM 41862c0179f834d8bc3bd84ce78ee495050f2676.patch -- trash: Sync trash dir items when files change -Patch0: https://gitlab.gnome.org/GNOME/gvfs/-/commit/41862c0179f834d8bc3bd84ce78ee495050f2676.patch -# PATCH-FIX-UPSTREAM fc2669f63c5def1528dda2e7833db5774aa08e22.patch -- mtp: Emit delete event on device when disconnected -Patch1: https://gitlab.gnome.org/GNOME/gvfs/-/commit/fc2669f63c5def1528dda2e7833db5774aa08e22.patch -# PATCH-FIX-UPSTREAM 85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch -- smb: Allow renaming a file to the same name with a different case -Patch2: https://gitlab.gnome.org/GNOME/gvfs/-/commit/85bfb701fc95abeaa8a8ca3d9059378a9490f738.patch - ### NOTE: Please, keep SLE-only patches at bottom (starting on 1000). # PATCH-FEATURE-SLE gvfs-nds.patch ksamrat@novell.com -- Provides NDS browsing for nautilus Patch1000: gvfs-nds.patch