From adacd774a0065e3b68f8b15107f83c20361d7827 Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 12:34:24 -0400 Subject: [PATCH] Import rpm: cadb93b19fa9d9a8fd374adfc06611c752532ba9 --- .gitignore | 1 + 0001-Port-to-hamcrest-2.2.patch | 108 ++++++++++++ create-tarball.sh | 22 +++ gating.yaml | 8 + generate-tarball.sh | 22 +++ junit.spec | 294 ++++++++++++++++++++++++++++++++ sources | 1 + 7 files changed, 456 insertions(+) create mode 100644 .gitignore create mode 100644 0001-Port-to-hamcrest-2.2.patch create mode 100755 create-tarball.sh create mode 100644 gating.yaml create mode 100755 generate-tarball.sh create mode 100644 junit.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6a623e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/junit-4.12-clean.tar.gz diff --git a/0001-Port-to-hamcrest-2.2.patch b/0001-Port-to-hamcrest-2.2.patch new file mode 100644 index 0000000..0d51ef4 --- /dev/null +++ b/0001-Port-to-hamcrest-2.2.patch @@ -0,0 +1,108 @@ +From 85c780b61cd35b4544d2926393805e1699641f38 Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Fri, 6 Mar 2020 14:28:05 +0100 +Subject: [PATCH] Port to hamcrest 2.2 + +--- + .../org/junit/internal/matchers/StacktracePrintingMatcher.java | 3 --- + .../org/junit/internal/matchers/ThrowableCauseMatcher.java | 2 -- + .../org/junit/internal/matchers/ThrowableMessageMatcher.java | 2 -- + src/main/java/org/junit/matchers/JUnitMatchers.java | 2 +- + .../experimental/theories/runner/WithDataPointMethod.java | 2 +- + 5 files changed, 2 insertions(+), 9 deletions(-) + +diff --git a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java +index 93a6827..3ea4a81 100644 +--- a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java ++++ b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java +@@ -1,7 +1,6 @@ + package org.junit.internal.matchers; + + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + + import org.junit.internal.Throwables; +@@ -39,13 +38,11 @@ public class StacktracePrintingMatcher extends + return Throwables.getStacktrace(throwable); + } + +- @Factory + public static Matcher isThrowable( + Matcher throwableMatcher) { + return new StacktracePrintingMatcher(throwableMatcher); + } + +- @Factory + public static Matcher isException( + Matcher exceptionMatcher) { + return new StacktracePrintingMatcher(exceptionMatcher); +diff --git a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java +index 6e2ff5e..1f0a0a0 100644 +--- a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java ++++ b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java +@@ -1,7 +1,6 @@ + package org.junit.internal.matchers; + + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + import org.hamcrest.TypeSafeMatcher; + +@@ -43,7 +42,6 @@ public class ThrowableCauseMatcher extends + * @param matcher to apply to the cause of the outer exception + * @param type of the outer exception + */ +- @Factory + public static Matcher hasCause(final Matcher matcher) { + return new ThrowableCauseMatcher(matcher); + } +diff --git a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java +index 74386a8..7d16b11 100644 +--- a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java ++++ b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java +@@ -1,7 +1,6 @@ + package org.junit.internal.matchers; + + import org.hamcrest.Description; +-import org.hamcrest.Factory; + import org.hamcrest.Matcher; + import org.hamcrest.TypeSafeMatcher; + +@@ -30,7 +29,6 @@ public class ThrowableMessageMatcher extends + matcher.describeMismatch(item.getMessage(), description); + } + +- @Factory + public static Matcher hasMessage(final Matcher matcher) { + return new ThrowableMessageMatcher(matcher); + } +diff --git a/src/main/java/org/junit/matchers/JUnitMatchers.java b/src/main/java/org/junit/matchers/JUnitMatchers.java +index 13407cc..8889266 100644 +--- a/src/main/java/org/junit/matchers/JUnitMatchers.java ++++ b/src/main/java/org/junit/matchers/JUnitMatchers.java +@@ -56,7 +56,7 @@ public class JUnitMatchers { + * @deprecated Please use {@link CoreMatchers#everyItem(Matcher)} instead. + */ + @Deprecated +- public static Matcher> everyItem(final Matcher elementMatcher) { ++ public static Matcher> everyItem(final Matcher elementMatcher) { + return CoreMatchers.everyItem(elementMatcher); + } + +diff --git a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java +index f2b2753..e5759ed 100644 +--- a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java ++++ b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java +@@ -108,7 +108,7 @@ public class WithDataPointMethod { + return JUnitCore.runClasses(type).getFailures(); + } + +- private Matcher> empty() { ++ private Matcher> empty() { + return everyItem(nullValue(Failure.class)); + } + } +-- +2.25.2 + diff --git a/create-tarball.sh b/create-tarball.sh new file mode 100755 index 0000000..1594760 --- /dev/null +++ b/create-tarball.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ $# -ne 1 ]; then + echo "Usage: ./create-tarball.sh VERSION" + exit 1 +fi + +VERSION=${1} +NAME="junit" + +wget https://github.com/${NAME}-team/${NAME}/archive/r${VERSION}.tar.gz +tar xvf r${VERSION}.tar.gz + +( + cd ${NAME}-r${VERSION} + find . -name "*.jar" -delete + find . -name "*.class" -delete +) + +tar czvf ${NAME}-${VERSION}-clean.tar.gz ${NAME}-r${VERSION} +rm -Rf ${NAME}-${VERSION}.tar.gz + diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..d6b7694 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - rhel-9 +decision_contexts: + - osci_compose_gate +rules: + # https://docs.engineering.redhat.com/display/RHELPLAN/Maven+Bootstrap+manual+gating+test + - !PassingTestCaseRule {test_case_name: manual.sst_cs_apps.maven.bootstrap} diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..76a4605 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +name=junit +version="$(sed -n 's/Version:\s*//p' *.spec)" + +# RETRIEVE +wget "https://github.com/junit-team/junit/archive/r${version}.tar.gz" -O "${name}-${version}.orig.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +pushd tarball-tmp +tar -xf "../${name}-${version}.orig.tar.gz" + +# CLEAN TARBALL +find -name '*.jar' -delete +find -name '*.class' -delete +rm -r "junit4-r${version}/src/site" + +tar -czf "../${name}-${version}.tar.gz" * +popd +rm -r tarball-tmp "${name}-${version}.orig.tar.gz" diff --git a/junit.spec b/junit.spec new file mode 100644 index 0000000..79e8de6 --- /dev/null +++ b/junit.spec @@ -0,0 +1,294 @@ +Name: junit +Epoch: 1 +Version: 4.12 +Release: 9%{?dist} +Summary: Java regression test package +License: EPL-1.0 +URL: http://www.junit.org/ +BuildArch: noarch + +# ./clean-tarball.sh %{version} +Source0: %{name}-%{version}-clean.tar.gz +Source3: create-tarball.sh + +BuildRequires: maven-local +BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) +BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) +BuildRequires: mvn(org.hamcrest:hamcrest-core) + +Obsoletes: %{name}-demo < 4.12 + +%description +JUnit is a regression testing framework written by Erich Gamma and Kent Beck. +It is used by the developer who implements unit tests in Java. JUnit is Open +Source Software, released under the Common Public License Version 1.0 and +hosted on GitHub. + +%package manual +Summary: Manual for %{name} + +%description manual +Documentation for %{name}. + +%package javadoc +Summary: Javadoc for %{name} + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -n %{name}-r%{version} + +# InaccessibleBaseClassTest fails with Java 8 +sed -i /InaccessibleBaseClassTest/d src/test/java/org/junit/tests/AllTests.java + +%pom_remove_plugin :replacer +sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >src/main/java/junit/runner/Version.java + +%pom_remove_plugin :animal-sniffer-maven-plugin + +# Removing hamcrest source jar references (not available and/or necessary) +%pom_remove_plugin :maven-javadoc-plugin + +# Add proper Apache Felix Bundle Plugin instructions +# so that we get a reasonable OSGi manifest. +%pom_xpath_inject pom:project "bundle" +%pom_xpath_inject pom:build/pom:plugins " + + org.apache.felix + maven-bundle-plugin + true + + + org.junit + {local-packages},!org.hamcrest*,*;x-internal:=true + <_nouses>true + + + " + +%mvn_file : %{name} + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%doc LICENSE-junit.txt README.md + +%files javadoc -f .mfiles-javadoc +%doc LICENSE-junit.txt + +%files manual +%doc LICENSE-junit.txt +%doc doc/* + +%changelog +* Mon Jul 2 2018 Mikolaj Izdebski - 1:4.12-9 +- Update license tag + +* Wed Feb 07 2018 Fedora Release Engineering - 1:4.12-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1:4.12-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 1:4.12-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jul 15 2016 Mat Booth - 1:4.12-5 +- Add missing BR + +* Thu Feb 04 2016 Fedora Release Engineering - 1:4.12-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 1:4.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jan 21 2015 Mikolaj Izdebski - 1:4.12-2 +- Export internal OSGi packages and mark them with x-internal +- Resolves: rhbz#1184144 + +* Mon Jan 19 2015 Mikolaj Izdebski - 1:4.12-1 +- Update to upstream version 4.12 +- Build with Maven +- Remove demo package + +* Mon Jun 9 2014 Mikolaj Izdebski - 1:4.11-14 +- Add epoch as workaround for a bug in koji-shadow + +* Mon Jun 9 2014 Mikolaj Izdebski - 4.11-13 +- Remove epoch + +* Sun Jun 8 2014 Peter Robinson 4.11-12 +- Re-add Epoch. Once you have it you can't remove it as it breaks upgrade paths + +* Sun Jun 08 2014 Fedora Release Engineering - 4.11-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 22 2014 Alexander Kurtakov 4.11-10 +- Update OSGi manifest to state 4.11. + +* Wed May 21 2014 Mikolaj Izdebski - 4.11-9 +- Update to current packaging guidelines +- Drop old Obsoletes/Provides for junit4 rename +- Disable test which fails with Java 8 + +* Tue Mar 04 2014 Stanislav Ochotnicky - 0:4.11-8 +- Use Requires: java-headless rebuild (#1067528) + +* Fri Aug 23 2013 Michal Srb - 0:4.11-7 +- Drop "-SNAPSHOT" from version ID +- See: https://lists.fedoraproject.org/pipermail/java-devel/2013-August/004923.html + +* Mon Aug 19 2013 Stanislav Ochotnicky - 0:4.11-6 +- Fix version in pom.xml (#998266) + +* Fri Aug 02 2013 Michal Srb - 0:4.11-5 +- Add create-tarball.sh script to SRPM + +* Fri Jun 28 2013 Mikolaj Izdebski - 0:4.11-4 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Fri Jun 21 2013 Michal Srb - 0:4.11-3 +- Build from clean tarball + +* Mon May 06 2013 Tomas Radej - 0:4.11-2 +- Removed uneeded dependencies + +* Thu Mar 21 2013 Tomas Radej - 0:4.11-1 +- Updated to latest upstream version + +* Thu Feb 14 2013 Fedora Release Engineering - 0:4.10-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Dec 18 2012 Michal Srb - 0:4.10-7 +- Build-time dependency perl-MD5 replaced with perl(Digest::MD5) +- Description cleanup (Resolves: #888389) + +* Thu Jul 19 2012 Fedora Release Engineering - 0:4.10-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Apr 30 2012 Krzysztof Daniel 0:4.10-5 +- Update OSGi metadata to match 4.10.0 release. + +* Thu Feb 09 2012 Harald Hoyer 4.10-4 +- removed Conflicts with itsself + +* Thu Jan 26 2012 Roland Grunberg 0:4.8.2-3 +- Add OSGi metadata to junit.jar manifest. + +* Thu Jan 26 2012 Tomas Radej - 0:4.10-2 +- Fixed versioning + +* Wed Jan 25 2012 Tomas Radej - 0:4.10-1 +- Updated to upstream 4.10 +- Obsoleted junit4 +- Epoch added + +* Fri Jan 13 2012 Fedora Release Engineering - 3.8.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 3.8.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Oct 7 2010 Alexander Kurtakov 3.8.2-7 +- Drop gcj support. + +* Fri Jul 24 2009 Fedora Release Engineering - 3.8.2-6.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 3.8.2-5.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Jul 9 2008 Tom "spot" Callaway - 3.8.2-4.4 +- drop repotag + +* Mon Feb 18 2008 Fedora Release Engineering - 3.8.2-4jpp.3 +- Autorebuild for GCC 4.3 + +* Thu Sep 20 2007 Deepak Bhole - 3.8.2-3jpp.3 +- Fix location of stylesheet for javadocs + +* Thu Sep 20 2007 Deepak Bhole - 3.8.2-3jpp.2 +- Rebuild for ppc32 execmem issue and new build-id + +* Mon Feb 12 2007 Thomas Fitzsimmons - 3.8.2-3jpp.1.fc7 +- Add dist tag + +* Mon Feb 12 2007 Thomas Fitzsimmons - 3.8.2-3jpp.1 +- Committed on behalf of Tania Bento +- Update per Fedora review process +- Resolves rhbz#225954 + +* Thu Aug 10 2006 Deepak Bhole - 0:3.8.2-3jpp.1 +- Added missing requirements. + +* Thu Aug 10 2006 Karsten Hopp 0:3.8.2-2jpp_3fc +- Require(post/postun): coreutils + +* Fri Jun 23 2006 Deepak Bhole - 0:3.8.2-2jpp_2fc +- Rebuilt. + +* Thu Jun 22 2006 Deepak Bhole - 0:3.8.2-2jpp_1fc +- Upgrade to 3.8.2 +- Added conditional native compilation. +- Fix path where demo is located. + +* Fri Mar 03 2006 Ralph Apel - 0:3.8.2-1jpp +- First JPP-1.7 release + +* Mon Aug 23 2004 Randy Watler - 0:3.8.1-4jpp +- Rebuild with ant-1.6.2 +* Fri May 09 2003 David Walluck 0:3.8.1-3jpp +- update for JPackage 1.5 + +* Fri Mar 21 2003 Nicolas Mailhot 3.8.1-2jpp +- For jpackage-utils 1.5 + +* Fri Sep 06 2002 Henri Gomez 3.8.1-1jpp +- 3.8.1 + +* Sun Sep 01 2002 Guillaume Rousse 3.8-2jpp +- used original zip file + +* Thu Aug 29 2002 Guillaume Rousse 3.8-1jpp +- 3.8 +- group, vendor and distribution tags + +* Sat Jan 19 2002 Guillaume Rousse 3.7-6jpp +- versioned dir for javadoc +- no dependencies for manual and javadoc packages +- stricter dependency for demo package +- additional sources in individual archives +- section macro + +* Sat Dec 1 2001 Guillaume Rousse 3.7-5jpp +- javadoc in javadoc package + +* Wed Nov 21 2001 Christian Zoffoli 3.7-4jpp +- fixed previous releases ...grrr + +* Wed Nov 21 2001 Christian Zoffoli 3.7-3jpp +- added jpp extension +- removed packager tag + +* Sun Sep 30 2001 Guillaume Rousse 3.7-2jpp +- first unified release +- s/jPackage/JPackage + +* Mon Sep 17 2001 Guillaume Rousse 3.7-1mdk +- 3.7 +- vendor tag +- packager tag +- s/Copyright/License/ +- truncated description to 72 columns in spec +- spec cleanup +- used versioned jar +- moved demo files to %%{_datadir}/%%{name} + +* Sat Feb 17 2001 Guillaume Rousse 3.5-1mdk +- first Mandrake release diff --git a/sources b/sources new file mode 100644 index 0000000..f304d7b --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA1 (junit-4.12-clean.tar.gz) = 8638be921555bc2a38baee8cfe0c7325b7d34650