This commit is contained in:
commit
214b6a516c
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -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
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
31
0001-Use-system-copy-of-effective_tld_names.dat.patch
Normal file
31
0001-Use-system-copy-of-effective_tld_names.dat.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 3514ce0f38dddafd052d76e6a0da9bbb862ff8a4 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Tue, 20 Jan 2015 16:04:31 +0100
|
||||
Subject: [PATCH] Use system copy of effective_tld_names.dat
|
||||
|
||||
---
|
||||
.../java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java b/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
|
||||
index 8783c5b..c858220 100644
|
||||
--- a/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
|
||||
+++ b/httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcherLoader.java
|
||||
@@ -82,11 +82,10 @@ public final class PublicSuffixMatcherLoader {
|
||||
if (DEFAULT_INSTANCE == null) {
|
||||
synchronized (PublicSuffixMatcherLoader.class) {
|
||||
if (DEFAULT_INSTANCE == null){
|
||||
- final URL url = PublicSuffixMatcherLoader.class.getResource(
|
||||
- "/mozilla/public-suffix-list.txt");
|
||||
- if (url != null) {
|
||||
+ final File file = new File("/usr/share/publicsuffix/effective_tld_names.dat");
|
||||
+ if (file.exists()) {
|
||||
try {
|
||||
- DEFAULT_INSTANCE = load(url);
|
||||
+ DEFAULT_INSTANCE = load(file);
|
||||
} catch (final IOException ex) {
|
||||
// Should never happen
|
||||
final Log log = LogFactory.getLog(PublicSuffixMatcherLoader.class);
|
||||
--
|
||||
2.9.3
|
||||
|
3
httpcomponents-client-4.5.6-src.tar.gz
Normal file
3
httpcomponents-client-4.5.6-src.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb5b341ae432841d691d5329c686dbde3ab35d0f5c1832a34b5826d9051a129a
|
||||
size 814884
|
3
httpcomponents-client-build.tar.xz
Normal file
3
httpcomponents-client-build.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a458fa02512ba193d96b0273f8334123b6bb0552169e22bdc0583ad4171099dd
|
||||
size 3672
|
19
httpcomponents-client-java8compat.patch
Normal file
19
httpcomponents-client-java8compat.patch
Normal file
@ -0,0 +1,19 @@
|
||||
--- httpcomponents-client-4.5.6/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java 2018-11-06 09:37:41.743463818 +0100
|
||||
+++ httpcomponents-client-4.5.6.new/httpclient/src/main/java/org/apache/http/client/utils/URLEncodedUtils.java 2019-03-13 10:49:52.762831489 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.net.URI;
|
||||
+import java.nio.Buffer;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.Charset;
|
||||
@@ -587,7 +588,7 @@
|
||||
bb.put((byte) c);
|
||||
}
|
||||
}
|
||||
- bb.flip();
|
||||
+ ((Buffer)bb).flip();
|
||||
return charset.decode(bb).toString();
|
||||
}
|
||||
|
5
httpcomponents-client.changes
Normal file
5
httpcomponents-client.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 13 16:41:34 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging of httpcomponents-client 4.5.6
|
||||
- Generate and customize ant build files
|
221
httpcomponents-client.spec
Normal file
221
httpcomponents-client.spec
Normal file
@ -0,0 +1,221 @@
|
||||
#
|
||||
# spec file for package httpcomponents-client
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%bcond_with tests
|
||||
Name: httpcomponents-client
|
||||
Version: 4.5.6
|
||||
Release: 0
|
||||
Summary: HTTP agent implementation based on httpcomponents HttpCore
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://hc.apache.org/
|
||||
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-src.tar.gz
|
||||
Source1: %{name}-build.tar.xz
|
||||
Patch0: 0001-Use-system-copy-of-effective_tld_names.dat.patch
|
||||
Patch1: %{name}-java8compat.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: apache-commons-codec
|
||||
BuildRequires: apache-commons-logging
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: httpcomponents-core
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: publicsuffix
|
||||
Requires: mvn(commons-codec:commons-codec)
|
||||
Requires: mvn(commons-logging:commons-logging)
|
||||
Requires: mvn(org.apache.httpcomponents:httpcore)
|
||||
Requires: publicsuffix
|
||||
BuildArch: noarch
|
||||
%if %{with tests}
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: cglib
|
||||
BuildRequires: mockito
|
||||
BuildRequires: objectweb-asm
|
||||
BuildRequires: objenesis
|
||||
%endif
|
||||
|
||||
%description
|
||||
HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on
|
||||
httpcomponents HttpCore. It also provides reusable components for
|
||||
client-side authentication, HTTP state management, and HTTP connection
|
||||
management. HttpComponents Client is a successor of and replacement
|
||||
for Commons HttpClient 3.x. Users of Commons HttpClient are strongly
|
||||
encouraged to upgrade.
|
||||
|
||||
%package cache
|
||||
Summary: Cache module for %{name}
|
||||
Group: Development/Libraries/Java
|
||||
Requires: mvn(commons-logging:commons-logging)
|
||||
Requires: mvn(org.apache.httpcomponents:httpclient) = %{version}
|
||||
|
||||
%description cache
|
||||
This package provides client side caching for %{name}.
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
%{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -a1
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
# Remove optional build deps not available in openSUSE
|
||||
%pom_disable_module httpclient-osgi
|
||||
%pom_disable_module httpclient-win
|
||||
%pom_remove_plugin :docbkx-maven-plugin
|
||||
%pom_remove_plugin :clirr-maven-plugin
|
||||
%pom_remove_plugin :maven-checkstyle-plugin
|
||||
%pom_remove_plugin :apache-rat-plugin
|
||||
%pom_remove_plugin :maven-source-plugin
|
||||
%pom_remove_plugin :maven-javadoc-plugin
|
||||
|
||||
# Fails due to strict crypto policy - uses DSA in test data
|
||||
rm httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java
|
||||
|
||||
# Don't compile/run httpclient-cache tests - they are incompatible with EasyMock 3.3
|
||||
%pom_remove_dep org.easymock:easymockclassextension
|
||||
for dep in org.easymock:easymockclassextension org.slf4j:slf4j-jcl; do
|
||||
%pom_remove_dep $dep httpclient-cache
|
||||
done
|
||||
rm -rf httpclient-cache/src/test
|
||||
|
||||
%pom_remove_plugin :download-maven-plugin httpclient
|
||||
|
||||
%pom_xpath_inject "pom:archive" "
|
||||
<manifestFile>\${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>"
|
||||
|
||||
%pom_xpath_inject pom:build/pom:plugins "
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>"
|
||||
|
||||
%pom_xpath_inject pom:build "
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Export-Package>org.apache.http.*,!org.apache.http.param</Export-Package>
|
||||
<Private-Package></Private-Package>
|
||||
<_nouses>true</_nouses>
|
||||
<Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
|
||||
</instructions>
|
||||
<excludeDependencies>true</excludeDependencies>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
" httpclient
|
||||
|
||||
%pom_xpath_inject pom:build "
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<Export-Package>*</Export-Package>
|
||||
<Import-Package>net.sf.ehcache;resolution:=optional,net.spy.memcached;resolution:=optional,*</Import-Package>
|
||||
<Private-Package></Private-Package>
|
||||
<_nouses>true</_nouses>
|
||||
</instructions>
|
||||
<excludeDependencies>true</excludeDependencies>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>" httpclient-cache
|
||||
|
||||
# requires network
|
||||
rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java
|
||||
|
||||
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/memcached
|
||||
%pom_remove_dep :spymemcached httpclient-cache
|
||||
|
||||
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/ehcache
|
||||
%pom_remove_dep :ehcache-core httpclient-cache
|
||||
|
||||
for module in fluent-hc httpclient httpclient-cache httpmime; do
|
||||
%pom_xpath_inject "pom:project" "
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<version>%{version}</version>" $module
|
||||
%pom_remove_parent $module
|
||||
done
|
||||
|
||||
%build
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib httpcomponents/httpcore commons-logging commons-codec
|
||||
%if %{with tests}
|
||||
build-jar-repository -s lib cglib/cglib mockito/mockito-core objectweb-asm/asm objenesis/objenesis
|
||||
%endif
|
||||
%{ant} \
|
||||
%if %{without tests}
|
||||
-Dtest.skip=true \
|
||||
%endif
|
||||
package javadoc
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -dm 0755 %{buildroot}%{_javadir}/httpcomponents
|
||||
for module in fluent-hc httpclient httpclient-cache httpmime; do
|
||||
install -pm 0644 ${module}/target/${module}-%{version}.jar %{buildroot}%{_javadir}/httpcomponents/${module}.jar
|
||||
done
|
||||
# pom
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}/httpcomponents
|
||||
for module in fluent-hc httpclient httpmime; do
|
||||
install -pm 0644 ${module}/pom.xml %{buildroot}%{_mavenpomdir}/httpcomponents/${module}.pom
|
||||
%add_maven_depmap httpcomponents/${module}.pom httpcomponents/${module}.jar
|
||||
done
|
||||
install -pm 0644 httpclient-cache/pom.xml %{buildroot}%{_mavenpomdir}/httpcomponents/httpclient-cache.pom
|
||||
%add_maven_depmap httpcomponents/httpclient-cache.pom httpcomponents/httpclient-cache.jar -f cache
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
for module in fluent-hc httpclient httpclient-cache httpmime; do
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}/${module}
|
||||
cp -pr ${module}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/${module}/
|
||||
done
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE.txt
|
||||
%doc NOTICE.txt README.txt RELEASE_NOTES.txt
|
||||
|
||||
%files cache -f .mfiles-cache
|
||||
|
||||
%files javadoc
|
||||
%license LICENSE.txt
|
||||
%doc NOTICE.txt
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user