From 295a8cf15bbe60888ee3384f56a7f2991b8fe3ad Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 30 Sep 2024 15:08:39 +0000 Subject: [PATCH] import CS ant-1.10.9-8.el9 --- SOURCES/ant-openjdk-jpeg-cmyk.patch | 29 +++++++++++++++++++++++++++++ SPECS/ant.spec | 10 ++++++++-- 2 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 SOURCES/ant-openjdk-jpeg-cmyk.patch diff --git a/SOURCES/ant-openjdk-jpeg-cmyk.patch b/SOURCES/ant-openjdk-jpeg-cmyk.patch new file mode 100644 index 0000000..2c0bdfc --- /dev/null +++ b/SOURCES/ant-openjdk-jpeg-cmyk.patch @@ -0,0 +1,29 @@ +diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java +index 537a4e8ffaf3af22..bfc8a011ad4b21f8 100644 +--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java ++++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/image/ImageIOTest.java +@@ -28,6 +28,7 @@ import org.junit.rules.ExpectedException; + + import java.io.File; + ++import static org.hamcrest.Matchers.anyOf; + import static org.hamcrest.Matchers.containsString; + import static org.junit.Assert.assertEquals; + import static org.junit.Assert.assertThat; +@@ -132,13 +133,13 @@ public class ImageIOTest { + + @Test + public void testFailOnError() { +- final String message = "Unsupported Image Type"; + thrown.expect(BuildException.class); +- thrown.expectMessage(message); + try { + buildRule.executeTarget("testFailOnError"); + } finally { +- assertThat(buildRule.getLog(), containsString(message)); ++ assertThat(buildRule.getLog(), ++ anyOf(containsString("Unsupported Image Type"), ++ containsString("Unknown image type"))); + } + } + diff --git a/SPECS/ant.spec b/SPECS/ant.spec index f26d84f..47266f6 100644 --- a/SPECS/ant.spec +++ b/SPECS/ant.spec @@ -34,7 +34,7 @@ Name: ant Version: 1.10.9 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Java build tool Summary(it): Tool per la compilazione di programmi java Summary(fr): Outil de compilation pour java @@ -46,6 +46,7 @@ Source2: apache-ant-1.8.ant.conf Source3: ant.asciidoc Patch0: %{name}-build.xml.patch +Patch1: %{name}-openjdk-jpeg-cmyk.patch BuildRequires: asciidoc BuildRequires: xmlto @@ -327,6 +328,7 @@ Javadoc pour %{name}. %prep %setup -q -n apache-ant-%{version} %patch0 -p0 +%patch1 -p1 # clean jar files find . -name "*.jar" | xargs -t rm @@ -505,7 +507,7 @@ install -p -m 644 man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %if %{without bootstrap} %check -LC_ALL=C.UTF-8 %{ant} test +LC_ALL=C.UTF-8 %{ant} -Doffline=true test %endif %files @@ -636,6 +638,10 @@ LC_ALL=C.UTF-8 %{ant} test # ----------------------------------------------------------------------------- %changelog +* Thu Jun 13 2024 Mikolaj Izdebski - 1.10.9-8 +- Fix test failures due to JPEG CMYK support in OpenJDK +- Resolves: RHEL-5354 + * Mon Aug 09 2021 Mohan Boddu - 1.10.9-7 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688