commit:     e5bf3454458975e7940336e8cfe722993d5fc720
Author:     Gabi Falk <gabifalk <AT> gmx <DOT> com>
AuthorDate: Wed Feb 26 15:00:00 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 26 22:15:13 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5bf3454

media-libs/tiff: fix race condition in tests

Closes: https://bugs.gentoo.org/943020
Signed-off-by: Gabi Falk <gabifalk <AT> gmx.com>
Closes: https://github.com/gentoo/gentoo/pull/40774
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../tiff/files/tiff-4.7.0-fix-test-race.patch      | 30 ++++++++++++++++++++++
 media-libs/tiff/tiff-4.7.0-r1.ebuild               |  2 ++
 media-libs/tiff/tiff-4.7.0.ebuild                  |  4 ++-
 3 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/media-libs/tiff/files/tiff-4.7.0-fix-test-race.patch 
b/media-libs/tiff/files/tiff-4.7.0-fix-test-race.patch
new file mode 100644
index 000000000000..3c26eb617b1b
--- /dev/null
+++ b/media-libs/tiff/files/tiff-4.7.0-fix-test-race.patch
@@ -0,0 +1,30 @@
+https://gitlab.com/libtiff/libtiff/-/merge_requests/701
+https://bugs.gentoo.org/943020
+
+From efadbbd8746d2c6c8129438716e2c1e8aeecafdb Mon Sep 17 00:00:00 2001
+From: Gabi Falk <[email protected]>
+Date: Wed, 26 Feb 2025 14:00:00 +0000
+Subject: [PATCH] test: Fix race condition in
+ {tiffcrop,tiffcp}-32bpp-None-jpeg.sh tests
+
+These tests used the same output path, which could cause failures
+when run in parallel.  These were the only tests with a conflicting
+outfile= parameter.
+
+Link: https://bugs.gentoo.org/943020
+---
+ test/tiffcrop-32bpp-None-jpeg.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/tiffcrop-32bpp-None-jpeg.sh 
b/test/tiffcrop-32bpp-None-jpeg.sh
+index 9b0d1f5f..4a47f6ed 100755
+--- a/test/tiffcrop-32bpp-None-jpeg.sh
++++ b/test/tiffcrop-32bpp-None-jpeg.sh
+@@ -2,6 +2,6 @@
+ # Generated file, master is Makefile.am
+ . ${srcdir:-.}/common.sh
+ infile="$srcdir/images/32bpp-None-jpeg.tiff"
+-outfile="o-tiffcp-32bpp-None-jpeg-YCbCr.tiff"
++outfile="o-tiffcrop-32bpp-None-jpeg-YCbCr.tiff"
+ f_test_convert "${TIFFCROP} -c jpeg" $infile $outfile
+ f_tiffinfo_validate $outfile

diff --git a/media-libs/tiff/tiff-4.7.0-r1.ebuild 
b/media-libs/tiff/tiff-4.7.0-r1.ebuild
index 838fe7bab110..594d624584af 100644
--- a/media-libs/tiff/tiff-4.7.0-r1.ebuild
+++ b/media-libs/tiff/tiff-4.7.0-r1.ebuild
@@ -50,6 +50,8 @@ MULTILIB_WRAPPED_HEADERS=(
        /usr/include/tiffconf.h
 )
 
+PATCHES=( "${FILESDIR}"/${P}-fix-test-race.patch ) # bug#943020
+
 src_prepare() {
        default
 

diff --git a/media-libs/tiff/tiff-4.7.0.ebuild 
b/media-libs/tiff/tiff-4.7.0.ebuild
index e1c35e00870a..84d12692c130 100644
--- a/media-libs/tiff/tiff-4.7.0.ebuild
+++ b/media-libs/tiff/tiff-4.7.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -45,6 +45,8 @@ MULTILIB_WRAPPED_HEADERS=(
        /usr/include/tiffconf.h
 )
 
+PATCHES=( "${FILESDIR}"/${P}-fix-test-race.patch ) # bug#943020
+
 src_prepare() {
        default
 

Reply via email to