Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/, mail-filter/spamassassin/files/
Date: Tue, 11 Dec 2018 10:19:43
Message-Id: 1544523570.dc7e9cb73adc438aa7fc4c7b8ea090f9d9cdcd14.zlogene@gentoo
1 commit: dc7e9cb73adc438aa7fc4c7b8ea090f9d9cdcd14
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 11 10:19:10 2018 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 11 10:19:30 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc7e9cb7
7
8 mail-filter/spamassassin: Security cleanup
9
10 Bug: https://bugs.gentoo.org/666348
11 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13
14 mail-filter/spamassassin/Manifest | 1 -
15 .../files/spamassassin-3.4.1-bug_7199.patch | 280 ------------
16 .../files/spamassassin-3.4.1-bug_7208.patch | 31 --
17 .../files/spamassassin-3.4.1-bug_7223.patch | 14 -
18 .../files/spamassassin-3.4.1-bug_7231-extra.patch | 140 ------
19 .../files/spamassassin-3.4.1-bug_7231.patch | 29 --
20 .../files/spamassassin-3.4.1-bug_7265.patch | 88 ----
21 .../files/spamassassin-3.4.1-bug_7361.patch | 491 ---------------------
22 .../files/spamassassin-3.4.1-bug_7404.patch | 23 -
23 .../files/spamassassin-3.4.1-bug_7462.patch | 198 ---------
24 .../files/spamassassin-3.4.1-perl526.patch | 14 -
25 .../spamassassin/spamassassin-3.4.1-r19.ebuild | 251 -----------
26 .../spamassassin/spamassassin-3.4.1-r20.ebuild | 251 -----------
27 .../spamassassin/spamassassin-3.4.1-r21.ebuild | 252 -----------
28 14 files changed, 2063 deletions(-)
29
30 diff --git a/mail-filter/spamassassin/Manifest b/mail-filter/spamassassin/Manifest
31 index 6b7489e6f21..cd12a63fe12 100644
32 --- a/mail-filter/spamassassin/Manifest
33 +++ b/mail-filter/spamassassin/Manifest
34 @@ -1,2 +1 @@
35 -DIST Mail-SpamAssassin-3.4.1.tar.bz2 2710985 BLAKE2B f85b0ed2bae783bc6dfa39df36589a6cb90e6c657efcff1fa094f952847e4bcb24aa232b6689804bb1170204ae1d33216ed9bde207d7a7a6863410d8f847c391 SHA512 91d50e2ce6520e3e1c7bc66da133a0815be34ced15e26b6e6c17af5a03d5c62f41d8086f25f65084d6634497148cf5439977d7d4a44d7c3e307535beac6629af
36 DIST Mail-SpamAssassin-3.4.2.tar.bz2 2700016 BLAKE2B a29b4cfce5e578c07ec54b2224191917dc45bcefff071f674c572fc905f1d6324827bcc21c338546bdea11140fc20474a16314218e2fd4fa685965b0e0078df8 SHA512 fe3d9d1d7b9fed3063549afd071066729f1f4d998be91ded1e5afc29bb37c7a298dc5f8f99a282b75435d317b5b5072a81393134ccfe059a73d953e26a9c3885
37
38 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch
39 deleted file mode 100644
40 index 323740cbb04..00000000000
41 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7199.patch
42 +++ /dev/null
43 @@ -1,280 +0,0 @@
44 -The "sslv3" option doesn't do what it says (upstream bug 7093) and
45 -only makes things worse. The SSLv3 support also prevents SpamAssassin
46 -from working with LibreSSL, which no longer does SSLv3.
47 -
48 -Index: trunk/spamc/libspamc.c
49 -===================================================================
50 ---- trunk.orig/spamc/libspamc.c
51 -+++ trunk/spamc/libspamc.c
52 -@@ -1187,7 +1187,7 @@ int message_filter(struct transport *tp,
53 - unsigned int throwaway;
54 - SSL_CTX *ctx = NULL;
55 - SSL *ssl = NULL;
56 -- SSL_METHOD *meth;
57 -+ const SSL_METHOD *meth;
58 - char zlib_on = 0;
59 - unsigned char *zlib_buf = NULL;
60 - int zlib_bufsiz = 0;
61 -@@ -1213,11 +1213,7 @@ int message_filter(struct transport *tp,
62 - if (flags & SPAMC_USE_SSL) {
63 - #ifdef SPAMC_SSL
64 - SSLeay_add_ssl_algorithms();
65 -- if (flags & SPAMC_TLSV1) {
66 -- meth = TLSv1_client_method();
67 -- } else {
68 -- meth = SSLv3_client_method(); /* default */
69 -- }
70 -+ meth = SSLv23_client_method();
71 - SSL_load_error_strings();
72 - ctx = SSL_CTX_new(meth);
73 - #else
74 -@@ -1596,7 +1592,7 @@ int message_tell(struct transport *tp, c
75 - int failureval;
76 - SSL_CTX *ctx = NULL;
77 - SSL *ssl = NULL;
78 -- SSL_METHOD *meth;
79 -+ const SSL_METHOD *meth;
80 -
81 - assert(tp != NULL);
82 - assert(m != NULL);
83 -@@ -1604,7 +1600,7 @@ int message_tell(struct transport *tp, c
84 - if (flags & SPAMC_USE_SSL) {
85 - #ifdef SPAMC_SSL
86 - SSLeay_add_ssl_algorithms();
87 -- meth = SSLv3_client_method();
88 -+ meth = SSLv23_client_method();
89 - SSL_load_error_strings();
90 - ctx = SSL_CTX_new(meth);
91 - #else
92 -Index: trunk/spamc/spamc.c
93 -===================================================================
94 ---- trunk.orig/spamc/spamc.c
95 -+++ trunk/spamc/spamc.c
96 -@@ -368,16 +368,11 @@ read_args(int argc, char **argv,
97 - case 'S':
98 - {
99 - flags |= SPAMC_USE_SSL;
100 -- if (!spamc_optarg || (strcmp(spamc_optarg,"sslv3") == 0)) {
101 -- flags |= SPAMC_SSLV3;
102 -- }
103 -- else if (strcmp(spamc_optarg,"tlsv1") == 0) {
104 -- flags |= SPAMC_TLSV1;
105 -- }
106 -- else {
107 -- libspamc_log(flags, LOG_ERR, "Please specify a legal ssl version (%s)", spamc_optarg);
108 -- ret = EX_USAGE;
109 -- }
110 -+ if(spamc_optarg) {
111 -+ libspamc_log(flags, LOG_ERR,
112 -+ "Explicit specification of an SSL/TLS version no longer supported.");
113 -+ ret = EX_USAGE;
114 -+ }
115 - break;
116 - }
117 - #endif
118 -Index: trunk/spamd/spamd.raw
119 -===================================================================
120 ---- trunk.orig/spamd/spamd.raw
121 -+++ trunk/spamd/spamd.raw
122 -@@ -409,7 +409,6 @@ GetOptions(
123 - 'sql-config!' => \$opt{'sql-config'},
124 - 'ssl' => \$opt{'ssl'},
125 - 'ssl-port=s' => \$opt{'ssl-port'},
126 -- 'ssl-version=s' => \$opt{'ssl-version'},
127 - 'syslog-socket=s' => \$opt{'syslog-socket'},
128 - 'syslog|s=s' => \$opt{'syslog'},
129 - 'log-timestamp-fmt:s' => \$opt{'log-timestamp-fmt'},
130 -@@ -744,11 +743,6 @@ if ( defined $ENV{'HOME'} ) {
131 -
132 - # Do whitelist later in tmp dir. Side effect: this will be done as -u user.
133 -
134 --my $sslversion = $opt{'ssl-version'} || 'sslv3';
135 --if ($sslversion !~ /^(?:sslv3|tlsv1)$/) {
136 -- die "spamd: invalid ssl-version: $opt{'ssl-version'}\n";
137 --}
138 --
139 - $opt{'server-key'} ||= "$LOCAL_RULES_DIR/certs/server-key.pem";
140 - $opt{'server-cert'} ||= "$LOCAL_RULES_DIR/certs/server-cert.pem";
141 -
142 -@@ -899,9 +893,8 @@ sub compose_listen_info_string {
143 - $socket_info->{ip_addr}, $socket_info->{port}));
144 -
145 - } elsif ($socket->isa('IO::Socket::SSL')) {
146 -- push(@listeninfo, sprintf("SSL [%s]:%s, ssl version %s",
147 -- $socket_info->{ip_addr}, $socket_info->{port},
148 -- $opt{'ssl-version'}||'sslv3'));
149 -+ push(@listeninfo, sprintf("SSL [%r]:%s", $socket_info->{ip_addr},
150 -+ $socket_info->{port}));
151 - }
152 - }
153 -
154 -@@ -1072,7 +1065,6 @@ sub server_sock_setup_inet {
155 - $sockopt{V6Only} = 1 if $io_socket_module_name eq 'IO::Socket::IP'
156 - && IO::Socket::IP->VERSION >= 0.09;
157 - %sockopt = (%sockopt, (
158 -- SSL_version => $sslversion,
159 - SSL_verify_mode => 0x00,
160 - SSL_key_file => $opt{'server-key'},
161 - SSL_cert_file => $opt{'server-cert'},
162 -@@ -1093,7 +1085,8 @@ sub server_sock_setup_inet {
163 - if (!$server_inet) {
164 - $diag = sprintf("could not create %s socket on [%s]:%s: %s",
165 - $ssl ? 'IO::Socket::SSL' : $io_socket_module_name,
166 -- $adr, $port, $!);
167 -+ $adr, $port, $ssl && $IO::Socket::SSL::SSL_ERROR ?
168 -+ "$!,$IO::Socket::SSL::SSL_ERROR" : $!);
169 - push(@diag_fail, $diag);
170 - } else {
171 - $diag = sprintf("created %s socket on [%s]:%s",
172 -@@ -3238,7 +3231,6 @@ Options:
173 - -H [dir], --helper-home-dir[=dir] Specify a different HOME directory
174 - --ssl Enable SSL on TCP connections
175 - --ssl-port port Override --port setting for SSL connections
176 -- --ssl-version sslversion Specify SSL protocol version to use
177 - --server-key keyfile Specify an SSL keyfile
178 - --server-cert certfile Specify an SSL certificate
179 - --socketpath=path Listen on a given UNIX domain socket
180 -@@ -3727,14 +3719,6 @@ Optionally specifies the port number for
181 - SSL connections (default: whatever --port uses). See B<--ssl> for
182 - more details.
183 -
184 --=item B<--ssl-version>=I<sslversion>
185 --
186 --Specify the SSL protocol version to use, one of B<sslv3> or B<tlsv1>.
187 --The default, B<sslv3>, is the most flexible, accepting a SSLv3 or
188 --higher hello handshake, then negotiating use of SSLv3 or TLSv1
189 --protocol if the client can accept it. Specifying B<--ssl-version>
190 --implies B<--ssl>.
191 --
192 - =item B<--server-key> I<keyfile>
193 -
194 - Specify the SSL key file to use for SSL connections.
195 -Index: trunk/spamc/spamc.pod
196 -===================================================================
197 ---- trunk.orig/spamc/spamc.pod
198 -+++ trunk/spamc/spamc.pod
199 -@@ -177,12 +177,10 @@ The default is 1 time (ie. one attempt a
200 - Sleep for I<sleep> seconds between failed spamd filtering attempts.
201 - The default is 1 second.
202 -
203 --=item B<-S>, B<--ssl>, B<--ssl>=I<sslversion>
204 -+=item B<-S>, B<--ssl>, B<--ssl>
205 -
206 - If spamc was built with support for SSL, encrypt data to and from the
207 - spamd process with SSL; spamd must support SSL as well.
208 --I<sslversion> specifies the SSL protocol version to use, either
209 --C<sslv3>, or C<tlsv1>. The default, is C<sslv3>.
210 -
211 - =item B<-t> I<timeout>, B<--timeout>=I<timeout>
212 -
213 -Index: trunk/t/spamd_ssl_tls.t
214 -===================================================================
215 ---- trunk.orig/t/spamd_ssl_tls.t
216 -+++ /dev/null
217 -@@ -1,28 +0,0 @@
218 --#!/usr/bin/perl
219 --
220 --use lib '.'; use lib 't';
221 --use SATest; sa_t_init("spamd_ssl_tls");
222 --use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
223 --
224 --exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
225 --
226 --# ---------------------------------------------------------------------------
227 --
228 --%patterns = (
229 --
230 --q{ Return-Path: sb55sb55@×××××.com}, 'firstline',
231 --q{ Subject: There yours for FREE!}, 'subj',
232 --q{ X-Spam-Status: Yes, score=}, 'status',
233 --q{ X-Spam-Flag: YES}, 'flag',
234 --q{ X-Spam-Level: **********}, 'stars',
235 --q{ TEST_ENDSNUMS}, 'endsinnums',
236 --q{ TEST_NOREALNAME}, 'noreal',
237 --q{ This must be the very last line}, 'lastline',
238 --
239 --
240 --);
241 --
242 --ok (sdrun ("-L --ssl --ssl-version=tlsv1 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
243 -- "--ssl=tlsv1 < data/spam/001",
244 -- \&patterns_run_cb));
245 --ok_all_patterns();
246 -Index: trunk/t/spamd_ssl_v3.t
247 -===================================================================
248 ---- trunk.orig/t/spamd_ssl_v3.t
249 -+++ /dev/null
250 -@@ -1,28 +0,0 @@
251 --#!/usr/bin/perl
252 --
253 --use lib '.'; use lib 't';
254 --use SATest; sa_t_init("spamd_sslv3");
255 --use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
256 --
257 --exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
258 --
259 --# ---------------------------------------------------------------------------
260 --
261 --%patterns = (
262 --
263 --q{ Return-Path: sb55sb55@×××××.com}, 'firstline',
264 --q{ Subject: There yours for FREE!}, 'subj',
265 --q{ X-Spam-Status: Yes, score=}, 'status',
266 --q{ X-Spam-Flag: YES}, 'flag',
267 --q{ X-Spam-Level: **********}, 'stars',
268 --q{ TEST_ENDSNUMS}, 'endsinnums',
269 --q{ TEST_NOREALNAME}, 'noreal',
270 --q{ This must be the very last line}, 'lastline',
271 --
272 --
273 --);
274 --
275 --ok (sdrun ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert",
276 -- "--ssl=sslv3 < data/spam/001",
277 -- \&patterns_run_cb));
278 --ok_all_patterns();
279 -Index: trunk/t/spamd_ssl_accept_fail.t
280 -===================================================================
281 ---- trunk.orig/t/spamd_ssl_accept_fail.t
282 -+++ trunk/t/spamd_ssl_accept_fail.t
283 -@@ -23,9 +23,9 @@ q{ This must be the very last line}, 'la
284 -
285 - );
286 -
287 --ok (start_spamd ("-L --ssl --ssl-version=sslv3 --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
288 -+ok (start_spamd ("-L --ssl --server-key data/etc/testhost.key --server-cert data/etc/testhost.cert"));
289 - ok (spamcrun ("< data/spam/001", \&patterns_run_cb));
290 --ok (spamcrun ("--ssl=sslv3 < data/spam/001", \&patterns_run_cb));
291 -+ok (spamcrun ("--ssl < data/spam/001", \&patterns_run_cb));
292 - ok (stop_spamd ());
293 -
294 - ok_all_patterns();
295 -Index: trunk/t/spamd_ssl.t
296 -===================================================================
297 ---- trunk.orig/t/spamd_ssl.t
298 -+++ trunk/t/spamd_ssl.t
299 -@@ -2,10 +2,7 @@
300 -
301 - use lib '.'; use lib 't';
302 - use SATest; sa_t_init("spamd_ssl");
303 --use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9),
304 -- onfail => sub {
305 -- warn "\n\nNote: This may not be a SpamAssassin bug, as some platforms require that you" .
306 -- "\nspecify a protocol in spamc --ssl option, and possibly in spamd --ssl-version.\n\n" };
307 -+use Test; plan tests => (($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE) ? 0 : 9);
308 -
309 - exit if ($SKIP_SPAMD_TESTS || !$SSL_AVAILABLE);
310 -
311 -Index: trunk/MANIFEST
312 -===================================================================
313 ---- trunk.orig/MANIFEST
314 -+++ trunk/MANIFEST
315 -@@ -513,8 +513,6 @@ t/spamd_report_ifspam.t
316 - t/spamd_sql_prefs.t
317 - t/spamd_ssl.t
318 - t/spamd_ssl_accept_fail.t
319 --t/spamd_ssl_tls.t
320 --t/spamd_ssl_v3.t
321 - t/spamd_stop.t
322 - t/spamd_symbols.t
323 - t/spamd_syslog.t
324
325 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7208.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7208.patch
326 deleted file mode 100644
327 index da97e3ee56f..00000000000
328 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7208.patch
329 +++ /dev/null
330 @@ -1,31 +0,0 @@
331 -https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7208
332 -https://bugs.gentoo.org/650638
333 ---- a/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm 2015/06/10 12:15:22 1684652
334 -+++ a/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm 2015/06/10 12:18:50 1684653
335 -@@ -350,7 +350,7 @@
336 - # look for W3 links only
337 - next unless (defined $info->{types}->{a});
338 -
339 -- while (my($host, $domain) = each $info->{hosts}) {
340 -+ while (my($host, $domain) = each %{$info->{hosts}}) {
341 -
342 - # skip if the domain name was matched
343 - if (exists $rule->{exclusions} && exists $rule->{exclusions}->{$domain}) {
344 -@@ -374,7 +374,7 @@
345 - }
346 -
347 - if (exists $rule->{countries}) {
348 -- dbg("check: uri_local_bl countries %s\n", join(' ', sort keys $rule->{countries}));
349 -+ dbg("check: uri_local_bl countries %s\n", join(' ', sort keys %{$rule->{countries}}));
350 -
351 - my $cc = $self->{geoip}->country_code_by_addr($ip);
352 -
353 -@@ -403,7 +403,7 @@
354 - }
355 -
356 - if (exists $rule->{isps}) {
357 -- dbg("check: uri_local_bl isps %s\n", join(' ', map { '"' . $_ . '"'; } sort keys $rule->{isps}));
358 -+ dbg("check: uri_local_bl isps %s\n", join(' ', map { '"' . $_ . '"'; } sort keys %{$rule->{isps}}));
359 -
360 - my $isp = $self->{geoisp}->isp_by_name($ip);
361 -
362
363 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7223.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7223.patch
364 deleted file mode 100644
365 index 0fea1f9cdbd..00000000000
366 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7223.patch
367 +++ /dev/null
368 @@ -1,14 +0,0 @@
369 -# Fix for Gentoo bug 579222 (SpamAssassin bug 7223).
370 -
371 ---- a/lib/Mail/SpamAssassin/DnsResolver.pm 2015/07/20 18:23:18 1691991
372 -+++ b/lib/Mail/SpamAssassin/DnsResolver.pm 2015/07/20 18:24:48 1691992
373 -@@ -592,6 +592,9 @@
374 - };
375 -
376 - if ($packet) {
377 -+ # RD flag needs to be set explicitly since Net::DNS 1.01, Bug 7223
378 -+ $packet->header->rd(1);
379 -+
380 - # my $udp_payload_size = $self->{res}->udppacketsize;
381 - my $udp_payload_size = $self->{conf}->{dns_options}->{edns};
382 - if ($udp_payload_size && $udp_payload_size > 512) {
383
384 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch
385 deleted file mode 100644
386 index 81c73866858..00000000000
387 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231-extra.patch
388 +++ /dev/null
389 @@ -1,140 +0,0 @@
390 -This should fix bug 7338, but the related commits were backported to
391 -the 3.4 branch as part of SpamAssassin bug 7231 (comment 13).
392 -
393 ---- a/lib/Mail/SpamAssassin/Dns.pm 2017/04/16 06:19:30 1791572
394 -+++ b/lib/Mail/SpamAssassin/Dns.pm 2017/04/16 07:28:59 1791573
395 -@@ -171,7 +171,7 @@
396 - if (substr($rule, 0, 2) eq "__") {
397 - # don't bother with meta rules
398 - } elsif ($answer->type eq 'TXT') {
399 -- # txtdata returns a non- zone-file-format encoded result, unlike rdatastr;
400 -+ # txtdata returns a non- zone-file-format encoded result, unlike rdstring;
401 - # avoid space-separated RDATA <character-string> fields if possible,
402 - # txtdata provides a list of strings in a list context since Net::DNS 0.69
403 - $log = join('',$answer->txtdata);
404 -@@ -215,11 +215,13 @@
405 -
406 - my $qname = $question->qname;
407 -
408 -- # txtdata returns a non- zone-file-format encoded result, unlike rdatastr;
409 -+ # txtdata returns a non- zone-file-format encoded result, unlike rdstring;
410 - # avoid space-separated RDATA <character-string> fields if possible,
411 - # txtdata provides a list of strings in a list context since Net::DNS 0.69
412 - #
413 -+ # rdatastr() is historical/undocumented, use rdstring() since Net::DNS 0.69
414 - my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata)
415 -+ : $answer->UNIVERSAL::can('rdstring') ? $answer->rdstring
416 - : $answer->rdatastr;
417 - if (defined $qname && defined $rdatastr) {
418 - my $qclass = $question->qclass;
419 -@@ -267,8 +269,13 @@
420 - my $answ_type = $answer->type;
421 - # TODO: there are some CNAME returns that might be useful
422 - next if ($answ_type ne 'A' && $answ_type ne 'TXT');
423 -- # skip any A record that isn't on 127/8
424 -- next if ($answ_type eq 'A' && $answer->rdatastr !~ /^127\./);
425 -+ if ($answ_type eq 'A') {
426 -+ # Net::DNS::RR::A::address() is available since Net::DNS 0.69
427 -+ my $ip_address = $answer->UNIVERSAL::can('address') ? $answer->address
428 -+ : $answer->rdatastr;
429 -+ # skip any A record that isn't on 127.0.0.0/8
430 -+ next if $ip_address !~ /^127\./;
431 -+ }
432 - for my $rule (@{$rules}) {
433 - $self->dnsbl_hit($rule, $question, $answer);
434 - }
435 -@@ -284,11 +291,13 @@
436 - sub process_dnsbl_set {
437 - my ($self, $set, $question, $answer) = @_;
438 -
439 -- # txtdata returns a non- zone-file-format encoded result, unlike rdatastr;
440 -+ # txtdata returns a non- zone-file-format encoded result, unlike rdstring;
441 - # avoid space-separated RDATA <character-string> fields if possible,
442 - # txtdata provides a list of strings in a list context since Net::DNS 0.69
443 - #
444 -- my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata)
445 -+ # rdatastr() is historical/undocumented, use rdstring() since Net::DNS 0.69
446 -+ my $rdatastr = $answer->UNIVERSAL::can('txtdata') ? join('',$answer->txtdata)
447 -+ : $answer->UNIVERSAL::can('rdstring') ? $answer->rdstring
448 - : $answer->rdatastr;
449 -
450 - while (my ($subtest, $rule) = each %{ $self->{dnspost}->{$set} }) {
451 ---- a/lib/Mail/SpamAssassin/Plugin/AskDNS.pm 2017/04/16 06:19:30 1791572
452 -+++ b/lib/Mail/SpamAssassin/Plugin/AskDNS.pm 2017/04/16 07:28:59 1791573
453 -@@ -140,7 +140,7 @@
454 - multiple character-strings (as defined in Section 3.3 of [RFC1035]), these
455 - strings are concatenated with no delimiters before comparing the result
456 - to the filtering string. This follows requirements of several documents,
457 --such as RFC 5518, RFC 4408, RFC 4871, RFC 5617. Examples of a plain text
458 -+such as RFC 5518, RFC 7208, RFC 4871, RFC 5617. Examples of a plain text
459 - filtering parameter: "127.0.0.1", "transaction", 'list' .
460 -
461 - A regular expression follows a familiar perl syntax like /.../ or m{...}
462 -@@ -539,7 +539,7 @@
463 - @answer = ( undef );
464 - }
465 -
466 -- # NOTE: $rr->rdatastr returns the result encoded in a DNS zone file
467 -+ # NOTE: $rr->rdstring returns the result encoded in a DNS zone file
468 - # format, i.e. enclosed in double quotes if a result contains whitespace
469 - # (or other funny characters), and may use \DDD encoding or \X quoting as
470 - # per RFC 1035. Using $rr->txtdata instead avoids this unnecessary encoding
471 -@@ -566,19 +566,26 @@
472 - # special case, no answer records, only rcode can be tested
473 - } else {
474 - $rr_type = uc $rr->type;
475 -- if ($rr->UNIVERSAL::can('txtdata')) { # TXT, SPF
476 -- # join with no intervening spaces, as per RFC 5518
477 -+ if ($rr_type eq 'A') {
478 -+ # Net::DNS::RR::A::address() is available since Net::DNS 0.69
479 -+ $rr_rdatastr = $rr->UNIVERSAL::can('address') ? $rr->address
480 -+ : $rr->rdatastr;
481 -+ if ($rr_rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) {
482 -+ $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rr_rdatastr);
483 -+ }
484 -+
485 -+ } elsif ($rr->UNIVERSAL::can('txtdata')) {
486 -+ # TXT, SPF: join with no intervening spaces, as per RFC 5518
487 - if ($txtdata_can_provide_a_list || $rr_type ne 'TXT') {
488 - $rr_rdatastr = join('', $rr->txtdata); # txtdata() in list context!
489 - } else { # char_str_list() is only available for TXT records
490 - $rr_rdatastr = join('', $rr->char_str_list); # historical
491 - }
492 - } else {
493 -- $rr_rdatastr = $rr->rdatastr;
494 -- if ($rr_type eq 'A' &&
495 -- $rr_rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) {
496 -- $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rr_rdatastr);
497 -- }
498 -+ # rdatastr() is historical, use rdstring() since Net::DNS 0.69
499 -+ $rr_rdatastr = $rr->UNIVERSAL::can('rdstring') ? $rr->rdstring
500 -+ : $rr->rdatastr;
501 -+ utf8::encode($rr_rdatastr) if utf8::is_utf8($rr_rdatastr);
502 - }
503 - # dbg("askdns: received rr type %s, data: %s", $rr_type, $rr_rdatastr);
504 - }
505 ---- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm 2017/04/16 06:19:30 1791572
506 -+++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm 2017/04/16 07:28:59 1791573
507 -@@ -1009,10 +1009,9 @@
508 - dbg("uridnsbl: complete_a_lookup aborted %s", $ent->{key});
509 - return;
510 - }
511 --
512 - dbg("uridnsbl: complete_a_lookup %s", $ent->{key});
513 -- my @answer = $pkt->answer;
514 - my $j = 0;
515 -+ my @answer = $pkt->answer;
516 - foreach my $rr (@answer) {
517 - $j++;
518 - my $str = $rr->string;
519 -@@ -1099,7 +1098,9 @@
520 - my $rr_type = $rr->type;
521 -
522 - if ($rr_type eq 'A') {
523 -- $rdatastr = $rr->rdatastr;
524 -+ # Net::DNS::RR::A::address() is available since Net::DNS 0.69
525 -+ $rdatastr = $rr->UNIVERSAL::can('address') ? $rr->address
526 -+ : $rr->rdatastr;
527 - if ($rdatastr =~ m/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) {
528 - $rdatanum = Mail::SpamAssassin::Util::my_inet_aton($rdatastr);
529 - }
530
531 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch
532 deleted file mode 100644
533 index 0d6e43abb6d..00000000000
534 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7231.patch
535 +++ /dev/null
536 @@ -1,29 +0,0 @@
537 -# Fix for Gentoo bug 579222 (SpamAssassin bug 7231).
538 -
539 ---- a/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm (revision 1694052)
540 -+++ b/lib/Mail/SpamAssassin/Plugin/URIDNSBL.pm (working copy)
541 -@@ -942,9 +942,8 @@
542 - next unless (defined($str) && defined($dom));
543 - dbg("uridnsbl: got($j) NS for $dom: $str");
544 -
545 -- if ($str =~ /IN\s+NS\s+(\S+)/) {
546 -- my $nsmatch = lc $1;
547 -- $nsmatch =~ s/\.$//;
548 -+ if ($rr->type eq 'NS') {
549 -+ my $nsmatch = lc $rr->nsdname; # available since at least Net::DNS 0.14
550 - my $nsrhblstr = $nsmatch;
551 - my $fullnsrhblstr = $nsmatch;
552 -
553 -@@ -1025,9 +1024,9 @@
554 - }
555 - dbg("uridnsbl: complete_a_lookup got(%d) A for %s: %s", $j,$hname,$str);
556 -
557 -- local $1;
558 -- if ($str =~ /IN\s+A\s+(\S+)/) {
559 -- $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $1);
560 -+ if ($rr->type eq 'A') {
561 -+ my $ip_address = $rr->rdatastr;
562 -+ $self->lookup_dnsbl_for_ip($pms, $ent->{obj}, $ip_address);
563 - }
564 - }
565 - }
566
567 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch
568 deleted file mode 100644
569 index f4fc4bcc718..00000000000
570 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7265.patch
571 +++ /dev/null
572 @@ -1,88 +0,0 @@
573 -# Fix for Gentoo bug 579222 (SpamAssassin bug 7265).
574 -# Two different revisions from that bug have been concatenated
575 -# together into this patch.
576 -
577 ---- a/lib/Mail/SpamAssassin/DnsResolver.pm 2015/11/19 15:23:56 1715196
578 -+++ b/lib/Mail/SpamAssassin/DnsResolver.pm 2015/11/19 15:31:49 1715197
579 -@@ -725,6 +725,37 @@
580 -
581 - ###########################################################################
582 -
583 -+=item $id = $res->bgread()
584 -+
585 -+Similar to C<Net::DNS::Resolver::bgread>. Reads a DNS packet from
586 -+a supplied socket, decodes it, and returns a Net::DNS::Packet object
587 -+if successful. Dies on error.
588 -+
589 -+=cut
590 -+
591 -+sub bgread() {
592 -+ my ($self) = @_;
593 -+ my $sock = $self->{sock};
594 -+ my $packetsize = $self->{res}->udppacketsize;
595 -+ $packetsize = 512 if $packetsize < 512; # just in case
596 -+ my $data = '';
597 -+ my $peeraddr = $sock->recv($data, $packetsize+256); # with some size margin for troubleshooting
598 -+ defined $peeraddr or die "bgread: recv() failed: $!";
599 -+ my $peerhost = $sock->peerhost;
600 -+ $data ne '' or die "bgread: received empty packet from $peerhost";
601 -+ dbg("dns: bgread: received %d bytes from %s", length($data), $peerhost);
602 -+ my($answerpkt, $decoded_length) = Net::DNS::Packet->new(\$data);
603 -+ $answerpkt or die "bgread: decoding DNS packet failed: $@";
604 -+ $answerpkt->answerfrom($peerhost);
605 -+ if ($decoded_length ne length($data)) {
606 -+ warn sprintf("bgread: received a %d bytes packet from %s, decoded %d bytes\n",
607 -+ length($data), $peerhost, $decoded_length);
608 -+ }
609 -+ return $answerpkt;
610 -+}
611 -+
612 -+###########################################################################
613 -+
614 - =item $nfound = $res->poll_responses()
615 -
616 - See if there are any C<bgsend> reply packets ready, and return
617 -@@ -772,13 +803,25 @@
618 - $timeout = 0; # next time around collect whatever is available, then exit
619 - last if $nfound == 0;
620 -
621 -- my $packet = $self->{res}->bgread($self->{sock});
622 -+ my $packet;
623 -+ eval {
624 -+ $packet = $self->bgread();
625 -+ } or do {
626 -+ undef $packet;
627 -+ my $eval_stat = $@ ne '' ? $@ : "errno=$!"; chomp $eval_stat;
628 -+ # resignal if alarm went off
629 -+ die $eval_stat if $eval_stat =~ /__alarm__ignore__\(.*\)/s;
630 -+ info("dns: bad dns reply: %s", $eval_stat);
631 -+ };
632 -+
633 -+# Bug 7265, use our own bgread()
634 -+# my $packet = $self->{res}->bgread($self->{sock});
635 -
636 - if (!$packet) {
637 -- my $dns_err = $self->{res}->errorstring;
638 -- # resignal if alarm went off
639 -- die "dns (3) $dns_err\n" if $dns_err =~ /__alarm__ignore__\(.*\)/s;
640 -- info("dns: bad dns reply: $dns_err");
641 -+ # error already reported above
642 -+# my $dns_err = $self->{res}->errorstring;
643 -+# die "dns (3) $dns_err\n" if $dns_err =~ /__alarm__ignore__\(.*\)/s;
644 -+# info("dns: bad dns reply: $dns_err");
645 - } else {
646 - my $header = $packet->header;
647 - if (!$header) {
648 -
649 ---- a/lib/Mail/SpamAssassin/Plugin/DKIM.pm 2015/11/19 19:20:06 1715247
650 -+++ b/lib/Mail/SpamAssassin/Plugin/DKIM.pm 2015/11/19 19:22:25 1715248
651 -@@ -793,7 +793,8 @@
652 - # Only do so if EDNS0 provides a reasonably-sized UDP payload size,
653 - # as our interface does not provide a DNS fallback to TCP, unlike
654 - # the Net::DNS::Resolver::send which does provide it.
655 -- my $res = $self->{main}->{resolver}->get_resolver;
656 -+ my $res = $self->{main}->{resolver};
657 -+ dbg("dkim: providing our own resolver: %s", ref $res);
658 - Mail::DKIM::DNS::resolver($res);
659 - }
660 - }
661
662 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
663 deleted file mode 100644
664 index 525bf75c7fe..00000000000
665 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7361.patch
666 +++ /dev/null
667 @@ -1,491 +0,0 @@
668 -This patch is a modified combination of the patches posted to
669 -
670 - https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7361
671 -
672 -that allow SpamAssassin to build against (and work with) openssl-1.1.x.
673 -Mark Wright (gienah) made the necessary updates to get the patches to
674 -work on Gentoo and solve bug 624858.
675 -
676 -SpamAssassin-bug: 7361
677 -Gentoo-bug: 624858
678 -
679 ---- a/spamc/configure (revision 1767127)
680 -+++ b/spamc/configure (working copy)
681 -@@ -943,7 +943,7 @@
682 - else
683 - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
684 - fi
685 -- cd "$ac_popdir"
686 -+ cd $ac_popdir
687 - done
688 - fi
689 -
690 -@@ -1874,7 +1874,8 @@
691 - cat conftest.err >&5
692 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
693 - (exit $ac_status); } &&
694 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
695 -+ { ac_try='test -z "$ac_c_werror_flag"
696 -+ || test ! -s conftest.err'
697 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
698 - (eval $ac_try) 2>&5
699 - ac_status=$?
700 -@@ -1932,7 +1933,8 @@
701 - cat conftest.err >&5
702 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
703 - (exit $ac_status); } &&
704 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
705 -+ { ac_try='test -z "$ac_c_werror_flag"
706 -+ || test ! -s conftest.err'
707 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
708 - (eval $ac_try) 2>&5
709 - ac_status=$?
710 -@@ -2048,7 +2050,8 @@
711 - cat conftest.err >&5
712 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
713 - (exit $ac_status); } &&
714 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
715 -+ { ac_try='test -z "$ac_c_werror_flag"
716 -+ || test ! -s conftest.err'
717 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
718 - (eval $ac_try) 2>&5
719 - ac_status=$?
720 -@@ -2102,7 +2105,8 @@
721 - cat conftest.err >&5
722 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
723 - (exit $ac_status); } &&
724 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
725 -+ { ac_try='test -z "$ac_c_werror_flag"
726 -+ || test ! -s conftest.err'
727 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
728 - (eval $ac_try) 2>&5
729 - ac_status=$?
730 -@@ -2147,7 +2151,8 @@
731 - cat conftest.err >&5
732 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
733 - (exit $ac_status); } &&
734 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
735 -+ { ac_try='test -z "$ac_c_werror_flag"
736 -+ || test ! -s conftest.err'
737 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
738 - (eval $ac_try) 2>&5
739 - ac_status=$?
740 -@@ -2191,7 +2196,8 @@
741 - cat conftest.err >&5
742 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
743 - (exit $ac_status); } &&
744 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
745 -+ { ac_try='test -z "$ac_c_werror_flag"
746 -+ || test ! -s conftest.err'
747 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
748 - (eval $ac_try) 2>&5
749 - ac_status=$?
750 -@@ -2523,7 +2529,8 @@
751 - cat conftest.err >&5
752 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
753 - (exit $ac_status); } &&
754 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
755 -+ { ac_try='test -z "$ac_c_werror_flag"
756 -+ || test ! -s conftest.err'
757 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
758 - (eval $ac_try) 2>&5
759 - ac_status=$?
760 -@@ -2693,7 +2700,8 @@
761 - cat conftest.err >&5
762 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
763 - (exit $ac_status); } &&
764 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
765 -+ { ac_try='test -z "$ac_c_werror_flag"
766 -+ || test ! -s conftest.err'
767 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
768 - (eval $ac_try) 2>&5
769 - ac_status=$?
770 -@@ -2764,7 +2772,8 @@
771 - cat conftest.err >&5
772 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
773 - (exit $ac_status); } &&
774 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
775 -+ { ac_try='test -z "$ac_c_werror_flag"
776 -+ || test ! -s conftest.err'
777 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
778 - (eval $ac_try) 2>&5
779 - ac_status=$?
780 -@@ -2917,7 +2926,8 @@
781 - cat conftest.err >&5
782 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
783 - (exit $ac_status); } &&
784 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
785 -+ { ac_try='test -z "$ac_c_werror_flag"
786 -+ || test ! -s conftest.err'
787 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
788 - (eval $ac_try) 2>&5
789 - ac_status=$?
790 -@@ -3069,7 +3079,8 @@
791 - cat conftest.err >&5
792 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
793 - (exit $ac_status); } &&
794 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
795 -+ { ac_try='test -z "$ac_c_werror_flag"
796 -+ || test ! -s conftest.err'
797 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
798 - (eval $ac_try) 2>&5
799 - ac_status=$?
800 -@@ -3260,7 +3271,8 @@
801 - cat conftest.err >&5
802 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
803 - (exit $ac_status); } &&
804 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
805 -+ { ac_try='test -z "$ac_c_werror_flag"
806 -+ || test ! -s conftest.err'
807 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
808 - (eval $ac_try) 2>&5
809 - ac_status=$?
810 -@@ -3323,7 +3335,8 @@
811 - cat conftest.err >&5
812 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
813 - (exit $ac_status); } &&
814 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
815 -+ { ac_try='test -z "$ac_c_werror_flag"
816 -+ || test ! -s conftest.err'
817 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
818 - (eval $ac_try) 2>&5
819 - ac_status=$?
820 -@@ -3388,7 +3401,8 @@
821 - cat conftest.err >&5
822 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
823 - (exit $ac_status); } &&
824 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
825 -+ { ac_try='test -z "$ac_c_werror_flag"
826 -+ || test ! -s conftest.err'
827 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
828 - (eval $ac_try) 2>&5
829 - ac_status=$?
830 -@@ -3491,7 +3505,8 @@
831 - cat conftest.err >&5
832 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
833 - (exit $ac_status); } &&
834 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
835 -+ { ac_try='test -z "$ac_c_werror_flag"
836 -+ || test ! -s conftest.err'
837 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
838 - (eval $ac_try) 2>&5
839 - ac_status=$?
840 -@@ -3557,7 +3572,8 @@
841 - cat conftest.err >&5
842 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
843 - (exit $ac_status); } &&
844 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
845 -+ { ac_try='test -z "$ac_c_werror_flag"
846 -+ || test ! -s conftest.err'
847 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
848 - (eval $ac_try) 2>&5
849 - ac_status=$?
850 -@@ -3628,7 +3644,8 @@
851 - cat conftest.err >&5
852 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
853 - (exit $ac_status); } &&
854 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
855 -+ { ac_try='test -z "$ac_c_werror_flag"
856 -+ || test ! -s conftest.err'
857 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
858 - (eval $ac_try) 2>&5
859 - ac_status=$?
860 -@@ -3666,9 +3683,9 @@
861 - SSLLIBS=""
862 - SSLCFLAGS=""
863 - if test yes = "$sa_ssl_enabled"; then
864 -- echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5
865 --echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6
866 --if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then
867 -+ echo "$as_me:$LINENO: checking for CRYPTO_malloc in -lcrypto" >&5
868 -+echo $ECHO_N "checking for CRYPTO_malloc in -lcrypto... $ECHO_C" >&6
869 -+if test "${ac_cv_lib_crypto_CRYPTO_malloc+set}" = set; then
870 - echo $ECHO_N "(cached) $ECHO_C" >&6
871 - else
872 - ac_check_lib_save_LIBS=$LIBS
873 -@@ -3686,11 +3703,11 @@
874 - #endif
875 - /* We use char because int might match the return type of a gcc2
876 - builtin and then its argument prototype would still apply. */
877 --char CRYPTO_lock ();
878 -+char CRYPTO_malloc ();
879 - int
880 - main ()
881 - {
882 --CRYPTO_lock ();
883 -+CRYPTO_malloc ();
884 - ;
885 - return 0;
886 - }
887 -@@ -3704,7 +3721,8 @@
888 - cat conftest.err >&5
889 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
890 - (exit $ac_status); } &&
891 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
892 -+ { ac_try='test -z "$ac_c_werror_flag"
893 -+ || test ! -s conftest.err'
894 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
895 - (eval $ac_try) 2>&5
896 - ac_status=$?
897 -@@ -3716,20 +3734,20 @@
898 - ac_status=$?
899 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
900 - (exit $ac_status); }; }; then
901 -- ac_cv_lib_crypto_CRYPTO_lock=yes
902 -+ ac_cv_lib_crypto_CRYPTO_malloc=yes
903 - else
904 - echo "$as_me: failed program was:" >&5
905 - sed 's/^/| /' conftest.$ac_ext >&5
906 -
907 --ac_cv_lib_crypto_CRYPTO_lock=no
908 -+ac_cv_lib_crypto_CRYPTO_malloc=no
909 - fi
910 - rm -f conftest.err conftest.$ac_objext \
911 - conftest$ac_exeext conftest.$ac_ext
912 - LIBS=$ac_check_lib_save_LIBS
913 - fi
914 --echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5
915 --echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6
916 --if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then
917 -+echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_malloc" >&5
918 -+echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_malloc" >&6
919 -+if test $ac_cv_lib_crypto_CRYPTO_malloc = yes; then
920 - SSLLIBS="-lcrypto $SSLLIBS"
921 - fi
922 -
923 -@@ -3771,7 +3789,8 @@
924 - cat conftest.err >&5
925 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
926 - (exit $ac_status); } &&
927 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
928 -+ { ac_try='test -z "$ac_c_werror_flag"
929 -+ || test ! -s conftest.err'
930 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
931 - (eval $ac_try) 2>&5
932 - ac_status=$?
933 -@@ -3804,7 +3823,7 @@
934 - # before defining SPAMC_SSL check that all its requirements are
935 - # actually available
936 - if test yes = "$ac_cv_header_openssl_crypto_h" && \
937 -- test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \
938 -+ test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \
939 - test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then
940 - SSLCFLAGS="-DSPAMC_SSL"
941 - else
942 -@@ -3854,7 +3873,8 @@
943 - cat conftest.err >&5
944 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
945 - (exit $ac_status); } &&
946 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
947 -+ { ac_try='test -z "$ac_c_werror_flag"
948 -+ || test ! -s conftest.err'
949 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
950 - (eval $ac_try) 2>&5
951 - ac_status=$?
952 -@@ -3927,7 +3947,8 @@
953 - cat conftest.err >&5
954 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
955 - (exit $ac_status); } &&
956 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
957 -+ { ac_try='test -z "$ac_c_werror_flag"
958 -+ || test ! -s conftest.err'
959 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
960 - (eval $ac_try) 2>&5
961 - ac_status=$?
962 -@@ -4000,7 +4021,8 @@
963 - cat conftest.err >&5
964 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
965 - (exit $ac_status); } &&
966 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
967 -+ { ac_try='test -z "$ac_c_werror_flag"
968 -+ || test ! -s conftest.err'
969 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
970 - (eval $ac_try) 2>&5
971 - ac_status=$?
972 -@@ -4073,7 +4095,8 @@
973 - cat conftest.err >&5
974 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
975 - (exit $ac_status); } &&
976 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
977 -+ { ac_try='test -z "$ac_c_werror_flag"
978 -+ || test ! -s conftest.err'
979 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
980 - (eval $ac_try) 2>&5
981 - ac_status=$?
982 -@@ -4182,7 +4205,8 @@
983 - cat conftest.err >&5
984 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
985 - (exit $ac_status); } &&
986 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
987 -+ { ac_try='test -z "$ac_c_werror_flag"
988 -+ || test ! -s conftest.err'
989 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
990 - (eval $ac_try) 2>&5
991 - ac_status=$?
992 -@@ -4246,7 +4270,8 @@
993 - cat conftest.err >&5
994 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
995 - (exit $ac_status); } &&
996 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
997 -+ { ac_try='test -z "$ac_c_werror_flag"
998 -+ || test ! -s conftest.err'
999 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1000 - (eval $ac_try) 2>&5
1001 - ac_status=$?
1002 -@@ -4311,7 +4336,8 @@
1003 - cat conftest.err >&5
1004 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1005 - (exit $ac_status); } &&
1006 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1007 -+ { ac_try='test -z "$ac_c_werror_flag"
1008 -+ || test ! -s conftest.err'
1009 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1010 - (eval $ac_try) 2>&5
1011 - ac_status=$?
1012 -@@ -4368,7 +4394,8 @@
1013 - cat conftest.err >&5
1014 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1015 - (exit $ac_status); } &&
1016 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1017 -+ { ac_try='test -z "$ac_c_werror_flag"
1018 -+ || test ! -s conftest.err'
1019 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1020 - (eval $ac_try) 2>&5
1021 - ac_status=$?
1022 -@@ -4435,7 +4462,8 @@
1023 - cat conftest.err >&5
1024 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1025 - (exit $ac_status); } &&
1026 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1027 -+ { ac_try='test -z "$ac_c_werror_flag"
1028 -+ || test ! -s conftest.err'
1029 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1030 - (eval $ac_try) 2>&5
1031 - ac_status=$?
1032 -@@ -4500,7 +4528,8 @@
1033 - cat conftest.err >&5
1034 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1035 - (exit $ac_status); } &&
1036 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1037 -+ { ac_try='test -z "$ac_c_werror_flag"
1038 -+ || test ! -s conftest.err'
1039 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1040 - (eval $ac_try) 2>&5
1041 - ac_status=$?
1042 -@@ -4564,7 +4593,8 @@
1043 - cat conftest.err >&5
1044 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1045 - (exit $ac_status); } &&
1046 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1047 -+ { ac_try='test -z "$ac_c_werror_flag"
1048 -+ || test ! -s conftest.err'
1049 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1050 - (eval $ac_try) 2>&5
1051 - ac_status=$?
1052 -@@ -4628,7 +4658,8 @@
1053 - cat conftest.err >&5
1054 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1055 - (exit $ac_status); } &&
1056 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1057 -+ { ac_try='test -z "$ac_c_werror_flag"
1058 -+ || test ! -s conftest.err'
1059 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1060 - (eval $ac_try) 2>&5
1061 - ac_status=$?
1062 -@@ -4692,7 +4723,8 @@
1063 - cat conftest.err >&5
1064 - echo "$as_me:$LINENO: \$? = $ac_status" >&5
1065 - (exit $ac_status); } &&
1066 -- { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
1067 -+ { ac_try='test -z "$ac_c_werror_flag"
1068 -+ || test ! -s conftest.err'
1069 - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1070 - (eval $ac_try) 2>&5
1071 - ac_status=$?
1072 -@@ -5527,6 +5559,11 @@
1073 -
1074 -
1075 -
1076 -+ if test x"$ac_file" != x-; then
1077 -+ { echo "$as_me:$LINENO: creating $ac_file" >&5
1078 -+echo "$as_me: creating $ac_file" >&6;}
1079 -+ rm -f "$ac_file"
1080 -+ fi
1081 - # Let's still pretend it is `configure' which instantiates (i.e., don't
1082 - # use $as_me), people would be surprised to read:
1083 - # /* config.h. Generated by config.status. */
1084 -@@ -5565,12 +5602,6 @@
1085 - fi;;
1086 - esac
1087 - done` || { (exit 1); exit 1; }
1088 --
1089 -- if test x"$ac_file" != x-; then
1090 -- { echo "$as_me:$LINENO: creating $ac_file" >&5
1091 --echo "$as_me: creating $ac_file" >&6;}
1092 -- rm -f "$ac_file"
1093 -- fi
1094 - _ACEOF
1095 - cat >>$CONFIG_STATUS <<_ACEOF
1096 - sed "$ac_vpsub
1097 -
1098 ---- a/spamc/configure.in (revision 1767127)
1099 -+++ b/spamc/configure.in (working copy)
1100 -@@ -64,13 +64,13 @@
1101 - SSLLIBS=""
1102 - SSLCFLAGS=""
1103 - if test yes = "$sa_ssl_enabled"; then
1104 -- AC_CHECK_LIB(crypto, CRYPTO_lock,[SSLLIBS="-lcrypto $SSLLIBS"])
1105 -+ AC_CHECK_LIB(crypto, CRYPTO_malloc,[SSLLIBS="-lcrypto $SSLLIBS"])
1106 - AC_CHECK_LIB(ssl, SSL_CTX_free,[SSLLIBS="-lssl $SSLLIBS"],,-lcrypto)
1107 -
1108 - # before defining SPAMC_SSL check that all its requirements are
1109 - # actually available
1110 - if test yes = "$ac_cv_header_openssl_crypto_h" && \
1111 -- test yes = "$ac_cv_lib_crypto_CRYPTO_lock" && \
1112 -+ test yes = "$ac_cv_lib_crypto_CRYPTO_malloc" && \
1113 - test yes = "$ac_cv_lib_ssl_SSL_CTX_free"; then
1114 - SSLCFLAGS="-DSPAMC_SSL"
1115 - else
1116 -
1117 ---- a/spamc/libspamc.c 2017-10-20 13:33:54.129653171 +1100
1118 -+++ b/spamc/libspamc.c 2017-10-20 13:36:09.429653849 +1100
1119 -@@ -1212,10 +1212,21 @@
1120 -
1121 - if (flags & SPAMC_USE_SSL) {
1122 - #ifdef SPAMC_SSL
1123 -+#if OPENSSL_API_COMPAT >= 0x10100000L
1124 -+ OPENSSL_init_ssl(0, NULL);
1125 -+ meth = TLS_method();
1126 -+ ctx = SSL_CTX_new(meth);
1127 -+ if (flags & SPAMC_TLSV1) {
1128 -+ SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION);
1129 -+ } else {
1130 -+ SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION);
1131 -+ }
1132 -+#else
1133 - SSLeay_add_ssl_algorithms();
1134 - meth = SSLv23_client_method();
1135 - SSL_load_error_strings();
1136 - ctx = SSL_CTX_new(meth);
1137 -+#endif
1138 - #else
1139 - UNUSED_VARIABLE(ssl);
1140 - UNUSED_VARIABLE(meth);
1141 -@@ -1599,10 +1610,17 @@
1142 -
1143 - if (flags & SPAMC_USE_SSL) {
1144 - #ifdef SPAMC_SSL
1145 -+#if OPENSSL_API_COMPAT >= 0x10100000L
1146 -+ OPENSSL_init_ssl(0, NULL);
1147 -+ meth = TLS_method();
1148 -+ ctx = SSL_CTX_new(meth);
1149 -+ SSL_CTX_set_min_proto_version(ctx, SSL3_VERSION);
1150 -+#else
1151 - SSLeay_add_ssl_algorithms();
1152 - meth = SSLv23_client_method();
1153 - SSL_load_error_strings();
1154 - ctx = SSL_CTX_new(meth);
1155 -+#endif
1156 - #else
1157 - UNUSED_VARIABLE(ssl);
1158 - UNUSED_VARIABLE(meth);
1159
1160 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch
1161 deleted file mode 100644
1162 index 563110fcb1f..00000000000
1163 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7404.patch
1164 +++ /dev/null
1165 @@ -1,23 +0,0 @@
1166 ---- a/lib/Mail/SpamAssassin/PerMsgStatus.pm (revision 1790817)
1167 -+++ b/lib/Mail/SpamAssassin/PerMsgStatus.pm (working copy)
1168 -@@ -896,16 +896,16 @@
1169 - $str .= shift @{$ary};
1170 - }
1171 - undef $ary;
1172 -- chomp ($str); $str .= " [...]\n";
1173 -
1174 - # in case the last line was huge, trim it back to around 200 chars
1175 - local $1;
1176 -- $str =~ s/^(.{,200}).*$/$1/gs;
1177 -+ $str =~ s/^(.{200}).+$/$1 [...]/gm;
1178 -+ chomp ($str); $str .= "\n";
1179 -
1180 - # now, some tidy-ups that make things look a bit prettier
1181 -- $str =~ s/-----Original Message-----.*$//gs;
1182 -+ $str =~ s/-----Original Message-----.*$//gm;
1183 - $str =~ s/This is a multi-part message in MIME format\.//gs;
1184 -- $str =~ s/[-_\*\.]{10,}//gs;
1185 -+ $str =~ s/[-_*.]{10,}//gs;
1186 - $str =~ s/\s+/ /gs;
1187 -
1188 - # add "Content preview:" ourselves, so that the text aligns
1189
1190 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
1191 deleted file mode 100644
1192 index bf4dc111acb..00000000000
1193 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-bug_7462.patch
1194 +++ /dev/null
1195 @@ -1,198 +0,0 @@
1196 -https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7462
1197 -https://bugs.gentoo.org/show_bug.cgi?id=627678
1198 ---- Mail-SpamAssassin-3.4.1/t/basic_meta.t 2015-04-28 15:56:59.000000000 -0400
1199 -+++ Mail-SpamAssassin-3.4.1/t/basic_meta.t 2017-08-20 21:29:44.000000000 -0400
1200 -@@ -14,10 +14,11 @@
1201 - if (-e 'test_dir') { # running from test directory, not ..
1202 - $prefix = '..';
1203 - }
1204 -
1205 - use strict;
1206 -+use lib '.'; use lib 't';
1207 - use SATest; sa_t_init("meta");
1208 - use Test;
1209 - use Mail::SpamAssassin;
1210 -
1211 - use vars qw( %rules %scores $perl_path);
1212 ---- Mail-SpamAssassin-3.4.1/t/body_mod.t 2015-04-28 15:56:58.000000000 -0400
1213 -+++ Mail-SpamAssassin-3.4.1/t/body_mod.t 2017-08-20 21:30:09.000000000 -0400
1214 -@@ -14,10 +14,11 @@
1215 - if (-e 'test_dir') { # running from test directory, not ..
1216 - $prefix = '..';
1217 - }
1218 -
1219 - use strict;
1220 -+use lib '.'; use lib 't';
1221 - use SATest; sa_t_init("body_mod");
1222 - use Test; BEGIN { plan tests => 3 };
1223 -
1224 - use Mail::SpamAssassin;
1225 -
1226 ---- Mail-SpamAssassin-3.4.1/t/config_errs.t 2015-04-28 15:56:59.000000000 -0400
1227 -+++ Mail-SpamAssassin-3.4.1/t/config_errs.t 2017-08-20 21:30:28.000000000 -0400
1228 -@@ -39,10 +39,11 @@
1229 - if (-e 'test_dir') { # running from test directory, not ..
1230 - $prefix = '..';
1231 - }
1232 -
1233 - use strict;
1234 -+use lib '.'; use lib 't';
1235 - use SATest; sa_t_init("config_errs");
1236 - use Test;
1237 - use Mail::SpamAssassin;
1238 -
1239 - # initialize SpamAssassin
1240 ---- Mail-SpamAssassin-3.4.1/t/debug.t 2015-04-28 15:56:58.000000000 -0400
1241 -+++ Mail-SpamAssassin-3.4.1/t/debug.t 2017-08-20 21:31:02.000000000 -0400
1242 -@@ -14,10 +14,11 @@
1243 - if (-e 'test_dir') { # running from test directory, not ..
1244 - $prefix = '..';
1245 - }
1246 -
1247 - use strict;
1248 -+use lib '.'; use lib 't';
1249 - use SATest; sa_t_init("debug");
1250 - use Test;
1251 - use Mail::SpamAssassin;
1252 -
1253 - use constant TEST_ENABLED => conf_bool('run_long_tests');
1254 ---- Mail-SpamAssassin-3.4.1/t/get_headers.t 2015-04-28 15:56:58.000000000 -0400
1255 -+++ Mail-SpamAssassin-3.4.1/t/get_headers.t 2017-08-20 21:31:48.000000000 -0400
1256 -@@ -15,10 +15,11 @@
1257 - $prefix = '..';
1258 - }
1259 -
1260 - use strict;
1261 - use Test;
1262 -+use lib '.'; use lib 't';
1263 - use SATest; sa_t_init("get_headers");
1264 - use Mail::SpamAssassin;
1265 -
1266 - plan tests => 16;
1267 -
1268 ---- Mail-SpamAssassin-3.4.1/t/idn_dots.t 2015-04-28 15:56:58.000000000 -0400
1269 -+++ Mail-SpamAssassin-3.4.1/t/idn_dots.t 2017-08-20 21:32:03.000000000 -0400
1270 -@@ -16,10 +16,11 @@
1271 - if (-e 'test_dir') { # running from test directory, not ..
1272 - $prefix = '..';
1273 - }
1274 -
1275 - use strict;
1276 -+use lib '.'; use lib 't';
1277 - use SATest; sa_t_init("normalize_utf8_dots.t");
1278 - use Test;
1279 - use Mail::SpamAssassin;
1280 - use vars qw(%patterns %anti_patterns);
1281 -
1282 ---- Mail-SpamAssassin-3.4.1/t/missing_hb_separator.t 2015-04-28 15:56:58.000000000 -0400
1283 -+++ Mail-SpamAssassin-3.4.1/t/missing_hb_separator.t 2017-08-20 21:32:17.000000000 -0400
1284 -@@ -15,10 +15,11 @@
1285 - $prefix = '..';
1286 - }
1287 -
1288 - use strict;
1289 - use Test;
1290 -+use lib '.'; use lib 't';
1291 - use SATest; sa_t_init("missing_hb_separator");
1292 - use Mail::SpamAssassin;
1293 -
1294 - plan tests => 13;
1295 -
1296 ---- Mail-SpamAssassin-3.4.1/t/priorities.t 2015-04-28 15:56:59.000000000 -0400
1297 -+++ Mail-SpamAssassin-3.4.1/t/priorities.t 2017-08-20 21:34:21.000000000 -0400
1298 -@@ -15,10 +15,11 @@
1299 - my $prefix = '.';
1300 - if (-e 'test_dir') { # running from test directory, not ..
1301 - $prefix = '..';
1302 - }
1303 -
1304 -+use lib '.'; use lib 't';
1305 - use SATest; sa_t_init("priorities");
1306 - use strict;
1307 - use Test; BEGIN { plan tests => NUM_TESTS };
1308 -
1309 - use Mail::SpamAssassin;
1310 ---- Mail-SpamAssassin-3.4.1/t/regexp_valid.t 2015-04-28 15:56:59.000000000 -0400
1311 -+++ Mail-SpamAssassin-3.4.1/t/regexp_valid.t 2017-08-20 21:34:31.000000000 -0400
1312 -@@ -14,10 +14,11 @@
1313 - if (-e 'test_dir') { # running from test directory, not ..
1314 - $prefix = '..';
1315 - }
1316 -
1317 - use strict;
1318 -+use lib '.'; use lib 't';
1319 - use SATest; sa_t_init("regexp_valid");
1320 - use Test;
1321 -
1322 - # settings
1323 - plan tests => 24;
1324 ---- Mail-SpamAssassin-3.4.1/t/relative_scores.t 2015-04-28 15:56:59.000000000 -0400
1325 -+++ Mail-SpamAssassin-3.4.1/t/relative_scores.t 2017-08-20 21:34:43.000000000 -0400
1326 -@@ -9,10 +9,11 @@
1327 - if (-e 'test_dir') { # running from test directory, not ..
1328 - unshift(@INC, '../blib/lib', '.');
1329 - }
1330 - }
1331 -
1332 -+use lib '.'; use lib 't';
1333 - use SATest; sa_t_init("relative_scores");
1334 - use Test;
1335 - use strict;
1336 - use vars qw/ $error /;
1337 -
1338 ---- Mail-SpamAssassin-3.4.1/t/reuse.t 2015-04-28 15:56:58.000000000 -0400
1339 -+++ Mail-SpamAssassin-3.4.1/t/reuse.t 2017-08-20 21:34:52.000000000 -0400
1340 -@@ -14,10 +14,11 @@
1341 - if (-e 'test_dir') { # running from test directory, not ..
1342 - $prefix = '..';
1343 - }
1344 -
1345 - use strict;
1346 -+use lib '.'; use lib 't';
1347 - use SATest; sa_t_init("reuse");
1348 - use Test;
1349 -
1350 - use vars qw(%patterns %anti_patterns $perl_path &patterns_run_cb);
1351 -
1352 ---- Mail-SpamAssassin-3.4.1/t/uri_html.t 2015-04-28 15:56:58.000000000 -0400
1353 -+++ Mail-SpamAssassin-3.4.1/t/uri_html.t 2017-08-20 21:35:20.000000000 -0400
1354 -@@ -16,10 +16,11 @@
1355 - if (-e 'test_dir') { # running from test directory, not ..
1356 - $prefix = '..';
1357 - }
1358 -
1359 - use strict;
1360 -+use lib '.'; use lib 't';
1361 - use SATest; sa_t_init("uri_html");
1362 - use Test;
1363 - use Mail::SpamAssassin;
1364 - use vars qw(%patterns %anti_patterns);
1365 -
1366 ---- Mail-SpamAssassin-3.4.1/t/uri.t 2015-04-28 15:56:59.000000000 -0400
1367 -+++ Mail-SpamAssassin-3.4.1/t/uri.t 2017-08-20 21:35:30.000000000 -0400
1368 -@@ -15,10 +15,11 @@
1369 - $prefix = '..';
1370 - }
1371 -
1372 - use strict;
1373 - use Test;
1374 -+use lib '.'; use lib 't';
1375 - use SATest; sa_t_init("uri");
1376 -
1377 - use Mail::SpamAssassin;
1378 - use Mail::SpamAssassin::HTML;
1379 - use Mail::SpamAssassin::Util;
1380 ---- Mail-SpamAssassin-3.4.1/t/uri_text.t 2015-04-28 15:56:58.000000000 -0400
1381 -+++ Mail-SpamAssassin-3.4.1/t/uri_text.t 2017-08-20 21:35:07.000000000 -0400
1382 -@@ -16,10 +16,11 @@
1383 - if (-e 'test_dir') { # running from test directory, not ..
1384 - $prefix = '..';
1385 - }
1386 -
1387 - use strict;
1388 -+use lib '.'; use lib 't';
1389 - use SATest; sa_t_init("uri_text");
1390 - use Test;
1391 - use Mail::SpamAssassin;
1392 - use vars qw(%patterns %anti_patterns);
1393 -
1394
1395 diff --git a/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch b/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch
1396 deleted file mode 100644
1397 index 1c63136e3f6..00000000000
1398 --- a/mail-filter/spamassassin/files/spamassassin-3.4.1-perl526.patch
1399 +++ /dev/null
1400 @@ -1,14 +0,0 @@
1401 -https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7367
1402 -https://bugs.gentoo.org/625316
1403 -
1404 ---- Mail-SpamAssassin-3.4.1/spamc/configure.pl
1405 -+++ Mail-SpamAssassin-3.4.1/spamc/configure.pl
1406 -@@ -66,7 +66,7 @@
1407 - # Do the same thing as for the preprocessor below.
1408 - package version_h;
1409 - my $Z = $0;
1410 -- local $0 = "version.h.pl";
1411 -+ local $0 = "./version.h.pl";
1412 - local @ARGV = ();
1413 - # Got to check for defined because the script returns shell error level!
1414 - unless (defined do $0) {
1415
1416 diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
1417 deleted file mode 100644
1418 index d40f8141384..00000000000
1419 --- a/mail-filter/spamassassin/spamassassin-3.4.1-r19.ebuild
1420 +++ /dev/null
1421 @@ -1,251 +0,0 @@
1422 -# Copyright 1999-2018 Gentoo Foundation
1423 -# Distributed under the terms of the GNU General Public License v2
1424 -
1425 -EAPI=6
1426 -
1427 -inherit perl-functions systemd toolchain-funcs user
1428 -
1429 -MY_P="Mail-SpamAssassin-${PV//_/-}"
1430 -S="${WORKDIR}/${MY_P}"
1431 -DESCRIPTION="An extensible mail filter which can identify and tag spam"
1432 -HOMEPAGE="https://spamassassin.apache.org/"
1433 -SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
1434 -
1435 -LICENSE="Apache-2.0 GPL-2"
1436 -SLOT="0"
1437 -KEYWORDS="alpha amd64 ~arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
1438 -IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
1439 -
1440 -# The Makefile.PL script checks for dependencies, but only fails if a
1441 -# required (i.e. not optional) dependency is missing. We therefore
1442 -# require most of the optional modules only at runtime.
1443 -REQDEPEND="dev-lang/perl:=
1444 - dev-perl/HTML-Parser
1445 - dev-perl/Net-DNS
1446 - dev-perl/NetAddr-IP
1447 - virtual/perl-Archive-Tar
1448 - virtual/perl-Digest-SHA
1449 - virtual/perl-IO-Zlib
1450 - virtual/perl-Time-HiRes
1451 - ssl? (
1452 - !libressl? ( dev-libs/openssl:0= )
1453 - libressl? ( dev-libs/libressl )
1454 - )"
1455 -
1456 -# SpamAssassin doesn't use libwww-perl except as a fallback for when
1457 -# curl/wget are missing, so we depend on one of those instead. Some
1458 -# mirrors use https, so we need those utilities to support SSL.
1459 -#
1460 -# re2c is needed to compile the rules (sa-compile).
1461 -#
1462 -# We still need the old Digest-SHA1 because razor2 has not been ported
1463 -# to Digest-SHA.
1464 -OPTDEPEND="app-crypt/gnupg
1465 - dev-perl/Digest-SHA1
1466 - dev-perl/Encode-Detect
1467 - dev-perl/Geo-IP
1468 - dev-perl/HTTP-Date
1469 - dev-perl/Mail-DKIM
1470 - dev-perl/Mail-SPF
1471 - dev-perl/Net-Patricia
1472 - dev-perl/Net-CIDR-Lite
1473 - dev-util/re2c
1474 - || ( net-misc/wget[ssl] net-misc/curl[ssl] )
1475 - virtual/perl-MIME-Base64
1476 - virtual/perl-Pod-Parser
1477 - berkdb? ( virtual/perl-DB_File )
1478 - ipv6? ( dev-perl/IO-Socket-INET6 )
1479 - ldap? ( dev-perl/perl-ldap )
1480 - mysql? (
1481 - dev-perl/DBI
1482 - dev-perl/DBD-mysql
1483 - )
1484 - postgres? (
1485 - dev-perl/DBI
1486 - dev-perl/DBD-Pg
1487 - )
1488 - sqlite? (
1489 - dev-perl/DBI
1490 - dev-perl/DBD-SQLite
1491 - )
1492 - ssl? ( dev-perl/IO-Socket-SSL )"
1493 -
1494 -DEPEND="${REQDEPEND}
1495 - test? (
1496 - ${OPTDEPEND}
1497 - virtual/perl-Test-Harness
1498 - )"
1499 -RDEPEND="${REQDEPEND} ${OPTDEPEND}"
1500 -
1501 -PATCHES=(
1502 - "${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
1503 - "${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
1504 - "${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
1505 - "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
1506 - "${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
1507 - "${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
1508 - "${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
1509 - "${FILESDIR}/spamassassin-3.4.1-perl526.patch"
1510 - "${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
1511 -)
1512 -
1513 -src_prepare() {
1514 - default
1515 -
1516 - # The sa_compile test does some weird stuff like hopping around in
1517 - # the directory tree and calling "make" to create a dist tarball
1518 - # from ${S}. It fails, and is more trouble than it's worth...
1519 - perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
1520 -
1521 - # The spamc tests (which need the networked spamd daemon) fail for
1522 - # irrelevant reasons. It's too hard to disable them (unlike the
1523 - # spamd tests themselves -- see src_test), so use a crude
1524 - # workaround.
1525 - perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
1526 -}
1527 -
1528 -src_configure() {
1529 - # This is how and where the perl-module eclass disables the
1530 - # MakeMaker interactive prompt.
1531 - export PERL_MM_USE_DEFAULT=1
1532 -
1533 - # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
1534 - # (just to be sure, nobody knows how it could happen in the first place).
1535 - #
1536 - # We also set the path to the perl executable explictly. This will be
1537 - # used to create the initial shebang line in the scripts (bug 62276).
1538 - perl Makefile.PL \
1539 - PREFIX="${EPREFIX}/usr" \
1540 - INSTALLDIRS=vendor \
1541 - SYSCONFDIR="${EPREFIX}/etc" \
1542 - DATADIR="${EPREFIX}/usr/share/spamassassin" \
1543 - PERL_BIN="${EPREFIX}/usr/bin/perl" \
1544 - ENABLE_SSL="$(usex ssl)" \
1545 - DESTDIR="${D}" \
1546 - || die 'failed to create a Makefile using Makefile.PL'
1547 -
1548 - # Now configure spamc.
1549 - emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
1550 -}
1551 -
1552 -src_compile() {
1553 - emake
1554 - use qmail && emake spamc/qmail-spamc
1555 -}
1556 -
1557 -src_install () {
1558 - emake install
1559 - einstalldocs
1560 -
1561 - # Create the stub dir used by sa-update and friends
1562 - keepdir /var/lib/spamassassin
1563 -
1564 - # Move spamd to sbin where it belongs.
1565 - dodir /usr/sbin
1566 - mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed"
1567 -
1568 - if use qmail; then
1569 - dobin spamc/qmail-spamc
1570 - fi
1571 -
1572 - ln -s mail/spamassassin "${ED}"/etc/spamassassin || die
1573 -
1574 - # Disable plugin by default
1575 - sed -i -e 's/^loadplugin/\#loadplugin/g' \
1576 - "${ED}/etc/mail/spamassassin/init.pre" \
1577 - || die "failed to disable plugins by default"
1578 -
1579 - # Add the init and config scripts.
1580 - newinitd "${FILESDIR}/3.4.1-spamd.init-r2" spamd
1581 - newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
1582 -
1583 - systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
1584 - systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
1585 - "${PN}.service"
1586 -
1587 - use postgres && dodoc sql/*_pg.sql
1588 - use mysql && dodoc sql/*_mysql.sql
1589 -
1590 - dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
1591 - sql/README.awl procmailrc.example sample-nonspam.txt \
1592 - sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
1593 - spamd-apache2/README.apache
1594 -
1595 - # Rename some files so that they don't clash with others.
1596 - newdoc spamd/README README.spamd
1597 - newdoc sql/README README.sql
1598 - newdoc ldap/README README.ldap
1599 -
1600 - if use qmail; then
1601 - dodoc spamc/README.qmail
1602 - fi
1603 -
1604 - insinto /etc/mail/spamassassin/
1605 - insopts -m0400
1606 - newins "${FILESDIR}"/secrets.cf secrets.cf.example
1607 -
1608 - # Create the directory where sa-update stores its GPG key (if you
1609 - # choose to import one). If this directory does not exist, the
1610 - # import will fail. This is bug 396307. We expect that the import
1611 - # will be performed as root, and making the directory accessible
1612 - # only to root prevents a warning on the command-line.
1613 - diropts -m0700
1614 - dodir /etc/mail/spamassassin/sa-update-keys
1615 -
1616 - if use cron; then
1617 - # Install the cron job if they want it.
1618 - exeinto /etc/cron.daily
1619 - newexe "${FILESDIR}/update-spamassassin-rules.cron" \
1620 - update-spamassassin-rules
1621 - fi
1622 -
1623 - # Remove perllocal.pod to avoid file collisions (bug #603338).
1624 - perl_delete_localpod || die "failed to remove perllocal.pod"
1625 -
1626 - # The perl-module eclass calls three other functions to clean
1627 - # up in src_install. The first fixes references to ${D} in the
1628 - # packlist, and is useful to us, too. The other two functions,
1629 - # perl_delete_emptybsdir and perl_remove_temppath, don't seem
1630 - # to be needed: there are no empty directories, *.bs files, or
1631 - # ${D} paths remaining in our installed image.
1632 - perl_fix_packlist || die "failed to fix paths in packlist"
1633 -}
1634 -
1635 -src_test() {
1636 - # Trick the test suite into skipping the spamd tests. Setting
1637 - # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
1638 - # set in SATest.pm.
1639 - export SPAMD_HOST=disabled
1640 - default
1641 -}
1642 -
1643 -pkg_preinst() {
1644 - # The spamd daemon runs as this user. Use a real home directory so
1645 - # that it can hold SA configuration.
1646 - enewuser spamd -1 -1 /home/spamd
1647 -}
1648 -
1649 -pkg_postinst() {
1650 - elog
1651 - elog 'No rules are installed by default. You will need to run sa-update'
1652 - elog 'at least once, and most likely configure SpamAssassin before it'
1653 - elog 'will work.'
1654 -
1655 - if ! use cron; then
1656 - elog
1657 - elog 'You should consider a cron job for sa-update. One is provided'
1658 - elog 'for daily updates if you enable the "cron" USE flag.'
1659 - fi
1660 - elog
1661 - elog 'Configuration and update help can be found on the wiki:'
1662 - elog
1663 - elog ' https://wiki.gentoo.org/wiki/SpamAssassin'
1664 - elog
1665 -
1666 - ewarn 'If this version of SpamAssassin causes permissions issues'
1667 - ewarn 'with your user configurations or bayes databases, then you'
1668 - ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
1669 - ewarn 'configuration file, or remove the --username and --groupname'
1670 - ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
1671 - ewarn 'configuration file.'
1672 -}
1673
1674 diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild
1675 deleted file mode 100644
1676 index fbea7792df5..00000000000
1677 --- a/mail-filter/spamassassin/spamassassin-3.4.1-r20.ebuild
1678 +++ /dev/null
1679 @@ -1,251 +0,0 @@
1680 -# Copyright 1999-2018 Gentoo Foundation
1681 -# Distributed under the terms of the GNU General Public License v2
1682 -
1683 -EAPI=6
1684 -
1685 -inherit perl-functions systemd toolchain-funcs user
1686 -
1687 -MY_P="Mail-SpamAssassin-${PV//_/-}"
1688 -S="${WORKDIR}/${MY_P}"
1689 -DESCRIPTION="An extensible mail filter which can identify and tag spam"
1690 -HOMEPAGE="https://spamassassin.apache.org/"
1691 -SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
1692 -
1693 -LICENSE="Apache-2.0 GPL-2"
1694 -SLOT="0"
1695 -KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ppc64 s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
1696 -IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
1697 -
1698 -# The Makefile.PL script checks for dependencies, but only fails if a
1699 -# required (i.e. not optional) dependency is missing. We therefore
1700 -# require most of the optional modules only at runtime.
1701 -REQDEPEND="dev-lang/perl:=
1702 - dev-perl/HTML-Parser
1703 - dev-perl/Net-DNS
1704 - dev-perl/NetAddr-IP
1705 - virtual/perl-Archive-Tar
1706 - virtual/perl-Digest-SHA
1707 - virtual/perl-IO-Zlib
1708 - virtual/perl-Time-HiRes
1709 - ssl? (
1710 - !libressl? ( dev-libs/openssl:0= )
1711 - libressl? ( dev-libs/libressl )
1712 - )"
1713 -
1714 -# SpamAssassin doesn't use libwww-perl except as a fallback for when
1715 -# curl/wget are missing, so we depend on one of those instead. Some
1716 -# mirrors use https, so we need those utilities to support SSL.
1717 -#
1718 -# re2c is needed to compile the rules (sa-compile).
1719 -#
1720 -# We still need the old Digest-SHA1 because razor2 has not been ported
1721 -# to Digest-SHA.
1722 -OPTDEPEND="app-crypt/gnupg
1723 - dev-perl/Digest-SHA1
1724 - dev-perl/Encode-Detect
1725 - dev-perl/Geo-IP
1726 - dev-perl/HTTP-Date
1727 - dev-perl/Mail-DKIM
1728 - dev-perl/Mail-SPF
1729 - dev-perl/Net-Patricia
1730 - dev-perl/Net-CIDR-Lite
1731 - dev-util/re2c
1732 - || ( net-misc/wget[ssl] net-misc/curl[ssl] )
1733 - virtual/perl-MIME-Base64
1734 - virtual/perl-Pod-Parser
1735 - berkdb? ( virtual/perl-DB_File )
1736 - ipv6? ( dev-perl/IO-Socket-INET6 )
1737 - ldap? ( dev-perl/perl-ldap )
1738 - mysql? (
1739 - dev-perl/DBI
1740 - dev-perl/DBD-mysql
1741 - )
1742 - postgres? (
1743 - dev-perl/DBI
1744 - dev-perl/DBD-Pg
1745 - )
1746 - sqlite? (
1747 - dev-perl/DBI
1748 - dev-perl/DBD-SQLite
1749 - )
1750 - ssl? ( dev-perl/IO-Socket-SSL )"
1751 -
1752 -DEPEND="${REQDEPEND}
1753 - test? (
1754 - ${OPTDEPEND}
1755 - virtual/perl-Test-Harness
1756 - )"
1757 -RDEPEND="${REQDEPEND} ${OPTDEPEND}"
1758 -
1759 -PATCHES=(
1760 - "${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
1761 - "${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
1762 - "${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
1763 - "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
1764 - "${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
1765 - "${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
1766 - "${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
1767 - "${FILESDIR}/spamassassin-3.4.1-perl526.patch"
1768 - "${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
1769 -)
1770 -
1771 -src_prepare() {
1772 - default
1773 -
1774 - # The sa_compile test does some weird stuff like hopping around in
1775 - # the directory tree and calling "make" to create a dist tarball
1776 - # from ${S}. It fails, and is more trouble than it's worth...
1777 - perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
1778 -
1779 - # The spamc tests (which need the networked spamd daemon) fail for
1780 - # irrelevant reasons. It's too hard to disable them (unlike the
1781 - # spamd tests themselves -- see src_test), so use a crude
1782 - # workaround.
1783 - perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
1784 -}
1785 -
1786 -src_configure() {
1787 - # This is how and where the perl-module eclass disables the
1788 - # MakeMaker interactive prompt.
1789 - export PERL_MM_USE_DEFAULT=1
1790 -
1791 - # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
1792 - # (just to be sure, nobody knows how it could happen in the first place).
1793 - #
1794 - # We also set the path to the perl executable explictly. This will be
1795 - # used to create the initial shebang line in the scripts (bug 62276).
1796 - perl Makefile.PL \
1797 - PREFIX="${EPREFIX}/usr" \
1798 - INSTALLDIRS=vendor \
1799 - SYSCONFDIR="${EPREFIX}/etc" \
1800 - DATADIR="${EPREFIX}/usr/share/spamassassin" \
1801 - PERL_BIN="${EPREFIX}/usr/bin/perl" \
1802 - ENABLE_SSL="$(usex ssl)" \
1803 - DESTDIR="${D}" \
1804 - || die 'failed to create a Makefile using Makefile.PL'
1805 -
1806 - # Now configure spamc.
1807 - emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
1808 -}
1809 -
1810 -src_compile() {
1811 - emake
1812 - use qmail && emake spamc/qmail-spamc
1813 -}
1814 -
1815 -src_install () {
1816 - emake install
1817 - einstalldocs
1818 -
1819 - # Create the stub dir used by sa-update and friends
1820 - keepdir /var/lib/spamassassin
1821 -
1822 - # Move spamd to sbin where it belongs.
1823 - dodir /usr/sbin
1824 - mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed"
1825 -
1826 - if use qmail; then
1827 - dobin spamc/qmail-spamc
1828 - fi
1829 -
1830 - dosym mail/spamassassin /etc/spamassassin
1831 -
1832 - # Disable plugin by default
1833 - sed -i -e 's/^loadplugin/\#loadplugin/g' \
1834 - "${ED}/etc/mail/spamassassin/init.pre" \
1835 - || die "failed to disable plugins by default"
1836 -
1837 - # Add the init and config scripts.
1838 - newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
1839 - newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
1840 -
1841 - systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
1842 - systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
1843 - "${PN}.service"
1844 -
1845 - use postgres && dodoc sql/*_pg.sql
1846 - use mysql && dodoc sql/*_mysql.sql
1847 -
1848 - dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
1849 - sql/README.awl procmailrc.example sample-nonspam.txt \
1850 - sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
1851 - spamd-apache2/README.apache
1852 -
1853 - # Rename some files so that they don't clash with others.
1854 - newdoc spamd/README README.spamd
1855 - newdoc sql/README README.sql
1856 - newdoc ldap/README README.ldap
1857 -
1858 - if use qmail; then
1859 - dodoc spamc/README.qmail
1860 - fi
1861 -
1862 - insinto /etc/mail/spamassassin/
1863 - insopts -m0400
1864 - newins "${FILESDIR}"/secrets.cf secrets.cf.example
1865 -
1866 - # Create the directory where sa-update stores its GPG key (if you
1867 - # choose to import one). If this directory does not exist, the
1868 - # import will fail. This is bug 396307. We expect that the import
1869 - # will be performed as root, and making the directory accessible
1870 - # only to root prevents a warning on the command-line.
1871 - diropts -m0700
1872 - dodir /etc/mail/spamassassin/sa-update-keys
1873 -
1874 - if use cron; then
1875 - # Install the cron job if they want it.
1876 - exeinto /etc/cron.daily
1877 - newexe "${FILESDIR}/update-spamassassin-rules.cron" \
1878 - update-spamassassin-rules
1879 - fi
1880 -
1881 - # Remove perllocal.pod to avoid file collisions (bug #603338).
1882 - perl_delete_localpod || die "failed to remove perllocal.pod"
1883 -
1884 - # The perl-module eclass calls three other functions to clean
1885 - # up in src_install. The first fixes references to ${D} in the
1886 - # packlist, and is useful to us, too. The other two functions,
1887 - # perl_delete_emptybsdir and perl_remove_temppath, don't seem
1888 - # to be needed: there are no empty directories, *.bs files, or
1889 - # ${D} paths remaining in our installed image.
1890 - perl_fix_packlist || die "failed to fix paths in packlist"
1891 -}
1892 -
1893 -src_test() {
1894 - # Trick the test suite into skipping the spamd tests. Setting
1895 - # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
1896 - # set in SATest.pm.
1897 - export SPAMD_HOST=disabled
1898 - default
1899 -}
1900 -
1901 -pkg_preinst() {
1902 - # The spamd daemon runs as this user. Use a real home directory so
1903 - # that it can hold SA configuration.
1904 - enewuser spamd -1 -1 /home/spamd
1905 -}
1906 -
1907 -pkg_postinst() {
1908 - elog
1909 - elog 'No rules are installed by default. You will need to run sa-update'
1910 - elog 'at least once, and most likely configure SpamAssassin before it'
1911 - elog 'will work.'
1912 -
1913 - if ! use cron; then
1914 - elog
1915 - elog 'You should consider a cron job for sa-update. One is provided'
1916 - elog 'for daily updates if you enable the "cron" USE flag.'
1917 - fi
1918 - elog
1919 - elog 'Configuration and update help can be found on the wiki:'
1920 - elog
1921 - elog ' https://wiki.gentoo.org/wiki/SpamAssassin'
1922 - elog
1923 -
1924 - ewarn 'If this version of SpamAssassin causes permissions issues'
1925 - ewarn 'with your user configurations or bayes databases, then you'
1926 - ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
1927 - ewarn 'configuration file, or remove the --username and --groupname'
1928 - ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
1929 - ewarn 'configuration file.'
1930 -}
1931
1932 diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild
1933 deleted file mode 100644
1934 index e8abe80c39e..00000000000
1935 --- a/mail-filter/spamassassin/spamassassin-3.4.1-r21.ebuild
1936 +++ /dev/null
1937 @@ -1,252 +0,0 @@
1938 -# Copyright 1999-2018 Gentoo Foundation
1939 -# Distributed under the terms of the GNU General Public License v2
1940 -
1941 -EAPI=6
1942 -
1943 -inherit perl-functions systemd toolchain-funcs user
1944 -
1945 -MY_P="Mail-SpamAssassin-${PV//_/-}"
1946 -S="${WORKDIR}/${MY_P}"
1947 -DESCRIPTION="An extensible mail filter which can identify and tag spam"
1948 -HOMEPAGE="https://spamassassin.apache.org/"
1949 -SRC_URI="mirror://apache/spamassassin/source/${MY_P}.tar.bz2"
1950 -
1951 -LICENSE="Apache-2.0 GPL-2"
1952 -SLOT="0"
1953 -KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos"
1954 -IUSE="berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test"
1955 -
1956 -# The Makefile.PL script checks for dependencies, but only fails if a
1957 -# required (i.e. not optional) dependency is missing. We therefore
1958 -# require most of the optional modules only at runtime.
1959 -REQDEPEND="dev-lang/perl:=
1960 - dev-perl/HTML-Parser
1961 - dev-perl/Net-DNS
1962 - dev-perl/NetAddr-IP
1963 - virtual/perl-Archive-Tar
1964 - virtual/perl-Digest-SHA
1965 - virtual/perl-IO-Zlib
1966 - virtual/perl-Time-HiRes
1967 - ssl? (
1968 - !libressl? ( dev-libs/openssl:0= )
1969 - libressl? ( dev-libs/libressl )
1970 - )"
1971 -
1972 -# SpamAssassin doesn't use libwww-perl except as a fallback for when
1973 -# curl/wget are missing, so we depend on one of those instead. Some
1974 -# mirrors use https, so we need those utilities to support SSL.
1975 -#
1976 -# re2c is needed to compile the rules (sa-compile).
1977 -#
1978 -# We still need the old Digest-SHA1 because razor2 has not been ported
1979 -# to Digest-SHA.
1980 -OPTDEPEND="app-crypt/gnupg
1981 - dev-perl/Digest-SHA1
1982 - dev-perl/Encode-Detect
1983 - dev-perl/Geo-IP
1984 - dev-perl/HTTP-Date
1985 - dev-perl/Mail-DKIM
1986 - dev-perl/Mail-SPF
1987 - dev-perl/Net-Patricia
1988 - dev-perl/Net-CIDR-Lite
1989 - dev-util/re2c
1990 - || ( net-misc/wget[ssl] net-misc/curl[ssl] )
1991 - virtual/perl-MIME-Base64
1992 - virtual/perl-Pod-Parser
1993 - berkdb? ( virtual/perl-DB_File )
1994 - ipv6? ( dev-perl/IO-Socket-INET6 )
1995 - ldap? ( dev-perl/perl-ldap )
1996 - mysql? (
1997 - dev-perl/DBI
1998 - dev-perl/DBD-mysql
1999 - )
2000 - postgres? (
2001 - dev-perl/DBI
2002 - dev-perl/DBD-Pg
2003 - )
2004 - sqlite? (
2005 - dev-perl/DBI
2006 - dev-perl/DBD-SQLite
2007 - )
2008 - ssl? ( dev-perl/IO-Socket-SSL )"
2009 -
2010 -DEPEND="${REQDEPEND}
2011 - test? (
2012 - ${OPTDEPEND}
2013 - virtual/perl-Test-Harness
2014 - )"
2015 -RDEPEND="${REQDEPEND} ${OPTDEPEND}"
2016 -
2017 -PATCHES=(
2018 - "${FILESDIR}/spamassassin-3.4.1-bug_7199.patch"
2019 - "${FILESDIR}/spamassassin-3.4.1-bug_7208.patch"
2020 - "${FILESDIR}/spamassassin-3.4.1-bug_7223.patch"
2021 - "${FILESDIR}/spamassassin-3.4.1-bug_7231.patch"
2022 - "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch"
2023 - "${FILESDIR}/spamassassin-3.4.1-bug_7231-extra.patch"
2024 - "${FILESDIR}/spamassassin-3.4.1-bug_7404.patch"
2025 - "${FILESDIR}/spamassassin-3.4.1-bug_7462.patch"
2026 - "${FILESDIR}/spamassassin-3.4.1-perl526.patch"
2027 - "${FILESDIR}/spamassassin-3.4.1-bug_7361.patch"
2028 -)
2029 -
2030 -src_prepare() {
2031 - default
2032 -
2033 - # The sa_compile test does some weird stuff like hopping around in
2034 - # the directory tree and calling "make" to create a dist tarball
2035 - # from ${S}. It fails, and is more trouble than it's worth...
2036 - perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test'
2037 -
2038 - # The spamc tests (which need the networked spamd daemon) fail for
2039 - # irrelevant reasons. It's too hard to disable them (unlike the
2040 - # spamd tests themselves -- see src_test), so use a crude
2041 - # workaround.
2042 - perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests'
2043 -}
2044 -
2045 -src_configure() {
2046 - # This is how and where the perl-module eclass disables the
2047 - # MakeMaker interactive prompt.
2048 - export PERL_MM_USE_DEFAULT=1
2049 -
2050 - # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again
2051 - # (just to be sure, nobody knows how it could happen in the first place).
2052 - #
2053 - # We also set the path to the perl executable explictly. This will be
2054 - # used to create the initial shebang line in the scripts (bug 62276).
2055 - perl Makefile.PL \
2056 - PREFIX="${EPREFIX}/usr" \
2057 - INSTALLDIRS=vendor \
2058 - SYSCONFDIR="${EPREFIX}/etc" \
2059 - DATADIR="${EPREFIX}/usr/share/spamassassin" \
2060 - PERL_BIN="${EPREFIX}/usr/bin/perl" \
2061 - ENABLE_SSL="$(usex ssl)" \
2062 - DESTDIR="${D}" \
2063 - || die 'failed to create a Makefile using Makefile.PL'
2064 -
2065 - # Now configure spamc.
2066 - emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile
2067 -}
2068 -
2069 -src_compile() {
2070 - emake
2071 - use qmail && emake spamc/qmail-spamc
2072 -}
2073 -
2074 -src_install () {
2075 - emake install
2076 - einstalldocs
2077 -
2078 - # Create the stub dir used by sa-update and friends
2079 - keepdir /var/lib/spamassassin
2080 -
2081 - # Move spamd to sbin where it belongs.
2082 - dodir /usr/sbin
2083 - mv "${ED}"/usr/bin/spamd "${ED}"/usr/sbin/spamd || die "move spamd failed"
2084 -
2085 - if use qmail; then
2086 - dobin spamc/qmail-spamc
2087 - fi
2088 -
2089 - dosym mail/spamassassin /etc/spamassassin
2090 -
2091 - # Disable plugin by default
2092 - sed -i -e 's/^loadplugin/\#loadplugin/g' \
2093 - "${ED}/etc/mail/spamassassin/init.pre" \
2094 - || die "failed to disable plugins by default"
2095 -
2096 - # Add the init and config scripts.
2097 - newinitd "${FILESDIR}/3.4.1-spamd.init-r3" spamd
2098 - newconfd "${FILESDIR}/3.4.1-spamd.conf-r1" spamd
2099 -
2100 - systemd_newunit "${FILESDIR}/${PN}.service-r4" "${PN}.service"
2101 - systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r2" \
2102 - "${PN}.service"
2103 -
2104 - use postgres && dodoc sql/*_pg.sql
2105 - use mysql && dodoc sql/*_mysql.sql
2106 -
2107 - dodoc NOTICE TRADEMARK CREDITS UPGRADE USAGE sql/README.bayes \
2108 - sql/README.awl procmailrc.example sample-nonspam.txt \
2109 - sample-spam.txt spamd/PROTOCOL spamd/README.vpopmail \
2110 - spamd-apache2/README.apache
2111 -
2112 - # Rename some files so that they don't clash with others.
2113 - newdoc spamd/README README.spamd
2114 - newdoc sql/README README.sql
2115 - newdoc ldap/README README.ldap
2116 -
2117 - if use qmail; then
2118 - dodoc spamc/README.qmail
2119 - fi
2120 -
2121 - insinto /etc/mail/spamassassin/
2122 - insopts -m0400
2123 - newins "${FILESDIR}"/secrets.cf secrets.cf.example
2124 -
2125 - # Create the directory where sa-update stores its GPG key (if you
2126 - # choose to import one). If this directory does not exist, the
2127 - # import will fail. This is bug 396307. We expect that the import
2128 - # will be performed as root, and making the directory accessible
2129 - # only to root prevents a warning on the command-line.
2130 - diropts -m0700
2131 - dodir /etc/mail/spamassassin/sa-update-keys
2132 -
2133 - if use cron; then
2134 - # Install the cron job if they want it.
2135 - exeinto /etc/cron.daily
2136 - newexe "${FILESDIR}/update-spamassassin-rules.cron" \
2137 - update-spamassassin-rules
2138 - fi
2139 -
2140 - # Remove perllocal.pod to avoid file collisions (bug #603338).
2141 - perl_delete_localpod || die "failed to remove perllocal.pod"
2142 -
2143 - # The perl-module eclass calls three other functions to clean
2144 - # up in src_install. The first fixes references to ${D} in the
2145 - # packlist, and is useful to us, too. The other two functions,
2146 - # perl_delete_emptybsdir and perl_remove_temppath, don't seem
2147 - # to be needed: there are no empty directories, *.bs files, or
2148 - # ${D} paths remaining in our installed image.
2149 - perl_fix_packlist || die "failed to fix paths in packlist"
2150 -}
2151 -
2152 -src_test() {
2153 - # Trick the test suite into skipping the spamd tests. Setting
2154 - # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be
2155 - # set in SATest.pm.
2156 - export SPAMD_HOST=disabled
2157 - default
2158 -}
2159 -
2160 -pkg_preinst() {
2161 - # The spamd daemon runs as this user. Use a real home directory so
2162 - # that it can hold SA configuration.
2163 - enewuser spamd -1 -1 /home/spamd
2164 -}
2165 -
2166 -pkg_postinst() {
2167 - elog
2168 - elog 'No rules are installed by default. You will need to run sa-update'
2169 - elog 'at least once, and most likely configure SpamAssassin before it'
2170 - elog 'will work.'
2171 -
2172 - if ! use cron; then
2173 - elog
2174 - elog 'You should consider a cron job for sa-update. One is provided'
2175 - elog 'for daily updates if you enable the "cron" USE flag.'
2176 - fi
2177 - elog
2178 - elog 'Configuration and update help can be found on the wiki:'
2179 - elog
2180 - elog ' https://wiki.gentoo.org/wiki/SpamAssassin'
2181 - elog
2182 -
2183 - ewarn 'If this version of SpamAssassin causes permissions issues'
2184 - ewarn 'with your user configurations or bayes databases, then you'
2185 - ewarn 'may need to set SPAMD_RUN_AS_ROOT=true in your OpenRC service'
2186 - ewarn 'configuration file, or remove the --username and --groupname'
2187 - ewarn 'flags from the SPAMD_OPTS variable in your systemd service'
2188 - ewarn 'configuration file.'
2189 -}