!1 package init

Merge pull request !1 from 香帅醉花香/wzs
This commit is contained in:
openeuler-ci-bot 2019-12-09 13:52:27 +08:00 committed by Gitee
commit dd1c000495
3 changed files with 183 additions and 0 deletions

View 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

Binary file not shown.

152
httpcomponents-client.spec Normal file
View File

@ -0,0 +1,152 @@
Name: httpcomponents-client
Version: 4.5.5
Release: 6
License: ASL 2.0
Summary: A library of components for building client side HTTP services
URL: http://hc.apache.org/
Source0: http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-src.tar.gz
Patch0001: 0001-Use-system-copy-of-effective_tld_names.dat.patch
BuildArch: noarch
BuildRequires: maven-local mvn(commons-codec:commons-codec) mvn(commons-logging:commons-logging)
BuildRequires: mvn(junit:junit) mvn(net.sf.ehcache:ehcache-core) mvn(net.spy:spymemcached)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) mvn(org.apache.httpcomponents:httpcore)
BuildRequires: mvn(org.apache.httpcomponents:project:pom:) mvn(org.mockito:mockito-core) publicsuffix-list
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) mvn(org.easymock:easymock)
Requires: publicsuffix-list
Obsoletes: %{name}-tests < 4.4
%description
HttpClient is an HTTP proxy implementation of HTTP / 1.1 extended by
httpcomponents HttpCore,which provides reusable components for
HTTP state management, HTTP connection management, and client-side
authentication. HttpComponents Client is almost equalto Commons
HttpClient 3.x. Users of Commons HttpClient strongly support it.
%package cache
Summary: Module used to cache for %{name}
%description cache
This package can be known as a client side, providing client side caching for %{name}.
%package help
Summary: Help documents javadoc for httpcomponents-client
Provides: %{name}-javadoc = %{version}-%{release}
Obsoletes: %{name}-javadoc < %{version}-%{release}
%description help
Man pages and other related help documents for httpcomponents-client.
%prep
%autosetup -n %{name}-%{version} -p1
%mvn_package :httpclient-cache cache
%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
rm httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java
%pom_remove_plugin org.apache.maven.plugins:maven-jar-plugin httpclient-cache
%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
for module in httpclient httpmime httpclient-cache fluent-hc; do
%pom_xpath_remove "pom:project/pom:packaging" $module
%pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" $module
done
%pom_xpath_inject pom:build "
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>" fluent-hc
%pom_xpath_inject pom:build/pom:plugins "
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
</plugin>" httpmime
%pom_xpath_inject pom:reporting/pom:plugins "
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Export-Package>*</Export-Package>
<Private-Package></Private-Package>
<Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
</instructions>
</configuration>
</plugin>" httpclient
%pom_xpath_inject pom:build/pom:plugins "
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<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>" httpclient
%pom_xpath_inject pom:build/pom: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>" httpclient-cache
rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java
%build
%mvn_file ":{*}" httpcomponents/@1
%mvn_build -f
%install
%mvn_install
find %{_buildrootdir} -name "httpcomponents-client.xml" | xargs sed -i \
's/<uuid>[[:alnum:]]\{8\}-[[:alnum:]]\{4\}-[[:alnum:]]\{4\}-[[:alnum:]]\{4\}-[[:alnum:]]\{12\}<\/uuid>/<uuid>12345678-1234-1234-1234-123456789012<\/uuid>/g'
%files -f .mfiles
%doc LICENSE.txt NOTICE.txt README.txt RELEASE_NOTES.txt
%files cache -f .mfiles-cache
%files help -f .mfiles-javadoc
%changelog
* Sun Dec 1 2019 wangzhishun <wangzhishun1@huawei.com> - 4.5.5-6
- Package init