diff options
author | Ralph Seichter <github@seichter.de> | 2019-04-26 18:38:23 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-04-27 16:28:42 +0200 |
commit | b311887028076658b60af8549d2760daae3ccc7c (patch) | |
tree | abf6b58ec924c51ae159eaae7586de554407b5b2 /mail-filter/milter-regex | |
parent | net-analyzer/ossec-hids: Fix config data getting overwritten (diff) | |
download | gentoo-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')
-rw-r--r-- | mail-filter/milter-regex/Manifest | 1 | ||||
-rw-r--r-- | mail-filter/milter-regex/files/milter-regex-2.6-gentoo.patch | 38 | ||||
-rw-r--r-- | mail-filter/milter-regex/files/milter-regex-conf-2.6 | 16 | ||||
-rw-r--r-- | mail-filter/milter-regex/files/milter-regex-init-2.6 | 15 | ||||
-rw-r--r-- | mail-filter/milter-regex/milter-regex-2.6.ebuild | 51 |
5 files changed, 121 insertions, 0 deletions
diff --git a/mail-filter/milter-regex/Manifest b/mail-filter/milter-regex/Manifest index 688c2efe87e1..0c6613f6e754 100644 --- a/mail-filter/milter-regex/Manifest +++ b/mail-filter/milter-regex/Manifest @@ -1,2 +1,3 @@ DIST milter-regex-1.9.tar.gz 19880 BLAKE2B 8934eb4f78f168b6f4f93b3a7e70b896c6518cd1228ea8fe387184a718a002f051f5084a7a7f4d07c9e7832fe1c9e9bc907661c4e765dde938b7c6049c8772e6 SHA512 55cb97eba01220eb57c29498a090152c05d259abbe6f771e47a67499e7c2a1d4121ec9d0bce84cc8b6490bcd20dea8eaaba753e61f1ce9002edd8440b13f7148 DIST milter-regex-2.2.tar.gz 20496 BLAKE2B 75cd668e8f75a62bb16d1e38d089465e1e9b49a7441594cb8f77279c9e29f1b90c7b452595f8653b81167fbed8f10e8322ccec51374446938ca43b245cbfa440 SHA512 c2f94d1d9897e2a3f62639343ff9272d28c044f25c59e10f12f37250aa0e5426174cb2a74850993246628e828d21f5cba8567de65a225235eac1969836e41f28 +DIST milter-regex-2.6.tar.gz 20517 BLAKE2B d98587146010d60a062833d8529af2788d657141e19c249e97bf5c847ffa01d6c76f42b6c8413f957fbeb9843ad38281ba8257aef10d0f1bd414726c416533da SHA512 33afa9a314ff2a2f14a301a85fa142e6e4166ffb77e8d18632b094c7873397e037ee6c5d3d1c248bfbb23037c45a15f21fb0cebcbb0f90c69b3d985aad37f169 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} +} diff --git a/mail-filter/milter-regex/milter-regex-2.6.ebuild b/mail-filter/milter-regex/milter-regex-2.6.ebuild new file mode 100644 index 000000000000..8783e3fd0c9e --- /dev/null +++ b/mail-filter/milter-regex/milter-regex-2.6.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit toolchain-funcs user + +DESCRIPTION="A milter-based regular expression filter" +HOMEPAGE="https://www.benzedrine.ch/milter-regex.html" +SRC_URI="https://www.benzedrine.ch/${P}.tar.gz" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="|| ( mail-filter/libmilter mail-mta/sendmail )" +DEPEND="${RDEPEND} + virtual/yacc" + +PATCHES=( "${FILESDIR}/${P}-gentoo.patch" ) + +src_compile() { + emake CC="$(tc-getCC)" -f Makefile.linux all +} + +src_install() { + dobin ${PN} + + insinto /etc + newins rules ${PN}.conf + + newconfd "${FILESDIR}/${PN}-conf-${PV}" ${PN} + newinitd "${FILESDIR}/${PN}-init-${PV}" ${PN} + + doman *.8 +} + +pkg_preinst() { + # For consistency with mail-milter/spamass-milter (see bug #280571). + # While the milter process requires an owner, a home directory is not + # necessary because no data is written. + enewgroup milter + enewuser milter -1 -1 /var/lib/milter milter +} + +pkg_postinst() { + elog "Postfix configuration example (add to main.cf or master.cf):" + elog " smtpd_milters=unix:/run/milter-regex/socket" + elog "Sendmail configuration example:" + elog " INPUT_MAIL_FILTER(\`${PN}',\`S=unix:/run/milter-regex/socket,T=S:30s;R:2m')" +} |