From d17b5fb8396dcf2d05207fab9ab0f94bd0bdb251eeeea285eeada257f35cbec2 Mon Sep 17 00:00:00 2001 From: Michal Vyskocil Date: Tue, 5 Feb 2013 12:54:40 +0000 Subject: [PATCH] Accepting request 150900 from home:posophe Replace jakarta-commons-httpclient ( dead project ) OBS-URL: https://build.opensuse.org/request/show/150900 OBS-URL: https://build.opensuse.org/package/show/Java:packages/apache-commons-httpclient?expand=0&rev=1 --- .gitattributes | 23 +++ .gitignore | 1 + ...e-commons-httpclient-addosgimanifest.patch | 31 +++ ...ommons-httpclient-disablecryptotests.patch | 20 ++ apache-commons-httpclient-encoding.patch | 34 ++++ apache-commons-httpclient.changes | 5 + apache-commons-httpclient.spec | 183 ++++++++++++++++++ commons-httpclient-3.1-src.tar.gz | 3 + 8 files changed, 300 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 apache-commons-httpclient-addosgimanifest.patch create mode 100644 apache-commons-httpclient-disablecryptotests.patch create mode 100644 apache-commons-httpclient-encoding.patch create mode 100644 apache-commons-httpclient.changes create mode 100644 apache-commons-httpclient.spec create mode 100644 commons-httpclient-3.1-src.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/apache-commons-httpclient-addosgimanifest.patch b/apache-commons-httpclient-addosgimanifest.patch new file mode 100644 index 0000000..b2adc73 --- /dev/null +++ b/apache-commons-httpclient-addosgimanifest.patch @@ -0,0 +1,31 @@ +--- MANIFEST.MF 2007-09-06 12:31:02.000000000 -0400 ++++ MANIFEST.MF 2007-09-06 12:30:45.000000000 -0400 +@@ -3,4 +3,27 @@ + Specification-Version: 1.0 + Implementation-Vendor: Apache Software Foundation + Implementation-Version: @version@ +- ++Bundle-ManifestVersion: 2 ++Bundle-Name: %bundleName ++Bundle-SymbolicName: org.apache.commons.httpclient ++Bundle-Version: 3.1.0.v20080605-1935 ++Import-Package: javax.crypto;resolution:=optional, ++ javax.crypto.spec;resolution:=optional, ++ javax.net;resolution:=optional, ++ javax.net.ssl;resolution:=optional, ++ org.apache.commons.codec;version="[1.2.0,2.0.0)", ++ org.apache.commons.codec.binary;version="[1.2.0,2.0.0)", ++ org.apache.commons.codec.net;version="[1.2.0,2.0.0)", ++ org.apache.commons.logging;version="[1.0.4,2.0.0)" ++Export-Package: org.apache.commons.httpclient;version="3.1.0", ++ org.apache.commons.httpclient.auth;version="3.1.0", ++ org.apache.commons.httpclient.cookie;version="3.1.0", ++ org.apache.commons.httpclient.methods;version="3.1.0", ++ org.apache.commons.httpclient.methods.multipart;version="3.1.0", ++ org.apache.commons.httpclient.params;version="3.1.0", ++ org.apache.commons.httpclient.protocol;version="3.1.0", ++ org.apache.commons.httpclient.util;version="3.1.0" ++Bundle-Vendor: %bundleProvider ++Bundle-Localization: plugin ++Bundle-RequiredExecutionEnvironment: CDC-1.0/Foundation-1.0, ++ J2SE-1.2 diff --git a/apache-commons-httpclient-disablecryptotests.patch b/apache-commons-httpclient-disablecryptotests.patch new file mode 100644 index 0000000..75e38e1 --- /dev/null +++ b/apache-commons-httpclient-disablecryptotests.patch @@ -0,0 +1,20 @@ +--- ./src/test/org/apache/commons/httpclient/params/TestParamsAll.java.sav 2006-07-20 18:42:17.000000000 -0400 ++++ ./src/test/org/apache/commons/httpclient/params/TestParamsAll.java 2006-07-20 18:42:26.000000000 -0400 +@@ -43,7 +43,6 @@ + public static Test suite() { + TestSuite suite = new TestSuite(); + suite.addTest(TestHttpParams.suite()); +- suite.addTest(TestSSLTunnelParams.suite()); + return suite; + } + +--- ./src/test/org/apache/commons/httpclient/TestAll.java.sav 2006-07-20 18:42:56.000000000 -0400 ++++ ./src/test/org/apache/commons/httpclient/TestAll.java 2006-07-20 18:43:01.000000000 -0400 +@@ -100,7 +100,6 @@ + // Non compliant behaviour + suite.addTest(TestNoncompliant.suite()); + // Proxy +- suite.addTest(TestProxy.suite()); + suite.addTest(TestProxyWithRedirect.suite()); + return suite; + } diff --git a/apache-commons-httpclient-encoding.patch b/apache-commons-httpclient-encoding.patch new file mode 100644 index 0000000..fed1669 --- /dev/null +++ b/apache-commons-httpclient-encoding.patch @@ -0,0 +1,34 @@ +--- build.xml 2007-08-18 05:02:14.000000000 -0400 ++++ build.xml 2012-01-23 09:52:50.405796336 -0500 +@@ -179,6 +179,7 @@ + description="Compile shareable components"> + +@@ -186,6 +187,7 @@ + + +@@ -197,6 +199,7 @@ + description="Compile unit test cases"> + +@@ -244,6 +244,7 @@ + + = 1.0.3 +#BuildRequires: java-javadoc +#BuildRequires: apache-commons-logging-javadoc +BuildRequires: java-devel +BuildRequires: junit + +Requires: commons-codec +Requires: commons-logging >= 1.0.3 + +Provides: %{short_name} = %{version}-%{release} + +Provides: jakarta-%{short_name} = %{version}-%{release} +Obsoletes: jakarta-%{short_name} <= %{version}-%{release} + +%description +Although the java.net package provides basic functionality for +accessing resources via HTTP, it doesn't provide the full flexibility +or functionality needed by many applications. The Apache Commons +HttpClient component seeks to fill this void by providing an efficient, +up-to-date, and feature-rich package implementing the client side of +the most recent HTTP standards and recommendations. + +Designed for extension while providing robust support for the base HTTP +protocol, the HttpClient component may be of interest to anyone +building HTTP-aware client applications such as web browsers, web +service clients, or systems that leverage or extend the HTTP protocol +for distributed communication. + +%package javadoc +PreReq: coreutils +Summary: Developer documentation for apache-commons-httpclient +Group: Development/Libraries/Java + +%description javadoc +Developer documentation for apache-commons-httpclient in JavaDoc +format. + +%{summary}. + +%package demo +Summary: Demonstration files for apache-commons-httpclient +Group: Development/Libraries/Java +Requires: %{name} = %{version}-%{release} + +%description demo +Demonstration files for apache-commons-httpclient. NOTE: It is +possible that some demonstration files are specially prepared for SUN +Java runtime environment. If they fail with IBM or BEA Java, the +package itself does not need to be broken. + +%{summary}. + +%package manual +Summary: Manual for apache-commons-httpclient +Group: Development/Libraries/Java + +%description manual +Manual for apache-commons-httpclient + +%{summary}. + +%prep +%setup -q -n commons-httpclient-%{version} +mkdir lib # duh +rm -rf docs/apidocs docs/*.patch docs/*.orig docs/*.rej + +%patch0 + +pushd src/conf +%{__sed} -i 's/\r//' MANIFEST.MF +%patch1 +popd + +%patch2 + +# Use javax classes, not com.sun ones +# assume no filename contains spaces +pushd src + for j in $(find . -name "*.java" -exec grep -l 'com\.sun\.net\.ssl' {} \;); do + sed -e 's|com\.sun\.net\.ssl|javax.net.ssl|' $j > tempf + cp tempf $j + done + rm tempf +popd + +%{__sed} -i 's/\r//' RELEASE_NOTES.txt +%{__sed} -i 's/\r//' README.txt +%{__sed} -i 's/\r//' LICENSE.txt + +%build +ant \ + -Dbuild.sysclasspath=first \ + -Djavadoc.j2sdk.link=%{_javadocdir}/java \ + -Djavadoc.logging.link=%{_javadocdir}/apache-commons-logging \ + -Dtest.failonerror=false \ + -Dlib.dir=%{_javadir} \ + -Djavac.encoding=UTF-8 \ + dist test + +%install +# jars +mkdir -p $RPM_BUILD_ROOT%{_javadir} +cp -p dist/commons-httpclient.jar \ + $RPM_BUILD_ROOT%{_javadir}/%{name}.jar +# compat symlink +pushd $RPM_BUILD_ROOT%{_javadir} +ln -s apache-commons-httpclient.jar apache-commons-httpclient3.jar +ln -s apache-commons-httpclient.jar commons-httpclient3.jar +ln -s apache-commons-httpclient.jar commons-httpclient.jar +popd + +# javadoc +mkdir -p $RPM_BUILD_ROOT%{_javadocdir} +mv dist/docs/api $RPM_BUILD_ROOT%{_javadocdir}/%{name} + +# demo +mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name} +cp -pr src/examples src/contrib $RPM_BUILD_ROOT%{_datadir}/%{name} + +# manual and docs +rm -f dist/docs/{BUILDING,TESTING}.txt +ln -s %{_javadocdir}/%{name} dist/docs/apidocs + +%files +%defattr(0644,root,root,0755) +%doc LICENSE.txt README.txt RELEASE_NOTES.txt +%{_javadir}/%{name}.jar +%{_javadir}/apache-commons-httpclient3.jar +%{_javadir}/commons-httpclient3.jar +%{_javadir}/commons-httpclient.jar + +%files javadoc +%defattr(0644,root,root,0755) +%doc %{_javadocdir}/%{name} + +%files demo +%defattr(0644,root,root,0755) +%{_datadir}/%{name} + +%files manual +%defattr(0644,root,root,0755) +%doc dist/docs/* + +%changelog diff --git a/commons-httpclient-3.1-src.tar.gz b/commons-httpclient-3.1-src.tar.gz new file mode 100644 index 0000000..ce3caeb --- /dev/null +++ b/commons-httpclient-3.1-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9a496d3418b0e15894fb351652cd4fa5ca434ebfc3ce3bb8da40defd8b097f2 +size 1882664