39aebd
%bcond_without     memcached
39aebd
%bcond_without     ehcache
39aebd
39aebd
Name:              httpcomponents-client
39aebd
Summary:           HTTP agent implementation based on httpcomponents HttpCore
39aebd
Version:           4.5.5
9f4a39
Release:           5%{?dist}
39aebd
License:           ASL 2.0
39aebd
URL:               http://hc.apache.org/
39aebd
Source0:           http://www.apache.org/dist/httpcomponents/httpclient/source/%{name}-%{version}-src.tar.gz
39aebd
39aebd
Patch0:            0001-Use-system-copy-of-effective_tld_names.dat.patch
9f4a39
Patch1:            0002-Incorrect-handling-of-malformed-authority-component-.patch
39aebd
39aebd
BuildArch:         noarch
39aebd
39aebd
BuildRequires:     maven-local
39aebd
BuildRequires:     mvn(commons-codec:commons-codec)
39aebd
BuildRequires:     mvn(commons-logging:commons-logging)
39aebd
BuildRequires:     mvn(junit:junit)
39aebd
%if %{with ehcache}
39aebd
BuildRequires:     mvn(net.sf.ehcache:ehcache-core)
39aebd
%endif
39aebd
%if %{with memcached}
39aebd
BuildRequires:     mvn(net.spy:spymemcached)
39aebd
%endif
39aebd
BuildRequires:     mvn(org.apache.felix:maven-bundle-plugin)
39aebd
BuildRequires:     mvn(org.apache.httpcomponents:httpcore)
39aebd
BuildRequires:     mvn(org.apache.httpcomponents:project:pom:)
39aebd
BuildRequires:     mvn(org.codehaus.mojo:build-helper-maven-plugin)
39aebd
BuildRequires:     mvn(org.easymock:easymock)
39aebd
BuildRequires:     mvn(org.mockito:mockito-core)
39aebd
39aebd
BuildRequires:     publicsuffix-list
39aebd
Requires:          publicsuffix-list
39aebd
39aebd
Obsoletes:         %{name}-tests < 4.4
39aebd
39aebd
%description
39aebd
HttpClient is a HTTP/1.1 compliant HTTP agent implementation based on
39aebd
httpcomponents HttpCore. It also provides reusable components for
39aebd
client-side authentication, HTTP state management, and HTTP connection
39aebd
management. HttpComponents Client is a successor of and replacement
39aebd
for Commons HttpClient 3.x. Users of Commons HttpClient are strongly
39aebd
encouraged to upgrade.
39aebd
39aebd
%package        cache
39aebd
Summary:        Cache module for %{name}
39aebd
39aebd
%description    cache
39aebd
This package provides client side caching for %{name}.
39aebd
39aebd
%package        javadoc
39aebd
Summary:        API documentation for %{name}
39aebd
39aebd
%description    javadoc
39aebd
%{summary}.
39aebd
39aebd
%prep
39aebd
%setup -q -n %{name}-%{version}
39aebd
%patch0 -p1
9f4a39
%patch1 -p1
39aebd
39aebd
%mvn_package :httpclient-cache cache
39aebd
39aebd
# Remove optional build deps not available in Fedora
39aebd
%pom_disable_module httpclient-osgi
39aebd
%pom_disable_module httpclient-win
39aebd
%pom_remove_plugin :docbkx-maven-plugin
39aebd
%pom_remove_plugin :clirr-maven-plugin
39aebd
%pom_remove_plugin :maven-checkstyle-plugin
39aebd
%pom_remove_plugin :apache-rat-plugin
39aebd
%pom_remove_plugin :maven-source-plugin
39aebd
%pom_remove_plugin :maven-javadoc-plugin
39aebd
39aebd
# Fails due to strict crypto policy - uses DSA in test data
39aebd
rm httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java
39aebd
39aebd
# Don't compile/run httpclient-cache tests - they are incompatible with EasyMock 3.3
39aebd
%pom_remove_plugin org.apache.maven.plugins:maven-jar-plugin httpclient-cache
39aebd
%pom_remove_dep org.easymock:easymockclassextension
39aebd
for dep in org.easymock:easymockclassextension org.slf4j:slf4j-jcl; do
39aebd
    %pom_remove_dep $dep httpclient-cache
39aebd
done
39aebd
rm -rf httpclient-cache/src/test
39aebd
39aebd
%pom_remove_plugin :download-maven-plugin httpclient
39aebd
39aebd
# Add proper Apache felix bundle plugin instructions
39aebd
# so that we get a reasonable OSGi manifest.
39aebd
for module in httpclient httpmime httpclient-cache fluent-hc; do
39aebd
    %pom_xpath_remove "pom:project/pom:packaging" $module
39aebd
    %pom_xpath_inject "pom:project" "<packaging>bundle</packaging>" $module
39aebd
done
39aebd
39aebd
# Make fluent-hc into bundle
39aebd
%pom_xpath_inject pom:build "
39aebd
<plugins>
39aebd
    <plugin>
39aebd
      <groupId>org.apache.felix</groupId>
39aebd
      <artifactId>maven-bundle-plugin</artifactId>
39aebd
      <extensions>true</extensions>
39aebd
    </plugin>
39aebd
</plugins>" fluent-hc
39aebd
39aebd
# Make httpmime into bundle
39aebd
%pom_xpath_inject pom:build/pom:plugins "
39aebd
    <plugin>
39aebd
      <groupId>org.apache.felix</groupId>
39aebd
      <artifactId>maven-bundle-plugin</artifactId>
39aebd
      <extensions>true</extensions>
39aebd
    </plugin>" httpmime
39aebd
39aebd
# Make httpclient into bundle
39aebd
%pom_xpath_inject pom:reporting/pom:plugins "
39aebd
    <plugin>
39aebd
      <groupId>org.apache.felix</groupId>
39aebd
      <artifactId>maven-bundle-plugin</artifactId>
39aebd
      <configuration>
39aebd
        <instructions>
39aebd
          <Export-Package>*</Export-Package>
39aebd
          <Private-Package></Private-Package>
39aebd
          <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
39aebd
        </instructions>
39aebd
      </configuration>
39aebd
    </plugin>" httpclient
39aebd
%pom_xpath_inject pom:build/pom:plugins "
39aebd
    <plugin>
39aebd
      <groupId>org.apache.felix</groupId>
39aebd
      <artifactId>maven-bundle-plugin</artifactId>
39aebd
      <extensions>true</extensions>
39aebd
      <configuration>
39aebd
        <instructions>
39aebd
          <Export-Package>org.apache.http.*,!org.apache.http.param</Export-Package>
39aebd
          <Private-Package></Private-Package>
39aebd
          <_nouses>true</_nouses>
39aebd
          <Import-Package>!org.apache.avalon.framework.logger,!org.apache.log,!org.apache.log4j,*</Import-Package>
39aebd
        </instructions>
39aebd
        <excludeDependencies>true</excludeDependencies>
39aebd
      </configuration>
39aebd
    </plugin>" httpclient
39aebd
39aebd
# Make httpclient-cache into bundle
39aebd
%pom_xpath_inject pom:build/pom:plugins "
39aebd
    <plugin>
39aebd
      <groupId>org.apache.felix</groupId>
39aebd
      <artifactId>maven-bundle-plugin</artifactId>
39aebd
      <extensions>true</extensions>
39aebd
      <configuration>
39aebd
        <instructions>
39aebd
          <Export-Package>*</Export-Package>
39aebd
          <Import-Package>net.sf.ehcache;resolution:=optional,net.spy.memcached;resolution:=optional,*</Import-Package>
39aebd
          <Private-Package></Private-Package>
39aebd
          <_nouses>true</_nouses>
39aebd
        </instructions>
39aebd
        <excludeDependencies>true</excludeDependencies>
39aebd
      </configuration>
39aebd
    </plugin>" httpclient-cache
39aebd
39aebd
# requires network
39aebd
rm httpclient/src/test/java/org/apache/http/client/config/TestRequestConfig.java
39aebd
39aebd
%if %{without memcached}
39aebd
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/memcached
39aebd
%pom_remove_dep :spymemcached httpclient-cache
39aebd
%endif
39aebd
%if %{without ehcache}
39aebd
rm -r httpclient-cache/src/*/java/org/apache/http/impl/client/cache/ehcache
39aebd
%pom_remove_dep :ehcache-core httpclient-cache
39aebd
%endif
39aebd
39aebd
%build
39aebd
%mvn_file ":{*}" httpcomponents/@1
39aebd
39aebd
%mvn_build
39aebd
39aebd
%install
39aebd
%mvn_install
39aebd
39aebd
39aebd
%files -f .mfiles
39aebd
%doc LICENSE.txt NOTICE.txt README.txt RELEASE_NOTES.txt
39aebd
39aebd
%files cache -f .mfiles-cache
39aebd
39aebd
%files javadoc -f .mfiles-javadoc
39aebd
%doc LICENSE.txt NOTICE.txt
39aebd
39aebd
%changelog
9f4a39
* Sat Sep 25 2021 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.5-5
9f4a39
- Fix incorrect handling of malformed authority component in request URIs
9f4a39
- Resolves: CVE-2020-13956
9f4a39
39aebd
* Mon Mar 19 2018 Michael Simacek <msimacek@redhat.com> - 4.5.5-4
39aebd
- Fix FTBFS (weak crypto in test data)
39aebd
39aebd
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.5.5-3
39aebd
- Escape macros in %%changelog
39aebd
39aebd
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.5-2
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
39aebd
39aebd
* Mon Jan 22 2018 Michael Simacek <msimacek@redhat.com> - 4.5.5-1
39aebd
- Update to upstream version 4.5.5
39aebd
39aebd
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.3-4
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
39aebd
39aebd
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.3-3
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
39aebd
39aebd
* Thu Feb 02 2017 Michael Simacek <msimacek@redhat.com> - 4.5.3-2
39aebd
- Add conditionals for memcached and ehcache
39aebd
39aebd
* Thu Jan 26 2017 Michael Simacek <msimacek@redhat.com> - 4.5.3-1
39aebd
- Update to upstream version 4.5.3
39aebd
39aebd
* Fri Jun 24 2016 Michael Simacek <msimacek@redhat.com> - 4.5.2-4
39aebd
- Fix build with httpcomponents-core-4.4.5
39aebd
39aebd
* Wed Jun 15 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.2-3
39aebd
- Add missing build-requires
39aebd
39aebd
* Wed Mar 16 2016 Sopot Cela <scela@redhat.com> - 4.5.2-2
39aebd
- Make the fluent API into a bundle
39aebd
39aebd
* Mon Feb 29 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.2-1
39aebd
- Update to upstream version 4.5.2
39aebd
39aebd
* Wed Feb 10 2016 Mat Booth <mat.booth@redhat.com> - 4.5.1-4
39aebd
- Enable the fluent API module
39aebd
39aebd
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.5.1-3
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
39aebd
39aebd
* Mon Jan 25 2016 Mat Booth <mat.booth@redhat.com> - 4.5.1-2
39aebd
- Make client cache jar into a OSGi bundle
39aebd
39aebd
* Wed Sep 16 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.5.1-1
39aebd
- Update to upstream version 4.5.1
39aebd
39aebd
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.5-2
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
39aebd
39aebd
* Thu Jun 04 2015 Michael Simacek <msimacek@redhat.com> - 4.5-1
39aebd
- Update to upstream version 4.5
39aebd
39aebd
* Tue Mar 31 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4.1-1
39aebd
- Update to upstream version 4.4.1
39aebd
39aebd
* Wed Feb 18 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-1
39aebd
- Update to upstream version 4.4
39aebd
39aebd
* Thu Jan 22 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.3.beta1
39aebd
- Split httpclient-cache into subpackage
39aebd
39aebd
* Tue Jan 20 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.2.beta1
39aebd
- Unbundle publicsuffix-list
39aebd
- Resolves: rhbz#1183782
39aebd
39aebd
* Mon Jan 19 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.4-0.1.beta1
39aebd
- Update to upstream version 4.4 beta1
39aebd
- Remove tests subpackage
39aebd
39aebd
* Fri Jan  9 2015 Richard Fearn <richardfearn@gmail.com> - 4.3.5-3
39aebd
- Also build HttpClient Cache (bug #1180696)
39aebd
39aebd
* Tue Dec 02 2014 Michael Simacek <msimacek@redhat.com> - 4.3.5-2
39aebd
- Build and install tests artifact (needed by copr-java)
39aebd
39aebd
* Tue Aug  5 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.5-1
39aebd
- Update to upstream version 4.3.5
39aebd
39aebd
* Mon Aug  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.4-2
39aebd
- Fix build-requires on httpcomponents-project
39aebd
39aebd
* Fri Jun  6 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.4-1
39aebd
- Update to upstream version 4.3.4
39aebd
39aebd
* Fri Feb 28 2014 Michael Simacek <msimacek@redhat.com> - 4.3.3-1
39aebd
- Update to upstream version 4.3.3
39aebd
39aebd
* Mon Jan 20 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3.2-1
39aebd
- Update to upstream version 4.3.2
39aebd
39aebd
* Mon Jan 06 2014 Michael Simacek <msimacek@redhat.com> - 4.3.1-1
39aebd
- Update to upstream version 4.3.1
39aebd
- Temporarily disable tests due to bug in mockito
39aebd
39aebd
* Thu Oct  3 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.3-2
39aebd
- Don't try to remove maven-notice-plugin from POM
39aebd
39aebd
* Fri Sep 13 2013 Michal Srb <msrb@redhat.com> - 4.3-1
39aebd
- Update to upstream version 4.3
39aebd
- Drop group tag
39aebd
39aebd
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.5-3
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
39aebd
39aebd
* Mon Jun 10 2013 Michal Srb <msrb@redhat.com> - 4.2.5-2
39aebd
- Enable tests on Fedora
39aebd
39aebd
* Thu Apr 25 2013 Michal Srb <msrb@redhat.com> - 4.2.5-1
39aebd
- Update to upstream version 4.2.5
39aebd
39aebd
* Thu Apr 11 2013 Michal Srb <msrb@redhat.com> - 4.2.4-1
39aebd
- Update to upstream version 4.2.4
39aebd
39aebd
* Wed Feb 06 2013 Java SIG <java-devel@lists.fedoraproject.org> - 4.2.3-3
39aebd
- Update for https://fedoraproject.org/wiki/Fedora_19_Maven_Rebuild
39aebd
- Replace maven BuildRequires with maven-local
39aebd
39aebd
* Fri Jan 25 2013 Michal Srb <msrb@redhat.com> - 4.2.3-2
39aebd
- Build with xmvn
39aebd
- Disable fluent-hc module
39aebd
39aebd
* Thu Jan 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.3-1
39aebd
- Update to upstream version 4.2.3
39aebd
39aebd
* Thu Oct 25 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.2-1
39aebd
- Update to upstream version 4.2.2
39aebd
39aebd
* Wed Aug  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-3
39aebd
- Fix OSGi manifest in httpmime
39aebd
39aebd
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-2
39aebd
- Install NOTICE.txt file
39aebd
- Fix javadir directory ownership
39aebd
- Fix directory permissions
39aebd
- Preserve timestamps
39aebd
- Replace add_to_maven_depmap with add_maven_depmap
39aebd
39aebd
* Fri Jul 27 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 4.2.1-1
39aebd
- Update to upstream version 4.2.1
39aebd
- Convert patches to POM macros
39aebd
39aebd
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.3-4
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
39aebd
39aebd
* Wed May 2 2012 Alexander Kurtakov <akurtako@redhat.com> 4.1.3-3
39aebd
- Do not export org.apache.http.param in osgi.
39aebd
39aebd
* Mon Mar 26 2012 Alexander Kurtakov <akurtako@redhat.com> 4.1.3-2
39aebd
- Do not export * but only org.apache.http.* .
39aebd
- Do not generate uses clauses in the manifest.
39aebd
39aebd
* Thu Mar  1 2012 Stanislav Ochotnicky <sochotnicky@redhat.com> 4.1.3-1
39aebd
- Update to latest upstream bugfix
39aebd
39aebd
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.2-2
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
39aebd
39aebd
* Tue Aug 16 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.2-1
39aebd
- Update to latest upstream (4.1.2)
39aebd
- Minor tweaks according to guidelines
39aebd
39aebd
* Fri Jul 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1.1-3
39aebd
- Fix for RH Bz#718830. Add instructions so as to not
39aebd
  Import-Package optional dependencies.
39aebd
39aebd
* Thu Apr 7 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1.1-2
39aebd
- Add BR/R apache-commons-codec, since httpcomponents-client's
39aebd
  MANIFEST.MF has an Import-Package: org.apache.commons.codec
39aebd
  header.
39aebd
39aebd
* Tue Mar 29 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.1.1-1
39aebd
- New upstream bugfix version (4.1.1)
39aebd
39aebd
* Tue Mar 15 2011 Severin Gehwolf <sgehwolf@redhat.com> 4.1-6
39aebd
- Explicitly set PrivatePackage to the empty set, so as to
39aebd
  export all packages.
39aebd
39aebd
* Thu Mar 10 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-5
39aebd
- OSGi export more packages.
39aebd
39aebd
* Fri Feb 25 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-4
39aebd
- Build httpmime module.
39aebd
39aebd
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-3
39aebd
- Don't use basename as an identifier.
39aebd
39aebd
* Fri Feb 18 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-2
39aebd
- OSGify properly.
39aebd
- Install into %%{_javadir}/%%{basename}.
39aebd
39aebd
* Thu Feb 17 2011 Alexander Kurtakov <akurtako@redhat.com> 4.1-1
39aebd
- Update to latest upstream version.
39aebd
39aebd
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.3-3
39aebd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
39aebd
39aebd
* Wed Dec 22 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.0.3-2
39aebd
- Added license to javadoc subpackage
39aebd
39aebd
* Mon Dec 20 2010 Stanislav Ochotnicky <sochotnicky@redhat.com> - 4.0.3-1
39aebd
- Initial version