From b0509562a91289a7e9fe57d2551c743ed4a85ffc Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 12:06:43 +0000 Subject: [PATCH 01/11] Switch to SHA512 sources --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 80cc7ce..a1e7717 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -776b51a51312c1854ad8f6d344a47cda commons-collections-3.2.2-src.tar.gz +SHA512 (commons-collections-3.2.2-src.tar.gz) = 2e8ef638f07515b028a3e7e97851fcf1d9023a2c188e211bd1e936f35d3d91c2885adf3b1103ad17dfb7aeea6e7a67ce7826ee346a8a29c1aa7c6b0cf14e9230 From 1e9ab5afb52b9d6204828a4dd4a747b78ac7f872 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Thu, 29 Nov 2018 12:55:38 +0000 Subject: [PATCH 02/11] Remove Obsoletes --- apache-commons-collections.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index c23fe31..8eab4e6 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -43,7 +43,6 @@ Requires: %{name} = %{version}-%{release} %package javadoc Summary: Javadoc for %{name} Provides: %{name}-testframework-javadoc = %{version}-%{release} -Obsoletes: %{name}-testframework-javadoc < %{version}-%{release} %description javadoc %{summary}. From 00bb4232acd22b1869fc74b214ec59edc86e63a4 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 24 May 2019 17:00:16 +0200 Subject: [PATCH 03/11] Mass rebuild for javapackages-tools 201901 --- apache-commons-collections.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 8eab4e6..3501044 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -3,7 +3,7 @@ Name: apache-%{short_name} Version: 3.2.2 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Provides new interfaces, implementations and utilities for Java Collections License: ASL 2.0 URL: http://commons.apache.org/%{base_name}/ @@ -85,6 +85,9 @@ ant tf.javadoc -Dtf.build.docs=target/site/apidocs/ %changelog +* Fri May 24 2019 Mikolaj Izdebski - 3.2.2-11 +- Mass rebuild for javapackages-tools 201901 + * Thu Jul 12 2018 Fedora Release Engineering - 3.2.2-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From f064771ab3188db02ba7caa6f7c841fbdd6dea66 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 28 Jun 2019 08:51:54 +0200 Subject: [PATCH 04/11] Disable testframework package --- 0001-Port-to-Java-8.patch | 40 +++++++++++++++++++++------- apache-commons-collections.spec | 46 +++++++++++---------------------- 2 files changed, 46 insertions(+), 40 deletions(-) diff --git a/0001-Port-to-Java-8.patch b/0001-Port-to-Java-8.patch index 25f40f7..6cd852d 100644 --- a/0001-Port-to-Java-8.patch +++ b/0001-Port-to-Java-8.patch @@ -1,16 +1,17 @@ -From 066f654cd6a1b9d3bfd54565af1d618dada2deb4 Mon Sep 17 00:00:00 2001 +From 93a0da9fde8676714db9d79ac003749940a76044 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Tue, 17 Nov 2015 01:02:55 +0100 Subject: [PATCH] Port to Java 8 --- - src/java/org/apache/commons/collections/MultiHashMap.java | 8 ++++---- - src/java/org/apache/commons/collections/MultiMap.java | 4 ++-- - src/java/org/apache/commons/collections/map/MultiKeyMap.java | 8 +++++--- - src/java/org/apache/commons/collections/map/MultiValueMap.java | 8 ++++---- - src/test/org/apache/commons/collections/TestMultiHashMap.java | 10 +++++----- - .../org/apache/commons/collections/map/TestMultiKeyMap.java | 4 ++-- - 6 files changed, 22 insertions(+), 20 deletions(-) + .../org/apache/commons/collections/MultiHashMap.java | 8 ++++---- + src/java/org/apache/commons/collections/MultiMap.java | 4 ++-- + .../apache/commons/collections/map/MultiKeyMap.java | 8 +++++--- + .../apache/commons/collections/map/MultiValueMap.java | 8 ++++---- + .../apache/commons/collections/TestMultiHashMap.java | 10 +++++----- + .../commons/collections/map/TestMultiKeyMap.java | 4 ++-- + .../commons/collections/map/TestMultiValueMap.java | 10 +++++----- + 7 files changed, 27 insertions(+), 25 deletions(-) diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java index 7fec9af..bcb4a11 100644 @@ -160,6 +161,27 @@ index b1ee3d0..66fcade 100644 assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); break; case 3: +diff --git a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +index b9a5ac8..b37dc0c 100644 +--- a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +@@ -338,11 +338,11 @@ public class TestMultiValueMap extends TestCase { + map.put("A", "AA"); + map.put("A", "AB"); + map.put("A", "AC"); +- assertEquals(null, map.remove("C", "CA")); +- assertEquals(null, map.remove("A", "AD")); +- assertEquals("AC", map.remove("A", "AC")); +- assertEquals("AB", map.remove("A", "AB")); +- assertEquals("AA", map.remove("A", "AA")); ++ assertEquals(false, map.remove("C", "CA")); ++ assertEquals(false, map.remove("A", "AD")); ++ assertEquals(true, map.remove("A", "AC")); ++ assertEquals(true, map.remove("A", "AB")); ++ assertEquals(true, map.remove("A", "AA")); + assertEquals(new MultiValueMap(), map); + } + -- -2.5.0 +2.21.0 diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 3501044..4851f4c 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -1,22 +1,18 @@ -%global base_name collections -%global short_name commons-%{base_name} - -Name: apache-%{short_name} +Name: apache-commons-collections Version: 3.2.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: Provides new interfaces, implementations and utilities for Java Collections License: ASL 2.0 -URL: http://commons.apache.org/%{base_name}/ -Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz +URL: http://commons.apache.org/collections/ +BuildArch: noarch + +Source0: http://www.apache.org/dist/commons/collections/source/commons-collections-%{version}-src.tar.gz Patch0: 0001-Port-to-Java-8.patch -BuildArch: noarch - -BuildRequires: ant BuildRequires: maven-local +BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.commons:commons-parent:pom:) -BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) %description The introduction of the Collections API by Sun in JDK 1.2 has been a @@ -33,22 +29,14 @@ Java2-style collections. - methods to test or create typical set-theory properties of collections such as union, intersection, and closure. -%package testframework -Summary: Testframework for %{name} -Requires: %{name} = %{version}-%{release} - -%description testframework -%{summary}. - %package javadoc Summary: Javadoc for %{name} -Provides: %{name}-testframework-javadoc = %{version}-%{release} %description javadoc %{summary}. %prep -%setup -q -n %{short_name}-%{version}-src +%setup -q -n commons-collections-%{version}-src # remove all binary libs find . -name "*.jar" -exec rm -f {} \; @@ -59,17 +47,12 @@ find . -name "*.class" -exec rm -f {} \; # Fix file eof sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt -%mvn_package :%{short_name}-testframework testframework -%mvn_file ':%{short_name}{,-testframework}' %{name}@1 %{short_name}@1 +%pom_remove_plugin :maven-antrun-plugin + +%mvn_file :commons-collections %{name} commons-collections %build -# 2017-09-18 mizdebsk: Temporarly disable tests, they stopped working -# after Maven Surefire upgrade to 2.20, need to investigate why. -%mvn_build -- -DskipTests - -ant tf.javadoc -Dtf.build.docs=target/site/apidocs/ - -%mvn_artifact %{short_name}:%{short_name}-testframework:%{version} target/%{short_name}-testframework-%{version}.jar +%mvn_build %install %mvn_install @@ -78,13 +61,14 @@ ant tf.javadoc -Dtf.build.docs=target/site/apidocs/ %doc PROPOSAL.html README.txt %license LICENSE.txt NOTICE.txt -%files testframework -f .mfiles-testframework - %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt %changelog +* Fri Jun 28 2019 Mikolaj Izdebski - 3.2.2-12 +- Disable testframework package + * Fri May 24 2019 Mikolaj Izdebski - 3.2.2-11 - Mass rebuild for javapackages-tools 201901 From 2e756bc4d97f1be03c12f458080bac305df2793b Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 28 Jun 2019 09:17:26 +0200 Subject: [PATCH 05/11] Re-enable testframework package --- apache-commons-collections.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 4851f4c..be408b4 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -13,6 +13,7 @@ Patch0: 0001-Port-to-Java-8.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.commons:commons-parent:pom:) +BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) %description The introduction of the Collections API by Sun in JDK 1.2 has been a @@ -29,6 +30,13 @@ Java2-style collections. - methods to test or create typical set-theory properties of collections such as union, intersection, and closure. +%package testframework +Summary: Testframework for %{name} +Requires: %{name} = %{version}-%{release} + +%description testframework +%{summary}. + %package javadoc Summary: Javadoc for %{name} @@ -47,27 +55,28 @@ find . -name "*.class" -exec rm -f {} \; # Fix file eof sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt -%pom_remove_plugin :maven-antrun-plugin - -%mvn_file :commons-collections %{name} commons-collections +%mvn_package :commons-collections-testframework testframework +%mvn_file ':commons-collections{,-testframework}' %{name}@1 commons-collections@1 %build %mvn_build %install +%mvn_artifact commons-collections:commons-collections-testframework:%{version} target/commons-collections-testframework-%{version}.jar %mvn_install %files -f .mfiles %doc PROPOSAL.html README.txt %license LICENSE.txt NOTICE.txt +%files testframework -f .mfiles-testframework + %files javadoc -f .mfiles-javadoc %license LICENSE.txt NOTICE.txt - %changelog * Fri Jun 28 2019 Mikolaj Izdebski - 3.2.2-12 -- Disable testframework package +- Enable tests * Fri May 24 2019 Mikolaj Izdebski - 3.2.2-11 - Mass rebuild for javapackages-tools 201901 From c969ecc87ff5b49d8c1aa96e1150a8f80feab6e6 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 25 Oct 2019 18:53:31 +0200 Subject: [PATCH 06/11] Set compiler source/target to 1.6 --- apache-commons-collections.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index be408b4..349f1eb 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -59,7 +59,7 @@ sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt %mvn_file ':commons-collections{,-testframework}' %{name}@1 commons-collections@1 %build -%mvn_build +%mvn_build -- -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6 %install %mvn_artifact commons-collections:commons-collections-testframework:%{version} target/commons-collections-testframework-%{version}.jar From 0404defbd62c149520e3ff42478c8c08c83ae244 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 31 Oct 2019 12:35:12 +0100 Subject: [PATCH 07/11] Port to OpenJDK 11 --- 0002-Port-to-OpenJDK-11.patch | 25 +++++++++++++++++++++++++ apache-commons-collections.spec | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 0002-Port-to-OpenJDK-11.patch diff --git a/0002-Port-to-OpenJDK-11.patch b/0002-Port-to-OpenJDK-11.patch new file mode 100644 index 0000000..db64aad --- /dev/null +++ b/0002-Port-to-OpenJDK-11.patch @@ -0,0 +1,25 @@ +From 085b289c17f7047f4350d52bf594313392ae0caa Mon Sep 17 00:00:00 2001 +From: Marian Koncek +Date: Thu, 31 Oct 2019 12:30:12 +0100 +Subject: [PATCH] Port to OpenJDK 11 + +--- + .../commons/collections/collection/AbstractTestCollection.java | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java +index dfde362..8287f33 100644 +--- a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java ++++ b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java +@@ -1116,7 +1116,7 @@ public abstract class AbstractTestCollection extends AbstractTestObject { + verify(); + + try { +- array = collection.toArray(null); ++ array = collection.toArray((Object[]) null); + fail("toArray(null) should raise NPE"); + } catch (NullPointerException e) { + // expected +-- +2.21.0 + diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 349f1eb..b999ab8 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -9,6 +9,7 @@ BuildArch: noarch Source0: http://www.apache.org/dist/commons/collections/source/commons-collections-%{version}-src.tar.gz Patch0: 0001-Port-to-Java-8.patch +Patch1: 0002-Port-to-OpenJDK-11.patch BuildRequires: maven-local BuildRequires: mvn(junit:junit) @@ -51,6 +52,7 @@ find . -name "*.jar" -exec rm -f {} \; find . -name "*.class" -exec rm -f {} \; %patch0 -p1 +%patch1 -p1 # Fix file eof sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt From 674a125eeef59dad9f0c3fe499dd1a61ef742d85 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 17:29:27 +0100 Subject: [PATCH 08/11] Mass rebuild for javapackages-tools 201902 --- apache-commons-collections.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index b999ab8..2de2465 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -1,6 +1,6 @@ Name: apache-commons-collections Version: 3.2.2 -Release: 12%{?dist} +Release: 13%{?dist} Summary: Provides new interfaces, implementations and utilities for Java Collections License: ASL 2.0 URL: http://commons.apache.org/collections/ @@ -77,6 +77,9 @@ sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt %license LICENSE.txt NOTICE.txt %changelog +* Tue Nov 05 2019 Mikolaj Izdebski - 3.2.2-13 +- Mass rebuild for javapackages-tools 201902 + * Fri Jun 28 2019 Mikolaj Izdebski - 3.2.2-12 - Enable tests From d1592f7a6e3ec35b2747e8a6ba9e7ce5305dba9f Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 11 Dec 2019 17:29:10 +0100 Subject: [PATCH 09/11] Fix OSGi bundle symbolic name --- apache-commons-collections.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 2de2465..4a30214 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -61,7 +61,7 @@ sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt %mvn_file ':commons-collections{,-testframework}' %{name}@1 commons-collections@1 %build -%mvn_build -- -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6 +%mvn_build -- -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6 -Dcommons.osgi.symbolicName=org.apache.commons.collections %install %mvn_artifact commons-collections:commons-collections-testframework:%{version} target/commons-collections-testframework-%{version}.jar From c5b1591042c487e15aef37d0fbca1eea18df8e5e Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sun, 17 May 2020 12:37:56 +0200 Subject: [PATCH 10/11] Port to maven-antrun-plugin 3.0.0 --- apache-commons-collections.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index 4a30214..ea1f22b 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -54,6 +54,9 @@ find . -name "*.class" -exec rm -f {} \; %patch0 -p1 %patch1 -p1 +# Port to maven-antrun-plugin 3.0.0 +sed -i s/tasks/target/ pom.xml + # Fix file eof sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt From 03dd62ce7876cef60d50edb4078114b74e817eab Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Fri, 16 Apr 2021 15:33:12 +0200 Subject: [PATCH 11/11] Conditionalize buildrequires in bootstrap mode --- apache-commons-collections.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apache-commons-collections.spec b/apache-commons-collections.spec index ea1f22b..d7ca5f2 100644 --- a/apache-commons-collections.spec +++ b/apache-commons-collections.spec @@ -1,3 +1,5 @@ +%bcond_without bootstrap + Name: apache-commons-collections Version: 3.2.2 Release: 13%{?dist} @@ -12,9 +14,13 @@ Patch0: 0001-Port-to-Java-8.patch Patch1: 0002-Port-to-OpenJDK-11.patch BuildRequires: maven-local +%if %{with bootstrap} +BuildRequires: javapackages-bootstrap +%else BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.commons:commons-parent:pom:) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) +%endif %description The introduction of the Collections API by Sun in JDK 1.2 has been a