pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

make gvfs-hal-volume-monitor aware of a SIG_HUP that full reloads itsself using execvp this is done by /libexec/devpubd-hooks/03-hal when discover another /dev/sd* device



Module Name:	pkgsrc-wip
Committed By:	sergio lenzi <nervoso%k1.com.br@localhost>
Pushed By:	lenzi.sergio
Date:		Tue Sep 29 16:43:57 2020 -0300
Changeset:	ac9d959309b252682c7a5cf70838517023c06a10

Modified Files:
	gvfs/patches/patch-configure.ac
Added Files:
	gvfs/patches/patch-client_gvfsfusedaemon.c
	gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c

Log Message:
make gvfs-hal-volume-monitor aware of a SIG_HUP that full reloads itsself using execvp
this is done by /libexec/devpubd-hooks/03-hal when discover another /dev/sd* device

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=ac9d959309b252682c7a5cf70838517023c06a10

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 gvfs/patches/patch-client_gvfsfusedaemon.c         | 14 ++++++++
 gvfs/patches/patch-configure.ac                    |  2 +-
 .../patch-monitor_hal_hal-volume-monitor-daemon.c  | 38 ++++++++++++++++++++++
 3 files changed, 53 insertions(+), 1 deletion(-)

diffs:
diff --git a/gvfs/patches/patch-client_gvfsfusedaemon.c b/gvfs/patches/patch-client_gvfsfusedaemon.c
new file mode 100644
index 0000000000..fb63dfdab4
--- /dev/null
+++ b/gvfs/patches/patch-client_gvfsfusedaemon.c
@@ -0,0 +1,14 @@
+$NetBSD$
+
+--- client/gvfsfusedaemon.c.orig	2017-03-28 14:05:33.000000000 +0000
++++ client/gvfsfusedaemon.c
+@@ -2443,7 +2443,9 @@ vfs_init (struct fuse_conn_info *conn)
+   subthread = g_thread_new ("gvfs-fuse-sub", (GThreadFunc) subthread_main, NULL);
+ 
+   /* Indicate O_TRUNC support for open() */
++#ifdef FUSE_CAP_ATOMIC_O_TRUNC
+   conn->want |= FUSE_CAP_ATOMIC_O_TRUNC;
++#endif
+ 
+   /* Prevent out-of-order readahead */
+   conn->async_read = 0;
diff --git a/gvfs/patches/patch-configure.ac b/gvfs/patches/patch-configure.ac
index e7b49cf8d6..fee42989c8 100644
--- a/gvfs/patches/patch-configure.ac
+++ b/gvfs/patches/patch-configure.ac
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- configure.ac.orig	2020-09-18 13:48:24.766400687 +0000
+--- configure.ac.orig	2017-03-28 14:05:33.000000000 +0000
 +++ configure.ac
 @@ -823,7 +823,7 @@ AC_CHECK_MEMBERS([struct statvfs.f_baset
  dnl
diff --git a/gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c b/gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c
new file mode 100644
index 0000000000..75b6aa7b94
--- /dev/null
+++ b/gvfs/patches/patch-monitor_hal_hal-volume-monitor-daemon.c
@@ -0,0 +1,38 @@
+$NetBSD$
+
+--- monitor/hal/hal-volume-monitor-daemon.c.orig	2020-09-28 23:58:08.642966101 +0000
++++ monitor/hal/hal-volume-monitor-daemon.c
+@@ -27,14 +27,33 @@
+ #include <glib/gi18n-lib.h>
+ #include <gmodule.h>
+ #include <gio/gio.h>
++#include <signal.h>
++#include <unistd.h>
+ 
+ #include <gvfsproxyvolumemonitordaemon.h>
+ 
+ #include "ghalvolumemonitor.h"
+ 
++static char	**saveargs;
++
++static void reset(int s) {
++	sigset_t	set;
++
++	sigemptyset(&set);
++	sigaddset(&set,SIGHUP);
++	sigprocmask(SIG_UNBLOCK,&set,NULL);
++	execvp(saveargs[0],saveargs);
++}
++
+ int
+ main (int argc, char *argv[])
+ {
++
++  if (signal(SIGHUP, reset) ==  SIG_ERR) {
++	perror ("SIGHUP");
++	exit (1);
++  }
++  saveargs=argv;
+   g_vfs_proxy_volume_monitor_daemon_init ();
+   return g_vfs_proxy_volume_monitor_daemon_main (argc,
+                                                  argv,


Home | Main Index | Thread Index | Old Index