commit:     6f8585de7ea586a36cbc06530346f855540d25e0
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 28 19:08:38 2020 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 19:08:55 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f8585de

mail-filter/opendkim: new revision to disable parallel tests.

The test suite for OpenDKIM currently relies on two "setup" and
"cleanup" tests being run at the beginning/end of the test suite,
respectively. But when the test suite is run in parallel, that's not
always guaranteed. This new revision runs the test suite sequentially
to avoid the problem, which has been reported upstream.  The credit
for this goes to klondike, who was able to determine the root cause of
the heisenbug.

In the process, a minor security vulnerability (insecure /tmp path)
was also reported upstream and fixed in the ebuild.

Closes: https://bugs.gentoo.org/745969
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 ...ndkim-2.10.3-r25.ebuild => opendkim-2.10.3-r26.ebuild} | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/mail-filter/opendkim/opendkim-2.10.3-r25.ebuild 
b/mail-filter/opendkim/opendkim-2.10.3-r26.ebuild
similarity index 93%
rename from mail-filter/opendkim/opendkim-2.10.3-r25.ebuild
rename to mail-filter/opendkim/opendkim-2.10.3-r26.ebuild
index b105074a89a..5aad117eed3 100644
--- a/mail-filter/opendkim/opendkim-2.10.3-r25.ebuild
+++ b/mail-filter/opendkim/opendkim-2.10.3-r26.ebuild
@@ -68,6 +68,15 @@ src_prepare() {
        sed -e 's:dist_doc_DATA:dist_html_DATA:' \
                -i libopendkim/docs/Makefile.am \
                || die
+
+       # The existing hard-coded path under /tmp is vulnerable to exploits
+       # since (for example) a user can create a symlink there to a file
+       # that portage will clobber. Reported upstream at,
+       #
+       #   https://github.com/trusteddomainproject/OpenDKIM/issues/113
+       #
+       sed -e "s:/tmp:${T}:" -i libopendkim/tests/t-testdata.h || die
+
        eautoreconf
 }
 
@@ -121,6 +130,12 @@ src_compile() {
        emake runstatedir=/run
 }
 
+src_test() {
+       # Needed for now due to the expected sequencing of the setup/cleanup
+       # tests, https://github.com/trusteddomainproject/OpenDKIM/issues/110
+       emake -j1 check
+}
+
 src_install() {
        default
        find "${D}" -name '*.la' -type f -delete || die

Reply via email to