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

laney at users.alioth.debian.org laney at users.alioth.debian.org
Mon May 11 14:53:13 UTC 2015


Author: laney
Date: Mon May 11 14:53:12 2015
New Revision: 44341

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

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

Modified: desktop/experimental/glib2.0/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/changelog?rev=44341&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/changelog	[utf-8] (original)
+++ desktop/experimental/glib2.0/debian/changelog	[utf-8] Mon May 11 14:53:12 2015
@@ -1,5 +1,6 @@
 glib2.0 (2.45.1-2) UNRELEASED; urgency=medium
 
+  [ Simon McVittie ]
   * d/p/regex-if-PCRE-is-8.34-or-later-disable-auto-possessi.patch:
     update to my latest version submitted upstream, which fixes undefined
     behaviour in the unlikely event that G_REGEX_OPTIMIZE is combined
@@ -10,6 +11,10 @@
   * d/p/gdbus-serialization-use-check_serialization-instead-.patch:
     add patch to fix FTBFS in non-minimal environments (libdbus-1-dev
     installed). Applied upstream for 2.45.2.
+
+  [ Iain Lane ]
+  * debian/patches/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 12:15:17 +0100
 

Added: desktop/experimental/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch?rev=44341&op=file
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch	(added)
+++ desktop/experimental/glib2.0/debian/patches/0001-Fix-trashing-on-overlayfs.patch	[utf-8] Mon May 11 14:53:12 2015
@@ -0,0 +1,56 @@
+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.
+---
+ 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/experimental/glib2.0/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/glib2.0/debian/patches/series?rev=44341&op=diff
==============================================================================
--- desktop/experimental/glib2.0/debian/patches/series	[utf-8] (original)
+++ desktop/experimental/glib2.0/debian/patches/series	[utf-8] Mon May 11 14:53:12 2015
@@ -19,3 +19,4 @@
 regex-if-PCRE-is-8.34-or-later-disable-auto-possessi.patch
 regex-test-do-not-assert-that-system-PCRE-still-has-.patch
 gdbus-serialization-use-check_serialization-instead-.patch
+0001-Fix-trashing-on-overlayfs.patch




More information about the pkg-gnome-commits mailing list