r44359 - in /desktop/unstable/glib2.0/debian: changelog patches/0001-Fix-trashing-on-overlayfs.patch patches/series

smcv at users.alioth.debian.org smcv at users.alioth.debian.org
Mon May 11 19:57:43 UTC 2015


Author: smcv
Date: Mon May 11 19:57:42 2015
New Revision: 44359

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=44359
Log:
d/p/0001-Fix-trashing-on-overlayfs.patch: Take patch from upstream bug to fix trashing on overlayfs.

[smcv: add DEP-3 bug reference]

Added:
    desktop/unstable/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch
Modified:
    desktop/unstable/glib2.0/debian/changelog
    desktop/unstable/glib2.0/debian/patches/series

Modified: desktop/unstable/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/changelog?rev=44359&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/changelog	[utf-8] (original)
+++ desktop/unstable/glib2.0/debian/changelog	[utf-8] Mon May 11 19:57:42 2015
@@ -1,5 +1,6 @@
 glib2.0 (2.44.0-3) UNRELEASED; urgency=medium
 
+  [ Simon McVittie ]
   * d/p/regex-test-do-not-assert-that-system-PCRE-allows-P-1.patch:
     update to the version that went upstream in 2.45.1. No functional change.
   * d/p/regex-if-PCRE-is-8.34-or-later-disable-auto-possessi.patch:
@@ -28,6 +29,10 @@
     in jessie
   * d/p/81-skip-monitor-test-on-non-linux.patch: add DEP-3 information
   * d/p/90_gio-modules-multiarch-compat.patch: add DEP-3 information
+
+  [ Iain Lane ]
+  * d/p/0001-Fix-trashing-on-overlayfs.patch: Take patch from
+    upstream bug to fix trashing on overlayfs.
 
  -- Simon McVittie <smcv at debian.org>  Mon, 04 May 2015 09:53:53 +0100
 

Added: desktop/unstable/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch?rev=44359&op=file
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch	(added)
+++ desktop/unstable/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch	[utf-8] Mon May 11 19:57:42 2015
@@ -0,0 +1,58 @@
+From 4411742e5d5d0b68b7d1e781bc04a0a3182917b2 Mon Sep 17 00:00:00 2001
+From: Iain Lane <iain at orangesquash.org.uk>
+Date: Tue, 21 Apr 2015 15:00:09 +0100
+Subject: [PATCH] Fix trashing on overlayfs
+
+In order to determine whether to trash a file to the home directory, we
+compare its st_dev to our home directory's st_dev field.
+
+This is the wrong thing to do on overlayfs when deleting files, because
+st_dev contains the ID of the filesystem providing the file (which can
+be the lower or upper filesystem), but directories always return the ID
+of the overlayfs. Thus the comparison fails and we are unable to trash
+the file.
+
+Fix this by checking st_dev of the parent directory when we are deleting
+a file.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=748248
+---
+ gio/glocalfile.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/gio/glocalfile.c b/gio/glocalfile.c
+index 327fe6f..19ebb76 100644
+--- a/gio/glocalfile.c
++++ b/gio/glocalfile.c
+@@ -1900,7 +1900,7 @@ g_local_file_trash (GFile         *file,
+   char *basename, *trashname, *trashfile, *infoname, *infofile;
+   char *original_name, *original_name_escaped;
+   int i;
+-  char *data;
++  char *data, *path;
+   gboolean is_homedir_trash;
+   char delete_time[32];
+   int fd;
+@@ -1925,6 +1925,19 @@ g_local_file_trash (GFile         *file,
+ 
+   is_homedir_trash = FALSE;
+   trashdir = NULL;
++
++  /* On overlayfs, a file's st_dev will be different to the home directory's.
++   * We still want to create our trash directory under the home directory, so
++   * instead we should stat the directory that the file we're deleting is in as
++   * this will have the same st_dev.
++   */
++  if (!S_ISDIR (file_stat.st_mode))
++  {
++      path = g_path_get_dirname (local->filename);
++      g_lstat (path, &file_stat);
++      g_free (path);
++  }
++
+   if (file_stat.st_dev == home_stat.st_dev)
+     {
+       is_homedir_trash = TRUE;
+-- 
+2.1.4
+

Modified: desktop/unstable/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/glib2.0/debian/patches/series?rev=44359&op=diff
==============================================================================
--- desktop/unstable/glib2.0/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/glib2.0/debian/patches/series	[utf-8] Mon May 11 19:57:42 2015
@@ -20,3 +20,4 @@
 gdbus-serialization-use-check_serialization-instead-.patch
 gdbus-peer-test-let-GDBusServer-start-before-notifyi.patch
 gdatetime-test-don-t-assume-that-time-stands-still.patch
+0001-Fix-trashing-on-overlayfs.patch




More information about the pkg-gnome-commits mailing list