[gvfs/f18] Install systemd tmpfiles.d exclusion file for gvfs-fuse (#902743)

Tomas Bzatek tbzatek at fedoraproject.org
Wed Feb 6 15:23:26 UTC 2013


commit 633df238ff6934ffb6e60f985bc7274fd8c17f35
Author: Tomas Bzatek <tbzatek at redhat.com>
Date:   Wed Feb 6 16:23:14 2013 +0100

    Install systemd tmpfiles.d exclusion file for gvfs-fuse (#902743)

 gvfs-1.15.4-tmpfilesd.patch |   61 +++++++++++++++++++++++++++++++++++++++++++
 gvfs.spec                   |    9 +++++-
 2 files changed, 69 insertions(+), 1 deletions(-)
---
diff --git a/gvfs-1.15.4-tmpfilesd.patch b/gvfs-1.15.4-tmpfilesd.patch
new file mode 100644
index 0000000..ab1f57a
--- /dev/null
+++ b/gvfs-1.15.4-tmpfilesd.patch
@@ -0,0 +1,61 @@
+From 657330aa51ec65b9e5c247365bf5eb067ef62915 Mon Sep 17 00:00:00 2001
+From: Tomas Bzatek <tbzatek at redhat.com>
+Date: Wed, 06 Feb 2013 15:02:06 +0000
+Subject: fuse: Install systemd tmpfiles.d exclusion file
+
+We need to tell systemd to stay out of our fuse mounts before
+any data are destroyed.
+
+This patch reuses libsystemd-login detection as long as there is no
+general header or pkg-config file in systemd.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=902743
+https://bugs.archlinux.org/task/32715
+https://bugzilla.gnome.org/show_bug.cgi?id=560658
+---
+diff --git a/client/Makefile.am b/client/Makefile.am
+index 5613d58..356bb57 100644
+--- a/client/Makefile.am
++++ b/client/Makefile.am
+@@ -81,4 +81,19 @@ gvfsd_fuse_LDADD = \
+ 	$(top_builddir)/common/libgvfscommon.la \
+ 	$(GLIB_LIBS) $(FUSE_LIBS)
+ 
++
++# FIXME: reusing USE_LIBSYSTEMD_LOGIN as systemd has no universal header or pkg-config file
++if USE_LIBSYSTEMD_LOGIN
++
++# FIXME: hardcoded path (systemd doesn't use lib64)
++tmpfilesddir = $(prefix)/lib/tmpfiles.d
++tmpfilesd_DATA = gvfsd-fuse-tmpfiles.conf
++
++endif
++
+ endif
++
++
++EXTRA_DIST = \
++	gvfsd-fuse-tmpfiles.conf	\
++	$(NULL)
+diff --git a/client/gvfsd-fuse-tmpfiles.conf b/client/gvfsd-fuse-tmpfiles.conf
+new file mode 100644
+index 0000000..d808f2e
+--- a/dev/null
++++ b/client/gvfsd-fuse-tmpfiles.conf
+@@ -0,0 +1,14 @@
++# This is a systemd tmpfiles.d configuration file
++#
++# tmpfiles.d defaults are set to clean /run/user every now and then
++# which includes our gvfs-fuse mount being mounted in /run/user/<id>/gvfs
++#
++# This file adds an exclusion rule so that user data don't get automatically
++# cleaned up (i.e. destroyed).
++#
++# Due to our fuse mount restrictions root can't access nor stat the mountpoint
++# resulting in warning spitted out by the systemd-tmpfiles process. Please
++# ignore it for the time being until proper solution is found:
++# https://bugzilla.gnome.org/show_bug.cgi?id=560658
++
++x /run/user/*/gvfs
+--
+cgit v0.9.0.2
diff --git a/gvfs.spec b/gvfs.spec
index cedb1b1..c8bb44d 100644
--- a/gvfs.spec
+++ b/gvfs.spec
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.14.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv3 and LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -38,6 +38,8 @@ BuildRequires: libtool
 
 # http://bugzilla.gnome.org/show_bug.cgi?id=567235
 Patch0: gvfs-archive-integration.patch
+# from upstream
+Patch1: gvfs-1.15.4-tmpfilesd.patch
 
 Obsoletes: gnome-mount <= 0.8
 Obsoletes: gnome-mount-nautilus-properties <= 0.8
@@ -152,6 +154,7 @@ to applications using gvfs.
 %prep
 %setup -q
 %patch0 -p1 -b .archive-integration
+%patch1 -p1 -b .tmpfilesd
 
 %build
 # Needed for gvfs-0.2.1-archive-integration.patch
@@ -278,6 +281,7 @@ killall -USR1 gvfsd >&/dev/null || :
 %doc %{_mandir}/man1/gvfsd.1.gz
 %doc %{_mandir}/man1/gvfsd-metadata.1.gz
 %doc %{_mandir}/man7/gvfs.7.gz
+%{_prefix}/lib/tmpfiles.d/gvfsd-fuse-tmpfiles.conf
 
 %files devel
 %dir %{_includedir}/gvfs-client
@@ -331,6 +335,9 @@ killall -USR1 gvfsd >&/dev/null || :
 %{_datadir}/gvfs/mounts/afp-browse.mount
 
 %changelog
+* Wed Feb  6 2013 Tomas Bzatek <tbzatek at redhat.com> - 1.14.2-3
+- Install systemd tmpfiles.d exclusion file for gvfs-fuse (#902743)
+
 * Fri Dec  7 2012 Tomas Bzatek <tbzatek at redhat.com> - 1.14.2-2
 - Enable verbose build messages
 - Remove deprecated Encoding key from mount-archive.desktop


More information about the scm-commits mailing list