Unbundle publicsuffix-list
- Resolves: rhbz#1183782
This commit is contained in:
		
							parent
							
								
									4f319933b5
								
							
						
					
					
						commit
						1117252b88
					
				
							
								
								
									
										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 b4954ca99dcc6daa344c9223a5997487e0806605 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 173763a..d792eca 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
 | ||||||
|  | @@ -80,11 +80,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 (IOException ex) { | ||||||
|  |                              // Should never happen | ||||||
|  |                              final Log log = LogFactory.getLog(PublicSuffixMatcherLoader.class); | ||||||
|  | -- 
 | ||||||
|  | 2.1.0 | ||||||
|  | 
 | ||||||
| @ -3,11 +3,12 @@ | |||||||
| Name:              httpcomponents-client | Name:              httpcomponents-client | ||||||
| Summary:           HTTP agent implementation based on httpcomponents HttpCore | Summary:           HTTP agent implementation based on httpcomponents HttpCore | ||||||
| Version:           4.4 | Version:           4.4 | ||||||
| Release:           0.1.beta1%{?dist} | Release:           0.2.beta1%{?dist} | ||||||
| License:           ASL 2.0 and MPL | License:           ASL 2.0 | ||||||
| URL:               http://hc.apache.org/ | URL:               http://hc.apache.org/ | ||||||
| Source0:           http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-beta1-src.tar.gz | Source0:           http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-beta1-src.tar.gz | ||||||
| Source1:           https://publicsuffix.org/list/effective_tld_names.dat | 
 | ||||||
|  | Patch0:            0001-Use-system-copy-of-effective_tld_names.dat.patch | ||||||
| 
 | 
 | ||||||
| BuildArch:         noarch | BuildArch:         noarch | ||||||
| 
 | 
 | ||||||
| @ -20,9 +21,9 @@ BuildRequires:     mvn(org.codehaus.mojo:build-helper-maven-plugin) | |||||||
| BuildRequires:     mvn(org.mockito:mockito-core) | BuildRequires:     mvn(org.mockito:mockito-core) | ||||||
| BuildRequires:     mvn(net.sf.ehcache:ehcache-core) | BuildRequires:     mvn(net.sf.ehcache:ehcache-core) | ||||||
| BuildRequires:     mvn(spy:spymemcached) | BuildRequires:     mvn(spy:spymemcached) | ||||||
| # TODO: unbundle publicsuffix-list once it gets into Fedora | BuildRequires:     publicsuffix-list | ||||||
| # see https://bugzilla.redhat.com/show_bug.cgi?id=1175293 | 
 | ||||||
| #BuildRequires:     publicsuffix-list | Requires:          publicsuffix-list | ||||||
| 
 | 
 | ||||||
| Obsoletes:         %{name}-tests < 4.4 | Obsoletes:         %{name}-tests < 4.4 | ||||||
| 
 | 
 | ||||||
| @ -42,6 +43,7 @@ Summary:        API documentation for %{name} | |||||||
| 
 | 
 | ||||||
| %prep | %prep | ||||||
| %setup -q -n %{name}-%{version}-beta1 | %setup -q -n %{name}-%{version}-beta1 | ||||||
|  | %patch0 -p1 | ||||||
| 
 | 
 | ||||||
| # Don't install javadoc and sources jars | # Don't install javadoc and sources jars | ||||||
| %mvn_package ":{*}::{sources,javadoc}:" __noinstall | %mvn_package ":{*}::{sources,javadoc}:" __noinstall | ||||||
| @ -64,8 +66,6 @@ done | |||||||
| rm -rf httpclient-cache/src/test | rm -rf httpclient-cache/src/test | ||||||
| 
 | 
 | ||||||
| %pom_remove_plugin :download-maven-plugin httpclient | %pom_remove_plugin :download-maven-plugin httpclient | ||||||
| mkdir -p httpclient/target/classes/mozilla |  | ||||||
| cp -a %{SOURCE1} httpclient/target/classes/mozilla/public-suffix-list.txt |  | ||||||
| 
 | 
 | ||||||
| # Add proper Apache felix bundle plugin instructions | # Add proper Apache felix bundle plugin instructions | ||||||
| # so that we get a reasonable OSGi manifest. | # so that we get a reasonable OSGi manifest. | ||||||
| @ -130,6 +130,10 @@ rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java | |||||||
| %doc LICENSE.txt NOTICE.txt | %doc LICENSE.txt NOTICE.txt | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Tue Jan 20 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.2.beta1 | ||||||
|  | - Unbundle publicsuffix-list | ||||||
|  | - Resolves: rhbz#1183782 | ||||||
|  | 
 | ||||||
| * Mon Jan 19 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.1.beta1 | * Mon Jan 19 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.1.beta1 | ||||||
| - Update to upstream version 4.4 beta1 | - Update to upstream version 4.4 beta1 | ||||||
| - Remove tests subpackage | - Remove tests subpackage | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user