From 1ef9a438aec4ba5ee0eb7611f31b08c0e337ac7c Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 12:55:39 +0000 Subject: [PATCH 01/13] Remove Obsoletes --- hamcrest.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/hamcrest.spec b/hamcrest.spec index a17e633..803c97e 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -70,7 +70,6 @@ UI validation rules. %package core Summary: Core API of hamcrest matcher framework. -Obsoletes: %{name} < 0:1.3-10 %description core The core API of hamcrest matcher framework to be used by third-party framework providers. From 57ba691354ad01e1436d62e45dbbe9e4287d8e9f Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 13:02:12 +0000 Subject: [PATCH 02/13] Remove explicit Epoch --- hamcrest.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hamcrest.spec b/hamcrest.spec index 803c97e..707d461 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -31,7 +31,6 @@ Name: hamcrest Version: 1.3 Release: 23%{?dist} -Epoch: 0 Summary: Library of matchers for building test expressions License: BSD URL: https://github.com/hamcrest/JavaHamcrest @@ -50,7 +49,7 @@ Patch5: %{name}-%{version}-fork-javac.patch Requires: qdox Requires: easymock >= 3.0 -Requires: %{name}-core = %{epoch}:%{version}-%{release} +Requires: %{name}-core = %{version}-%{release} BuildRequires: javapackages-local BuildRequires: ant @@ -83,7 +82,7 @@ Javadoc for %{name}. %package demo Summary: Demos for %{name} -Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: %{name} = %{version}-%{release} Requires: junit Requires: testng From 21d87b440a4a55e4355c9e9d6de1a0142c1f514a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 24 May 2019 17:00:38 +0200 Subject: [PATCH 03/13] Mass rebuild for javapackages-tools 201901 --- hamcrest.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hamcrest.spec b/hamcrest.spec index 707d461..629fc06 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -30,7 +30,7 @@ Name: hamcrest Version: 1.3 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Library of matchers for building test expressions License: BSD URL: https://github.com/hamcrest/JavaHamcrest @@ -158,6 +158,9 @@ cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/ %{_datadir}/%{name} %changelog +* Fri May 24 2019 Mikolaj Izdebski - 1.3-24 +- Mass rebuild for javapackages-tools 201901 + * Wed Feb 07 2018 Fedora Release Engineering - 0:1.3-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From f6468e545de235236626b16b7b66edfb6f87d4c2 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 21 Aug 2019 10:11:10 +0200 Subject: [PATCH 04/13] Update to upstream version 2.1 --- .gitignore | 1 + hamcrest.spec | 137 ++++++++++++++++---------------------------------- sources | 2 +- 3 files changed, 46 insertions(+), 94 deletions(-) diff --git a/.gitignore b/.gitignore index cd85946..c5faf99 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /noarch /.build-*.log /hamcrest-java-1.3.tar.gz +/hamcrest-2.1.tar.gz diff --git a/hamcrest.spec b/hamcrest.spec index 629fc06..1a4dea9 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -29,135 +29,86 @@ # Name: hamcrest -Version: 1.3 -Release: 24%{?dist} +Version: 2.1 +Release: 1%{?dist} Summary: Library of matchers for building test expressions License: BSD URL: https://github.com/hamcrest/JavaHamcrest -Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz +Source0: https://github.com/hamcrest/JavaHamcrest/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: https://repo1.maven.org/maven2/org/hamcrest/hamcrest/%{version}/hamcrest-%{version}.pom -Source8: hamcrest-core-MANIFEST.MF -Source9: hamcrest-library-MANIFEST.MF -Source11: hamcrest-integration-MANIFEST.MF -Source12: hamcrest-generator-MANIFEST.MF - -Patch0: %{name}-%{version}-build.patch -Patch1: %{name}-%{version}-no-jarjar.patch -Patch3: %{name}-%{version}-javadoc.patch -Patch4: %{name}-%{version}-qdox-2.0.patch -Patch5: %{name}-%{version}-fork-javac.patch - -Requires: qdox -Requires: easymock >= 3.0 -Requires: %{name}-core = %{version}-%{release} - -BuildRequires: javapackages-local -BuildRequires: ant -BuildRequires: ant-junit -BuildRequires: easymock -BuildRequires: junit -BuildRequires: qdox -BuildRequires: testng +BuildRequires: maven-local +BuildRequires: mvn(junit:junit) BuildArch: noarch +Obsoletes: hamcrest-demo < 2.1 + %description Provides a library of matcher objects (also known as constraints or predicates) allowing 'match' rules to be defined declaratively, to be used in other frameworks. Typical scenarios include testing frameworks, mocking libraries and UI validation rules. -%package core -Summary: Core API of hamcrest matcher framework. - -%description core -The core API of hamcrest matcher framework to be used by third-party framework providers. -This includes the a foundation set of matcher implementations for common operations. - %package javadoc Summary: Javadoc for %{name} %description javadoc Javadoc for %{name}. -%package demo -Summary: Demos for %{name} -Requires: %{name} = %{version}-%{release} -Requires: junit -Requires: testng - -%description demo -Demonstrations and samples for %{name}. - %prep -%setup -q -n JavaHamcrest-%{name}-java-%{version} +%setup -q -n JavaHamcrest-%{version} -find . -type f -name "*.jar" | xargs -t rm -rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java -rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java -rm -fr hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java -# BUILD/hamcrest-1.1/lib/generator/qdox-1.6.1.jar.no -ln -sf $(build-classpath qdox) lib/generator/ -# BUILD/hamcrest-1.1/lib/integration/easymock-2.2.jar.no -ln -sf $(build-classpath easymock3) lib/integration/ -# BUILD/hamcrest-1.1/lib/integration/jmock-1.10RC1.jar.no -ln -sf $(build-classpath jmock) lib/integration/ -# BUILD/hamcrest-1.1/lib/integration/testng-4.6-jdk15.jar.no -ln -sf $(build-classpath testng-jdk15) lib/integration/ +rm -rf docs +rm -rf *gradle* +rm -rf */*.gradle -%patch0 -p1 -%patch1 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 +mv hamcrest/src . +rm -rf hamcrest +rm -rf hamcrest-core +rm -rf hamcrest-integration +rm -rf hamcrest-library + +cp -p %{SOURCE1} pom.xml +%pom_add_dep junit:junit +%pom_xpath_inject pom:project ' + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 1.8 + 1.8 + + + +' + +%mvn_alias org.hamcrest:hamcrest org.hamcrest:hamcrest-all +%mvn_alias org.hamcrest:hamcrest org.hamcrest:hamcrest-core +%mvn_alias org.hamcrest:hamcrest org.hamcrest:hamcrest-library sed -i 's/\r//' LICENSE.txt %build -export CLASSPATH=$(build-classpath qdox) -export OPT_JAR_LIST="junit ant/ant-junit" -# The unit-test goal is switched off as some tests fail with JDK 7 -# see https://github.com/hamcrest/JavaHamcrest/issues/30 -ant -Dant.build.javac.source=1.5 -Dversion=%{version} -Dbuild.sysclasspath=last clean core generator library bigjar javadoc - -# inject OSGi manifests -jar ufm build/%{name}-core-%{version}.jar %{SOURCE8} -jar ufm build/%{name}-library-%{version}.jar %{SOURCE9} -jar ufm build/%{name}-integration-%{version}.jar %{SOURCE11} -jar ufm build/%{name}-generator-%{version}.jar %{SOURCE12} +%mvn_build %install -sed -i 's/@VERSION@/%{version}/g' pom/*.pom - -%mvn_artifact pom/hamcrest-parent.pom - -for mod in all core generator library integration; do - %mvn_artifact pom/hamcrest-$mod.pom build/%{name}-$mod-%{version}.jar -done - -%mvn_package :hamcrest-parent core -%mvn_package :hamcrest-core core - -%mvn_file ':hamcrest-{*}' %{name}/@1 - -# demo -install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name} -cp -pr %{name}-examples $RPM_BUILD_ROOT%{_datadir}/%{name}/ - -%mvn_install -J build/temp/hamcrest-all-1.3-javadoc.jar.contents/ +%mvn_install %files -f .mfiles - -%files core -f .mfiles-core +%doc README.md %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt -%files demo -%{_datadir}/%{name} - %changelog +* Mon Aug 19 2019 Marian Koncek - 2.1-1 +- Update to upstream version 2.1 + * Fri May 24 2019 Mikolaj Izdebski - 1.3-24 - Mass rebuild for javapackages-tools 201901 diff --git a/sources b/sources index 7930287..f2bb972 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hamcrest-java-1.3.tar.gz) = 4356df7b5b78f821847fde027b416b49b8456e84ab2ec98c2982adf54e2bdc01a5ca2c2b5425620c5ee34bfe3f95ea43c77190504f76ddc9f8b93b137a4ca54b +SHA512 (hamcrest-2.1.tar.gz) = 15a67b040cf95141b241e201bd5ff14b913dea53fd2dc8305e8d2768e5e214457efa1eed75e66d95a0be575b6c5b611e281886c7661d75e186165c3861698abc From f4e30aba3481d62f7bb07cce65e7d4c596a8229a Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 21 Aug 2019 10:53:49 +0200 Subject: [PATCH 05/13] Remove unneeded fies --- hamcrest-1.3-build.patch | 39 ------------ hamcrest-1.3-fork-javac.patch | 25 -------- hamcrest-1.3-javadoc.patch | 17 ----- hamcrest-1.3-no-jarjar.patch | 23 ------- hamcrest-1.3-qdox-2.0.patch | 105 ------------------------------- hamcrest-core-MANIFEST.MF | 14 ----- hamcrest-generator-MANIFEST.MF | 18 ------ hamcrest-integration-MANIFEST.MF | 14 ----- hamcrest-library-MANIFEST.MF | 15 ----- 9 files changed, 270 deletions(-) delete mode 100644 hamcrest-1.3-build.patch delete mode 100644 hamcrest-1.3-fork-javac.patch delete mode 100644 hamcrest-1.3-javadoc.patch delete mode 100644 hamcrest-1.3-no-jarjar.patch delete mode 100644 hamcrest-1.3-qdox-2.0.patch delete mode 100644 hamcrest-core-MANIFEST.MF delete mode 100644 hamcrest-generator-MANIFEST.MF delete mode 100644 hamcrest-integration-MANIFEST.MF delete mode 100644 hamcrest-library-MANIFEST.MF diff --git a/hamcrest-1.3-build.patch b/hamcrest-1.3-build.patch deleted file mode 100644 index 877e51e..0000000 --- a/hamcrest-1.3-build.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/build.xml b/build.xml -index 1cfd4fb..5a7c740 100644 ---- a/build.xml -+++ b/build.xml -@@ -14,13 +14,13 @@ - - -+ classpath="lib/generator/qdox.jar"/> - - -- -+ - - -- -+ - - - -@@ -152,7 +152,8 @@ - - -+ windowtitle="Hamcrest" source="1.6" failonerror="yes"> -+ - - - -@@ -313,6 +314,7 @@ - -+ - - - diff --git a/hamcrest-1.3-fork-javac.patch b/hamcrest-1.3-fork-javac.patch deleted file mode 100644 index f5a86fe..0000000 --- a/hamcrest-1.3-fork-javac.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 54b7ccdd1e16f1d6dd07359eae0fcac8f1883373 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Mon, 2 Jan 2017 10:31:56 +0100 -Subject: [PATCH] Fork javac - ---- - build.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build.xml b/build.xml -index 1cfd4fb..69acfe8 100644 ---- a/build.xml -+++ b/build.xml -@@ -284,7 +284,7 @@ - - - -- -+ - - - --- -2.9.3 - diff --git a/hamcrest-1.3-javadoc.patch b/hamcrest-1.3-javadoc.patch deleted file mode 100644 index adaae0d..0000000 --- a/hamcrest-1.3-javadoc.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/build.xml b/build.xml -index ed57763..a4550cb 100644 ---- a/build.xml -+++ b/build.xml -@@ -135,11 +135,10 @@ - - - -- -+ - - - -- - - - -- -- -- -- -- -- -- -- -- - - - diff --git a/hamcrest-1.3-qdox-2.0.patch b/hamcrest-1.3-qdox-2.0.patch deleted file mode 100644 index a65f977..0000000 --- a/hamcrest-1.3-qdox-2.0.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 6d7da5456a7458a249bed9c4c1e768cc7cc2fe40 Mon Sep 17 00:00:00 2001 -From: Michael Simacek -Date: Wed, 1 Feb 2017 12:57:14 +0100 -Subject: [PATCH] Port to qdox 2.0 - ---- - .../src/main/java/org/hamcrest/generator/QDox.java | 4 ++-- - .../org/hamcrest/generator/QDoxFactoryReader.java | 26 ++++++++++++---------- - 2 files changed, 16 insertions(+), 14 deletions(-) - -diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java -index efaf615..338178d 100644 ---- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java -+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java -@@ -1,6 +1,6 @@ - package org.hamcrest.generator; - --import com.thoughtworks.qdox.JavaDocBuilder; -+import com.thoughtworks.qdox.JavaProjectBuilder; - import com.thoughtworks.qdox.model.JavaClass; - - import java.io.File; -@@ -16,7 +16,7 @@ import java.io.Reader; - */ - public class QDox { - -- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder(); -+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder(); - - public void addSourceTree(File sourceDir) { - javaDocBuilder.addSourceTree(sourceDir); -diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java -index 5108140..97fce01 100644 ---- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java -+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java -@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag; - import com.thoughtworks.qdox.model.JavaClass; - import com.thoughtworks.qdox.model.JavaMethod; - import com.thoughtworks.qdox.model.JavaParameter; --import com.thoughtworks.qdox.model.Type; -+import com.thoughtworks.qdox.model.JavaType; -+import com.thoughtworks.qdox.model.impl.DefaultJavaClass; - -+import java.util.ArrayList; - import java.util.Iterator; - import java.util.List; - import java.util.regex.Pattern; -@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable { - JavaMethod methodSource = findMethodInSource(factoryMethod); - if (methodSource != null) { - factoryMethod.setJavaDoc(createJavaDocComment(methodSource)); -- JavaParameter[] parametersFromSource -+ List parametersFromSource - = methodSource.getParameters(); - List parametersFromReflection - = factoryMethod.getParameters(); - -- if (parametersFromReflection.size() == parametersFromSource.length) { -- for (int i = 0; i < parametersFromSource.length; i++) { -+ if (parametersFromReflection.size() == parametersFromSource.size()) { -+ for (int i = 0; i < parametersFromSource.size(); i++) { - parametersFromReflection.get(i).setName( -- parametersFromSource[i].getName()); -+ parametersFromSource.get(i).getName()); - } - } - } -@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable { - // Note, this doesn't always work - it struggles with some kinds of generics. - // This seems to cover most cases though. - List params = factoryMethod.getParameters(); -- Type[] types = new Type[params.size()]; -+ List types = new ArrayList(params.size()); - boolean varArgs = false; -- for (int i = 0; i < types.length; i++) { -+ for (int i = 0; i < params.size(); i++) { - String type = params.get(i).getType(); - varArgs = VARARGS_REGEX.matcher(type).find(); - // QDox ignores varargs and generics, so we strip them out to help QDox. - type = GENERIC_REGEX.matcher(type).replaceAll(""); - type = VARARGS_REGEX.matcher(type).replaceAll(""); -- types[i] = new Type(type); -+ types.add(new DefaultJavaClass(type)); - } -- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs); -- return methods.length == 1 ? methods[0] : null; -+ List methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs); -+ return methods.size() == 1 ? methods.get(0) : null; - } - - /** -@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable { - */ - private static String createJavaDocComment(JavaMethod methodSource) { - String comment = methodSource.getComment(); -- DocletTag[] tags = methodSource.getTags(); -- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) { -+ List tags = methodSource.getTags(); -+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) { - return null; - } - StringBuilder result = new StringBuilder(); --- -2.9.3 - diff --git a/hamcrest-core-MANIFEST.MF b/hamcrest-core-MANIFEST.MF deleted file mode 100644 index 754d5d9..0000000 --- a/hamcrest-core-MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: Fedoraproject.org -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: Hamcrest Core -Bundle-SymbolicName: org.hamcrest.core -Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too - ls:org.eclipse.orbit/org.hamcrest.core;tag=v201303031735 -Export-Package: org.hamcrest;version="1.3.0";core=split;mandatory:=cor - e,org.hamcrest.core;version="1.3.0",org.hamcrest.internal;version="1. - 3.0";x-internal:=true -Bundle-Version: 1.3.0.v201303031735 -Bundle-ManifestVersion: 2 diff --git a/hamcrest-generator-MANIFEST.MF b/hamcrest-generator-MANIFEST.MF deleted file mode 100644 index f99c220..0000000 --- a/hamcrest-generator-MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.hamcrest.generator -Bundle-Version: 1.3.0.v20090501071000 -Export-Package: org.hamcrest.generator;version="1.3.0",org.hamcrest.ge - nerator.config;version="1.3.0" -Bundle-ManifestVersion: 2 -Import-Package: com.thoughtworks.qdox;version="1.6.3",com.thoughtworks - .qdox.ant;version="1.6.3",com.thoughtworks.qdox.directorywalker;versi - on="1.6.3",com.thoughtworks.qdox.junit;version="1.6.3",com.thoughtwor - ks.qdox.model;version="1.6.3",com.thoughtworks.qdox.model.util;versio - n="1.6.3",com.thoughtworks.qdox.parser;version="1.6.3",com.thoughtwor - ks.qdox.parser.impl;version="1.6.3",com.thoughtworks.qdox.parser.stru - cts;version="1.6.3",com.thoughtworks.qdox.tools;version="1.6.3" diff --git a/hamcrest-integration-MANIFEST.MF b/hamcrest-integration-MANIFEST.MF deleted file mode 100644 index ab68061..0000000 --- a/hamcrest-integration-MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.hamcrest.integration -Require-Bundle: org.hamcrest.core;bundle-version="1.3.0" -Bundle-Version: 1.3.0.v20090501071000 -Export-Package: org.hamcrest;integration=split;mandatory:=integration; - version="1.3.0",org.hamcrest.integration;version="1.3.0" -Bundle-ManifestVersion: 2 -Import-Package: org.easymock;version="2.4.0";resolution:=optional,org. - jmock.core;version="1.10";resolution:=optional diff --git a/hamcrest-library-MANIFEST.MF b/hamcrest-library-MANIFEST.MF deleted file mode 100644 index 5fc8676..0000000 --- a/hamcrest-library-MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Vendor: %providerName -Bundle-ActivationPolicy: lazy -Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Bundle-Name: %pluginName -Bundle-SymbolicName: org.hamcrest.library -Require-Bundle: org.hamcrest.core;bundle-version="1.3.0" -Bundle-Version: 1.3.0.v20090501071000 -Export-Package: org.hamcrest;version="1.3.0";library=split;mandatory:= - library,org.hamcrest.beans;version="1.3.0",org.hamcrest.collection;ve - rsion="1.3.0",org.hamcrest.number;version="1.3.0",org.hamcrest.object - ;version="1.3.0",org.hamcrest.text;version="1.3.0",org.hamcrest.xml;v - ersion="1.3.0" -Bundle-ManifestVersion: 2 From 99f91c6e338843c14d56714bdafc4b9caae0f6dd Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 21 Aug 2019 11:07:03 +0200 Subject: [PATCH 06/13] Remove Obsoletes, add missing sources --- .gitignore | 1 + hamcrest.spec | 2 -- sources | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c5faf99..cf81d22 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /.build-*.log /hamcrest-java-1.3.tar.gz /hamcrest-2.1.tar.gz +/hamcrest-2.1.pom diff --git a/hamcrest.spec b/hamcrest.spec index 1a4dea9..80ddfdd 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -42,8 +42,6 @@ BuildRequires: mvn(junit:junit) BuildArch: noarch -Obsoletes: hamcrest-demo < 2.1 - %description Provides a library of matcher objects (also known as constraints or predicates) allowing 'match' rules to be defined declaratively, to be used in other diff --git a/sources b/sources index f2bb972..da013fa 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (hamcrest-2.1.tar.gz) = 15a67b040cf95141b241e201bd5ff14b913dea53fd2dc8305e8d2768e5e214457efa1eed75e66d95a0be575b6c5b611e281886c7661d75e186165c3861698abc +SHA512 (hamcrest-2.1.pom) = b5b82c4333bf8b882286a6f8470f6a8c9eabe1a3e89353e9b744010ea2f64345815b6999d3c6eaeb44f3308280a9062ab2a770985ba45b445506659d331bc145 From 98a562f8b50adf37382b7b00bc89a575bfa6bf13 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 18 Sep 2019 15:32:27 +0200 Subject: [PATCH 07/13] Update to upstream version 2.2~rc1 --- .gitignore | 2 ++ hamcrest.spec | 13 +++++++++---- sources | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index cf81d22..c6dd817 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ /hamcrest-java-1.3.tar.gz /hamcrest-2.1.tar.gz /hamcrest-2.1.pom +/hamcrest-2.2~rc1.tar.gz +/hamcrest-2.2-rc1.pom diff --git a/hamcrest.spec b/hamcrest.spec index 80ddfdd..7303bae 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -28,14 +28,16 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +%global upstream_version %(echo %{version} | tr '~' '-') + Name: hamcrest -Version: 2.1 +Version: 2.2~rc1 Release: 1%{?dist} Summary: Library of matchers for building test expressions License: BSD URL: https://github.com/hamcrest/JavaHamcrest -Source0: https://github.com/hamcrest/JavaHamcrest/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz -Source1: https://repo1.maven.org/maven2/org/hamcrest/hamcrest/%{version}/hamcrest-%{version}.pom +Source0: https://github.com/hamcrest/JavaHamcrest/archive/v%{upstream_version}.tar.gz#/%{name}-%{version}.tar.gz +Source1: https://repo1.maven.org/maven2/org/hamcrest/hamcrest/%{upstream_version}/hamcrest-%{upstream_version}.pom BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -55,7 +57,7 @@ Summary: Javadoc for %{name} Javadoc for %{name}. %prep -%setup -q -n JavaHamcrest-%{version} +%setup -q -n JavaHamcrest-%{upstream_version} rm -rf docs rm -rf *gradle* @@ -104,6 +106,9 @@ sed -i 's/\r//' LICENSE.txt %license LICENSE.txt %changelog +* Wed Sep 18 2019 Marian Koncek - 2.2~rc1-1 +- Update to upstream version 2.2~rc1 + * Mon Aug 19 2019 Marian Koncek - 2.1-1 - Update to upstream version 2.1 diff --git a/sources b/sources index da013fa..21f2f3f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (hamcrest-2.1.tar.gz) = 15a67b040cf95141b241e201bd5ff14b913dea53fd2dc8305e8d2768e5e214457efa1eed75e66d95a0be575b6c5b611e281886c7661d75e186165c3861698abc -SHA512 (hamcrest-2.1.pom) = b5b82c4333bf8b882286a6f8470f6a8c9eabe1a3e89353e9b744010ea2f64345815b6999d3c6eaeb44f3308280a9062ab2a770985ba45b445506659d331bc145 +SHA512 (hamcrest-2.2~rc1.tar.gz) = 62d9f311b979363359c0ba4edc43611378f8d47f1f385c2af92bb9b33cc1df19f1de665e67c5bc2690dff23a834dd09de683b9571b4078b4b7e4db12a73af731 +SHA512 (hamcrest-2.2-rc1.pom) = 3c609d989613e58d452387e82ce6c0172326895af5f58c390ab814e269877d1a7e7078af5a5325e7dbe60d0543adb36ad2a700d3b33bf2b8f164577efa7c912d From 8b02a8f827e8922f64705914cf2f9403836d16d4 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 17 Oct 2019 15:28:15 +0200 Subject: [PATCH 08/13] Update to upstream version 2.2 --- .gitignore | 2 ++ hamcrest.spec | 5 ++++- sources | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c6dd817..4252ec0 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ /hamcrest-2.1.pom /hamcrest-2.2~rc1.tar.gz /hamcrest-2.2-rc1.pom +/hamcrest-2.2.tar.gz +/hamcrest-2.2.pom diff --git a/hamcrest.spec b/hamcrest.spec index 7303bae..cab78ba 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -31,7 +31,7 @@ %global upstream_version %(echo %{version} | tr '~' '-') Name: hamcrest -Version: 2.2~rc1 +Version: 2.2 Release: 1%{?dist} Summary: Library of matchers for building test expressions License: BSD @@ -106,6 +106,9 @@ sed -i 's/\r//' LICENSE.txt %license LICENSE.txt %changelog +* Thu Oct 17 2019 Marian Koncek - 2.2-1 +- Update to upstream version 2.2 + * Wed Sep 18 2019 Marian Koncek - 2.2~rc1-1 - Update to upstream version 2.2~rc1 diff --git a/sources b/sources index 21f2f3f..924d689 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (hamcrest-2.2~rc1.tar.gz) = 62d9f311b979363359c0ba4edc43611378f8d47f1f385c2af92bb9b33cc1df19f1de665e67c5bc2690dff23a834dd09de683b9571b4078b4b7e4db12a73af731 -SHA512 (hamcrest-2.2-rc1.pom) = 3c609d989613e58d452387e82ce6c0172326895af5f58c390ab814e269877d1a7e7078af5a5325e7dbe60d0543adb36ad2a700d3b33bf2b8f164577efa7c912d +SHA512 (hamcrest-2.2.tar.gz) = 8120e4f4ad83ff41b8b8ede1fe0817eb8fce6f13072e932aff7fc8c9f64689698753ae47b9f024922d5ab0a5bf7bb88b9e1998064d69a58b8c418ab89200e66a +SHA512 (hamcrest-2.2.pom) = e48470aa7c3c1d3fe2cac3a7b218e07564ed7ce6e4eafc90433ae0ffb8e303322027092d2358b3e655ae1b5e58ea313249c8d3ceed9d550a655af8d890df6390 From 954f612f877119b3dd9ebe6845ced48c20a46ec0 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 08:15:22 +0100 Subject: [PATCH 09/13] Fix build with OpenJDK 11 --- 0001-Fix-build-with-OpenJDK-11.patch | 131 +++++++++++++++++++++++++++ hamcrest.spec | 37 +------- 2 files changed, 136 insertions(+), 32 deletions(-) create mode 100644 0001-Fix-build-with-OpenJDK-11.patch diff --git a/0001-Fix-build-with-OpenJDK-11.patch b/0001-Fix-build-with-OpenJDK-11.patch new file mode 100644 index 0000000..4e882e2 --- /dev/null +++ b/0001-Fix-build-with-OpenJDK-11.patch @@ -0,0 +1,131 @@ +From d33031924faa557bb43ba0471f74d942ddfeae50 Mon Sep 17 00:00:00 2001 +From: Mikolaj Izdebski +Date: Tue, 5 Nov 2019 14:50:23 +0100 +Subject: [PATCH] Fix build with OpenJDK 11 + +--- + .../src/main/java/org/hamcrest/collection/ArrayMatching.java | 3 ++- + .../org/hamcrest/collection/IsArrayContainingInAnyOrder.java | 2 +- + .../org/hamcrest/collection/IsArrayContainingInOrder.java | 2 +- + .../hamcrest/collection/IsIterableContainingInAnyOrder.java | 2 +- + .../collection/IsIterableContainingInRelativeOrder.java | 2 +- + hamcrest/src/main/java/org/hamcrest/core/AllOf.java | 2 +- + hamcrest/src/main/java/org/hamcrest/core/AnyOf.java | 2 +- + .../src/main/java/org/hamcrest/core/CombinableMatcher.java | 4 ++-- + 8 files changed, 10 insertions(+), 9 deletions(-) + +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java b/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java +index fc968e0..baab775 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/ArrayMatching.java +@@ -67,7 +67,8 @@ public class ArrayMatching { + */ + @SafeVarargs + public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { +- return arrayContainingInAnyOrder(asList(itemMatchers)); ++ Collection> itemMatchersList = asList(itemMatchers); ++ return new ArrayAsIterableMatcher<>(new IsIterableContainingInAnyOrder<>(itemMatchersList), itemMatchersList, "in any order"); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java +index 7e72a62..c0c7efc 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInAnyOrder.java +@@ -59,7 +59,7 @@ public class IsArrayContainingInAnyOrder extends TypeSafeMatcher { + * a list of matchers, each of which must be satisfied by an entry in an examined array + */ + public static Matcher arrayContainingInAnyOrder(Matcher... itemMatchers) { +- return arrayContainingInAnyOrder(Arrays.asList(itemMatchers)); ++ return new IsArrayContainingInAnyOrder(Arrays.asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java +index c046914..2022f1a 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsArrayContainingInOrder.java +@@ -73,7 +73,7 @@ public class IsArrayContainingInOrder extends TypeSafeMatcher { + * the matchers that must be satisfied by the items in the examined array + */ + public static Matcher arrayContaining(Matcher... itemMatchers) { +- return arrayContaining(asList(itemMatchers)); ++ return new IsArrayContainingInOrder(asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java +index d6a9a33..9a7e6c0 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInAnyOrder.java +@@ -98,7 +98,7 @@ public class IsIterableContainingInAnyOrder extends TypeSafeDiagnosingMatcher + */ + @SafeVarargs + public static Matcher> containsInAnyOrder(Matcher... itemMatchers) { +- return containsInAnyOrder(Arrays.asList(itemMatchers)); ++ return new IsIterableContainingInAnyOrder(Arrays.asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java +index 0657768..06d6a57 100644 +--- a/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java ++++ b/hamcrest/src/main/java/org/hamcrest/collection/IsIterableContainingInRelativeOrder.java +@@ -99,7 +99,7 @@ public class IsIterableContainingInRelativeOrder extends TypeSafeDiagnosingMa + */ + @SafeVarargs + public static Matcher> containsInRelativeOrder(Matcher... itemMatchers) { +- return containsInRelativeOrder(asList(itemMatchers)); ++ return new IsIterableContainingInRelativeOrder(asList(itemMatchers)); + } + + /** +diff --git a/hamcrest/src/main/java/org/hamcrest/core/AllOf.java b/hamcrest/src/main/java/org/hamcrest/core/AllOf.java +index b8c3faa..f8951bd 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/AllOf.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/AllOf.java +@@ -56,6 +56,6 @@ public class AllOf extends DiagnosingMatcher { + */ + @SafeVarargs + public static Matcher allOf(Matcher... matchers) { +- return allOf(Arrays.asList(matchers)); ++ return new AllOf(Arrays.asList(matchers)); + } + } +diff --git a/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java b/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java +index 7a22c22..5a63574 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/AnyOf.java +@@ -46,6 +46,6 @@ public class AnyOf extends ShortcutCombination { + */ + @SafeVarargs + public static AnyOf anyOf(Matcher... matchers) { +- return anyOf(Arrays.asList(matchers)); ++ return new AnyOf(Arrays.asList(matchers)); + } + } +diff --git a/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java b/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java +index e37efce..6b44884 100644 +--- a/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java ++++ b/hamcrest/src/main/java/org/hamcrest/core/CombinableMatcher.java +@@ -57,7 +57,7 @@ public class CombinableMatcher extends TypeSafeDiagnosingMatcher { + this.first = matcher; + } + public CombinableMatcher and(Matcher other) { +- return new CombinableMatcher<>(first).and(other); ++ return new CombinableMatcher<>(first).and((Matcher)other); + } + } + +@@ -76,7 +76,7 @@ public class CombinableMatcher extends TypeSafeDiagnosingMatcher { + this.first = matcher; + } + public CombinableMatcher or(Matcher other) { +- return new CombinableMatcher<>(first).or(other); ++ return new CombinableMatcher<>(first).or((Matcher)other); + } + } + } +-- +2.21.0 + diff --git a/hamcrest.spec b/hamcrest.spec index cab78ba..9551f7a 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,33 +1,3 @@ -# Copyright (c) 2000-2008, JPackage Project -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the -# distribution. -# 3. Neither the name of the JPackage Project nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - %global upstream_version %(echo %{version} | tr '~' '-') Name: hamcrest @@ -36,14 +6,16 @@ Release: 1%{?dist} Summary: Library of matchers for building test expressions License: BSD URL: https://github.com/hamcrest/JavaHamcrest +BuildArch: noarch + Source0: https://github.com/hamcrest/JavaHamcrest/archive/v%{upstream_version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://repo1.maven.org/maven2/org/hamcrest/hamcrest/%{upstream_version}/hamcrest-%{upstream_version}.pom +Patch0: 0001-Fix-build-with-OpenJDK-11.patch + BuildRequires: maven-local BuildRequires: mvn(junit:junit) -BuildArch: noarch - %description Provides a library of matcher objects (also known as constraints or predicates) allowing 'match' rules to be defined declaratively, to be used in other @@ -58,6 +30,7 @@ Javadoc for %{name}. %prep %setup -q -n JavaHamcrest-%{upstream_version} +%patch0 -p1 rm -rf docs rm -rf *gradle* From 51c46d11409fb3cd96291480b507c57b69607136 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 17:29:27 +0100 Subject: [PATCH 10/13] Mass rebuild for javapackages-tools 201902 --- hamcrest.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hamcrest.spec b/hamcrest.spec index 9551f7a..7c5eac7 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -2,7 +2,7 @@ Name: hamcrest Version: 2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Library of matchers for building test expressions License: BSD URL: https://github.com/hamcrest/JavaHamcrest @@ -79,6 +79,9 @@ sed -i 's/\r//' LICENSE.txt %license LICENSE.txt %changelog +* Tue Nov 05 2019 Mikolaj Izdebski - 2.2-2 +- Mass rebuild for javapackages-tools 201902 + * Thu Oct 17 2019 Marian Koncek - 2.2-1 - Update to upstream version 2.2 From 01c1a918c77b89cd12477bb2a3b3669d9287c45c Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 19 May 2020 08:53:53 +0200 Subject: [PATCH 11/13] Remove circular dependency between junit and hamcrest --- hamcrest.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hamcrest.spec b/hamcrest.spec index 7c5eac7..197fca1 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -43,7 +43,7 @@ rm -rf hamcrest-integration rm -rf hamcrest-library cp -p %{SOURCE1} pom.xml -%pom_add_dep junit:junit +%pom_add_dep junit:junit::test %pom_xpath_inject pom:project ' From 352d52739038324cf7d6341f47af81ba562f1803 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 16 Apr 2021 15:33:12 +0200 Subject: [PATCH 12/13] Conditionalize buildrequires in bootstrap mode --- hamcrest.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hamcrest.spec b/hamcrest.spec index 197fca1..95292a1 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,3 +1,5 @@ +%bcond_without bootstrap + %global upstream_version %(echo %{version} | tr '~' '-') Name: hamcrest @@ -14,7 +16,11 @@ Source1: https://repo1.maven.org/maven2/org/hamcrest/hamcrest/%{upstream_ Patch0: 0001-Fix-build-with-OpenJDK-11.patch BuildRequires: maven-local +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else BuildRequires: mvn(junit:junit) +%endif %description Provides a library of matcher objects (also known as constraints or predicates) From 1fc045102a3f1c273bb2ecc993a817b45fe4eff4 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 13 May 2021 19:08:42 +0200 Subject: [PATCH 13/13] Turn off bootstrap mode by default --- hamcrest.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hamcrest.spec b/hamcrest.spec index 95292a1..685faba 100644 --- a/hamcrest.spec +++ b/hamcrest.spec @@ -1,4 +1,4 @@ -%bcond_without bootstrap +%bcond_with bootstrap %global upstream_version %(echo %{version} | tr '~' '-')