From c8ec4e6abb9aa9c9623db29c3b969d4517e7f037 Mon Sep 17 00:00:00 2001 From: Antonio Trande Date: Wed, 28 Jul 2021 11:52:28 +0200 Subject: [PATCH] Use bundled junit| Fix hamcrest symlinks in Fedora 35+ --- hdf.spec | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hdf.spec b/hdf.spec index a8d2ce0..1705188 100644 --- a/hdf.spec +++ b/hdf.spec @@ -108,21 +108,22 @@ HDF4 java library %patch11 -p1 -b .build # 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%{?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 -%endif 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 ## Fix syntax error bacause 'CLASSPATH_ENV=$H4_CLASSPATH' line on epel6 builds # Use only if java is disabled @@ -266,8 +267,10 @@ make -j1 -C build-static check %changelog -* Thu Jul 22 2021 Fedora Release Engineering - 4.2.15-6 +* Wed Jul 28 2021 Antonio Trande - 4.2.15-6 - 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 - 4.2.15-5 - Handle junit versions better