b03f6a
%global short_name httpclient
b03f6a
b03f6a
Name:           jakarta-commons-httpclient
b03f6a
Version:        3.1
b03f6a
Release:        28%{?dist}
b03f6a
Summary: Jakarta Commons HTTPClient implements the client side of HTTP standards
b03f6a
License:        ASL 2.0 and (ASL 2.0 or LGPLv2+)
b03f6a
URL:            http://jakarta.apache.org/commons/httpclient/
b03f6a
Epoch:          1
b03f6a
Source0:        http://archive.apache.org/dist/httpcomponents/commons-httpclient/source/commons-httpclient-3.1-src.tar.gz
b03f6a
Source1:        http://repo.maven.apache.org/maven2/commons-httpclient/commons-httpclient/%{version}/commons-httpclient-%{version}.pom
b03f6a
Patch0:         %{name}-disablecryptotests.patch
b03f6a
# Add OSGi MANIFEST.MF bits
b03f6a
Patch1:         %{name}-addosgimanifest.patch
b03f6a
Patch2:         %{name}-encoding.patch
b03f6a
# CVE-2012-5783: missing connection hostname check against X.509 certificate name
b03f6a
# https://fisheye6.atlassian.com/changelog/httpcomponents?cs=1422573
b03f6a
Patch3:         %{name}-CVE-2012-5783.patch
b03f6a
Patch4:         %{name}-CVE-2014-3577.patch
b03f6a
Patch5:         %{name}-CVE-2015-5262.patch
b03f6a
b03f6a
BuildArch:      noarch
b03f6a
b03f6a
# FIXME: we need BR maven-local, because we're using macros like mvn_install
b03f6a
# this should be changed to "javapackages-local" when javapackages-tools 4.0.0 is out
b03f6a
BuildRequires:  maven-local
b03f6a
BuildRequires:  ant
b03f6a
BuildRequires:  apache-commons-codec
b03f6a
BuildRequires:  apache-commons-logging >= 0:1.0.3
b03f6a
BuildRequires:  apache-commons-logging-javadoc
b03f6a
BuildRequires:  java-javadoc
b03f6a
BuildRequires:  junit
b03f6a
b03f6a
Requires:       java-headless
b03f6a
Requires:       apache-commons-logging >= 0:1.0.3
b03f6a
Requires:       apache-commons-codec
b03f6a
b03f6a
%description
b03f6a
The Hyper-Text Transfer Protocol (HTTP) is perhaps the most significant
b03f6a
protocol used on the Internet today. Web services, network-enabled
b03f6a
appliances and the growth of network computing continue to expand the
b03f6a
role of the HTTP protocol beyond user-driven web browsers, and increase
b03f6a
the number of applications that may require HTTP support.
b03f6a
Although the java.net package provides basic support for accessing
b03f6a
resources via HTTP, it doesn't provide the full flexibility or
b03f6a
functionality needed by many applications. The Jakarta Commons HTTP
b03f6a
Client component seeks to fill this void by providing an efficient,
b03f6a
up-to-date, and feature-rich package implementing the client side of the
b03f6a
most recent HTTP standards and recommendations.
b03f6a
Designed for extension while providing robust support for the base HTTP
b03f6a
protocol, the HTTP Client component may be of interest to anyone
b03f6a
building HTTP-aware client applications such as web browsers, web
b03f6a
service clients, or systems that leverage or extend the HTTP protocol
b03f6a
for distributed communication.
b03f6a
b03f6a
%package        javadoc
b03f6a
Summary:        Javadoc for %{name}
b03f6a
b03f6a
%description    javadoc
b03f6a
%{summary}.
b03f6a
b03f6a
%package        demo
b03f6a
Summary:        Demos for %{name}
b03f6a
Requires:       %{name} = %{epoch}:%{version}-%{release}
b03f6a
b03f6a
%description    demo
b03f6a
%{summary}.
b03f6a
b03f6a
%package        manual
b03f6a
Summary:        Manual for %{name}
b03f6a
Requires:       %{name}-javadoc = %{epoch}:%{version}-%{release}
b03f6a
b03f6a
%description    manual
b03f6a
%{summary}.
b03f6a
b03f6a
b03f6a
%prep
b03f6a
%setup -q -n commons-httpclient-%{version}
b03f6a
mkdir lib # duh
b03f6a
build-jar-repository -p lib commons-codec commons-logging junit
b03f6a
rm -rf docs/apidocs docs/*.patch docs/*.orig docs/*.rej
b03f6a
b03f6a
%patch0
b03f6a
b03f6a
pushd src/conf
b03f6a
%{__sed} -i 's/\r//' MANIFEST.MF
b03f6a
%patch1
b03f6a
popd
b03f6a
b03f6a
%patch2
b03f6a
%patch3 -p2
b03f6a
%patch4 -p1
b03f6a
%patch5 -p1
b03f6a
b03f6a
# Use javax classes, not com.sun ones
b03f6a
# assume no filename contains spaces
b03f6a
pushd src
b03f6a
    for j in $(find . -name "*.java" -exec grep -l 'com\.sun\.net\.ssl' {} \;); do
b03f6a
        sed -e 's|com\.sun\.net\.ssl|javax.net.ssl|' $j > tempf
b03f6a
        cp tempf $j
b03f6a
    done
b03f6a
    rm tempf
b03f6a
popd
b03f6a
b03f6a
%mvn_alias : apache:commons-httpclient
b03f6a
%mvn_file ":{*}" jakarta-@1 "@1" commons-%{short_name}3
b03f6a
b03f6a
%build
b03f6a
ant \
b03f6a
  -Dbuild.sysclasspath=first \
b03f6a
  -Djavadoc.j2sdk.link=%{_javadocdir}/java \
b03f6a
  -Djavadoc.logging.link=%{_javadocdir}/jakarta-commons-logging \
b03f6a
  -Dtest.failonerror=false \
b03f6a
  -Djavac.encoding=UTF-8 \
b03f6a
  dist test
b03f6a
b03f6a
%install
b03f6a
%mvn_artifact %{SOURCE1} dist/commons-httpclient.jar
b03f6a
%mvn_install -J dist/docs/api
b03f6a
b03f6a
# demo
b03f6a
mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{name}
b03f6a
cp -pr src/examples src/contrib $RPM_BUILD_ROOT%{_datadir}/%{name}
b03f6a
b03f6a
# manual and docs
b03f6a
rm -Rf dist/docs/{api,BUILDING.txt,TESTING.txt}
b03f6a
ln -s %{_javadocdir}/%{name} dist/docs/apidocs
b03f6a
b03f6a
b03f6a
%files -f .mfiles
b03f6a
%doc LICENSE NOTICE
b03f6a
%doc README RELEASE_NOTES
b03f6a
b03f6a
%files javadoc -f .mfiles-javadoc
b03f6a
%doc LICENSE NOTICE
b03f6a
b03f6a
%files demo
b03f6a
%{_datadir}/%{name}
b03f6a
b03f6a
%files manual
b03f6a
%doc dist/docs/*
b03f6a
b03f6a
b03f6a
%changelog
b03f6a
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-28
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
b03f6a
b03f6a
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-27
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
b03f6a
b03f6a
* Thu Feb 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-26
b03f6a
- Use build-jar-repository for locating dependencies
b03f6a
b03f6a
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-25
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
b03f6a
b03f6a
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.1-24
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
b03f6a
b03f6a
* Fri Sep 11 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-23
b03f6a
- Respect configured SO_TIMEOUT during SSL handshake
b03f6a
- Resolves: CVE-2015-5262
b03f6a
b03f6a
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-22
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b03f6a
b03f6a
* Tue Oct 14 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-21
b03f6a
- Remove legacy Obsoletes/Provides
b03f6a
b03f6a
* Mon Aug 18 2014 Michal Srb <msrb@redhat.com> - 1:3.1-20
b03f6a
- Fix MITM security vulnerability
b03f6a
- Resolves: CVE-2014-3577
b03f6a
b03f6a
* Mon Aug 11 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-19
b03f6a
- Add alias for apache:commons-httpclient
b03f6a
b03f6a
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-18
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b03f6a
b03f6a
* Wed May 21 2014 Michal Srb <msrb@redhat.com> - 1:3.1-17
b03f6a
- Adapt to current guidelines
b03f6a
b03f6a
* Wed May 21 2014 Michal Srb <msrb@redhat.com> - 1:3.1-16
b03f6a
- Migrate to mfiles
b03f6a
b03f6a
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1:3.1-15
b03f6a
- Use Requires: java-headless rebuild (#1067528)
b03f6a
b03f6a
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-14
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b03f6a
b03f6a
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-13
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
b03f6a
b03f6a
* Mon Jan 21 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-12
b03f6a
- Add missing connection hostname check against X.509 certificate name
b03f6a
- Resolves: CVE-2012-5783
b03f6a
b03f6a
* Thu Nov  1 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-11
b03f6a
- Add maven POM
b03f6a
b03f6a
* Thu Sep 20 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-10
b03f6a
- Fix license tag
b03f6a
b03f6a
* Thu Sep 20 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:3.1-9
b03f6a
- Install LICENSE and NOTICE files
b03f6a
- Add missing R: java, jpackage-utils
b03f6a
b03f6a
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-8
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b03f6a
b03f6a
* Sun Jan 22 2012 Andy Grimm <agrimm@gmail.com> - 1:3.1-7
b03f6a
- Fix character encoding
b03f6a
b03f6a
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-6
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
b03f6a
b03f6a
* Tue Jun 28 2011 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1:3.1-5
b03f6a
- Fix symlinks in javadir
b03f6a
b03f6a
* Tue Jun 28 2011 Alexander Kurtakov <akurtako@redhat.com> 1:3.1-4
b03f6a
- Fix FTBFS.
b03f6a
- Adapt to current guidelines.
b03f6a
b03f6a
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-3
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
b03f6a
b03f6a
* Wed Nov 10 2010 Alexander Kurtakov <akurtako@redhat.com> 1:3.1-2
b03f6a
- Add missing requires on commons-codec.
b03f6a
b03f6a
* Fri Jul 16 2010 Alexander Kurtakov <akurtako@redhat.com> 1:3.1-1
b03f6a
- Drop gcj_support.
b03f6a
- Fix FTBFS.
b03f6a
b03f6a
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-0.5
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
b03f6a
b03f6a
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.1-0.4
b03f6a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
b03f6a
b03f6a
* Thu Jul 24 2008 Andrew Overholt <overholt@redhat.com> 1:3.1-0.3
b03f6a
- Update OSGi MANIFEST.MF
b03f6a
b03f6a
* Wed Jul  9 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1:3.1-0.2
b03f6a
- drop repotag
b03f6a
- fix license tag
b03f6a
b03f6a
* Fri Apr 04 2008 Deepak Bhole <dbhole@redhat.com> - 0:3.1-0jpp.1
b03f6a
- Update to 3.1
b03f6a
b03f6a
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1:3.0.1-2jpp.2
b03f6a
- Autorebuild for GCC 4.3
b03f6a
b03f6a
* Thu Sep 06 2007 Andrew Overholt <overholt@redhat.com> 1:3.0.1-1jpp.2
b03f6a
- Add OSGi MANIFEST.MF information.
b03f6a
b03f6a
* Fri Mar 16 2007 Permaine Cheung <pcheung@redhat.com> - 1:3.0.1-1jpp.1
b03f6a
- Merge with upstream and more rpmlint cleanup.
b03f6a
b03f6a
* Thu Feb 15 2007 Fernando Nasser <fnasser@redhat.com> - 1:3.0.1-1jpp
b03f6a
- Upgrade to 3.0.1
b03f6a
b03f6a
* Fri Jan 26 2007 Permaine Cheung <pcheung@redhat.com> - 1:3.0-8jpp
b03f6a
- Added versions for provides and obsoletes and rpmlint cleanup.
b03f6a
b03f6a
* Thu Aug 10 2006 Deepak Bhole <dbhole@redhat.com> - 1:3.0-7jpp.1
b03f6a
- Added missing requirements.
b03f6a
- Added missing postun section for javadoc.
b03f6a
b03f6a
* Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 1:3.0-6jpp_2fc
b03f6a
- Rebuilt
b03f6a
b03f6a
* Thu Jul 20 2006 Deepak Bhole <dbhole@redhat.com> - 1:3.0-6jpp_1fc
b03f6a
- Added conditional native compilation.
b03f6a
- Disable certain ssl related tests that are known to fail with libgcj.
b03f6a
b03f6a
* Thu Apr 06 2006 Fernando Nasser <fnasser@redhat.com> - 1:3.0-5jpp
b03f6a
- Improve backwards compatibility and force removal of older versioned
b03f6a
  packages
b03f6a
b03f6a
* Thu Apr 06 2006 Fernando Nasser <fnasser@redhat.com> - 1:3.0-4jpp
b03f6a
- Remove duplicate release definition
b03f6a
- Require simply a jaxp 1.3
b03f6a
b03f6a
* Thu Apr 06 2006 Fernando Nasser <fnasser@redhat.com> - 1:3.0-3jpp
b03f6a
- BR xml-commons-jaxp-1.3-apis
b03f6a
b03f6a
* Thu Apr 06 2006 Ralph Apel <r.apel@r-apel.de> - 1:3.0-2jpp
b03f6a
- Fix tarball typo
b03f6a
- assure javax classes are used instead of com.sun. ones
b03f6a
b03f6a
* Wed Apr 05 2006 Ralph Apel <r.apel@r-apel.de> - 1:3.0-1jpp
b03f6a
- 3.0 final, drop main version in name
b03f6a
b03f6a
* Thu Oct 20 2005 Jason Corley <jason.corley@gmail.com> - 1:3.0-0.rc4.1jpp
b03f6a
- 3.0rc4
b03f6a
b03f6a
* Thu May 05 2005 Fernando Nasser <fnasser@redhat.com> - 1:3.0-0.rc2.1jpp
b03f6a
- Update to 3.0 rc2.
b03f6a
b03f6a
* Thu Nov  4 2004 Ville Skyttä <ville.skytta at iki.fi> - 1:2.0.2-1jpp
b03f6a
- Update to 2.0.2.
b03f6a
- Fix Group tag in -manual.
b03f6a
b03f6a
* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:2.0-2jpp
b03f6a
- Rebuild with ant-1.6.2
b03f6a
b03f6a
* Mon Feb 16 2004 Kaj J. Niemi <kajtzu@fi.basen.net> - 0:2.0-1jpp
b03f6a
- 2.0 final
b03f6a
b03f6a
* Thu Jan 22 2004 David Walluck <david@anti-microsoft.org> 0:2.0-0.rc3.1jpp
b03f6a
- 2.0-rc3
b03f6a
- bump epoch
b03f6a
b03f6a
* Tue Oct 14 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0-3.rc2.1jpp
b03f6a
- Update to 2.0rc2.
b03f6a
- Manual subpackage.
b03f6a
- Crosslink with local J2SE javadocs.
b03f6a
- Own unversioned javadoc dir symlink.
b03f6a
b03f6a
* Fri Aug 15 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0-3.rc1.1jpp
b03f6a
- Update to 2.0rc1.
b03f6a
- Include "jakarta-"-less jar symlinks for consistency with other packages.
b03f6a
- Exclude example and contrib sources from main package, they're in -demo.
b03f6a
b03f6a
* Wed Jul  9 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0-2.beta2.1jpp
b03f6a
- Update to 2.0 beta 2.
b03f6a
- Demo subpackage.
b03f6a
- Crosslink with local commons-logging javadocs.
b03f6a
b03f6a
* Wed Jun  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0-2.beta1.1jpp
b03f6a
- Update to 2.0 beta 1.
b03f6a
- Non-versioned javadoc symlinking.
b03f6a
b03f6a
* Fri Apr  4 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.0-1.alpha3.2jpp
b03f6a
- Rebuild for JPackage 1.5.
b03f6a
b03f6a
* Wed Feb 26 2003 Ville Skyttä <ville.skytta at iki.fi> - 2.0-1.alpha3.1jpp
b03f6a
- Update to 2.0 alpha 3.
b03f6a
- Fix Group tags.
b03f6a
- Run standalone unit tests during build.
b03f6a
b03f6a
* Thu Sep 12 2002 Ville Skyttä <ville.skytta at iki.fi> 2.0-0.cvs20020909.1jpp
b03f6a
- Tune the rpm release number tag so rpm2html doesn't barf on it.
b03f6a
b03f6a
* Mon Sep  9 2002 Ville Skyttä <ville.skytta at iki.fi> 2.0-0.20020909alpha1.1jpp
b03f6a
- 2.0alpha1 snapshot 20020909.
b03f6a
- Use sed instead of bash extensions when symlinking jars during build.
b03f6a
- Add distribution tag.
b03f6a
- Require commons-logging instead of log4j.
b03f6a
b03f6a
* Sat Jan 19 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-4jpp
b03f6a
- renamed to jakarta-commons-httpclient
b03f6a
- additional sources in individual archives
b03f6a
- versioned dir for javadoc
b03f6a
- no dependencies for javadoc package
b03f6a
- dropped j2ee package
b03f6a
- adapted to new jsse package
b03f6a
- section macro
b03f6a
b03f6a
* Fri Dec 7 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-3jpp
b03f6a
- javadoc into javadoc package
b03f6a
b03f6a
* Sat Nov 3 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-2jpp
b03f6a
- fixed jsse subpackage
b03f6a
b03f6a
* Fri Nov 2 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 1.0-1jpp
b03f6a
- first JPackage release