diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-11-03 08:36:22 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-11-03 08:36:22 +0000 |
commit | f65628136faa35d0c4d3b5e7332275c7b35fcd96 (patch) | |
tree | 021998302365c5652e37824b6c26d4d969a62055 /mail-filter | |
parent | 70b82ae359a5538711e103b0e8dfb92654296644 (diff) |
gentoo resync : 03.11.2018
Diffstat (limited to 'mail-filter')
-rw-r--r-- | mail-filter/Manifest.gz | bin | 11025 -> 11028 bytes | |||
-rw-r--r-- | mail-filter/spamassassin/Manifest | 4 | ||||
-rw-r--r-- | mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch | 61 | ||||
-rw-r--r-- | mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild | 2 | ||||
-rw-r--r-- | mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild | 283 |
5 files changed, 348 insertions, 2 deletions
diff --git a/mail-filter/Manifest.gz b/mail-filter/Manifest.gz Binary files differindex 704548c70176..d8894b8cacdb 100644 --- a/mail-filter/Manifest.gz +++ b/mail-filter/Manifest.gz diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest index c273b33424e7..331e0393392d 100644 --- a/mail-filter/spamassassin/Manifest +++ b/mail-filter/spamassassin/Manifest @@ -12,6 +12,7 @@ AUX spamassassin-3.4.1-bug_7361.patch 16483 BLAKE2B bcb17a9e246bee95e0f5ffcd8b08 AUX spamassassin-3.4.1-bug_7404.patch 792 BLAKE2B 711c5916827504dd06eebe6138df4bca7e364825c0df601b6bb6542e68f18d8a7546e05f23671b6a8d479f7dc12365217fc8437425b6a342331661f0e4aa644e SHA512 8bc613699872f0358d699f0c151bf9eac6ff80d9dc878d38fca522ac091f4e1348982bf2ce8029c7f241fdbabbf531e1d45f301159f6eddfbeb935252bd577e5 AUX spamassassin-3.4.1-bug_7462.patch 5836 BLAKE2B 734601071cfff101177d98afa758f15622bd393ea02ab247b20a8fc368c8600a094bb1de04b3ffb3c9d9d9878d332c25587a65e1f4a5cbd01d21eb99f3ee7458 SHA512 68cad4b4ebd46fa186df04c926043fcdcf0099504451ed2b323d35871d142448431777baf2d374082554e1ef914efbf8f89001e1975c10e73e8865f3feff5878 AUX spamassassin-3.4.1-perl526.patch 484 BLAKE2B eca4a52d15171fe048bfd3f997aa73c1eb0235a50c5b4e61a28ea1c707eddf184a888a0e1c75700cda9ced26ccf693d8a8040cac1bf59f46ea66854f0aa99d37 SHA512 ded5a6079f95bb4a771e23b382af83498f16144eb9ba613b97b365b52d96845255f26ddf561b7d6edaa53c7acad3d62294adb01ce4a8a4157470a5ed92cd1b13 +AUX spamassassin-3.4.2-bug_7631.patch 2022 BLAKE2B 33b67b585fdb2ce82b6e64856463714e014f8e6ae69671a70f0a8c0952450c888e9e42cd4cebe0d57cf6552d30ae50214757c0192f61601294b4e11c39537832 SHA512 f23c7f9d821ef9d24f716f56016ce3bb1b29fabd177ad7ce3f8b6728601fcfb22d2c8aad82f36b978f3343bc18a514e1e85ce7c5b207ffd732c2921cf4909353 AUX spamassassin-3.4.2-bug_7632.patch 673 BLAKE2B a819b0817efb745f1dc9d971fa476d9da355b72df41ffc58a7a505a5a2c1588ecee3e1dbe79c3a0d03ba04a6fc2e63bc018b49240da1417bb2a967925ed85e84 SHA512 adf9f78a60a95d16cf918e048c178986ec5543fb80a350d9419800b2bcc8fbcc8669967b77d9a85dfce7b67528fe9d816f5ca9a435444197f9ac1aa83d92fec3 AUX spamassassin.service-r4 182 BLAKE2B c5813612e78602d6e67b527f07a8a38171422a638bf419135b34f950a036e899ee6d6a129413ab52ca737f18258265cad971a0b84057561b7012fbc390efd7e9 SHA512 35da6ed8baa1cfc13546b409ed65d18334410ee497f9609c89cd4993dc8084ed479ddc7658e72a52a9b79f1a73d4efba42148b7238678c17a2965f9ff6a608e9 AUX spamassassin.service.conf-r2 120 BLAKE2B cdefa5d73234be5331f7ff7cc646f10365adf515b85bf0d9912d240105579747f3834b7f72402a31b5be9b8ed0faf2545ae0a4ed46ebd3c7a90962f764fb5e8a SHA512 55b93ce1636505beabba21cd208541750ef448e952658b65d6e1447f92cec3a35e3d489d014a0229765117168cc03b4675652709f7ed9973be8fba84c10786dd @@ -21,5 +22,6 @@ DIST Mail-SpamAssassin-3.4.2.tar.bz2 2700016 BLAKE2B a29b4cfce5e578c07ec54b22241 EBUILD spamassassin-3.4.1-r19.ebuild 7828 BLAKE2B 2cbf6260632b4fba3e0f25eeb4301be18a321768d6ac77f479d0d0bb7914fb978b59817db61ac35acb19386b2831381f1e6f7784dd8c72f94999c0c9e8cb718c SHA512 822bbd4cefdd73a8174072c2131cd8deead8416192ce7b9373165476cdaa2b3056b589d9143fc84944ad9bd312333852cd510e3ac949afba5310fda9a778b64c EBUILD spamassassin-3.4.1-r20.ebuild 7814 BLAKE2B 144d0498236d9f504e252d7dea23910a7ece9739a8df0a2f840be25ae656702f64847f533b5dcbd54761e3fb5e073b49ca117107269b5bc25a36ab64c0d52468 SHA512 3bc999d93244311e074cbecf3b6e4ad7db065b8ddeb1a13f0cd93e654ed7694d8c527b35dc624479efb56bdb050fa46996a5a8bce15fa3968e26970e87552d32 EBUILD spamassassin-3.4.1-r21.ebuild 7862 BLAKE2B 0d5897de61875e18bc7791ff15b6955be8685caf7ede9bc8294f46b3b7ab1a3f98657f2b1c3769303c4b728e530bf97187430b835c0dfb3b31f2f11951cc37ad SHA512 3d48cb3993e648c59a8073100f03a9f2e7b08c6aa2032374386ea014bc4df1053a6f01110655e8be1d217743f3927c4f183d61735602b09f54ed23eee38b0bbb -EBUILD spamassassin-3.4.2-r2.ebuild 7610 BLAKE2B e99b996d3122dbe7fa31fda87842df923f59af4153cd4b1b003fef791c4d54ab1b75de25c3aadf8bed8c732c44e3b5da7775cf9414b19233d24acd077eeb9312 SHA512 1f9fdf2eb6732c7a4b12cffd24c11e7cd4de32796d2f24b4c33cf409733d864c3bd0be2a9241a1e5de48ef3b9edd2190144766688a500ee52e811f958fdf66ff +EBUILD spamassassin-3.4.2-r2.ebuild 7609 BLAKE2B 00c115b66fb3b0d5da4a8e8a94c1bd834979e039d59732ee01f5d81ea29ffbc5144b552dc6f415d1184f6d7294a89f13d19fec6f5020d3b17016eb27ca5a54e8 SHA512 b308193d455c2d8a802e9c776c1e82e164f4f412da52bf13f7d4a565778bf499a8f5626e674eda2fc9fafd2c1de9d639f8e3e462579d4c4ed7f36e0f1a4ccdf9 +EBUILD spamassassin-3.4.2-r3.ebuild 8559 BLAKE2B 0657529ee4324147998e4b6ee935cebe63b20643abc3a7fdc321370ff9343a44b1d97e6d7073dc568e35fde983b0734d363f81599c423ac35546592b8b1be984 SHA512 b8ad6679c0928e174c8c0f446af91f2dbb8e40e5dd48fab6299aa3d68ef29d6e597d5656a50a7875b15cbc4c1029720950af994b0a0c1e98a4c2e46ed531d04a MISC metadata.xml 807 BLAKE2B 14bf38e1888040ece6a48e7a8234917d5f9ae8d699995a0414520c0d262b91518c233ee3d3b1d13d7b5068fea8ec612bfee2a84ce825748e471b6ba6c25728b5 SHA512 2cc4534cdb5ed62612419a99a67e9e8e1867ba73a2daf957e3df8e7f2fd0bd058b7c9bb31fdfadb56d4001ce89e66d8f9da89d620e482d8f13502f288eb4136b diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch new file mode 100644 index 000000000000..3c4bf403dc2c --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin-3.4.2-bug_7631.patch @@ -0,0 +1,61 @@ +This upstream doc changes addresses 3.4.2 adding new rows to awl SQL +tables. + +Upstream's UPGRADE diff is slightly different. Their version is +applied to the 3.4.3 release notes (not yet released), ours applies +to 3.4.2. + +Bug: https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7631 +Bug: https://bugs.gentoo.org/666576 + +--- a/UPGRADE 2018-10-28 15:43:45.744850026 -0400 ++++ b/UPGRADE 2018-10-28 15:47:52.805028626 -0400 +@@ -8,6 +8,13 @@ + + See https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7614 + ++- Added last_hit timestamp to Awl SQL schema. ++ You should upgrade your sql database running the following command: ++ MySQL: ++ "ALTER TABLE `awl` ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;" ++ PostgreSQL: ++ "ALTER TABLE awl ADD last_hit timestamp NOT NULL default CURRENT_TIMESTAMP;" ++ + New plugins + ----------- + +--- a/sql/awl_mysql.sql 2018/10/21 12:10:09 1844484 ++++ b/sql/awl_mysql.sql 2018/10/21 12:10:40 1844485 +@@ -5,5 +5,6 @@ + msgcount int(11) NOT NULL default '0', + totscore float NOT NULL default '0', + signedby varchar(255) NOT NULL default '', ++ last_hit timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (username,email,signedby,ip) + ) ENGINE=InnoDB; +--- a/sql/awl_pg.sql 2018/10/21 12:10:09 1844484 ++++ b/sql/awl_pg.sql 2018/10/21 12:10:40 1844485 +@@ -5,8 +5,22 @@ + msgcount bigint NOT NULL default '0', + totscore float NOT NULL default '0', + signedby varchar(255) NOT NULL default '', ++ last_hit timestamp NOT NULL default CURRENT_TIMESTAMP, + PRIMARY KEY (username,email,signedby,ip) + ); + +-ALTER TABLE awl SET (fillfactor=95); ++create index awl_last_hit on awl (last_hit); ++ ++create OR REPLACE function update_awl_last_hit() ++RETURNS TRIGGER AS $$ ++BEGIN ++ NEW.last_hit = CURRENT_TIMESTAMP; ++ RETURN NEW; ++END; ++$$ language 'plpgsql'; + ++create TRIGGER update_awl_update_last_hit BEFORE UPDATE ++ON awl FOR EACH ROW EXECUTE PROCEDURE ++update_awl_last_hit(); ++ ++ALTER TABLE awl SET (fillfactor=95); diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild index 921ad90bd14a..cdb0e67e84ef 100644 --- a/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild +++ b/mail-filter/spamassassin/spamassassin-3.4.2-r2.ebuild @@ -13,7 +13,7 @@ SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2" LICENSE="Apache-2.0 GPL-2" SLOT="0" -KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ~ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ~ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test" # The Makefile.PL script checks for dependencies, but only fails if a diff --git a/mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild b/mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild new file mode 100644 index 000000000000..e1fd17004951 --- /dev/null +++ b/mail-filter/spamassassin/spamassassin-3.4.2-r3.ebuild @@ -0,0 +1,283 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit perl-functions systemd toolchain-funcs user eapi7-ver + +MY_P="Mail-SpamAssassin-${PV//_/-}" +S="${WORKDIR}/${MY_P}" +DESCRIPTION="An extensible mail filter which can identify and tag spam" +HOMEPAGE="https://spamassassin.apache.org/" +SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2" + +LICENSE="Apache-2.0 GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" +IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test" + +# The Makefile.PL script checks for dependencies, but only fails if a +# required (i.e. not optional) dependency is missing. We therefore +# require most of the optional modules only at runtime. +REQDEPEND="dev-lang/perl:= + dev-perl/HTML-Parser + dev-perl/Net-DNS + dev-perl/NetAddr-IP + virtual/perl-Archive-Tar + virtual/perl-Digest-SHA + virtual/perl-IO-Zlib + virtual/perl-Time-HiRes + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl ) + )" + +# SpamAssassin doesn't use libwww-perl except as a fallback for when +# curl/wget are missing, so we depend on one of those instead. Some +# mirrors use https, so we need those utilities to support SSL. +# +# re2c is needed to compile the rules (sa-compile). +# +# We still need the old Digest-SHA1 because razor2 has not been ported +# to Digest-SHA. +OPTDEPEND="app-crypt/gnupg + dev-perl/Digest-SHA1 + dev-perl/Encode-Detect + dev-perl/Geo-IP + dev-perl/HTTP-Date + dev-perl/Mail-DKIM + dev-perl/Mail-SPF + dev-perl/Net-Patricia + dev-perl/Net-CIDR-Lite + dev-util/re2c + || ( net-misc/wget[ssl] net-misc/curl[ssl] ) + virtual/perl-MIME-Base64 + virtual/perl-Pod-Parser + berkdb? ( virtual/perl-DB_File ) + ipv6? ( dev-perl/IO-Socket-INET6 ) + ldap? ( dev-perl/perl-ldap ) + mysql? ( + dev-perl/DBI + dev-perl/DBD-mysql + ) + postgres? ( + dev-perl/DBI + dev-perl/DBD-Pg + ) + sqlite? ( + dev-perl/DBI + dev-perl/DBD-SQLite + ) + ssl? ( dev-perl/IO-Socket-SSL )" + +DEPEND="${REQDEPEND} + test? ( + ${OPTDEPEND} + virtual/perl-Test-Harness + )" +RDEPEND="${REQDEPEND} ${OPTDEPEND}" + +PATCHES=( + "${FILESDIR}/spamassassin-3.4.2-bug_7631.patch" + "${FILESDIR}/spamassassin-3.4.2-bug_7632.patch" +) + +src_prepare() { + default + + # The sa_compile test does some weird stuff like hopping around in + # the directory tree and calling "make" to create a dist tarball + # from ${S}. It fails, and is more trouble than it's worth... + perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test' + + # The spamc tests (which need the networked spamd daemon) fail for + # irrelevant reasons. It's too hard to disable them (unlike the + # spamd tests themselves -- see src_test), so use a crude + # workaround. + perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests' + + # Upstream bug 7622: this thing needs network access but doesn't + # respect the 'run_net_tests' setting. + perl_rm_files t/urilocalbl_geoip.t \ + || die 'failed to remove urilocalbl_geoip tests' +} + +src_configure() { + # This is how and where the perl-module eclass disables the + # MakeMaker interactive prompt. + export PERL_MM_USE_DEFAULT=1 + + # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again + # (just to be sure, nobody knows how it could happen in the first place). + # + # We also set the path to the perl executable explictly. This will be + # used to create the initial shebang line in the scripts (bug 62276). + perl Makefile.PL \ + PREFIX="${EPREFIX}/usr" \ + INSTALLDIRS=vendor \ + SYSCONFDIR="${EPREFIX}/etc" \ + DATADIR="${EPREFIX}/usr/share/spamassassin" \ + PERL_BIN="${EPREFIX}/usr/bin/perl" \ + ENABLE_SSL="$(usex ssl)" \ + DESTDIR="${D}" \ + || die 'failed to create a Makefile using Makefile.PL' + + # Now configure spamc. + emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile +} + +src_compile() { + emake + use qmail && emake spamc/qmail-spamc +} + +src_install () { + emake install + einstalldocs + + # Create the stub dir used by sa-update and friends + keepdir /var/lib/spamassassin + + # Move spamd to sbin where it belongs. + dodir /usr/sbin + mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed" + + if use qmail; then + dobin spamc/qmail-spamc + fi + + dosym mail/spamassassin /etc/spamassassin + + # Disable plugin by default + sed -i -e 's/^loadplugin/\#loadplugin/g' \ + "${ED}/etc/mail/spamassassin/init.pre" \ + || die "failed to disable plugins by default" + + # Add the init and config scripts. + newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd + newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd + + systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service" + systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \ + "${PN}.service" + + use postgres && dodoc sql/*_pg.sql + use mysql && dodoc sql/*_mysql.sql + + dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \ + sql/README.awl procmailrc.example sample-nonspam.txt \ + sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \ + spamd-apache2/README.apache + + # Rename some files so that they don't clash with others. + newdoc spamd/README README.spamd + newdoc sql/README README.sql + newdoc ldap/README README.ldap + + if use qmail; then + dodoc spamc/README.qmail + fi + + insinto /etc/mail/spamassassin/ + insopts -m0400 + newins "${FILESDIR}"/secrets.cf secrets.cf.example + + # Create the directory where sa-update stores its GPG key (if you + # choose to import one). If this directory does not exist, the + # import will fail. This is bug 396307. We expect that the import + # will be performed as root, and making the directory accessible + # only to root prevents a warning on the command-line. + diropts -m0700 + dodir /etc/mail/spamassassin/sa-update-keys + + if use cron; then + # Install the cron job if they want it. + exeinto /etc/cron.daily + newexe "${FILESDIR}/update-spamassassin-rules.cron" \ + update-spamassassin-rules + fi + + # Remove perllocal.pod to avoid file collisions (bug #603338). + perl_delete_localpod || die "failed to remove perllocal.pod" + + # The perl-module eclass calls three other functions to clean + # up in src_install. The first fixes references to ${D} in the + # packlist, and is useful to us, too. The other two functions, + # perl_delete_emptybsdir and perl_remove_temppath, don't seem + # to be needed: there are no empty directories, *.bs files, or + # ${D} paths remaining in our installed image. + perl_fix_packlist || die "failed to fix paths in packlist" +} + +src_test() { + # Trick the test suite into skipping the spamd tests. Setting + # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be + # set in SATest.pm. + export SPAMD_HOST=disabled + default +} + +pkg_preinst() { + # The spamd daemon runs as this user. Use a real home directory so + # that it can hold SA configuration. + enewuser spamd -1 -1 /home/spamd + + if use mysql || use postgres ; then + local _awlwarn=0 + local _v + for _v in ${REPLACING_VERSIONS}; do + if ! ver_test "${_v}" -gt "3.4.2-r3"; then + _awlwarn=1 + fi + done + if [[ ${_awlwarn} == 1 ]] ; then + ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.' + ewarn 'You will need to manually ALTER your tables for them to' + ewarn 'continue working. See the UPGRADE documentation for' + ewarn 'details.' + ewarn + fi + fi +} + +pkg_postinst() { + elog + elog 'No rules are installed by default. You will need to run sa-update' + elog 'at least once, and most likely configure SpamAssassin before it' + elog 'will work.' + + if ! use cron; then + elog + elog 'You should consider a cron job for sa-update. One is provided' + elog 'for daily updates if you enable the "cron" USE flag.' + fi + elog + elog 'Configuration and update help can be found on the wiki:' + elog + elog ' https://wiki.gentoo.org/wiki/SpamAssassin' + elog + + if use mysql || use postgres ; then + local _v + for _v in ${REPLACING_VERSIONS}; do + if ver_test "${_v}" -lt "3.4.2-r3"; then + ewarn + ewarn 'If you used AWL before 3.4.2, the SQL schema has changed.' + ewarn 'You will need to manually ALTER your tables for them to' + ewarn 'continue working. See the UPGRADE documentation for' + ewarn 'details.' + ewarn + + # show this only once + break + fi + done + fi + + ewarn 'If this version of SpamAssassin causes permissions issues' + ewarn 'with your user configurations or bayes databases, then you' + ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service' + ewarn 'configuration file, or remove the --username and --groupname' + ewarn 'flags from the SPAMD_OPTS variable in your systemd service' + ewarn 'configuration file.' +} |