Update to upstream version 3.2.2

- Merge two javadoc subpackages
- Install with XMVn
- Specfile cleanup
This commit is contained in:
Michael Simacek 2015-11-17 01:41:01 +01:00
parent 8a47ab548b
commit 90eafa49fd
8 changed files with 49 additions and 210 deletions

1
.gitignore vendored
View File

@ -0,0 +1 @@
/commons-collections-3.2.2-src.tar.gz

View File

@ -1,5 +1,19 @@
From 066f654cd6a1b9d3bfd54565af1d618dada2deb4 Mon Sep 17 00:00:00 2001
From: Michael Simacek <msimacek@redhat.com>
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(-)
diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java diff --git a/src/java/org/apache/commons/collections/MultiHashMap.java b/src/java/org/apache/commons/collections/MultiHashMap.java
index 25158b4..ab0ca71 100644 index 7fec9af..bcb4a11 100644
--- a/src/java/org/apache/commons/collections/MultiHashMap.java --- a/src/java/org/apache/commons/collections/MultiHashMap.java
+++ b/src/java/org/apache/commons/collections/MultiHashMap.java +++ b/src/java/org/apache/commons/collections/MultiHashMap.java
@@ -331,21 +331,21 @@ public class MultiHashMap extends HashMap implements MultiMap { @@ -331,21 +331,21 @@ public class MultiHashMap extends HashMap implements MultiMap {
@ -29,7 +43,7 @@ index 25158b4..ab0ca71 100644
/** /**
diff --git a/src/java/org/apache/commons/collections/MultiMap.java b/src/java/org/apache/commons/collections/MultiMap.java diff --git a/src/java/org/apache/commons/collections/MultiMap.java b/src/java/org/apache/commons/collections/MultiMap.java
index 8cd7212..60f22ae 100644 index be9455b..4d9cc7d 100644
--- a/src/java/org/apache/commons/collections/MultiMap.java --- a/src/java/org/apache/commons/collections/MultiMap.java
+++ b/src/java/org/apache/commons/collections/MultiMap.java +++ b/src/java/org/apache/commons/collections/MultiMap.java
@@ -66,7 +66,7 @@ public interface MultiMap extends Map { @@ -66,7 +66,7 @@ public interface MultiMap extends Map {
@ -51,7 +65,7 @@ index 8cd7212..60f22ae 100644
/** /**
* Gets a collection containing all the values in the map. * Gets a collection containing all the values in the map.
diff --git a/src/java/org/apache/commons/collections/map/MultiKeyMap.java b/src/java/org/apache/commons/collections/map/MultiKeyMap.java diff --git a/src/java/org/apache/commons/collections/map/MultiKeyMap.java b/src/java/org/apache/commons/collections/map/MultiKeyMap.java
index 1ba1cea..3523b5c 100644 index 9e3e02d..969d11e 100644
--- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java --- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java
+++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java +++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java
@@ -197,7 +197,7 @@ public class MultiKeyMap @@ -197,7 +197,7 @@ public class MultiKeyMap
@ -81,7 +95,7 @@ index 1ba1cea..3523b5c 100644
/** /**
diff --git a/src/java/org/apache/commons/collections/map/MultiValueMap.java b/src/java/org/apache/commons/collections/map/MultiValueMap.java diff --git a/src/java/org/apache/commons/collections/map/MultiValueMap.java b/src/java/org/apache/commons/collections/map/MultiValueMap.java
index cc74fd7..b347e84 100644 index f44999b..79938dc 100644
--- a/src/java/org/apache/commons/collections/map/MultiValueMap.java --- a/src/java/org/apache/commons/collections/map/MultiValueMap.java
+++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java +++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java
@@ -153,19 +153,19 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap { @@ -153,19 +153,19 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap {
@ -109,7 +123,7 @@ index cc74fd7..b347e84 100644
/** /**
diff --git a/src/test/org/apache/commons/collections/TestMultiHashMap.java b/src/test/org/apache/commons/collections/TestMultiHashMap.java diff --git a/src/test/org/apache/commons/collections/TestMultiHashMap.java b/src/test/org/apache/commons/collections/TestMultiHashMap.java
index 722bec0..2268d85 100644 index eca833a..f47c6f9 100644
--- a/src/test/org/apache/commons/collections/TestMultiHashMap.java --- a/src/test/org/apache/commons/collections/TestMultiHashMap.java
+++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java +++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java
@@ -464,11 +464,11 @@ public class TestMultiHashMap extends AbstractTestMap { @@ -464,11 +464,11 @@ public class TestMultiHashMap extends AbstractTestMap {
@ -130,7 +144,7 @@ index 722bec0..2268d85 100644
} }
diff --git a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java diff --git a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java
index 6e528fb..9faabf7 100644 index b1ee3d0..66fcade 100644
--- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java --- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java
+++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java
@@ -315,10 +315,10 @@ public class TestMultiKeyMap extends AbstractTestIterableMap { @@ -315,10 +315,10 @@ public class TestMultiKeyMap extends AbstractTestIterableMap {
@ -146,3 +160,6 @@ index 6e528fb..9faabf7 100644
assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1)));
break; break;
case 3: case 3:
--
2.5.0

View File

@ -2,31 +2,21 @@
%global short_name commons-%{base_name} %global short_name commons-%{base_name}
Name: apache-%{short_name} Name: apache-%{short_name}
Version: 3.2.1 Version: 3.2.2
Release: 26%{?dist} Release: 1%{?dist}
Summary: Provides new interfaces, implementations and utilities for Java Collections Summary: Provides new interfaces, implementations and utilities for Java Collections
License: ASL 2.0 License: ASL 2.0
Group: Development/Libraries
URL: http://commons.apache.org/%{base_name}/ URL: http://commons.apache.org/%{base_name}/
Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz Source0: http://www.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
Source1: commons-collections-testframework.pom
Patch0: java8-compat.patch
Patch1: jakarta-%{short_name}-javadoc-nonet.patch
Patch4: commons-collections-3.2-build_xml.patch
Patch0: 0001-Port-to-Java-8.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: java-devel
BuildRequires: jpackage-utils
BuildRequires: maven-local
BuildRequires: ant BuildRequires: ant
BuildRequires: apache-commons-parent BuildRequires: maven-local
BuildRequires: dos2unix BuildRequires: mvn(org.apache.commons:commons-parent:pom:)
Requires: java-headless BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
Requires: jpackage-utils
%description %description
The introduction of the Collections API by Sun in JDK 1.2 has been a The introduction of the Collections API by Sun in JDK 1.2 has been a
@ -45,7 +35,6 @@ such as union, intersection, and closure.
%package testframework %package testframework
Summary: Testframework for %{name} Summary: Testframework for %{name}
Group: Development/Tools
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description testframework %description testframework
@ -53,99 +42,53 @@ Requires: %{name} = %{version}-%{release}
%package javadoc %package javadoc
Summary: Javadoc for %{name} Summary: Javadoc for %{name}
Group: Documentation Provides: %{name}-testframework-javadoc = %{version}-%{release}
Obsoletes: %{name}-testframework-javadoc < %{version}-%{release}
%description javadoc %description javadoc
%{summary}. %{summary}.
%package testframework-javadoc
Summary: Javadoc for %{name}-testframework
Group: Documentation
%description testframework-javadoc
%{summary}.
%prep %prep
%setup -q -n %{short_name}-%{version}-src %setup -q -n %{short_name}-%{version}-src
# remove all binary libs # remove all binary libs
find . -name "*.jar" -exec rm -f {} \; find . -name "*.jar" -exec rm -f {} \;
find . -name "*.class" -exec rm -f {} \; find . -name "*.class" -exec rm -f {} \;
find . -name "*.java" |xargs dos2unix
%patch0 -p1 %patch0 -p1
%patch1 -p1
%patch4 -b .sav
# Fix file eof # Fix file eof
%{__sed} -i 's/\r//' LICENSE.txt sed -i 's/\r//' LICENSE.txt PROPOSAL.html README.txt NOTICE.txt
%{__sed} -i 's/\r//' PROPOSAL.html
%{__sed} -i 's/\r//' RELEASE-NOTES.html
%{__sed} -i 's/\r//' README.txt
%{__sed} -i 's/\r//' NOTICE.txt
# Substitute version into testframework pom %mvn_package :%{short_name}-testframework testframework
cp -p %{SOURCE1} pom-testframework.xml %mvn_file ':%{short_name}{,-testframework}' %{name}@1 %{short_name}@1
sed -i 's/@VERSION@/%{version}/' pom-testframework.xml
%build %build
%mvn_build %mvn_build
ant tf.javadoc ant tf.javadoc -Dtf.build.docs=target/site/apidocs/
%mvn_artifact %{short_name}:%{short_name}-testframework:%{version} target/%{short_name}-testframework-%{version}.jar
%install %install
%mvn_install
# jars
install -Dm 644 target/%{short_name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
install -Dm 644 target/%{short_name}-testframework-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-testframework.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *; do ln -sf ${jar} `echo $jar| sed "s|apache-||g"`; done)
# poms
mkdir -p %{buildroot}%{_datadir}/maven-poms/
install -Dpm 644 pom.xml %{buildroot}%{_datadir}/maven-poms/%{short_name}.pom
install -Dpm 644 pom-testframework.xml %{buildroot}%{_datadir}/maven-poms/%{short_name}-testframework.pom
# fragments
%add_maven_depmap %{short_name}.pom %{short_name}.jar -a "org.apache.commons:%{short_name}"
%add_maven_depmap %{short_name}-testframework.pom %{short_name}-testframework.jar -f "testframework" -a "org.apache.commons:%{short_name}-testframework"
# javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
rm -rf target/site/apidocs
# testframework-javadoc
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testframework-%{version}
cp -pr build/docs/testframework/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testframework-%{version}
ln -s %{name}-testframework-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testframework
%files -f .mfiles %files -f .mfiles
%doc PROPOSAL.html README.txt LICENSE.txt RELEASE-NOTES.html NOTICE.txt %doc PROPOSAL.html README.txt LICENSE.txt NOTICE.txt
%{_javadir}/%{name}.jar
%{_javadir}/%{short_name}.jar
%files testframework -f .mfiles-testframework %files testframework -f .mfiles-testframework
%{_javadir}/%{name}-testframework.jar
%{_javadir}/%{short_name}-testframework.jar
%files javadoc %files javadoc -f .mfiles-javadoc
%doc LICENSE.txt NOTICE.txt %doc LICENSE.txt NOTICE.txt
%{_javadocdir}/%{name}-%{version}
%{_javadocdir}/%{name}
%files testframework-javadoc
%doc LICENSE.txt NOTICE.txt
%{_javadocdir}/%{name}-testframework-%{version}
%{_javadocdir}/%{name}-testframework
%changelog %changelog
* Mon Nov 16 2015 Michael Simacek <msimacek@redhat.com> - 3.2.2-1
- Update to upstream version 3.2.2
- Merge two javadoc subpackages
- Install with XMVn
- Specfile cleanup
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-26 * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

View File

@ -1,70 +0,0 @@
<project name="commons-collections-tomcat5" default="build" basedir=".">
<property name="tomcat-collections.home" value="collections-tomcat5"/>
<property name="commons-collections.home" value="."/>
<property name="tomcat-collections.jar" value="commons-collections-tomcat5.jar"/>
<!-- Java Options -->
<property name="compile.debug" value="true"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.source" value="1.4"/>
<target name="clean">
<delete dir="${tomcat-collections.home}"/>
</target>
<target name="build">
<copy todir="${tomcat-collections.home}">
<fileset dir="${commons-collections.home}" >
<include name="**/collections/CursorableLinkedList.java" />
<include name="**/collections/KeyValue.java" />
<include name="**/collections/LRUMap.java" />
<include name="**/collections/SequencedHashMap.java" />
</fileset>
<!-- <fileset dir="${commons-pool.home}">
<include name="**/*.java" />
<exclude name="**/Stack*.java" />
<exclude name="**/SoftReferenceObjectPool.java" />
<exclude name="**/test/**" />
</fileset>
<fileset dir="${commons-dbcp.home}">
<include name="**/*.java" />
<exclude name="**/test/**" />
<exclude name="${tomcat-dbcp.home}/**"/>
</fileset> -->
</copy>
<replace dir="${tomcat-collections.home}/src/java/org/apache/commons">
<replacefilter token="return UnmodifiableList.decorate(l);"
value="return l;" />
<replacefilter token="import org.apache.commons.collections.list.UnmodifiableList;"
value=" " />
</replace>
<replace dir="${tomcat-collections.home}/src/java/org/apache/commons" >
<replacefilter token="org.apache.commons"
value="org.apache.tomcat.dbcp" />
</replace>
<mkdir dir="${tomcat-collections.home}/src/java/org/apache/tomcat/dbcp" />
<move todir="${tomcat-collections.home}/src/java/org/apache/tomcat/dbcp">
<fileset dir="${tomcat-collections.home}/src/java/org/apache/commons" />
</move>
<mkdir dir="${tomcat-collections.home}/classes"/>
<javac destdir="${tomcat-collections.home}/classes"
optimize="off"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
source="${compile.source}"
sourcepath="${tomcat-collections.home}/src/java"
srcdir="${tomcat-collections.home}/src/java" >
<include name="**" />
</javac>
<jar destfile="${tomcat-collections.home}/${tomcat-collections.jar}"
index="true">
<fileset dir="${tomcat-collections.home}/classes">
<include name="**/*.class" />
<include name="**/*.properties" />
</fileset>
</jar>
</target>
</project>

View File

@ -1,20 +0,0 @@
--- build.xml.orig 2008-11-29 21:16:01.000000000 +0200
+++ build.xml 2008-11-29 21:17:28.000000000 +0200
@@ -286,7 +286,7 @@
<!-- Runs all tests -->
<target name="-test-all" depends="compile.tests" unless="testcase">
<mkdir dir="${build.test.reports}"/>
- <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
+ <junit printsummary="yes" haltonfailure="no" showoutput="yes">
<formatter type="brief" />
<classpath>
<pathelement location="${build.classes}"/>
@@ -331,7 +331,7 @@
<target name="testjar" depends="compile.tests,jar"
description="Run all unit test cases">
<echo message="Running collections tests against built jar ..."/>
- <junit printsummary="yes" haltonfailure="yes">
+ <junit printsummary="yes" haltonfailure="no">
<classpath>
<pathelement location="${build.jar.name}"/>
<pathelement location="${build.tests}"/>

View File

@ -1,6 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections-testframework</artifactId>
<version>@VERSION@</version>
</project>

View File

@ -1,26 +0,0 @@
--- commons-collections-3.1/build.xml~ 2004-06-23 00:17:14.000000000 +0100
+++ commons-collections-3.1/build.xml 2005-05-04 13:58:44.000000000 +0100
@@ -80,7 +80,6 @@
<!-- Javadoc -->
<property name="javadoc.access" value="protected"/>
- <property name="javadoc.links" value="http://java.sun.com/j2se/1.3/docs/api/"/>
<!-- JUnit -->
<property name="test.failonerror" value="true"/>
@@ -362,7 +361,6 @@
author="true"
version="true"
use="true"
- link="${javadoc.links}"
overview="${source.java}/org/apache/commons/collections/overview.html"
doctitle="${component.title} ${component.version} API;"
windowtitle="${component.title} ${component.version} API"
@@ -470,7 +468,6 @@
access="protected"
author="false"
version="false"
- link="${javadoc.links}"
overview="${source.test}/org/apache/commons/collections/overview.html"
doctitle="${tf.title} ${tf.version} API;"
windowtitle="${tf.title} ${tf.version} API"

View File

@ -1 +1 @@
031ce05872ddb0462f0dcce1e5babbe9 commons-collections-3.2.1-src.tar.gz 776b51a51312c1854ad8f6d344a47cda commons-collections-3.2.2-src.tar.gz