summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-07-22 15:28:31 +0200
committerThomas Deutschmann <whissi@gentoo.org>2019-07-22 15:29:35 +0200
commit118d57e1e794edef1116618a8ac31ce6552414a9 (patch)
tree09a8f45a597fe9041391ce5def029224edbe8182 /sys-process/incron/files
parentapp-emulation/ganeti-instance-debootstrap: Drop old (diff)
downloadgentoo-118d57e1e794edef1116618a8ac31ce6552414a9.tar.gz
gentoo-118d57e1e794edef1116618a8ac31ce6552414a9.tar.bz2
gentoo-118d57e1e794edef1116618a8ac31ce6552414a9.zip
sys-process/incron: bump to v0.5.12 snapshot release
Closes: https://bugs.gentoo.org/675518 Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'sys-process/incron/files')
-rw-r--r--sys-process/incron/files/incron-0.5.12-use-execl-instead-system.patch25
-rw-r--r--sys-process/incron/files/incron.conf27
-rw-r--r--sys-process/incron/files/incrond-r1.init26
-rw-r--r--sys-process/incron/files/incrond.conf26
4 files changed, 104 insertions, 0 deletions
diff --git a/sys-process/incron/files/incron-0.5.12-use-execl-instead-system.patch b/sys-process/incron/files/incron-0.5.12-use-execl-instead-system.patch
new file mode 100644
index 000000000000..745940dba08f
--- /dev/null
+++ b/sys-process/incron/files/incron-0.5.12-use-execl-instead-system.patch
@@ -0,0 +1,25 @@
+https://github.com/ar-/incron/pull/56
+
+From 0a8cb83983394c2bd36105fcae5c56f89e931686 Mon Sep 17 00:00:00 2001
+From: Philippe Kueck <bqobccy6ejnq2bqvmebqiwqha4cs4@protected32.unixadm.org>
+Date: Thu, 14 Mar 2019 16:00:39 +0100
+Subject: [PATCH] use execl() instead of system() as system() returns, which
+ results in additional processes
+
+---
+ usertable.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usertable.cpp b/usertable.cpp
+index 11fd04b..f8b157a 100644
+--- a/usertable.cpp
++++ b/usertable.cpp
+@@ -471,7 +471,7 @@ void UserTable::OnEvent(InotifyEvent& rEvt)
+
+ // for system table
+ if (m_fSysTable) {
+- if (system(cmd.c_str()) != 0) // exec failed
++ if (execl("/bin/sh","sh", "-c", cmd.c_str(), (char *)0) != 0) // exec failed
+ {
+ syslog(LOG_ERR, "cannot exec process: %s", strerror(errno));
+ _exit(1);
diff --git a/sys-process/incron/files/incron.conf b/sys-process/incron/files/incron.conf
new file mode 100644
index 000000000000..a4c83f844acc
--- /dev/null
+++ b/sys-process/incron/files/incron.conf
@@ -0,0 +1,27 @@
+#
+# inotify cron daemon (incrond) incron example configuration file
+#
+
+# This directory is examined by incrond for system table files.
+#system_table_dir="/etc/incron.d"
+
+# This directory is examined by incrond for user table files.
+#user_table_dir="/var/spool/incron"
+
+# This file contains users allowed to use incron.
+#allowed_users="/etc/incron.allow"
+
+# This file contains users denied to use incron.
+#denied_users="/etc/incron.deny"
+
+# This directory is used for creating a lock avoiding to run multiple
+# instances of incrond.
+#lockfile_dir="/var/run"
+
+# This name (appended by '.pid') is used for creating a lock avoiding
+# to run multiple instances of incrond.
+#lockfile_name="incrond"
+
+# This name or path is used to run as an editor for editing incron tables.
+# When no editor is given, system editor is used.
+#editor=
diff --git a/sys-process/incron/files/incrond-r1.init b/sys-process/incron/files/incrond-r1.init
new file mode 100644
index 000000000000..6900f6b5b28f
--- /dev/null
+++ b/sys-process/incron/files/incrond-r1.init
@@ -0,0 +1,26 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+INCROND_BINARY=${INCROND_BINARY:-"/usr/sbin/incrond"}
+INCROND_CONFFILE=${INCROND_CONFFILE:-"/etc/incron.conf"}
+INCROND_PIDFILE=${INCROND_PIDFILE:-"/var/run/incrond.pid"}
+INCROND_SSDARGS=${INCROND_SSDARGS:-"--wait 1000"}
+INCROND_TERMTIMEOUT=${INCROND_TERMTIMEOUT:-"TERM/25/KILL/5"}
+INCROND_OPTS=${INCROND_OPTS:-""}
+
+command=${INCROND_BINARY}
+command_args="${INCROND_OPTS} -f \"${INCROND_CONFFILE}\""
+start_stop_daemon_args="${INCROND_SSDARGS}"
+pidfile="${INCROND_PIDFILE}"
+retry="${INCROND_TERMTIMEOUT}"
+
+required_files="${INCROND_CONFFILE}"
+
+name="incron daemon"
+description="inotify cron daemon monitors filesystem events and executes commands defined in system and user tables"
+
+depend() {
+ use clock logger
+ need localmount
+}
diff --git a/sys-process/incron/files/incrond.conf b/sys-process/incron/files/incrond.conf
new file mode 100644
index 000000000000..3ae3809eb0c4
--- /dev/null
+++ b/sys-process/incron/files/incrond.conf
@@ -0,0 +1,26 @@
+# /etc/conf.d/incrond
+
+# Configuration file
+#INCROND_CONFFILE="/etc/incron.conf"
+
+# PID file
+# When running multiple instances make sure that this value matches
+# ${lockfile_dir}/${lockfile_name}.pid set in ${INCROND_CONFFILE}.
+#INCROND_PIDFILE="/var/run/incrond.pid"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+#INCROND_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (25 + 5 seconds
+# per default) when you are stopping the service.
+#INCROND_TERMTIMEOUT="TERM/25/KILL/5"
+
+# Options to incrond
+# See incrond(8) for more details
+# Notes:
+# * Do not specify another CONFIGFILE but use the variable above to change the location
+#INCROND_OPTS=""