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