Gentoo Archives: gentoo-commits

From: Michael Haubenwallner <haubi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/nullmailer/files/, mail-mta/nullmailer/
Date: Tue, 01 Oct 2019 12:40:24
Message-Id: 1569933577.1121a40affec68c6a41cf77bcabce065aed584f2.haubi@gentoo
1 commit: 1121a40affec68c6a41cf77bcabce065aed584f2
2 Author: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Oct 1 12:34:59 2019 +0000
4 Commit: Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
5 CommitDate: Tue Oct 1 12:39:37 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1121a40a
7
8 mail-mta/nullmailer: import debian patches wrt tests
9
10 Fix a race condition while running tests, disable tests relying on
11 external resources like DNS and SMTP auth.
12
13 Package-Manager: Portage-2.3.69, Repoman-2.3.16
14 Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>
15
16 .../nullmailer-2.2-disable-dns-using-test.patch | 26 ++++++++++
17 .../nullmailer-2.2-disable-smtp-auth-tests.patch | 57 ++++++++++++++++++++++
18 .../nullmailer-2.2-fix-test-racecondition.patch | 29 +++++++++++
19 mail-mta/nullmailer/nullmailer-2.2.ebuild | 6 +++
20 4 files changed, 118 insertions(+)
21
22 diff --git a/mail-mta/nullmailer/files/nullmailer-2.2-disable-dns-using-test.patch b/mail-mta/nullmailer/files/nullmailer-2.2-disable-dns-using-test.patch
23 new file mode 100644
24 index 00000000000..0c5939ab004
25 --- /dev/null
26 +++ b/mail-mta/nullmailer/files/nullmailer-2.2-disable-dns-using-test.patch
27 @@ -0,0 +1,26 @@
28 +https://sources.debian.org/data/main/n/nullmailer/1:2.2-3/debian/patches/0006-Disable-DNS-using-test.patch
29 +
30 +From: David Bremner <david@×××××××.net>
31 +Date: Wed, 31 Oct 2018 09:18:53 -0300
32 +Subject: Disable DNS using test.
33 +
34 +This is probably against policy, and causes build failures in pbuilder
35 +---
36 + test/tests/protocols | 4 ++--
37 + 1 file changed, 2 insertions(+), 2 deletions(-)
38 +
39 +diff --git a/test/tests/protocols b/test/tests/protocols
40 +index 52209d7..8f67b0a 100644
41 +--- a/test/tests/protocols
42 ++++ b/test/tests/protocols
43 +@@ -28,8 +28,8 @@ do
44 +
45 + stop server
46 +
47 +- echo "Testing host not found error with $p."
48 +- error 2 protocol $p --host=this.host.can.not.exist 3<$testmail
49 ++# echo "Testing host not found error with $p."
50 ++# error 2 protocol $p --host=this.host.can.not.exist 3<$testmail
51 +
52 + echo "Testing connection refused error with $p."
53 + error 7 protocol $p -p $port --host=localhost 3<$testmail
54
55 diff --git a/mail-mta/nullmailer/files/nullmailer-2.2-disable-smtp-auth-tests.patch b/mail-mta/nullmailer/files/nullmailer-2.2-disable-smtp-auth-tests.patch
56 new file mode 100644
57 index 00000000000..f66a4841f4f
58 --- /dev/null
59 +++ b/mail-mta/nullmailer/files/nullmailer-2.2-disable-smtp-auth-tests.patch
60 @@ -0,0 +1,57 @@
61 +https://sources.debian.org/data/main/n/nullmailer/1:2.2-3/debian/patches/0007-disable-all-smtp-auth-tests.patch
62 +
63 +From: David Bremner <david@×××××××.net>
64 +Date: Tue, 25 Dec 2018 08:18:35 +0900
65 +Subject: disable all smtp-auth tests
66 +
67 +These seem racy in ways that I haven't been able to completely nail down
68 +---
69 + test/tests/smtp-auth | 32 ++++++++++++++++----------------
70 + 1 file changed, 16 insertions(+), 16 deletions(-)
71 +
72 +diff --git a/test/tests/smtp-auth b/test/tests/smtp-auth
73 +index 52e12d0..2dc736f 100644
74 +--- a/test/tests/smtp-auth
75 ++++ b/test/tests/smtp-auth
76 +@@ -1,25 +1,25 @@
77 + . functions
78 + export HELOHOST=f.q.d.n
79 +
80 +-make-testmail
81 ++# make-testmail
82 +
83 +-start server "tcpserver -1 ::0 0 sh $srcdir/test/authtest-smtp.sh $tmpdir/smtp-result"
84 +-catch-port server
85 ++# start server "tcpserver -1 ::0 0 sh $srcdir/test/authtest-smtp.sh $tmpdir/smtp-result"
86 ++# catch-port server
87 +
88 +-echo 'Testing auth success with smtp'
89 +-echo '250 OK' > $tmpdir/smtp-result
90 +-protocol smtp --host=localhost --port=$port --user=example --pass=example 3<$testmail
91 ++# echo 'Testing auth success with smtp'
92 ++# echo '250 OK' > $tmpdir/smtp-result
93 ++# protocol smtp --host=localhost --port=$port --user=example --pass=example 3<$testmail
94 +
95 +-echo 'Testing auth login success with smtp'
96 +-echo $'350 Go ahead\n250 AUTH' > $tmpdir/smtp-result
97 +-protocol smtp --host=localhost --port=$port --user=example --pass=example --auth-login 3<$testmail
98 ++# echo 'Testing auth login success with smtp'
99 ++# echo $'350 Go ahead\n250 AUTH' > $tmpdir/smtp-result
100 ++# protocol smtp --host=localhost --port=$port --user=example --pass=example --auth-login 3<$testmail
101 +
102 +-echo 'Testing auth temporary failure with smtp'
103 +-echo '450 No' > $tmpdir/smtp-result
104 +-error 16 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
105 ++# echo 'Testing auth temporary failure with smtp'
106 ++# echo '450 No' > $tmpdir/smtp-result
107 ++# error 16 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
108 +
109 +-echo 'Testing auth permanent failure with smtp'
110 +-echo '550 No' > $tmpdir/smtp-result
111 +-error 20 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
112 ++# echo 'Testing auth permanent failure with smtp'
113 ++# echo '550 No' > $tmpdir/smtp-result
114 ++# error 20 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
115 +
116 +-stop server
117 ++# stop server
118
119 diff --git a/mail-mta/nullmailer/files/nullmailer-2.2-fix-test-racecondition.patch b/mail-mta/nullmailer/files/nullmailer-2.2-fix-test-racecondition.patch
120 new file mode 100644
121 index 00000000000..8f721d8d8cc
122 --- /dev/null
123 +++ b/mail-mta/nullmailer/files/nullmailer-2.2-fix-test-racecondition.patch
124 @@ -0,0 +1,29 @@
125 +https://sources.debian.org/data/main/n/nullmailer/1:2.2-3/debian/patches/0001-Remove-race-conditions-from-tests.patch
126 +
127 +From: Felix Lechner <felix.lechner@××××××××.com>
128 +Date: Sat, 2 Sep 2017 09:57:43 -0300
129 +Subject: Remove race conditions from tests
130 +
131 +Testing the qmqp protocol fails because the testing server cannot
132 +acquire the lock. This is solved by waiting for the previous
133 +server to exit gracefully and clear the lock. Similarly, wait
134 +before removing temporary directories.
135 +
136 +Forwarded: no
137 +Last-Update: 2017-10-07
138 +---
139 + test/tests/protocols | 1 +
140 + 1 file changed, 1 insertion(+)
141 +
142 +diff --git a/test/tests/protocols b/test/tests/protocols
143 +index 0309d12..52209d7 100644
144 +--- a/test/tests/protocols
145 ++++ b/test/tests/protocols
146 +@@ -54,6 +54,7 @@ do
147 + echo "Testing protocol failure with $p."
148 + error 11 protocol $p -p $port --host=localhost 3<$testmail
149 + stop server
150 ++ wait
151 + done
152 +
153 + stop server
154
155 diff --git a/mail-mta/nullmailer/nullmailer-2.2.ebuild b/mail-mta/nullmailer/nullmailer-2.2.ebuild
156 index 178c1507ac2..59e8c37fad7 100644
157 --- a/mail-mta/nullmailer/nullmailer-2.2.ebuild
158 +++ b/mail-mta/nullmailer/nullmailer-2.2.ebuild
159 @@ -35,6 +35,12 @@ RDEPEND="
160 !mail-mta/ssmtp[mta(+)]
161 "
162
163 +PATCHES=(
164 + "${FILESDIR}/${P}-fix-test-racecondition.patch"
165 + "${FILESDIR}/${P}-disable-dns-using-test.patch"
166 + "${FILESDIR}/${P}-disable-smtp-auth-tests.patch"
167 +)
168 +
169 pkg_setup() {
170 enewgroup nullmail 88
171 enewuser nullmail 88 -1 /var/spool/nullmailer nullmail