public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Haubenwallner" <haubi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/nullmailer/files/, mail-mta/nullmailer/
Date: Tue,  1 Oct 2019 12:40:10 +0000 (UTC)	[thread overview]
Message-ID: <1569933577.1121a40affec68c6a41cf77bcabce065aed584f2.haubi@gentoo> (raw)

commit:     1121a40affec68c6a41cf77bcabce065aed584f2
Author:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
AuthorDate: Tue Oct  1 12:34:59 2019 +0000
Commit:     Michael Haubenwallner <haubi <AT> gentoo <DOT> org>
CommitDate: Tue Oct  1 12:39:37 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1121a40a

mail-mta/nullmailer: import debian patches wrt tests

Fix a race condition while running tests, disable tests relying on
external resources like DNS and SMTP auth.

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Michael Haubenwallner <haubi <AT> gentoo.org>

 .../nullmailer-2.2-disable-dns-using-test.patch    | 26 ++++++++++
 .../nullmailer-2.2-disable-smtp-auth-tests.patch   | 57 ++++++++++++++++++++++
 .../nullmailer-2.2-fix-test-racecondition.patch    | 29 +++++++++++
 mail-mta/nullmailer/nullmailer-2.2.ebuild          |  6 +++
 4 files changed, 118 insertions(+)

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
new file mode 100644
index 00000000000..0c5939ab004
--- /dev/null
+++ b/mail-mta/nullmailer/files/nullmailer-2.2-disable-dns-using-test.patch
@@ -0,0 +1,26 @@
+https://sources.debian.org/data/main/n/nullmailer/1:2.2-3/debian/patches/0006-Disable-DNS-using-test.patch
+
+From: David Bremner <david@tethera.net>
+Date: Wed, 31 Oct 2018 09:18:53 -0300
+Subject: Disable DNS using test.
+
+This is probably against policy, and causes build failures in pbuilder
+---
+ test/tests/protocols | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/tests/protocols b/test/tests/protocols
+index 52209d7..8f67b0a 100644
+--- a/test/tests/protocols
++++ b/test/tests/protocols
+@@ -28,8 +28,8 @@ do
+ 
+ 	stop server
+ 
+-	echo "Testing host not found error with $p."
+-	error 2 protocol $p --host=this.host.can.not.exist 3<$testmail
++#	echo "Testing host not found error with $p."
++#	error 2 protocol $p --host=this.host.can.not.exist 3<$testmail
+ 
+ 	echo "Testing connection refused error with $p."
+ 	error 7 protocol $p -p $port --host=localhost 3<$testmail

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
new file mode 100644
index 00000000000..f66a4841f4f
--- /dev/null
+++ b/mail-mta/nullmailer/files/nullmailer-2.2-disable-smtp-auth-tests.patch
@@ -0,0 +1,57 @@
+https://sources.debian.org/data/main/n/nullmailer/1:2.2-3/debian/patches/0007-disable-all-smtp-auth-tests.patch
+
+From: David Bremner <david@tethera.net>
+Date: Tue, 25 Dec 2018 08:18:35 +0900
+Subject: disable all smtp-auth tests
+
+These seem racy in ways that I haven't been able to completely nail down
+---
+ test/tests/smtp-auth | 32 ++++++++++++++++----------------
+ 1 file changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/test/tests/smtp-auth b/test/tests/smtp-auth
+index 52e12d0..2dc736f 100644
+--- a/test/tests/smtp-auth
++++ b/test/tests/smtp-auth
+@@ -1,25 +1,25 @@
+ . functions
+ export HELOHOST=f.q.d.n
+ 
+-make-testmail
++# make-testmail
+ 
+-start server "tcpserver -1 ::0 0 sh $srcdir/test/authtest-smtp.sh $tmpdir/smtp-result"
+-catch-port server
++# start server "tcpserver -1 ::0 0 sh $srcdir/test/authtest-smtp.sh $tmpdir/smtp-result"
++# catch-port server
+ 
+-echo 'Testing auth success with smtp'
+-echo '250 OK' > $tmpdir/smtp-result
+-protocol smtp --host=localhost --port=$port --user=example --pass=example 3<$testmail
++# echo 'Testing auth success with smtp'
++# echo '250 OK' > $tmpdir/smtp-result
++# protocol smtp --host=localhost --port=$port --user=example --pass=example 3<$testmail
+ 
+-echo 'Testing auth login success with smtp'
+-echo $'350 Go ahead\n250 AUTH' > $tmpdir/smtp-result
+-protocol smtp --host=localhost --port=$port --user=example --pass=example --auth-login 3<$testmail
++# echo 'Testing auth login success with smtp'
++# echo $'350 Go ahead\n250 AUTH' > $tmpdir/smtp-result
++# protocol smtp --host=localhost --port=$port --user=example --pass=example --auth-login 3<$testmail
+ 
+-echo 'Testing auth temporary failure with smtp'
+-echo '450 No' > $tmpdir/smtp-result
+-error 16 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
++# echo 'Testing auth temporary failure with smtp'
++# echo '450 No' > $tmpdir/smtp-result
++# error 16 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
+ 
+-echo 'Testing auth permanent failure with smtp'
+-echo '550 No' > $tmpdir/smtp-result
+-error 20 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
++# echo 'Testing auth permanent failure with smtp'
++# echo '550 No' > $tmpdir/smtp-result
++# error 20 protocol smtp --host=localhost --port $port --user=example --pass=example 3<$testmail
+ 
+-stop server
++# stop server

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
new file mode 100644
index 00000000000..8f721d8d8cc
--- /dev/null
+++ b/mail-mta/nullmailer/files/nullmailer-2.2-fix-test-racecondition.patch
@@ -0,0 +1,29 @@
+https://sources.debian.org/data/main/n/nullmailer/1:2.2-3/debian/patches/0001-Remove-race-conditions-from-tests.patch
+
+From: Felix Lechner <felix.lechner@lease-up.com>
+Date: Sat, 2 Sep 2017 09:57:43 -0300
+Subject: Remove race conditions from tests
+
+Testing the qmqp protocol fails because the testing server cannot
+acquire the lock.  This is solved by waiting for the previous
+server to exit gracefully and clear the lock. Similarly, wait
+before removing temporary directories.
+
+Forwarded: no
+Last-Update: 2017-10-07
+---
+ test/tests/protocols | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/test/tests/protocols b/test/tests/protocols
+index 0309d12..52209d7 100644
+--- a/test/tests/protocols
++++ b/test/tests/protocols
+@@ -54,6 +54,7 @@ do
+ 	echo "Testing protocol failure with $p."
+ 	error 11 protocol $p -p $port --host=localhost 3<$testmail
+ 	stop server
++	wait
+ done
+ 
+ stop server

diff --git a/mail-mta/nullmailer/nullmailer-2.2.ebuild b/mail-mta/nullmailer/nullmailer-2.2.ebuild
index 178c1507ac2..59e8c37fad7 100644
--- a/mail-mta/nullmailer/nullmailer-2.2.ebuild
+++ b/mail-mta/nullmailer/nullmailer-2.2.ebuild
@@ -35,6 +35,12 @@ RDEPEND="
 	!mail-mta/ssmtp[mta(+)]
 "
 
+PATCHES=(
+	"${FILESDIR}/${P}-fix-test-racecondition.patch"
+	"${FILESDIR}/${P}-disable-dns-using-test.patch"
+	"${FILESDIR}/${P}-disable-smtp-auth-tests.patch"
+)
+
 pkg_setup() {
 	enewgroup nullmail 88
 	enewuser nullmail 88 -1 /var/spool/nullmailer nullmail


             reply	other threads:[~2019-10-01 12:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 12:40 Michael Haubenwallner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-15  6:02 [gentoo-commits] repo/gentoo:master commit in: mail-mta/nullmailer/files/, mail-mta/nullmailer/ Joonas Niilola
2016-11-26 14:49 Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1569933577.1121a40affec68c6a41cf77bcabce065aed584f2.haubi@gentoo \
    --to=haubi@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox