* [gentoo-commits] repo/gentoo:master commit in: mail-filter/milter-regex/, mail-filter/milter-regex/files/
@ 2019-04-27 14:31 Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2019-04-27 14:31 UTC (permalink / raw
To: gentoo-commits
commit: b311887028076658b60af8549d2760daae3ccc7c
Author: Ralph Seichter <github <AT> seichter <DOT> de>
AuthorDate: Fri Apr 26 16:38:23 2019 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Apr 27 14:28:42 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3118870
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 <AT> 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 <AT> gentoo.org>
mail-filter/milter-regex/Manifest | 1 +
.../files/milter-regex-2.6-gentoo.patch | 38 ++++++++++++++++
.../milter-regex/files/milter-regex-conf-2.6 | 16 +++++++
.../milter-regex/files/milter-regex-init-2.6 | 15 +++++++
mail-filter/milter-regex/milter-regex-2.6.ebuild | 51 ++++++++++++++++++++++
5 files changed, 121 insertions(+)
diff --git a/mail-filter/milter-regex/Manifest b/mail-filter/milter-regex/Manifest
index 688c2efe87e..0c6613f6e75 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 00000000000..14efd964f84
--- /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 00000000000..716b2032742
--- /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 00000000000..9987363e272
--- /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 00000000000..8783e3fd0c9
--- /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')"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: mail-filter/milter-regex/, mail-filter/milter-regex/files/
@ 2022-10-01 2:53 Sam James
0 siblings, 0 replies; 2+ messages in thread
From: Sam James @ 2022-10-01 2:53 UTC (permalink / raw
To: gentoo-commits
commit: f78f4ec02ff2aa306774ccff54ce901b9317a6c1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 1 02:53:00 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 1 02:53:00 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f78f4ec0
mail-filter/milter-regex: fix build w/ Clang 16
Closes: https://bugs.gentoo.org/871366
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../milter-regex-2.7-implicit-func-decl.patch | 10 +++++
.../milter-regex/milter-regex-2.7-r2.ebuild | 47 ++++++++++++++++++++++
2 files changed, 57 insertions(+)
diff --git a/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
new file mode 100644
index 000000000000..c2edaa8e0b8f
--- /dev/null
+++ b/mail-filter/milter-regex/files/milter-regex-2.7-implicit-func-decl.patch
@@ -0,0 +1,10 @@
+https://bugs.gentoo.org/871366
+--- a/eval.h
++++ b/eval.h
+@@ -107,4 +107,6 @@ struct action *eval_end(struct ruleset *, int *, int, int);
+ void eval_clear(struct ruleset *, int *, int);
+ void free_ruleset(struct ruleset *);
+
++int yylex(void);
++
+ #endif
diff --git a/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild b/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild
new file mode 100644
index 000000000000..1e21636dfdff
--- /dev/null
+++ b/mail-filter/milter-regex/milter-regex-2.7-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+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="acct-user/milter-regex
+ >=mail-filter/libmilter-1.0.2_p2:="
+DEPEND="${RDEPEND}
+ virtual/yacc"
+
+src_prepare() {
+ eapply "${FILESDIR}/${PN}-2.6-gentoo.patch"
+ eapply "${FILESDIR}"/milter-regex-2.7-implicit-func-decl.patch
+ eapply_user
+ # Change default user
+ sed -i -e 's/_\(milter-regex\)/\1/g' ${PN}.[8c] || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" -f Makefile.linux all
+}
+
+src_install() {
+ dobin ${PN}
+ insinto /etc
+ newins rules ${PN}.conf
+ newconfd "${FILESDIR}/${PN}-conf-2.6" ${PN}
+ newinitd "${FILESDIR}/${PN}-init" ${PN}
+ doman *.8
+}
+
+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')"
+}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-01 2:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-01 2:53 [gentoo-commits] repo/gentoo:master commit in: mail-filter/milter-regex/, mail-filter/milter-regex/files/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2019-04-27 14:31 Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox