diff --git a/.gitignore b/.gitignore index ecd44ef..3a4dd0c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ junit3.8.2.zip /r4.11.tar.gz /junit-4.11-clean.tar.gz /junit-4.12-clean.tar.gz +/junit-4.13~beta.1.tar.gz diff --git a/0001-Port-to-hamcrest-2.1.patch b/0001-Port-to-hamcrest-2.1.patch index 16b864a..bc1fd0c 100644 --- a/0001-Port-to-hamcrest-2.1.patch +++ b/0001-Port-to-hamcrest-2.1.patch @@ -1,30 +1,30 @@ -From 9507c7b942a25f89428c95abb0012d30aff0ca9b Mon Sep 17 00:00:00 2001 +From e2d59e5707cdcb011cb8390dadbba7bbe7f64ece Mon Sep 17 00:00:00 2001 From: Marian Koncek -Date: Thu, 29 Aug 2019 12:48:20 +0200 +Date: Tue, 24 Sep 2019 11:38:29 +0200 Subject: [PATCH] Port to hamcrest 2.1 --- - .../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(-) + .../junit/internal/matchers/StacktracePrintingMatcher.java | 3 --- + .../org/junit/internal/matchers/ThrowableCauseMatcher.java | 4 +--- + .../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, 3 insertions(+), 10 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 9e9505d..45dc4f1 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 extends - return stringWriter.toString(); + import org.junit.internal.Throwables; +@@ -43,13 +42,11 @@ public class StacktracePrintingMatcher extends + return Throwables.getStacktrace(throwable); } - @Factory @@ -38,7 +38,7 @@ index 5d45ba3..6e94a67 100644 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 22ce8bd..4fa89e7 100644 +index a8d9cef..a3611b4 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 @@ @@ -49,14 +49,17 @@ index 22ce8bd..4fa89e7 100644 import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; -@@ -43,7 +42,6 @@ public class ThrowableCauseMatcher extends +@@ -45,8 +44,7 @@ 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) { + public static Matcher hasCause(final Matcher matcher) { return new ThrowableCauseMatcher(matcher); } +-} +\ No newline at end of file ++} 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 @@ -78,10 +81,10 @@ index 74386a8..7d16b11 100644 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 +index 47897c5..8ae4dcd 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 { +@@ -58,7 +58,7 @@ public class JUnitMatchers { * @deprecated Please use {@link CoreMatchers#everyItem(Matcher)} instead. */ @Deprecated diff --git a/create-tarball.sh b/create-tarball.sh deleted file mode 100755 index 1594760..0000000 --- a/create-tarball.sh +++ /dev/null @@ -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 - diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100755 index 0000000..019c640 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +name=junit +version="$(sed -n 's/Version:\s*//p' *.spec)" +upstream_version="$(echo ${version} | echo ${version} | sed 's/~\|\(alpha\.\|beta\)\./\1-/g')" + +# RETRIEVE +wget "https://github.com/${name}-team/${name}/archive/r${upstream_version}.tar.gz" + +rm -rf tarball-tmp +mkdir tarball-tmp +pushd tarball-tmp +tar xf "../r${upstream_version}.tar.gz" +mv * ${name}-${version} + +# CLEAN TARBALL +find -name '*.jar' -delete +find -name '*.class' -delete + +tar czf "../${name}-${version}.tar.gz" * +popd +rm -r tarball-tmp "r${upstream_version}.tar.gz" diff --git a/junit.spec b/junit.spec index b82ac09..7ef3574 100644 --- a/junit.spec +++ b/junit.spec @@ -1,14 +1,14 @@ Name: junit -Version: 4.12 -Release: 10%{?dist} +Version: 4.13~beta.1 +Release: 1%{?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 +# ./generate-tarball.sh +Source0: %{name}-%{version}.tar.gz +Source3: ./generate-tarball.sh Patch1: 0001-Port-to-hamcrest-2.1.patch @@ -37,7 +37,7 @@ Summary: Javadoc for %{name} Javadoc for %{name}. %prep -%setup -q -n %{name}-r%{version} +%setup -q %patch1 -p1 @@ -88,6 +88,9 @@ sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >sr %doc doc/* %changelog +* Tue Sep 24 2019 Marian Koncek - 4.13~beta.1-1 +- Update to upstream version 4.13~beta.1 + * Fri May 24 2019 Mikolaj Izdebski - 1:4.12-10 - Mass rebuild for javapackages-tools 201901 diff --git a/sources b/sources index f586a0c..c0cdbe0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (junit-4.12-clean.tar.gz) = d25fc547aa8fd961a33e5104da899be924047dbe150bfe8cd1677648173f7bcab82b0562718fc8ec2138323b786bb6c66e749f96701871d8f1d8984dee52c2de +SHA512 (junit-4.13~beta.1.tar.gz) = 7ae7c85077dfd3fd0ba0084317f628654f5f9352d3680033746e061f07aae0a8720d38b83782059a7f93d63cc54a0af73323aa9b30d11e223e5c5f8d34b8e67f