From b05b5b4f6a2e427e5ba89248abb7aa2fa9ac9924 Mon Sep 17 00:00:00 2001 From: Antonio Trande Date: Thu, 29 Jul 2021 16:48:42 +0200 Subject: [PATCH] Use bundled junit| Fix hamcrest symlinks in Fedora 35+ --- hdf5.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/hdf5.spec b/hdf5.spec index 63f12f5..4afb4cc 100644 --- a/hdf5.spec +++ b/hdf5.spec @@ -162,15 +162,22 @@ HDF5 parallel openmpi static libraries %patch5 -p1 -b .wrappers # Replace jars with system versions -find -name \*.jar -delete +# hamcrest-core is obsoleted in hamcrest-2.2 +# Junit tests are failing with junit-4.13.1 +%if 0%{?rhel} >= 9 || 0%{?fedora} > 34 +find . ! -name junit.jar -name "*.jar" -delete +ln -s %{_javadir}/hamcrest/hamcrest.jar java/lib/hamcrest-core.jar +%else +find . -name "*.jar" -delete ln -s %{_javadir}/hamcrest/core.jar java/lib/hamcrest-core.jar ln -s %{_javadir}/junit.jar java/lib/junit.jar -ln -s %{_javadir}/slf4j/api.jar java/lib/slf4j-api-1.7.25.jar -ln -s %{_javadir}/slf4j/nop.jar java/lib/ext/slf4j-nop-1.7.25.jar -ln -s %{_javadir}/slf4j/simple.jar java/lib/ext/slf4j-simple-1.7.25.jar # Fix test output junit_ver=$(sed -n '//{s/^.*>\([0-9]\.[0-9.]*\)<.*/\1/;p;q}' /usr/share/maven-poms/junit.pom) sed -i -e "s/JUnit version .*/JUnit version $junit_ver/" java/test/testfiles/JUnit-*.txt +%endif +ln -s %{_javadir}/slf4j/api.jar java/lib/slf4j-api-1.7.25.jar +ln -s %{_javadir}/slf4j/nop.jar java/lib/ext/slf4j-nop-1.7.25.jar +ln -s %{_javadir}/slf4j/simple.jar java/lib/ext/slf4j-simple-1.7.25.jar # Force shared by default for compiler wrappers (bug #1266645) sed -i -e '/^STATIC_AVAILABLE=/s/=.*/=no/' */*/h5[cf]*.in @@ -478,8 +485,10 @@ done %changelog -* Thu Jul 22 2021 Fedora Release Engineering - 1.10.6-7 +* Thu Jul 29 2021 Antonio Trande - 1.10.6-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild +- Use bundled junit +- Fix hamcrest symlinks in Fedora 35+ * Sun May 30 2021 Orion Poplawski - 1.10.6-6 - Handle junit versions better