summaryrefslogtreecommitdiff
path: root/sys-process/incron
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process/incron')
-rw-r--r--sys-process/incron/Manifest6
-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, 169 insertions, 0 deletions
diff --git a/sys-process/incron/Manifest b/sys-process/incron/Manifest
index c20af87a396b..93317cbdf232 100644
--- a/sys-process/incron/Manifest
+++ b/sys-process/incron/Manifest
@@ -1,6 +1,12 @@
AUX incron-0.5.10+gcc-4.7.patch 335 BLAKE2B 54bc73aabd1506b889b68bb93555bc25ae6b2c8ff89f8ede5c21b77679900de9e7d4678f50e8434864a7c9570ee99a4ce3a14aa9e68ca02e88ace624eb8fda1d SHA512 d5f78513aba03c02b0f0f69000a0c9c1e8a0e3a5011fc85645f188b26cbcf958532b1fe55d91949708ff14fe36e372dc0f7423b82b634a993081ad143e0fb682
+AUX incron-0.5.12-use-execl-instead-system.patch 871 BLAKE2B 971a193618a03efbca7e0665ab7a74dc1589c4bdd55251b965257ff669d6dd82099970a9394f4266866b166556b7c7145778f0d2a9810aa467f41eaa2ed1285e SHA512 a39cf0d3339a670b6f05d434ae02c64c45fd42d36d8db95d0df03bec5642511ce1778f1584c1f00892f4cda651585a77eb9b1146b2875c22039e390025d5791a
+AUX incron.conf 829 BLAKE2B a56d8909337dc28bfa10c813700c7be9d0564467775506c71c78af852ae1ba9ae3502cb7133b87a0a6665e8218ad22508d39a93f88eec6ab62d7083f9d4f5425 SHA512 0b81daafda8dca5c6d7933242e2860cdfc874bc2284bf29a39b250596035b5984e6ed04380568a016ce11d012f2945786bf7c411d623521de1256533036ef732
+AUX incrond-r1.init 853 BLAKE2B dd7ae75e522535f27b9f342c429dd7d6590ac0676784828614b6bae35b39773723aa1141236abaa4c63dcd1ce20b06fecf5978dd0c694edb3d8ca7808caa99cf SHA512 4f50734e056c3290ad8339847f1e1837a54f931813cc070722f1c9dc6883ea6d4ee1cf935f9bc42d1c9a9725345271cc46c219fe255ada0fe93f735014c0bf3d
+AUX incrond.conf 960 BLAKE2B b92d9f3523a8aaf38f0dfdfeda3a32b2ad6b588f007fc15e99d491a783a54f7581be677d810f00c10c3600335a89ded83664acdc0042710cf7784e9dfffba5b2 SHA512 e5d9d05c1b0f2393dea64ef27d01293f84302c79d6aec44ee11bc0f5b493e4392ee51cbf7e9a57a0771ee3e4625e6033f2e7ca3403a08df5aa1f3bad1d556545
AUX incrond.init 435 BLAKE2B 527422aa27036a7a32b47ec3de356ce61422b5e5b79f6aef4a43db064bb2969a0c7992d5e7622880311fc90c91a2e38cf47ae127170f8de07e3227125e06dd75 SHA512 11190582fa29bcbbf5f151f9e1ac1f7c74970d4a5a633a5f82102cf8bb574c25376c54d37621dd4fdaa1a99f16c5aefb2332c8f3e3de2ca0eef6783b379a1083
AUX incrond.service 155 BLAKE2B d0e1c9af86d7a548890b9c43799d5e13e17567659d25da44afbadae72e8401b6cf95e50b6471b86737dd00785c78d9f448bcab5cf0feea5c9a168aa6b3d6e26b SHA512 059043d3607aafb1d469977574eb96478845d17d88f7f61ba23269341c407e443bca36411eedf0753edf0216bd04800128c9557dc8827ffb980d5512f257bb80
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
EBUILD incron-0.5.10-r1.ebuild 833 BLAKE2B 014c5036faa33316f3024856634bb190f8c5d5d3a67f723063c4279cb99232731a4ef99e0858b4fdd8731168748f9af9f6891892cf184cab5e13fbf6a5f9629b SHA512 89ce3fcfe569e42a9863d3bbe47db3565e3b8e653d66d5e9304a8d975d51e7f034307375a383d68fec8cc602e5fd561382f0013544aa96710410acf53152a8f9
+EBUILD incron-0.5.12_p20191114.ebuild 1259 BLAKE2B 9f89ae648cc11114bc170aa285be621222c8ec805ec2e51b5706aeddfe40c5be6a3f071d55c9ad54bc77f37f6035f515ff7b88a2d094e14a99bfc2ec85f8c980 SHA512 e4711b792f25d9c63ceca8c9f67d07afa6ff79cab3999e008bb4d707824aec9d1167fe37d093c896dcb68ec2a9d1500befb804afddf436f09a80a10ae1386682
MISC metadata.xml 251 BLAKE2B fb85d245662fa1577cfe1d77526bd34fb2a674dd447192f2defe78b751423e3d14ae73efd3ac0e1e5e6fdb6259622a782e724ec77021faf526509f199dd20d61 SHA512 46942a98ef7e36470d1169a5bc8839d25603e33c143cd36327a8a85fc14cb6bfb32247eb7608d92cc58a06cc8eef5bd64d6ec2d21e69a88632e4b936598aa772
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}
+}