diff options
author | Stuart Shelton <stuart@shelton.me> | 2017-11-07 09:26:35 +0000 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2017-11-07 10:54:58 +0000 |
commit | 31fb4c1f55338f5a58505de9fecf8f6c4cf6ff2e (patch) | |
tree | 9d9465c1db22f03f87480da1ea6f61514b05c6da /mail-filter/spamassassin | |
parent | Update sys-apps/coreutils-8.26 (diff) | |
download | srcshelton-31fb4c1f55338f5a58505de9fecf8f6c4cf6ff2e.tar.gz srcshelton-31fb4c1f55338f5a58505de9fecf8f6c4cf6ff2e.tar.bz2 srcshelton-31fb4c1f55338f5a58505de9fecf8f6c4cf6ff2e.zip |
Add mail-filter/spamassassin-3.4.1-r19
Diffstat (limited to 'mail-filter/spamassassin')
7 files changed, 830 insertions, 0 deletions
diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest index c047341c..f656c82e 100644 --- a/mail-filter/spamassassin/Manifest +++ b/mail-filter/spamassassin/Manifest @@ -1,8 +1,10 @@ AUX 3.0.0-spamd.conf 1527 SHA256 ea61041e8b6b1616ec096cc42245ab8442b962f72c318695f5acff1fd794ee34 SHA512 4b820bfa56d565844298be9c9ba888847d7835afb218b7b95317d2fe078407b0776003bacda577e0789344070cfd3e1726115a0945e3c1400626d376197d2055 WHIRLPOOL 97571ccbcffe79e71dba041be6713cc9916240f3ea90807cf112f1c32008ca0e0c6857d13fb90d43672e4f81f0caa343893bcde245b5a7e987d4d2e8c2c6a3ed AUX 3.3.1-spamd.init 958 SHA256 7a95cfc77c8e6756f04982735160a292638f15ad740b89e5d03bdcea2f8c4732 SHA512 2b6803f91a7cd6e9649b74ca6fb0fa73d0fe9f037b9f9b4242bbd20de2308e24c609abe5ebc4f3e4d58d0c17e6d5efb6ba1bf9937ef802d105f0552f2cb52e96 WHIRLPOOL cc4ef8f5dcc90dbe737132c2a739f866254607f136f7661debb2faa311f2f0416866508aa7dd3a6a14c69873a170c60bf41ce7c2b2d5918f7a07512cea087203 AUX 3.4.1-spamd.conf 1923 SHA256 59fcea85ad0625f7671c3bbea354be8c7ec6927c8da7b1f5d4ef536ca07d2a4f SHA512 65bd987bb8d0dffec04a8d577482a0c3b0acb631e18dc5bccd0054b9edb161800ba5c56261bd57b4ed1fb501f5e85b21cdc3b42c7258a78299d485cc7cc86b3f WHIRLPOOL f539f8e1de4ac5cb0e7a91e987703c5359bd41be11c3abb7f5204278d1b9039ebe58876696a150e7610ebf97ad40c8ead6acc4f1fae645fc96b43d8e117f8f41 +AUX 3.4.1-spamd.conf-r1 1257 SHA256 94214cef86c5eb6664e5b0af1e31763568caa168941d29a683ce8073510e0b07 SHA512 b2233d9330fa06d13dc8d222fa16198a1f81dcb9c87ca93961db54d9f2514cdabd824d0f25c0cca678495f271f48f601ee14363c2a2f833100facae307226beb WHIRLPOOL f6e7ef7977cbcb202760dc89c51f58147bfff6c9eb8bd09cafe2c3951dd3e2362422678bdfcc462c367c77dc41e61ce352e0da7910c6af9acb2adbaddc299148 AUX 3.4.1-spamd.init 1314 SHA256 b693eaf4eae7d7f5537e54a304946b0f0da052a3cab747cfa183588b5126af67 SHA512 75516911452e1fc0ad816db88d67bffaf5ba2153601e5dd5db279fe390b4464fb0ff11d84f042504e11a8b48fedee7f6ad1fa69ca5c0069c8022eee6417cd898 WHIRLPOOL 08c8c18bd8d4bccc27bd7d31e2e01ad87ddf6a2b1c96aa83d1ea3584dd08df71af26eb47000235423514277c890ba5f20c23ffc451de2520ef2076db78a44678 AUX 3.4.1-spamd.init-r1 920 SHA256 ec9e8c5deabee559b681c1d2229bf9e3fcba8c5c7b78fb1d1509a20af5c2a868 SHA512 6944f4e7155cc6b74f10f58701b7a2f2c39febeafaabf20e2fb29fa2932fcea4e57704ffb4c0ed84a82f60a8780c7b88ca3b0619c72591c2322d3d9ddfccfeec WHIRLPOOL 5dc028b7b640c630085fdc1a0090a96a21e133a641bb64871f7833f21d1108dbb1b3cbee3e2a895527201855cb20819b93eac8d95894c052a7031aad7cb37f88 +AUX 3.4.1-spamd.init-r2 1182 SHA256 c5f4bb991a892eb6fcdbb55aef9b8a32c4529d2ee3485c08b78083b99a355667 SHA512 4d13fa655f6e863d91f0c4d5e9a832693f5d1bb980fe2327f365a46de14120da862a0650978e76cbf7096389f2d8e50e6e5a691da266c1173f4dd64dbf70ed9e WHIRLPOOL 82e2333a77c531a9b86eed900766415dca5084f794b6241ad65e4f517ee8afd2bff30e882940a008111e17e931e802139121782aee91b4b4802397ceeb5b4f6f AUX secrets.cf 664 SHA256 9f134c7b857b21689f612fc6d131f719e5a65e2ba341b282e7aa57402c854139 SHA512 bb6992098a44e16147be46b75b70e3fb81672285dd71a30719606e2cab556720fc9dd318c7a80832ceaf2e6d9c98c2dd7434f48242feede1922c3e1073559edb WHIRLPOOL 1eccfd765106199312fb23581612b810b92fe8cc3e94b9c4964bcf550ac68bab1e88af07d5324a2be11111cf04f941f4bcfe5482bc71c72ef5ab35be53512ebc AUX spamassassin-3.3.2-binary_token.patch 465 SHA256 170ffed8831f7e45d7e50fda774dccd2482f4652c733e419c664d04b3208f37f SHA512 0e101c9792bc1cc6123fa1546e2d412b23bd9811541f18454182871995ad4436916e038be2352774c313e61c6decf99c7b378b3e107dfd05fbeedb75a65ce6ad WHIRLPOOL 88739e51bba39242dfba9adc437a06922f1c9f43e7bc5988c3e6cccc3da937949b634567824587c5c366ff0a4f30b68631f14faf0425f05cd068380d87c83dbc AUX spamassassin-3.3.2-innodb.patch 4749 SHA256 d40a72692f9b7161f2a332189e68cfd5486b69a4d2e9fdea9d23d6ae7bd7fd10 SHA512 8d72542f1853eee35a9fb8a3127bd8a3a3aeb2ee0b30e1f15a7c45f7a1d81054c50c57a9b8109c9348dbdbe1a084a0932bc9efa8a5516da92142bd8371ed2ecd WHIRLPOOL 7f58df175bb6cef1d970577960e29077ae2172d74bda30dd7c47283df4e7dfbbe8f44045259531659f2eddc748b3f05853aca5c62f90949c6a22d3287a90495c @@ -13,13 +15,16 @@ AUX spamassassin-3.4.1-bug_7223.patch 526 SHA256 9d44a97b05048c2738f14176e56d22c 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 331 SHA256 1b815bd90faefc7799757ea5667d24b9807e90f1573cb9df744739210e7eb881 SHA512 e3c21056e27098f5735e754f5463a7ffbeee4458d3a39728d60037f2312fb94255650e81d52317bbac1e78f4ab4fc9a0e23fe5594f1470cd31cbedadd34d7c89 WHIRLPOOL 019fe066f8e23b2a440c63995cc3b08e30b653b055d549f03fa2295ea48254b48f72821388f68fbb6cf36808298cdf885ef93cbc042cd8866b6afbbcdd1758e8 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.3.2.tar.bz2 1006577 SHA256 c7239b4b4ef04ba5e2d5aedb9156850146ed3fa47c88f0a0757f08e22f93a205 SHA512 3baabfacd2f3ac1debc2bbcdc0b2109ad51f6b176b9a6d037e14999c430150f0922469f777e7d35311ab819eb20905b55c00aa58f1c3c8d5f881d173dd441cbd WHIRLPOOL 5751d7285ffd29c041056f15ff6c85f66ecf6b9e806558623716ad8826124e1f92096f0e8b00016158b4a965927bde7e9e5ed48984ee956906175431e8a45ee5 DIST Mail-SpamAssassin-3.4.0.tar.bz2 1065544 SHA256 553b39bae969b4ba20854c0a0fa1eba2a6aa0f4e103b530e0da4e152cdce4714 SHA512 4a04604a0331a9c23cd10d4fb58e5ca5d3e592bbeffacf0f89b379e5b46118f8b1500d671606a2407115f90fb633a713c8ed557f0db155f4645e263175b0946c WHIRLPOOL 401d61a0ab8bd906b14effb0125aeb3b1a87cdd115484b0787410a03208208e6dfb3c7a440c82ff2334c093555ac7e4eae8b9fc735de5e503f1396a172cec927 @@ -28,4 +33,5 @@ EBUILD spamassassin-3.3.2-r5.ebuild 7293 SHA256 cab38d2618ac8d6747ed003455d9af30 EBUILD spamassassin-3.4.0-r1.ebuild 6800 SHA256 d01fa61ca02e0d061046444c565f77fd060853050fd46b306ffdd2bd7d6a3485 SHA512 58e0b4300a0ac521d452c0021ff86c62a62150cabcfc3e7057e55786c2b559ee9979170eca0d1b5b8fd9d40454d9e433f26626f770c913d80a66e797081806f6 WHIRLPOOL 6ce6380e07a84b859e11e3db323b849107519bbdcaa2cbcf1dd08a1bf4a56b9d7f9d168112c1d6dd0265366440c20837a75f2b2f5f62a179acdc58fe9e4991f4 EBUILD spamassassin-3.4.0.ebuild 6800 SHA256 2f69ed9b6936e9c21de4b1ad94d24fe4f1c204ff9b2aea9dea7ffc2a5e47722a SHA512 7f19cd571d35443af256cc33e16de16f4e2fb25c000b8f8d34ec3484f5889529ff4dcf70aca6875bf1db076b5a3155aef4e5cbaad04b7a708a885ebeb1a475a5 WHIRLPOOL 47ee32346e15c1d50416466ac7c13aa0641d6a94c077502db6de444e6f6da5b66cc38594ba84417ee227c67322f7fc8fbe508997c41d8fe9b8c0253a59f9f423 EBUILD spamassassin-3.4.1-r16.ebuild 7482 SHA256 04cd38e0b4eea45728c9c9fc46ebfdf8cde0574b710011d836fa9e451a7cc4f9 SHA512 abefa539f14eba178db60aaba95d504627dfcd19b40e996d35f3f451c99ca1ed811b51501d60b473ccaea795c3ed34bd44088117a1dab7fb9d24b583f319cc9e WHIRLPOOL a4d22acfd782bb3598e3d4edfbd101fd477f282cd8127f2696ea37843486e686dcacb56aa719aba4fdbfe2e1b4bcdf177bdd559443d85b1c5b46d6f0ce08a89e +EBUILD spamassassin-3.4.1-r19.ebuild 7911 SHA256 c00714d5987c1dc29ef776ba280a2816e209e71f59eb977d28c2fb9c518844b4 SHA512 3ffb7da3ed0913b18c8a60bc5b8fec70a7e9082449ae42d8762c30c4189848119b2fba43c988a4407a1494b319797c92a38d714c1b71a9574ebab5a7c073fdb9 WHIRLPOOL a99966b052f71421ae05b4b467ef8137b9dcaca928d8f8f6d69ce78bfee15a6e8139e6a4b299dcfa875c2a814d3166a1723bbe318a9c63582a2034f73694d266 EBUILD spamassassin-3.4.1-r8.ebuild 7064 SHA256 106b5b91532686121a09786be9fdf3d86eaa64539e9d54f642ae85f8145f98e4 SHA512 81616b5cfc885d76a243d0b45edcb403ca63c3b040ecfa09c12c43be57c88f92672720949cf5bb485045b50b8327d3cf9872b6b9bb5a3bd441c157b98181b2b2 WHIRLPOOL 9e29533db7ce2780365af83cbef2725ca2cecf7f64d17414c022b6684a568dcb1d76e0ff48f9e8776b7e1de67b59a925fbe2c83c77ef901141af8d51c7c2027c 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 00000000..b7b46f32 --- /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 00000000..1c226542 --- /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="/var/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 00000000..525bf75c --- /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 00000000..b539cd2b --- /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 00000000..442dde44 --- /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 00000000..21d5bff1 --- /dev/null +++ b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild @@ -0,0 +1,253 @@ +# 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" +) + +pkg_setup() { + # The spamd daemon runs as this user. Use a real home directory so + # that it can hold SA configuration. + enewuser spamd -1 -1 /var/lib/spamassassin +} + +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 + fowners spamd /var/lib/spamassassin + fperms 0770 /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_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.' +} |