From b24bd25253fe093f722ab576d29fdc41d04cb1ee Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 2 Aug 2019 19:14:55 +0100 Subject: gentoo resync : 02.08.2019 --- .../incron-0.5.12-use-execl-instead-system.patch | 25 ++++++++++++++++++++ sys-process/incron/files/incron.conf | 27 ++++++++++++++++++++++ sys-process/incron/files/incrond-r1.init | 26 +++++++++++++++++++++ sys-process/incron/files/incrond.conf | 26 +++++++++++++++++++++ 4 files changed, 104 insertions(+) create mode 100644 sys-process/incron/files/incron-0.5.12-use-execl-instead-system.patch create mode 100644 sys-process/incron/files/incron.conf create mode 100644 sys-process/incron/files/incrond-r1.init create mode 100644 sys-process/incron/files/incrond.conf (limited to 'sys-process/incron/files') 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 +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="" -- cgit v1.2.3