From d37b97a25b8b10f748eead6574b01f893f140b01 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 6 Dec 2017 18:23:20 +0000 Subject: gentoo resync : 06.12.2017 --- mail-filter/Manifest.gz | Bin 11372 -> 11375 bytes mail-filter/spamassassin/Manifest | 4 +- mail-filter/spamassassin/files/3.4.1-spamd.init-r3 | 38 ++++ .../spamassassin/spamassassin-3.4.1-r20.ebuild | 251 +++++++++++++++++++++ 4 files changed, 292 insertions(+), 1 deletion(-) create mode 100644 mail-filter/spamassassin/files/3.4.1-spamd.init-r3 create mode 100644 mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild (limited to 'mail-filter') diff --git a/mail-filter/Manifest.gz b/mail-filter/Manifest.gz index cedc30ae9fb2..5f87c6ba81cc 100644 Binary files a/mail-filter/Manifest.gz and b/mail-filter/Manifest.gz differ diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest index af33fb06fb2c..c5bcf310c4bf 100644 --- a/mail-filter/spamassassin/Manifest +++ b/mail-filter/spamassassin/Manifest @@ -2,6 +2,7 @@ AUX 3.4.1-spamd.conf 887 BLAKE2B 15781a5c3d5e858c331c5002ac28e959927a823aca89390 AUX 3.4.1-spamd.conf-r1 1257 BLAKE2B bbdeeda731965dcd863c2a9bc615295b7d48e0110994dac66bfccb4ee1d84c9c50e6c2fd6649b09b7206e16120ed7e55b387ba76afdf0fe7e629bc767d87a80c SHA512 b2233d9330fa06d13dc8d222fa16198a1f81dcb9c87ca93961db54d9f2514cdabd824d0f25c0cca678495f271f48f601ee14363c2a2f833100facae307226beb AUX 3.4.1-spamd.init 1226 BLAKE2B 203d44e8e72088e34c3644d9a3457cc5684616b8211892b86714e0d44de866c61caf6b2fd9ad64f3b30d505bd0922ce3e19c30496f99f9087cb144f0eab836b7 SHA512 94e7b6cf5867d123fc1252cdb200906da80b2df4563c35d9e28db8bf0a4fac812797ad13c214a6d41bdac4d70d62d3bbcd3990f8405b3585f1a41c4db1f1be48 AUX 3.4.1-spamd.init-r2 1178 BLAKE2B 885a396e8b66e066e0f12bf49b9e66bad9db30551b8c807a7f8166b51a240aac751d0bab1d2cd50962a1f95f19d51a3e26b1d04d03276e4f3796de38382cfe38 SHA512 e17a735d4f0df52488c4e38acd9c4795145ae5355cc9ac640d07662883b65ff95d54168cca2ce6ec0a35d6879e3426b3b3e341fa0551c86d0e87b92d7f02cda1 +AUX 3.4.1-spamd.init-r3 1180 BLAKE2B c7290e6016b27247610b050f77368fcbf3dd3f4ab0a72a933b3819f35dfe9f9085f13f73be95b1169e04d3a09bc4cec6284e87963059ac047d5908df3458fb2b SHA512 2c968750da3252e8dcce4cebf105a26a9dbc471e39bda7d66180e0fbf930b11dd3a98337d7c387026375918b660768c637c2f2031d6624ce3237d9cc8cd88a02 AUX secrets.cf 664 BLAKE2B a501fb93369743e3c9139cc780f166168313613c840857bc0e72def5b3e168f235afc16a1dc34afa0e839ffa9da6c0c360c9a93a126d9dd711b4473e0a19ebcc SHA512 bb6992098a44e16147be46b75b70e3fb81672285dd71a30719606e2cab556720fc9dd318c7a80832ceaf2e6d9c98c2dd7434f48242feede1922c3e1073559edb AUX spamassassin-3.4.1-bug_7199.patch 10254 BLAKE2B f1a070c47658d67ebf01b68fc9312a4cbf331555a89eb1305f2568d8c18b5c14b266b51456e1e42bf3286d59517a00f7528b4878a72357b9736e8cd4148f7a13 SHA512 dd9ffaeaea93d03524315f300b5ce8ba8f0fd3f024b391adf8c0d08ab9b07427164c7f9eaea36c603f92643e7523f2683e75cf0c878ff7aa90101e8f0b0976c2 AUX spamassassin-3.4.1-bug_7223.patch 526 BLAKE2B b52af712616dc0247d740d9045a47c77a932bdb8e0ed397dec4b02815b7d4edbeeaa573331b048d17d840ab8af5f694a3473090ea00f622db3eb05381edfa5d1 SHA512 52949d391400582af028dfcfdbf1a781f6cbfe5bdd9125bfa4347f9ab0a4b596e3fa86ff112bf7a7992d0a0f619f686a533792b2d00d69aaf94ae678ba429d0b @@ -17,7 +18,8 @@ AUX spamassassin.service-r4 182 BLAKE2B c5813612e78602d6e67b527f07a8a38171422a63 AUX spamassassin.service.conf 333 BLAKE2B 87ef99f2466bd5d72aaf4158b7221dba79952facc61854faf802943ef9bacfbfa4aee7b090f16fe5cd5e436a30ca0de7ddf3b652ffb38e858145ff95b904d555 SHA512 d818e0ca5bfa9dadb94f99351a307f41c05bc46b89f55a03b9ba2fba0bd06fada06adf1a3eff949f3a04151f3680b279d78fba08c8f28873d17e4a4aa55edca4 AUX spamassassin.service.conf-r2 120 BLAKE2B cdefa5d73234be5331f7ff7cc646f10365adf515b85bf0d9912d240105579747f3834b7f72402a31b5be9b8ed0faf2545ae0a4ed46ebd3c7a90962f764fb5e8a SHA512 55b93ce1636505beabba21cd208541750ef448e952658b65d6e1447f92cec3a35e3d489d014a0229765117168cc03b4675652709f7ed9973be8fba84c10786dd AUX update-spamassassin-rules.cron 1378 BLAKE2B 0fda2be565deae75c0248c6dfc5abfc05a3fc4724cfed74175d35d276e8ea257ee93abce1d56be8c2f957621c039a2ba7e25a368f339b9b80f8dd9865944320b SHA512 90927b7709569a24ea2a233f42b16fce91bfda85e75e859ad85bc7ad16f7ad61ddb32bafc9b5b72515949b9ba8dda597679c24c2be4688d974375faf00bbccd5 -DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 SHA256 a0c1c9808f0684b389594eb8b2ccbace6486546593493f9308c9554563d14651 SHA512 91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af WHIRLPOOL 1465fcbc0456c9a671087d395c2a9998e3852a47153a0f6770158a2a311196490274c620aab89e2a6ff163defa72b8e785032f9450e7903df355544d957e8908 +DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 BLAKE2B f85b0ed2bae783bc6dfa39df36589a6cb90e6c657efcff1fa094f952847e4bcb24aa232b6689804bb1170204ae1d33216ed9bde207d7a7a6863410d8f847c391 SHA512 91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af EBUILD spamassassin-3.4.1-r19.ebuild 7827 BLAKE2B 8b7d0a7a1c0c8c27bc75324d1d4241ab2cdbbc8b50f1382750feb78621ac174aead3bbb8535fb4210909ac6840a08cbbd0435ea1c81966e8a63c0f2c78f2411b SHA512 7d1aca7c07984a5de780542cb96d6a10617a3395acd46c0c1ed6fe3925c30de5bbd9a130294d2088ed9b17c2fdc2062fbd0107076d4a2d8b7cc40e1f0d8ad9c3 +EBUILD spamassassin-3.4.1-r20.ebuild 7821 BLAKE2B 7b7e138d559f48d4b76c977dcabeb8657d1cef78c1d53fae21115533559b2c0f6a355c60c83641761c6ef52f74f1126b9b57a70bde110d6c1e2dba79cf811564 SHA512 7ec6a09b5121f88bddf2eb323e59c37338d178ca288f14b5316e20f5373b4b2a3806f8ab8d607d02bd9ab937de140a6400456576bf737d87257da06f47809d80 EBUILD spamassassin-3.4.1-r8.ebuild 7014 BLAKE2B 232ef27c8c1da3b3252f84d5fb845f9d50a688e27ffb7f1a49ad2d079b76362efbc40072869aecf123b463be013ece8713e23a300ce8e0d9ba8aabf0a3ba979f SHA512 0e71a3d5c7381fdc78c591050367d27f8281ed42789b5f0954af0dec2440b8e6183eb0303ff9056f9a0cf16bdc21ee866ef7889cabbcdc7401b6c49b81d72e6e MISC metadata.xml 1116 BLAKE2B c9879a85394a1dacac44bc073ec568ba50ac62f44eab9948cecbf19b49c12bb6a074279316d5cae97b396b59d9e9fca0243197073e08b0d6afafe4e22b7d6a71 SHA512 f0ec3654c51ab783c40e072fd87e5347931b3678537ad37491df3eee183be2060901effc93a343c20beff80f3175a41aeb417b5f0fdee19416df329435d221ef diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r3 b/mail-filter/spamassassin/files/3.4.1-spamd.init-r3 new file mode 100644 index 000000000000..0133d7936259 --- /dev/null +++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r3 @@ -0,0 +1,38 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/spamd" +pidfile="/run/spamd.pid" +command_args="--pidfile=${pidfile} ${SPAMD_OPTS}" +command_args_background="--daemonize" + +if ! [ "${SPAMD_RUN_AS_ROOT}" = "true" ]; then + # Passing --username=root to spamd kills it, so if SPAMD_RUN_AS_ROOT + # is true, then we want to pass no user/group command args at all. + # Any value other than "true" gets the default user/group of "spamd". + command_args="${command_args} --username=spamd --groupname=spamd" +fi + +: ${SPAMD_NICELEVEL:=0} +start_stop_daemon_args="--nicelevel ${SPAMD_NICELEVEL}" + +# Retry after SPAMD_TIMEOUT seconds because spamd can take a +# while to kill off all of its children. This was bug 322025. +: ${SPAMD_TIMEOUT:=15} +retry="${SPAMD_TIMEOUT}" + +extra_started_commands="reload" + +depend() { + before mta + use logger mysql postgresql +} + +reload() { + ebegin "Reloading configuration" + # Warning: reload causes the PID of the spamd process to + # change, but spamd does update its PID file afterwards. + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild new file mode 100644 index 000000000000..c4789c7633dc --- /dev/null +++ b/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild @@ -0,0 +1,251 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit perl-functions systemd toolchain-funcs user + +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.1-bug_7199.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7223.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7231.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7404.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7462.patch" + "${FILESDIR}/spamassassin-3.4.1-perl526.patch" + "${FILESDIR}/spamassassin-3.4.1-bug_7361.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' +} + +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 +} + +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 + + 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.' +} -- cgit v1.2.3