public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-process/incron/files/, sys-process/incron/
@ 2019-07-22 13:29 Thomas Deutschmann
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Deutschmann @ 2019-07-22 13:29 UTC (permalink / raw
  To: gentoo-commits

commit:     118d57e1e794edef1116618a8ac31ce6552414a9
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 22 13:28:31 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Mon Jul 22 13:29:35 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=118d57e1

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 <AT> gentoo.org>

 sys-process/incron/Manifest                        |  1 +
 .../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 ++++++++++
 sys-process/incron/incron-0.5.12_p20191114.ebuild  | 59 ++++++++++++++++++++++
 6 files changed, 164 insertions(+)

diff --git a/sys-process/incron/Manifest b/sys-process/incron/Manifest
index ef99ea4cebe..14fbf63125c 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 00000000000..745940dba08
--- /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 00000000000..a4c83f844ac
--- /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 00000000000..6900f6b5b28
--- /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 00000000000..3ae3809eb0c
--- /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 00000000000..232401e6e4a
--- /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}
+}


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-process/incron/files/, sys-process/incron/
@ 2021-04-25  1:01 Thomas Deutschmann
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Deutschmann @ 2021-04-25  1:01 UTC (permalink / raw
  To: gentoo-commits

commit:     388a0ec1751688351781ddfd6175bc4e902356d1
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 25 01:00:45 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Apr 25 01:01:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=388a0ec1

sys-process/incron: Fix crash when accessing path of..

...created/moved dir in watched directory.

Closes: https://bugs.gentoo.org/785448
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../incron/files/incron-0.5.12-issue25.patch       | 40 ++++++++++++++++++++++
 ...14.ebuild => incron-0.5.12_p20191114-r1.ebuild} |  7 ++--
 2 files changed, 45 insertions(+), 2 deletions(-)

diff --git a/sys-process/incron/files/incron-0.5.12-issue25.patch b/sys-process/incron/files/incron-0.5.12-issue25.patch
new file mode 100644
index 00000000000..8883aec180a
--- /dev/null
+++ b/sys-process/incron/files/incron-0.5.12-issue25.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/785448
+
+Origin: https://github.com/ar-/incron/issues/25#issuecomment-583796322
+
+--- old/usertable.cpp
++++ new/usertable.cpp
+@@ -370,20 +370,21 @@ void UserTable::OnEvent(InotifyEvent& rEvt)
+ {
+   InotifyWatch* pW = rEvt.GetWatch();
+   IncronTabEntry* pE = FindEntry(pW);
++  std::string pW_path = pW->GetPath();
+ 
+   // no entry found - this shouldn't occur
+   if (pE == NULL)
+     return;
+ 
+   // discard event if user has no access rights to watch path
+-  if (!(m_fSysTable || MayAccess(pW->GetPath(), DONT_FOLLOW(rEvt.GetMask()))))
++  if (!(m_fSysTable || MayAccess(pW_path, DONT_FOLLOW(rEvt.GetMask()))))
+     return;
+     
+   //#if 0
+   // log output for each dir + file + event
+   std::string events;
+   rEvt.DumpTypes(events);
+-  syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW->GetPath().c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str());
++  syslog(LOG_INFO, "PATH (%s) FILE (%s) EVENT (%s)", pW_path.c_str() , IncronTabEntry::GetSafePath(rEvt.GetName()).c_str() , events.c_str());
+   //#endif
+   
+   // add new watch for newly created subdirs
+@@ -422,7 +423,7 @@ void UserTable::OnEvent(InotifyEvent& rEvt)
+       else {
+         cmd.append(cs.substr(oldpos, pos-oldpos));
+         if (cs[px] == '@') {          // base path
+-          cmd.append(IncronTabEntry::GetSafePath(pW->GetPath()));
++          cmd.append(IncronTabEntry::GetSafePath(pW_path));
+           oldpos = pos + 2;
+         }
+         else if (cs[px] == '#') {     // file name
+ 

diff --git a/sys-process/incron/incron-0.5.12_p20191114.ebuild b/sys-process/incron/incron-0.5.12_p20191114-r1.ebuild
similarity index 88%
rename from sys-process/incron/incron-0.5.12_p20191114.ebuild
rename to sys-process/incron/incron-0.5.12_p20191114-r1.ebuild
index 28928d33fc2..7e7ab9ba0fb 100644
--- a/sys-process/incron/incron-0.5.12_p20191114.ebuild
+++ b/sys-process/incron/incron-0.5.12_p20191114-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="7"
@@ -20,7 +20,10 @@ IUSE=""
 DEPEND=""
 RDEPEND=""
 
-PATCHES=( "${FILESDIR}"/${PN}-0.5.12-use-execl-instead-system.patch )
+PATCHES=(
+	"${FILESDIR}"/${PN}-0.5.12-use-execl-instead-system.patch
+	"${FILESDIR}"/${PN}-0.5.12-issue25.patch
+)
 
 # < 2.6.18 => INOTIFY, >= 2.6.18 => INOTIFY_USER
 # It should be ok to expect at least 2.6.18


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-25  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-22 13:29 [gentoo-commits] repo/gentoo:master commit in: sys-process/incron/files/, sys-process/incron/ Thomas Deutschmann
  -- strict thread matches above, loose matches on Subject: below --
2021-04-25  1:01 Thomas Deutschmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox