summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalph Seichter <github@seichter.de>2019-04-26 18:38:23 +0200
committerMichał Górny <mgorny@gentoo.org>2019-04-27 16:28:42 +0200
commitb311887028076658b60af8549d2760daae3ccc7c (patch)
treeabf6b58ec924c51ae159eaae7586de554407b5b2 /mail-filter/milter-regex/files
parentnet-analyzer/ossec-hids: Fix config data getting overwritten (diff)
downloadgentoo-b311887028076658b60af8549d2760daae3ccc7c.tar.gz
gentoo-b311887028076658b60af8549d2760daae3ccc7c.tar.bz2
gentoo-b311887028076658b60af8549d2760daae3ccc7c.zip
mail-filter/milter-regex: upstream release 2.6
The ebuild utilises the PID file support that is now available in the upstream release. Signed-off-by: Ralph Seichter <gentoo@seichter.de> Package-Manager: Portage-2.3.62, Repoman-2.3.11 Closes: https://github.com/gentoo/gentoo/pull/11835 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'mail-filter/milter-regex/files')
-rw-r--r--mail-filter/milter-regex/files/milter-regex-2.6-gentoo.patch38
-rw-r--r--mail-filter/milter-regex/files/milter-regex-conf-2.616
-rw-r--r--mail-filter/milter-regex/files/milter-regex-init-2.615
3 files changed, 69 insertions, 0 deletions
diff --git a/mail-filter/milter-regex/files/milter-regex-2.6-gentoo.patch b/mail-filter/milter-regex/files/milter-regex-2.6-gentoo.patch
new file mode 100644
index 000000000000..14efd964f843
--- /dev/null
+++ b/mail-filter/milter-regex/files/milter-regex-2.6-gentoo.patch
@@ -0,0 +1,38 @@
+--- a/Makefile.linux 2011-07-16 16:51:34.000000000 +0300
++++ a/Makefile.linux 2012-08-05 18:15:30.906378968 +0300
+@@ -6,28 +6,27 @@
+ # see milter-regex.init for an init script for RedHat/Fedora
+ # (contributed by admin@2ka.mipt.ru)
+
+-CFLAGS= -g
+-LDFLAGS= -L/usr/lib/libmilter -lmilter -lpthread
++LIBS= -lmilter -lpthread
+
+ all: milter-regex milter-regex.cat8
+
+ milter-regex: milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o
+- gcc -o milter-regex milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o $(LDFLAGS)
++ $(CC) $(LDFLAGS) -o milter-regex milter-regex.o eval.o strlcat.o strlcpy.o y.tab.o $(LIBS)
+
+ milter-regex.o: milter-regex.c eval.h
+- gcc $(CFLAGS) -c milter-regex.c
++ $(CC) $(CFLAGS) -c milter-regex.c
+
+ eval.o: eval.c eval.h
+- gcc $(CFLAGS) -c eval.c
++ $(CC) $(CFLAGS) -c eval.c
+
+ strlcat.o: strlcat.c
+- gcc $(CFLAGS) -c strlcat.c
++ $(CC) $(CFLAGS) -c strlcat.c
+
+ strlcpy.o: strlcpy.c
+- gcc $(CFLAGS) -c strlcpy.c
++ $(CC) $(CFLAGS) -c strlcpy.c
+
+ y.tab.o: y.tab.c
+- gcc $(CFLAGS) -c y.tab.c
++ $(CC) $(CFLAGS) -c y.tab.c
+
+ y.tab.c: parse.y
+ yacc -d parse.y
diff --git a/mail-filter/milter-regex/files/milter-regex-conf-2.6 b/mail-filter/milter-regex/files/milter-regex-conf-2.6
new file mode 100644
index 000000000000..716b20327427
--- /dev/null
+++ b/mail-filter/milter-regex/files/milter-regex-conf-2.6
@@ -0,0 +1,16 @@
+# Config file.
+MR_CONF="/etc/milter-regex.conf"
+
+# Process and socket owner, socket group, socket permissions. Make
+# sure to allow your MTA to write to the socket by specifying an
+# appropriate group.
+MR_USER="milter"
+MR_GROUP="milter"
+MR_PERM="0660"
+
+MR_RUNDIR="/run/milter-regex"
+MR_SOCKET="${MR_RUNDIR}/socket"
+
+# Additional options for logging etc. Do not attempt to overwrite any
+# of the options already defined in /etc/init.d/milter-regex.
+MR_OPTS=""
diff --git a/mail-filter/milter-regex/files/milter-regex-init-2.6 b/mail-filter/milter-regex/files/milter-regex-init-2.6
new file mode 100644
index 000000000000..9987363e272f
--- /dev/null
+++ b/mail-filter/milter-regex/files/milter-regex-init-2.6
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile="/run/${RC_SVCNAME}.pid"
+command="/usr/bin/milter-regex"
+command_args="-c ${MR_CONF} -r ${pidfile} -u ${MR_USER} -p ${MR_SOCKET} -P ${MR_PERM} -U ${MR_USER} -G ${MR_GROUP} ${MR_OPTS}"
+
+depend() {
+ before mta
+}
+
+start_pre() {
+ checkpath --directory --mode 0755 --owner ${MR_USER}:${MR_GROUP} ${MR_RUNDIR}
+}