diff options
Diffstat (limited to 'mail-filter')
7 files changed, 828 insertions, 0 deletions
diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest index 67c48815c0b7..20b6ba598f1c 100644 --- a/mail-filter/spamassassin/Manifest +++ b/mail-filter/spamassassin/Manifest @@ -1,22 +1,28 @@ AUX 3.4.1-spamd.conf 887 SHA256 bcbe4286ba09af462d14db65930c8f0a9311477d99a030dd36703066ddf4104d SHA512 627b6a4d54adf2feeaaf2197a5193c6f216812eab685ee833bdf4e3d765f40996790c0a4e22ff618d23985053e96a521fb48d19a648ab47ff2b0e9c23621a7e8 WHIRLPOOL 7658ed8e4259014735bae24ccb2ba91dc4c5cc36e1003386cb00cda2720457693e68e0e7ee66609d37488cc5dd66bd63541da41721461c6c7fb3e3f761951bc6 +AUX 3.4.1-spamd.conf-r1 1257 SHA256 94214cef86c5eb6664e5b0af1e31763568caa168941d29a683ce8073510e0b07 SHA512 b2233d9330fa06d13dc8d222fa16198a1f81dcb9c87ca93961db54d9f2514cdabd824d0f25c0cca678495f271f48f601ee14363c2a2f833100facae307226beb WHIRLPOOL f6e7ef7977cbcb202760dc89c51f58147bfff6c9eb8bd09cafe2c3951dd3e2362422678bdfcc462c367c77dc41e61ce352e0da7910c6af9acb2adbaddc299148 AUX 3.4.1-spamd.init 1226 SHA256 1b17fdcd10452eea603fc3ed7c14fbcad069fb6b4ae7dda6373d47b6c8a1e737 SHA512 94e7b6cf5867d123fc1252cdb200906da80b2df4563c35d9e28db8bf0a4fac812797ad13c214a6d41bdac4d70d62d3bbcd3990f8405b3585f1a41c4db1f1be48 WHIRLPOOL 5e61bfe6f8977226c8094d0b8788e375379413ee808a9a8828fe1f3b9ef2c42a8795ab282ec5cf096fe857e1e6b99560eaa7fb027e69c3e4e8be8f2ba61cbe49 AUX 3.4.1-spamd.init-r1 916 SHA256 b8dcf7520283fdd9ff2bb9373e8377bc372d2a4270a4ea100b0ab25a043512bd SHA512 b0b3f4f26cf169232d9c3ce66f865793e93a3513666fd44089d33b2168cc7259eee868cc863e7f78dd790f98823b648bb74ed1580f2d69eb86ef5fa2eb9c6910 WHIRLPOOL 3ab222a93cf84dbaa1b724bbb8a5bc59d570d5dd5c8829794d59f0ccf4e5024a897d3ee78f6891fb491532cc61e7e381c8affab72d48a8df2cf104e0645af9f3 +AUX 3.4.1-spamd.init-r2 1178 SHA256 61c53a55c6b7dabbc8aee4277fa4f6c412fe5b2a74bc0369b1f802b30c09b5c8 SHA512 e17a735d4f0df52488c4e38acd9c4795145ae5355cc9ac640d07662883b65ff95d54168cca2ce6ec0a35d6879e3426b3b3e341fa0551c86d0e87b92d7f02cda1 WHIRLPOOL 6b84d9cc1b70068ceaf5c8d8d971a74a8eca1dc780f885111306a40ed5182b4d4610c96f0a06c9244f0a7c330bfcf12b9b5f1e31436a92ddd2ba981116989128 AUX secrets.cf 664 SHA256 9f134c7b857b21689f612fc6d131f719e5a65e2ba341b282e7aa57402c854139 SHA512 bb6992098a44e16147be46b75b70e3fb81672285dd71a30719606e2cab556720fc9dd318c7a80832ceaf2e6d9c98c2dd7434f48242feede1922c3e1073559edb WHIRLPOOL 1eccfd765106199312fb23581612b810b92fe8cc3e94b9c4964bcf550ac68bab1e88af07d5324a2be11111cf04f941f4bcfe5482bc71c72ef5ab35be53512ebc AUX spamassassin-3.4.1-bug_7199.patch 10254 SHA256 860db82d1a75eba09dbd4da1667a3119503d4d92f9f6f72431806af6ebefed96 SHA512 dd9ffaeaea93d03524315f300b5ce8ba8f0fd3f024b391adf8c0d08ab9b07427164c7f9eaea36c603f92643e7523f2683e75cf0c878ff7aa90101e8f0b0976c2 WHIRLPOOL 8789ba559890795065c2da105f06cd61107ab7adb3a3ccf5440524fa375d6783c268c68e1dfb534eb4e4351544d8e3e980f4d254ad93ab390356d60d42251bff AUX spamassassin-3.4.1-bug_7223.patch 526 SHA256 9d44a97b05048c2738f14176e56d22cea4793c37d4724cfa073c9f055c9c94c0 SHA512 52949d391400582af028dfcfdbf1a781f6cbfe5bdd9125bfa4347f9ab0a4b596e3fa86ff112bf7a7992d0a0f619f686a533792b2d00d69aaf94ae678ba429d0b WHIRLPOOL 2374d47df9ca2489b4c3517c507fe196c838ab9ee394e7c104a6cc97d473286d6d2f2c3428b6352c36dd3f9e1ed0e53afa73223d6ae0b91491976564c2a47a4d AUX spamassassin-3.4.1-bug_7231-extra.patch 6837 SHA256 a7a2fdd794be2c1f500d197a315761019f9278a200545d7b770e2ca9cfbc3459 SHA512 ec29c56b33155bc287be74c5eb0bb8ff6a4a94a00e5d0f396cc8845a1cc6bbe75935a5f841a732f68fd2baa5fe5089642dc7633ce224006f57b4d989e400082c WHIRLPOOL 937b6bf8f78d42022e0327b582c1c9200215216fe4b267150f3ef2f2879334f897f6a2fe44da9a3dac9f308116ad91167d6d72d19f77d50534096f6e532ed46a AUX spamassassin-3.4.1-bug_7231.patch 949 SHA256 f2b0db858fc0dd98b5c22553f428c4cc8f2ebfa3c5fa567a6e0217eee5a4f78c SHA512 319d517b1fd36d26c2bf34f348ddaf17ff708cbb7e8488c725fe14e8be154c2567d782de2291afa07696b988cbf984dfce9f05f060cbcbd8505f3520e6be4a29 WHIRLPOOL a62e51d3c5eab197e56a98d1b18bd3458b4e3b70811d67df285bcb6d65585055df9b54fe9af0ba39d086f663e8564f8b942177ddd103f2904da6da661f6c678d AUX spamassassin-3.4.1-bug_7265.patch 3432 SHA256 6592b9171f9c0c1abe1894792c4dd0c8671c5c2021377dc1e114440c6af46be2 SHA512 8d77aafdf465d8063f0069cdc316bc1be7ffbf8f7a56879fd96a4370e0ccdb412b96d5749ac782d4d72d673d560162e3fc809cd796bb5db58d96f0387a134257 WHIRLPOOL c25e9f04d982eaffde7a42d4b163519888275b9cae2d66865dc133a5c034003ce2b3b8ec4e20b16dec332a04cdf30ee3bae3d511f0f27ef7b73fc97529855492 +AUX spamassassin-3.4.1-bug_7361.patch 16483 SHA256 b57067c88497e80f87e48878f71b77a9b50eb198f864e31dd79e8b91d2ffd5c3 SHA512 7c84ef8f94a1379d1fbd102cc1e6de35293809261f4989ed65eee05b5198fc1e7ea3cd035cbaeef680127a5b2ab43cb98f27f74fce1fb1999dec1f7881698a73 WHIRLPOOL d23a96ffc258e27656de6bfc90428db30c508f7a373774cf2f37d87a2064ac5e00336252fe4fae5964982ac631dc459f9f8fd7b941b9bb4dda0f0a22be943c6e AUX spamassassin-3.4.1-bug_7404.patch 792 SHA256 05dfabab187c452a16b30b30c079c740fef844ba8264df8cf9c6626f189c8785 SHA512 8bc613699872f0358d699f0c151bf9eac6ff80d9dc878d38fca522ac091f4e1348982bf2ce8029c7f241fdbabbf531e1d45f301159f6eddfbeb935252bd577e5 WHIRLPOOL ee1db0b2642b85dc133facfca8dee9cd3e920a247cf7c37570802dac23de30957017dbb529016a1bf99cc2fb0aebdc5d85c4d2718d6c0b1012efbc858742e580 AUX spamassassin-3.4.1-bug_7462.patch 5836 SHA256 643b94cd2252b78a103c64792528b8ed3ab16e324c019f6b05676829bb851127 SHA512 68cad4b4ebd46fa186df04c926043fcdcf0099504451ed2b323d35871d142448431777baf2d374082554e1ef914efbf8f89001e1975c10e73e8865f3feff5878 WHIRLPOOL b3270b4794fbe46fc4573fdd4819b5f2f705d450cf595202812876b94c608fe4c5c30294f71790859baa8e03af0a92d9570a55c7e2b0a37b733c4ad5e7a94334 AUX spamassassin-3.4.1-perl526.patch 484 SHA256 18792c258512c8cd3e33abbf6d04f1b7e9bd23f0e04036676ababe6bc2c6f347 SHA512 ded5a6079f95bb4a771e23b382af83498f16144eb9ba613b97b365b52d96845255f26ddf561b7d6edaa53c7acad3d62294adb01ce4a8a4157470a5ed92cd1b13 WHIRLPOOL 20faa8d0e796b3a5b7c1a5691d1ac19841a8114ec2310f0558c7bebdfc954414ace1ef9cd09f6e11ba7c271771cbee8b910f5ca258498962916768c758050058 AUX spamassassin.service-r1 323 SHA256 960eb0115ac4e70981f9a4350767e001cdabb244f5cd6d169d713fa05f662f3b SHA512 3c9356d1a24f73c3a3374398058c8e7cb9875ee98a1b6bb96d5a6d9ec2de4de527717f12d809b40d4d768958e098f6e5e04803018f9b7e46a0322cd9319c0923 WHIRLPOOL a2c4faf6788132cec2b4781aedd55c859f45ec6555e40ba078c9890d857971ba3b8b8114c48cc9bbbffa0dd4ac3cc24d0e52e8f6af78325ad259718e867f3c00 AUX spamassassin.service-r3 217 SHA256 d5b93466f424269a6734d1b18e6096ef04039700ddd7306831984e8296223922 SHA512 9b90bcbc21ea778f41501d9533d3e1cea4a3327f4628f09d0626babca40a9880668cb38e81bc10797bd78a75ce312dba1d89eeabaf980539fa09f9449607c870 WHIRLPOOL 8da31abc7aea072e71594492300110b2ac0bdfb2d5c5d95867eadaadfa8cddc3a1fa3c721131802d73bb3db964b2e3252c8467a1296e28810fb29bb50533718c +AUX spamassassin.service-r4 182 SHA256 6df8c5befdcefdf8f5923f8b4a4b1e03203278bed18e102872537f70300e6d2f SHA512 35da6ed8baa1cfc13546b409ed65d18334410ee497f9609c89cd4993dc8084ed479ddc7658e72a52a9b79f1a73d4efba42148b7238678c17a2965f9ff6a608e9 WHIRLPOOL a663e91250f927f196ce93db5cdc3ac1d4932a8ad52e2419f19fd7074e1678266e91d423547d8a3cfc21e6c8a798ace3f5d833e9d5f37e7af9d94ea227a86052 AUX spamassassin.service.conf 333 SHA256 b6f942eb15f2476dbd161db92b8dacec43f2a0664b45405f3e4396f23ab8b18d SHA512 d818e0ca5bfa9dadb94f99351a307f41c05bc46b89f55a03b9ba2fba0bd06fada06adf1a3eff949f3a04151f3680b279d78fba08c8f28873d17e4a4aa55edca4 WHIRLPOOL 9b5e5674223f99df7afb48482f12f4fa307677290833dd6d3285cdcb94bea1a632c76e8a99e7e38b556a61c20375389d5a370105d2d8c2d4f1de445340ab429d AUX spamassassin.service.conf-r1 85 SHA256 24c07ff083df9ed68e092ae5a7d9c1e3e457bceaf447dbafcce9d538b907b134 SHA512 270337a79cdd04c82edd11e97e1186d3bee9a97c6ab35496828f30e75893c69a4dc46cbfb7fc26c1dc6de361a6fcb5603eab704f89a10c787ad1b3041e75a191 WHIRLPOOL aa047534f981d2259685133fae61de47334f513ac5276e1413e37609dee63aa88204072009b16896361e70df56007bde77dfa31103305ea5f46955b2f026ec48 +AUX spamassassin.service.conf-r2 120 SHA256 7faef35ccdf9f73049f342088a97adc7764341988d32a6029af5894611b4c32e SHA512 55b93ce1636505beabba21cd208541750ef448e952658b65d6e1447f92cec3a35e3d489d014a0229765117168cc03b4675652709f7ed9973be8fba84c10786dd WHIRLPOOL e3d4bf3392cb3a6d3b37fdc2f5aa5788c4ee1db70e2180403af98be143ba848054ef09ebdfaf56e529ee4e150ebf7163ca092bd3b3d79db3cda55cd7be12273c AUX update-spamassassin-rules.cron 1378 SHA256 82aafaa2ba3d7f1d86ac06ed4c561b86c8288c10552fbee1304233b0f0bd1e43 SHA512 90927b7709569a24ea2a233f42b16fce91bfda85e75e859ad85bc7ad16f7ad61ddb32bafc9b5b72515949b9ba8dda597679c24c2be4688d974375faf00bbccd5 WHIRLPOOL 9677bfc0a382dff0a3cdc28e4f9e851c7567b7f86d8ee130933f7a5662f94f1128973ab6032c1e12c69c9a65ab49daad052364944e69843412c637ea4e592ed2 DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 SHA256 a0c1c9808f0684b389594eb8b2ccbace6486546593493f9308c9554563d14651 SHA512 91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af WHIRLPOOL 1465fcbc0456c9a671087d395c2a9998e3852a47153a0f6770158a2a311196490274c620aab89e2a6ff163defa72b8e785032f9450e7903df355544d957e8908 EBUILD spamassassin-3.4.1-r16.ebuild 7402 SHA256 c8fa8b0bd445eaf916498445f837e99ab96c4df09594be7c9286dbff091f4cff SHA512 f62681f1d2e30a1e0f8b24839c7057afe91b4741edba45a8cf5a2663fc73bf4ac7dc17313dbf35478296568c6d1be6299e6abdd5c473d2807dc9498756578a47 WHIRLPOOL b5f170e18ffa0e9565a3ed95bc4f2765138b6a06f4ddc2d830113156305487466e372dd07604b44a5ac0f5802c659f6ec9f1485fa31aa2e8a4e70682667b175e +EBUILD spamassassin-3.4.1-r19.ebuild 7835 SHA256 915015a2eddb6896f4ec394976bfdea856dcbef9a222b60fabe341d3e622cc18 SHA512 1b2adf0aaa612abf4ea80c97ea83cb4b904f26fc2d9d9ce13ac68cd1c8b3bee0bbf928a74d0a93b788050761cb29f994bcdb31b7a4427d94d8d4544f74515e16 WHIRLPOOL 2962db8822e60ef61f5c3c1c51dec5d4ae24cddf07b6b3cccb8187390834ed257eebd9381280451472d6e1e5cedacc6176da90774e66e8b79a726464cf853461 EBUILD spamassassin-3.4.1-r8.ebuild 7014 SHA256 fe09355899e12443765c5fd8b2a159030f0b30ae1d26f20d8ad6077128107bdd SHA512 0e71a3d5c7381fdc78c591050367d27f8281ed42789b5f0954af0dec2440b8e6183eb0303ff9056f9a0cf16bdc21ee866ef7889cabbcdc7401b6c49b81d72e6e WHIRLPOOL 7dd4a6550f381ae2249a0be15b85c70bd6f03e9df0d34f6a8a4ed3587deaf3236696cbb302808378e4989b74fc9f4ba67bae12476392639cc5a1dd60671f82c3 MISC ChangeLog 11981 SHA256 ee39eba652ecdf545257c9addc9f251c27fc916a662b85733a18f3b6c8387602 SHA512 126d51d6ed71aff051cae7663139f0a23c8de136aa30965a77e039a421d8b75ec5382c3ecd1d1297c62acc57f79d9c18532f27f6f4db3efe833855bfea08b7eb WHIRLPOOL c8aac640da1663435b22c558549ce282c8fe22c0200d1aed7686e0124ee6397c7113d6d476e9ef8b6d9618f873bdab680d072ea9f4d424671cf947791904f0d7 MISC ChangeLog-2015 50434 SHA256 c3346f6e5bc71f22cd441184a6242bb3fe146f0b14e87365e9007e48ee86e5e9 SHA512 575db565453ecb6c9f0b4e0d155647a68b0e6dd57bd4b90d2f41a7dd82522b3ecb5b6401bfa6edefaf2b7bd8f252cebde03e9cbbdf8e8d95dc596216c4a43359 WHIRLPOOL b5600e57eb295607d953b3c8345ec644b2c6e40084200d5ae8e3d14c2d8ff04d2e91d788a1a04ed8e367c4f5aeeeb0da637e684432f623fffcfb7b1c96d78cb6 diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.conf-r1 b/mail-filter/spamassassin/files/3.4.1-spamd.conf-r1 new file mode 100644 index 000000000000..b7b46f3226a7 --- /dev/null +++ b/mail-filter/spamassassin/files/3.4.1-spamd.conf-r1 @@ -0,0 +1,30 @@ +# ***WARNING*** +# +# The spamd daemon must not run on an untrusted network. +# +# ***WARNING*** + +# Additional options to pass to the spamd daemon. The spamd(1) man +# page explains the available options. If you choose to listen on a +# non-default interface, you will need to use OpenRC's "rc_need" +# mechanism to ensure that your interface comes up before spamd +# starts. The openrc-run(8) man page describes rc_need. +SPAMD_OPTS="--max-children=5 --create-prefs --helper-home-dir" + +# Sets the 'nice' level of the spamd process. +SPAMD_NICELEVEL=0 + +# How long (in seconds) should we wait for spamd to stop after we've +# asked it to? After this amount of time, if spamd is still running, +# we will assume that it has failed to stop. +SPAMD_TIMEOUT=15 + +# Do you want to run spamd as root? If you have local users storing their +# personal configurations (or bayes databases) in ~/.spamassassin, then you +# may want to run spamd as root so that it can setuid to each user while +# processing his spam. (That way, you don't have to grant the "spamd" user +# individual permissions to everyone's ~/.spamassassin directory.) +# +# On the other hand, if you don't store any per-user configuration on +# the filesystem, then you should leave this alone. +SPAMD_RUN_AS_ROOT=false diff --git a/mail-filter/spamassassin/files/3.4.1-spamd.init-r2 b/mail-filter/spamassassin/files/3.4.1-spamd.init-r2 new file mode 100644 index 000000000000..c704782f3a4e --- /dev/null +++ b/mail-filter/spamassassin/files/3.4.1-spamd.init-r2 @@ -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 postgres +} + +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/files/spamassassin-3.4.1-bug_7361.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7361.patch new file mode 100644 index 000000000000..525bf75c7fe8 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7361.patch @@ -0,0 +1,491 @@ +This patch is a modified combination of the patches posted to + + https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7361 + +that allow SpamAssassin to build against (and work with) openssl-1.1.x. +Mark Wright (gienah) made the necessary updates to get the patches to +work on Gentoo and solve bug 624858. + +SpamAssassin-bug: 7361 +Gentoo-bug: 624858 + +--- a/spamc/configure (revision 1767127) ++++ b/spamc/configure (working copy) +@@ -943,7 +943,7 @@ + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi +- cd "$ac_popdir" ++ cd $ac_popdir + done + fi + +@@ -1874,7 +1874,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -1932,7 +1933,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2048,7 +2050,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2102,7 +2105,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2147,7 +2151,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2191,7 +2196,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2523,7 +2529,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2693,7 +2700,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2764,7 +2772,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2917,7 +2926,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3069,7 +3079,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3260,7 +3271,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3323,7 +3335,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3388,7 +3401,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3491,7 +3505,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3557,7 +3572,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3628,7 +3644,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3666,9 +3683,9 @@ + SSLLIBS="" + SSLCFLAGS="" + if test yes = "$sa_ssl_enabled"; then +- echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5 +-echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6 +-if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then ++ echo "$as_me:$LINENO: checking for CRYPTO_malloc in -lcrypto" >&5 ++echo $ECHO_N "checking for CRYPTO_malloc in -lcrypto... $ECHO_C" >&6 ++if test "${ac_cv_lib_crypto_CRYPTO_malloc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + ac_check_lib_save_LIBS=$LIBS +@@ -3686,11 +3703,11 @@ + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +-char CRYPTO_lock (); ++char CRYPTO_malloc (); + int + main () + { +-CRYPTO_lock (); ++CRYPTO_malloc (); + ; + return 0; + } +@@ -3704,7 +3721,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3716,20 +3734,20 @@ + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then +- ac_cv_lib_crypto_CRYPTO_lock=yes ++ ac_cv_lib_crypto_CRYPTO_malloc=yes + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + +-ac_cv_lib_crypto_CRYPTO_lock=no ++ac_cv_lib_crypto_CRYPTO_malloc=no + fi + rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$ac_check_lib_save_LIBS + fi +-echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5 +-echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6 +-if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then ++echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_malloc" >&5 ++echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_malloc" >&6 ++if test $ac_cv_lib_crypto_CRYPTO_malloc = yes; then + SSLLIBS="-lcrypto $SSLLIBS" + fi + +@@ -3771,7 +3789,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3804,7 +3823,7 @@ + # before defining SPAMC_SSL check that all its requirements are + # actually available + if test yes = "$ac_cv_header_openssl_crypto_h" && \ +- test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \ ++ test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \ + test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then + SSLCFLAGS="-DSPAMC_SSL" + else +@@ -3854,7 +3873,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3927,7 +3947,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4000,7 +4021,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4073,7 +4095,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4182,7 +4205,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4246,7 +4270,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4311,7 +4336,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4368,7 +4394,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4435,7 +4462,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4500,7 +4528,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4564,7 +4593,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4628,7 +4658,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4692,7 +4723,8 @@ + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5527,6 +5559,11 @@ + + + ++ if test x"$ac_file" != x-; then ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ rm -f "$ac_file" ++ fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ +@@ -5565,12 +5602,6 @@ + fi;; + esac + done` || { (exit 1); exit 1; } +- +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub + +--- a/spamc/configure.in (revision 1767127) ++++ b/spamc/configure.in (working copy) +@@ -64,13 +64,13 @@ + SSLLIBS="" + SSLCFLAGS="" + if test yes = "$sa_ssl_enabled"; then +- AC_CHECK_LIB(crypto, CRYPTO_lock,[SSLLIBS="-lcrypto $SSLLIBS"]) ++ AC_CHECK_LIB(crypto, CRYPTO_malloc,[SSLLIBS="-lcrypto $SSLLIBS"]) + AC_CHECK_LIB(ssl, SSL_CTX_free,[SSLLIBS="-lssl $SSLLIBS"],,-lcrypto) + + # before defining SPAMC_SSL check that all its requirements are + # actually available + if test yes = "$ac_cv_header_openssl_crypto_h" && \ +- test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \ ++ test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \ + test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then + SSLCFLAGS="-DSPAMC_SSL" + else + +--- a/spamc/libspamc.c 2017-10-20 13:33:54.129653171 +1100 ++++ b/spamc/libspamc.c 2017-10-20 13:36:09.429653849 +1100 +@@ -1212,10 +1212,21 @@ + + if (flags & SPAMC_USE_SSL) { + #ifdef SPAMC_SSL ++#if OPENSSL_API_COMPAT >= 0x10100000L ++ OPENSSL_init_ssl(0, NULL); ++ meth = TLS_method(); ++ ctx = SSL_CTX_new(meth); ++ if (flags & SPAMC_TLSV1) { ++ SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION); ++ } else { ++ SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION); ++ } ++#else + SSLeay_add_ssl_algorithms(); + meth = SSLv23_client_method(); + SSL_load_error_strings(); + ctx = SSL_CTX_new(meth); ++#endif + #else + UNUSED_VARIABLE(ssl); + UNUSED_VARIABLE(meth); +@@ -1599,10 +1610,17 @@ + + if (flags & SPAMC_USE_SSL) { + #ifdef SPAMC_SSL ++#if OPENSSL_API_COMPAT >= 0x10100000L ++ OPENSSL_init_ssl(0, NULL); ++ meth = TLS_method(); ++ ctx = SSL_CTX_new(meth); ++ SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION); ++#else + SSLeay_add_ssl_algorithms(); + meth = SSLv23_client_method(); + SSL_load_error_strings(); + ctx = SSL_CTX_new(meth); ++#endif + #else + UNUSED_VARIABLE(ssl); + UNUSED_VARIABLE(meth); diff --git a/mail-filter/spamassassin/files/spamassassin.service-r4 b/mail-filter/spamassassin/files/spamassassin.service-r4 new file mode 100644 index 000000000000..b539cd2bb5a3 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin.service-r4 @@ -0,0 +1,10 @@ +[Unit] +Description=Spamassassin daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/spamd $SPAMD_OPTS +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/mail-filter/spamassassin/files/spamassassin.service.conf-r2 b/mail-filter/spamassassin/files/spamassassin.service.conf-r2 new file mode 100644 index 000000000000..442dde44e078 --- /dev/null +++ b/mail-filter/spamassassin/files/spamassassin.service.conf-r2 @@ -0,0 +1,2 @@ +[Service] +Environment="SPAMD_OPTS=--username=spamd --groupname=spamd --max-children=5 --create-prefs --helper-home-dir" diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild new file mode 100644 index 000000000000..2f2e31f1087d --- /dev/null +++ b/mail-filter/spamassassin/spamassassin-3.4.1-r19.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 + + ln -s mail/spamassassin "${ED}"/etc/spamassassin || die + + # 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-r2" 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.' +} |