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
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')
-rw-r--r--sys-process/incron/Manifest1
-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
-rw-r--r--sys-process/incron/incron-0.5.12_p20191114.ebuild59
6 files changed, 164 insertions, 0 deletions
diff --git a/sys-process/incron/Manifest b/sys-process/incron/Manifest
index ef99ea4cebef..14fbf63125c5 100644
--- a/sys-process/incron/Manifest
+++ b/sys-process/incron/Manifest
@@ -1 +1,2 @@
DIST incron-0.5.10.tar.gz 203158 BLAKE2B fef659b6a01de3633411c2e886b62dafa364939bed73c4d16922b954ca99a754e5a9508770ba297aa3b7da5366e3165de76da3de4a0666ce25df81902f1bbce3 SHA512 653817c35059b5305e059137eac78f21a7d32ccc03fc92ba282eab66ba5f3d2c83a1a571ebdcead8df3ed500a7fd30cfa46375c635450b08d2bd8d00dfe86df3
+DIST incron-0.5.12_p20191114.tar.gz 339568 BLAKE2B ca6ccd4f2b4f24b48ee3bdf0a18713f6f70469cbc11f09fd215001e8512bd04dcbdc9cd5e7cc784907cd0d009a4572354f578cad78bc263070146b0ff2379029 SHA512 19cf386163de3f4cafcf36872659dd8f819129056ed2508403a8692130db04cbe5eb917370aa609d25a6b75c24a7a1b87e7bd2e957a5d66610f541fe83aec39e
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=""
diff --git a/sys-process/incron/incron-0.5.12_p20191114.ebuild b/sys-process/incron/incron-0.5.12_p20191114.ebuild
new file mode 100644
index 000000000000..232401e6e4a2
--- /dev/null
+++ b/sys-process/incron/incron-0.5.12_p20191114.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit linux-info systemd toolchain-funcs
+
+COMMIT="1eedfbc9b318372efd119fd17f4abdbde561a53d"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+DESCRIPTION="inotify based cron daemon"
+HOMEPAGE="https://incron.aiken.cz/"
+SRC_URI="https://github.com/ar-/incron/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/${PN}-0.5.12-use-execl-instead-system.patch )
+
+# < 2.6.18 => INOTIFY, >= 2.6.18 => INOTIFY_USER
+# It should be ok to expect at least 2.6.18
+CONFIG_CHECK="~INOTIFY_USER"
+
+src_prepare() {
+ default
+
+ sed -i \
+ -e '/$(INSTALL) -m 0644 incron.conf $(DESTDIR)$(INITDIR)/d' \
+ Makefile \
+ || die
+}
+
+src_compile() {
+ emake CXX=$(tc-getCXX)
+}
+
+src_install() {
+ emake DESTDIR="${D}" PREFIX=/usr DOCDIR=/usr/share/doc/${PF} install
+
+ newinitd "${FILESDIR}/incrond-r1.init" incrond
+ newconfd "${FILESDIR}/incrond.conf" incrond
+ systemd_dounit "${FILESDIR}/incrond.service"
+
+ dodoc CHANGELOG README TODO
+
+ insinto /etc
+ doins "${FILESDIR}"/incron.conf
+ touch \
+ "${D}/etc/incron.allow" \
+ "${D}/etc/incron.deny" \
+ || die
+
+ keepdir /var/spool/${PN}
+}