diff options
author | Vieri Di Paola <rentorbuy@yahoo.com> | 2022-08-29 11:48:00 +0200 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-25 06:51:07 +0100 |
commit | bb2427ffa72ef11c0589318af1f4ac51861dae95 (patch) | |
tree | a14b1136656a673e6c61b94426c6f7379b8585d7 /mail-filter | |
parent | net-misc/rsync: drop 3.2.4-r1, 3.2.5-r1 (diff) | |
download | gentoo-bb2427ffa72ef11c0589318af1f4ac51861dae95.tar.gz gentoo-bb2427ffa72ef11c0589318af1f4ac51861dae95.tar.bz2 gentoo-bb2427ffa72ef11c0589318af1f4ac51861dae95.zip |
mail-filter/mimedefang: version bump to 3.1 and several fixes
* PID dir according to upstream changelog (2017)
* Perl vendor path
* Unit test
* Postfix and sendmail dependencies (virtual/mta too broad)
Closes: https://bugs.gentoo.org/801646
Closes: https://bugs.gentoo.org/866662
Signed-off-by: Vieri Di Paola <rentorbuy@yahoo.com>
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/mimedefang/Manifest | 1 | ||||
-rw-r--r-- | mail-filter/mimedefang/files/mimedefang-tests2.patch | 22 | ||||
-rw-r--r-- | mail-filter/mimedefang/files/mimedefang-vendor.patch | 32 | ||||
-rw-r--r-- | mail-filter/mimedefang/files/mimedefang.conf | 3 | ||||
-rw-r--r-- | mail-filter/mimedefang/files/mimedefang.init | 9 | ||||
-rw-r--r-- | mail-filter/mimedefang/mimedefang-3.1.ebuild | 79 |
6 files changed, 143 insertions, 3 deletions
diff --git a/mail-filter/mimedefang/Manifest b/mail-filter/mimedefang/Manifest index 2e890f20fb13..93ea29b20981 100644 --- a/mail-filter/mimedefang/Manifest +++ b/mail-filter/mimedefang/Manifest @@ -1 +1,2 @@ DIST mimedefang-2.84.tar.gz 371596 BLAKE2B b9b871d6a438792afbcebfcd99a77a1f9bb2c0dc7826abea74db913c6dc154403753a3016dc0647e9873256fe354649dea096c0e50d54f8db16ff8d2b91f54f4 SHA512 ffe039654d2e3f649219efc559380e39b21ce910becc36e262356d59d50129f8683ee2e59dd9680aff46478ccebd6b3d9c4567f85ade9a8464077350f4e52f48 +DIST mimedefang-3.1.tar.gz 494467 BLAKE2B 4b1f9156c606b83bf9895ab76c4929fa37c2e0bd4454cb7177f1a2b8e8bfcac1b0eedfaefd1c32ceb29d9e0425ab09fb22c552ebe37a587f517d073dd46e16f6 SHA512 392c2bfa1f4e6bb2503ba6887d79696ccc861ded17a780d3ff44bd12c14ae248536aa8f056ec4679bf9c76b6a82d0357d5fdfe467b664b8992a0c11056c5180f diff --git a/mail-filter/mimedefang/files/mimedefang-tests2.patch b/mail-filter/mimedefang/files/mimedefang-tests2.patch new file mode 100644 index 000000000000..7b0842b74c89 --- /dev/null +++ b/mail-filter/mimedefang/files/mimedefang-tests2.patch @@ -0,0 +1,22 @@ +diff -ruN a/t/net.t b/t/net.t +--- a/t/net.t 2022-08-16 15:55:29.000000000 +0200 ++++ b/t/net.t 2022-09-14 14:22:52.954918347 +0200 +@@ -54,9 +54,15 @@ + my @rbl; + $rbl[0] = "dnsbltest.spamassassin.org"; + my $relayip = "144.137.3.98"; +- detect_and_load_perl_modules(); +- my $res = relay_is_blacklisted_multi($relayip, 10, 1, \@rbl); +- is($res->{"dnsbltest.spamassassin.org"}[0], "127.0.0.2"); ++ ++ SKIP: { ++ if ( (not defined $ENV{'NET_TEST'}) or ($ENV{'NET_TEST'} ne 'yes' )) { ++ skip "Net test disabled", 1 ++ } ++ detect_and_load_perl_modules(); ++ my $res = relay_is_blacklisted_multi($relayip, 10, 1, \@rbl); ++ is($res->{"dnsbltest.spamassassin.org"}[0], "127.0.0.2"); ++ } + } + + __PACKAGE__->runtests(); diff --git a/mail-filter/mimedefang/files/mimedefang-vendor.patch b/mail-filter/mimedefang/files/mimedefang-vendor.patch new file mode 100644 index 000000000000..2313d0562e2c --- /dev/null +++ b/mail-filter/mimedefang/files/mimedefang-vendor.patch @@ -0,0 +1,32 @@ +diff -ruN a/Makefile.in b/Makefile.in +--- a/Makefile.in 2022-05-19 09:31:36.000000000 +0200 ++++ b/Makefile.in 2022-08-28 02:54:01.337116642 +0200 +@@ -42,7 +42,7 @@ + PERLINSTALLSITELIB=@PERLINSTALLSITELIB@ + PERLINSTALLPRIVLIB=@PERLINSTALLPRIVLIB@ + PERLVENDORPREFIX=@PERLVENDORPREFIX@ +-PERLVENDORLIB=@PERLINSTALLPRIVLIB@/vendor_perl ++PERLVENDORLIB=@PERLVENDORLIB@ + LDFLAGS=@LDFLAGS@ + IP_HEADER=@IP_HEADER@ + SPOOLDIR=@SPOOLDIR@ +diff -ruN a/configure b/configure +--- a/configure 2022-08-06 10:43:38.000000000 +0200 ++++ b/configure 2022-08-28 02:53:17.006104021 +0200 +@@ -662,6 +662,7 @@ + PERLINSTALLPRIVLIB + PERLINSTALLARCHLIB + PERLVENDORPREFIX ++PERLVENDORLIB + PERLSITEPREFIX + PERLPREFIX + CONFDIR_EVAL +@@ -3962,7 +3963,7 @@ + fi + rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +-for thing in prefix siteprefix vendorprefix installarchlib installprivlib installbin installman1dir installman3dir installscript installsitearch installsitelib; do ++for thing in prefix siteprefix vendorprefix vendorlib installarchlib installprivlib installbin installman1dir installman3dir installscript installsitearch installsitelib; do + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Perl installation variable $thing" >&5 + printf %s "checking for Perl installation variable $thing... " >&6; } + val=`$PERL -V:$thing | sed -e "s/^.*='//" -e "s/';$//"` diff --git a/mail-filter/mimedefang/files/mimedefang.conf b/mail-filter/mimedefang/files/mimedefang.conf index 5deb1401d5ef..051ffb1823b3 100644 --- a/mail-filter/mimedefang/files/mimedefang.conf +++ b/mail-filter/mimedefang/files/mimedefang.conf @@ -2,6 +2,9 @@ # Mandatory options for MIMEDefang # #################################### +# PID directory +PIDDIR='/run/MIMEDefang' + # spool directory SPOOLDIR='/var/spool/MIMEDefang' diff --git a/mail-filter/mimedefang/files/mimedefang.init b/mail-filter/mimedefang/files/mimedefang.init index 931f47bf5919..4d9624a93ce6 100644 --- a/mail-filter/mimedefang/files/mimedefang.init +++ b/mail-filter/mimedefang/files/mimedefang.init @@ -1,10 +1,12 @@ #!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 +PIDDIR="${PIDDIR:-/run/MIMEDefang}" +PID="${PIDDIR}/mimedefang.pid" +MXPID="${PIDDIR}/mimedefang-multiplexor.pid" + SPOOLDIR="${SPOOLDIR:-/var/spool/MIMEDefang}" -PID="${SPOOLDIR}/mimedefang.pid" -MXPID="${SPOOLDIR}/mimedefang-multiplexor.pid" LOCK="${SPOOLDIR}/mimedefang.lock" MXLOCK="${SPOOLDIR}/mimedefang-multiplexor.lock" @@ -21,6 +23,7 @@ depend() { } checkconfig() { + checkpath -d "${PIDDIR}" checkpath -d "${SPOOLDIR}" einfo "multiplexor socket: ${MX_SOCKET}" einfo "sendmail socket: ${SOCKET}" diff --git a/mail-filter/mimedefang/mimedefang-3.1.ebuild b/mail-filter/mimedefang/mimedefang-3.1.ebuild new file mode 100644 index 000000000000..80c4242a862d --- /dev/null +++ b/mail-filter/mimedefang/mimedefang-3.1.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DESCRIPTION="Antispam, antivirus and other customizable filters for MTAs with Milter support" +HOMEPAGE="https://www.mimedefang.org/" +SRC_URI="https://mimedefang.org/releases/${P}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="clamav +poll test" +RESTRICT="!test? ( test )" + +RDEPEND=" + || ( mail-mta/sendmail mail-mta/postfix ) + acct-group/defang + acct-user/defang + dev-perl/Digest-SHA1 + dev-perl/IO-stringy + dev-perl/MailTools + dev-perl/MIME-tools + dev-perl/Unix-Syslog + mail-filter/libmilter:= + virtual/perl-MIME-Base64 + clamav? ( app-antivirus/clamav ) +" + +DEPEND=" + ${RDEPEND} + test? ( + dev-perl/Test-Class + dev-perl/Test-Most + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.72-ldflags.patch" + "${FILESDIR}/${PN}-vendor.patch" + "${FILESDIR}/${PN}-tests2.patch" +) + +src_configure() { + local myeconfargs=( + --with-user=defang + $(use_enable poll) + $(use_enable clamav) + $(use_enable clamav clamd) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + emake DESTDIR="${D}" INSTALL_STRIP_FLAG="" install + + fowners defang:defang /etc/mail/mimedefang-filter + fperms 644 /etc/mail/mimedefang-filter + insinto /etc/mail/ + newins "${S}"/SpamAssassin/spamassassin.cf sa-mimedefang.cf + + keepdir /var/spool/{MD-Quarantine,MIMEDefang} + fowners defang:defang /var/spool/{MD-Quarantine,MIMEDefang} + fperms 700 /var/spool/{MD-Quarantine,MIMEDefang} + + keepdir /var/log/mimedefang + + newinitd "${FILESDIR}"/${PN}.init ${PN} + newconfd "${FILESDIR}"/${PN}.conf ${PN} + + dodoc -r examples contrib +} + +pkg_postinst() { + elog "You can install Mail::SpamAssassin (mail-filter/spamassassin) and" + elog "HTML::Parser (dev-perl/HTML-Parser) even after installing if you require" + elog "them as they are loaded at run-time." +} |