Compare commits

..

No commits in common. "c8-stream-201902" and "c8-beta-stream-202201" have entirely different histories.

6 changed files with 110 additions and 141 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
SOURCES/junit-4.12-clean.tar.gz

View File

@ -1 +1,2 @@
8638be921555bc2a38baee8cfe0c7325b7d34650 SOURCES/junit-4.12-clean.tar.gz
c1dd8217f9c14e47eea2272a66515f195ddb311c SOURCES/generate-tarball.sh
f076a21f66401bdd79263ba0e464c95018a2365d SOURCES/junit-4.13.1.tar.gz

View File

@ -1,7 +1,7 @@
From 9507c7b942a25f89428c95abb0012d30aff0ca9b Mon Sep 17 00:00:00 2001
From 85c780b61cd35b4544d2926393805e1699641f38 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Thu, 29 Aug 2019 12:48:20 +0200
Subject: [PATCH] Port to hamcrest 2.1
Date: Fri, 6 Mar 2020 14:28:05 +0100
Subject: [PATCH] Port to hamcrest 2.2
---
.../org/junit/internal/matchers/StacktracePrintingMatcher.java | 3 ---
@ -12,19 +12,19 @@ Subject: [PATCH] Port to hamcrest 2.1
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 5d45ba3..6e94a67 100644
index 93a6827..3ea4a81 100644
--- a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
+++ b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
@@ -4,7 +4,6 @@ import java.io.PrintWriter;
import java.io.StringWriter;
@@ -1,7 +1,6 @@
package org.junit.internal.matchers;
import org.hamcrest.Description;
-import org.hamcrest.Factory;
import org.hamcrest.Matcher;
/**
@@ -42,13 +41,11 @@ public class StacktracePrintingMatcher<T extends Throwable> extends
return stringWriter.toString();
import org.junit.internal.Throwables;
@@ -39,13 +38,11 @@ public class StacktracePrintingMatcher<T extends Throwable> extends
return Throwables.getStacktrace(throwable);
}
- @Factory
@ -38,7 +38,7 @@ index 5d45ba3..6e94a67 100644
Matcher<T> exceptionMatcher) {
return new StacktracePrintingMatcher<T>(exceptionMatcher);
diff --git a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
index 22ce8bd..4fa89e7 100644
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 @@
@ -54,7 +54,7 @@ index 22ce8bd..4fa89e7 100644
* @param <T> type of the outer exception
*/
- @Factory
public static <T extends Throwable> Matcher<T> hasCause(final Matcher<? extends Throwable> matcher) {
public static <T extends Throwable> Matcher<T> hasCause(final Matcher<?> matcher) {
return new ThrowableCauseMatcher<T>(matcher);
}
diff --git a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
@ -91,7 +91,7 @@ index 13407cc..8889266 100644
}
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 c814508..ce22ef4 100644
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 {
@ -104,5 +104,5 @@ index c814508..ce22ef4 100644
}
}
--
2.21.0
2.25.2

View File

@ -1,90 +0,0 @@
From abb2895b7faf07817644e69e34701af6e88204e7 Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Wed, 30 Oct 2019 17:16:11 +0100
Subject: [PATCH] Port to OpenJDK 11
---
.../junit/runners/model/TestClassTest.java | 3 ++
.../junit/tests/running/core/MainRunner.java | 31 -------------------
2 files changed, 3 insertions(+), 31 deletions(-)
diff --git a/src/test/java/org/junit/runners/model/TestClassTest.java b/src/test/java/org/junit/runners/model/TestClassTest.java
index 7682968..810de25 100644
--- a/src/test/java/org/junit/runners/model/TestClassTest.java
+++ b/src/test/java/org/junit/runners/model/TestClassTest.java
@@ -135,6 +135,9 @@ public class TestClassTest {
}
}
+ /// The class Object starting from JDK9 has its own annotations
+ /// which causes this test to fail
+ @Ignore
@Test
public void providesAnnotatedMethodsSortedByName() {
TestClass tc = new TestClass(MethodsAnnotated.class);
diff --git a/src/test/java/org/junit/tests/running/core/MainRunner.java b/src/test/java/org/junit/tests/running/core/MainRunner.java
index 31f01e8..076a212 100644
--- a/src/test/java/org/junit/tests/running/core/MainRunner.java
+++ b/src/test/java/org/junit/tests/running/core/MainRunner.java
@@ -39,11 +39,6 @@ public class MainRunner {
throw new ExitException(status);
}
- @Override
- public boolean getInCheck() {
- return (originalSecurityManager != null) && originalSecurityManager.getInCheck();
- }
-
@Override
public Object getSecurityContext() {
return (originalSecurityManager == null) ? super.getSecurityContext() : originalSecurityManager.getSecurityContext();
@@ -196,11 +191,6 @@ public class MainRunner {
}
}
- @Override
- public boolean checkTopLevelWindow(Object window) {
- return (originalSecurityManager == null) ? super.checkTopLevelWindow(window) : originalSecurityManager.checkTopLevelWindow(window);
- }
-
@Override
public void checkPrintJobAccess() {
if (originalSecurityManager != null) {
@@ -208,20 +198,6 @@ public class MainRunner {
}
}
- @Override
- public void checkSystemClipboardAccess() {
- if (originalSecurityManager != null) {
- originalSecurityManager.checkSystemClipboardAccess();
- }
- }
-
- @Override
- public void checkAwtEventQueueAccess() {
- if (originalSecurityManager != null) {
- originalSecurityManager.checkAwtEventQueueAccess();
- }
- }
-
@Override
public void checkPackageAccess(String pkg) {
if (originalSecurityManager != null) {
@@ -243,13 +219,6 @@ public class MainRunner {
}
}
- @Override
- public void checkMemberAccess(Class<?> clazz, int which) {
- if (originalSecurityManager != null) {
- originalSecurityManager.checkMemberAccess(clazz, which);
- }
- }
-
@Override
public void checkSecurityAccess(String target) {
if (originalSecurityManager != null) {
--
2.21.0

View File

@ -1,22 +0,0 @@
#!/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

View File

@ -1,23 +1,36 @@
%bcond_with bootstrap
Name: junit
Version: 4.12
Release: 11%{?dist}
Epoch: 1
Version: 4.13.1
Release: 8%{?dist}
Summary: Java regression test package
License: EPL-1.0
URL: http://www.junit.org/
BuildArch: noarch
ExclusiveArch: %{java_arches} noarch
# ./clean-tarball.sh %{version}
Source0: %{name}-%{version}-clean.tar.gz
Source3: create-tarball.sh
# ./generate-tarball.sh
Source0: %{name}-%{version}.tar.gz
Source1: generate-tarball.sh
Patch1: 0001-Port-to-hamcrest-2.1.patch
Patch2: 0002-Port-to-OpenJDK-11.patch
Patch1: 0001-Port-to-hamcrest-2.2.patch
%if %{with bootstrap}
BuildRequires: javapackages-bootstrap
%else
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)
%endif
# For other packages, surefire-junit4 is normally pulled as transitive
# runtime dependency of junit, but junit doesn't build-depend on
# itself, so explicit BR on surefire-junit4 is needed.
%if %{without bootstrap}
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit4)
%endif
%description
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
@ -38,10 +51,9 @@ Summary: Javadoc for %{name}
Javadoc for %{name}.
%prep
%setup -q -n %{name}-r%{version}
%setup -q -n junit4-r%{version}
%patch1 -p1
%patch2 -p1
# InaccessibleBaseClassTest fails with Java 8
sed -i /InaccessibleBaseClassTest/d src/test/java/org/junit/tests/AllTests.java
@ -73,29 +85,97 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr
%mvn_file : %{name}
%mvn_alias junit:junit junit:junit-dep
%build
%mvn_build -- -DjdkVersion=1.6
%mvn_build -- -DjdkVersion=1.7 -P\!restrict-doclint
%install
%mvn_install
%files -f .mfiles
%doc LICENSE-junit.txt README.md
%license LICENSE-junit.txt
%doc README.md
%files javadoc -f .mfiles-javadoc
%doc LICENSE-junit.txt
%license LICENSE-junit.txt
%files manual
%doc LICENSE-junit.txt
%license LICENSE-junit.txt
%doc doc/*
%changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.13.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1:4.13.1-7
- Rebuilt for java-17-openjdk as system jdk
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.13.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Nov 02 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.13.1-5
- Bump Java compiler source/target levels to 1.7
* Tue Sep 15 2021 Didik Supriadi <didiksupriadi41@gmail.com> - 1:4.13.1-4
- Add alias for junit-dep
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.13.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 17 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.13.1-2
- Bootstrap build
- Non-bootstrap build
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Dec 4 2020 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.13.1-1
- Update to upstream version 4.13.1
* Sun Aug 16 2020 Fabio Valentini <decathorpe@gmail.com> - 1:4.13-2
- Bump release to account for previously untagged 4.13-1.fc33 build.
* Thu Aug 13 2020 Jerry James <loganjerry@gmail.com> - 1:4.13-1
- Update to upstream version 4.13
* Tue Aug 04 2020 Mat Booth <mat.booth@redhat.com> - 1:4.12-18
- Add automatic module name
* Tue Aug 04 2020 Mat Booth <mat.booth@redhat.com> - 1:4.12-17
- Allow building on Java 11
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-16
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 10 2020 Jiri Vanek <jvanek@redhat.com> - 1:4.12-14
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
* Fri Mar 06 2020 Marian Koncek <mkoncek@redhat.com> - 4.13-1
- Update to upstream version 4.13
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Nov 05 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.12-11
- Mass rebuild for javapackages-tools 201902
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 24 2019 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.12-10
- Mass rebuild for javapackages-tools 201901
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.12-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 2 2018 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.12-9
- Update license tag
@ -161,7 +241,7 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:4.11-4
- Rebuild to regenerate API documentation
- Resolves: CVE-2013-1571
- Resolves CVE-2013-1571
* Fri Jun 21 2013 Michal Srb <msrb@redhat.com> - 0:4.11-3
- Build from clean tarball
@ -253,6 +333,7 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr
* Mon Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:3.8.1-4jpp
- Rebuild with ant-1.6.2
* Fri May 09 2003 David Walluck <david@anti-microsoft.org> 0:3.8.1-3jpp
- update for JPackage 1.5