File compat-curl3.spec of Package compat-curl3

# spec file for package curl
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

%bcond_without openssl
%bcond_with mozilla_nss
%bcond_without testsuite

Name:           compat-curl3
%define rname	curl
%define lname	libcurl3
BuildRequires:  libidn-devel
BuildRequires:  libtool
BuildRequires:  lzma
BuildRequires:  openldap2-devel
BuildRequires:  pkg-config
BuildRequires:  zlib-devel
%if %{with openssl}
BuildRequires:  openssl-devel
%if %{with mozilla_nss}
BuildRequires:  mozilla-nss-devel
BuildRequires:  krb5-devel
BuildRequires:  libssh2-devel
BuildRequires:  openssh
BuildRequires:  libcares-devel
%if 0%{?_with_stunnel:1}
# used by the testsuite
BuildRequires:  stunnel
Version:        7.15.5
Release:        1.1
# bug437293
%ifarch ppc64
Obsoletes:      curl-64bit
Summary:        A Tool for Transferring Data from URLs
License:        BSD-3-Clause ; MIT
Group:          Productivity/Networking/Web/Utilities
Source2:        baselibs.conf
BuildRoot:      %_tmppath/%name-%version-build
Patch2:         %rname-7.15.1-lfs.patch
Patch3:         %rname-7.15.1-ipv6tests.patch

Curl is a client to get documents and files from or send documents to a
server using any of the supported protocols (HTTP, HTTPS, FTP, FTPS,
TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work
without user interaction or any kind of interactivity.

%package -n %lname
Summary:        Version 4 of cURL shared library
Group:          Productivity/Networking/Web/Utilities

%description -n %lname
The cURL shared library version 4 for accessing data using different
network protocols.

%package -n compat-curl3-devel
Summary:        A Tool for Transferring Data from URLs
Group:          Development/Libraries/C and C++
Requires:       %lname = %{version} glibc-devel

%description -n compat-curl3-devel
Curl is a client to get documents and files from or send documents to a
server using any of the supported protocols (HTTP, HTTPS, FTP, GOPHER,
DICT, TELNET, LDAP, or FILE). The command is designed to work without
user interaction or any kind of interactivity.

%setup -qn curl-%version

autoreconf -fi
# local hack to make curl-config --libs stop printing libraries it depends on
# (currently, libtool sets link_all_deplibs=(yes|unknown) everywhere,
# will hopefully change in the future)
sed -i 's/link_all_deplibs=unknown/link_all_deplibs=no/' configure
%configure \
	--enable-ipv6 \
%if %{with openssl}
	--with-ssl \
	--with-ca-path=/etc/ssl/certs/ \
	--without-ssl \
%if %{with mozilla_nss}
	--with-nss \
	--with-gssapi=/usr/lib/mit \
	--enable-hidden-symbols \
	--disable-static \

: if this fails, the above sed hack did not work
./libtool --config | grep -q link_all_deplibs=no
# enable-hidden-symbols needs gcc4 and causes that curl exports only its API
make %{?_smp_mflags}

%if %{with testsuite}

exit 0
cd tests
# make sure the testsuite runs don't race on MP machines in autobuild
if test -z "$BUILD_INCARNATION" -a -r /.buildenv; then
	. /.buildenv
if test -z "$BUILD_INCARNATION"; then
base=$((8990 + $BUILD_INCARNATION * 20))
perl ./ -a -b$base || {
%if 0%{?curl_testsuite_fatal:1}
	echo "WARNING: failed with code $?, continuing nevertheless"

rm $RPM_BUILD_ROOT%_libdir/
install -d $RPM_BUILD_ROOT/usr/share/aclocal
install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/usr/share/aclocal/
rm -f "%buildroot/%_datadir/curl/curl-ca-bundle.crt"
rm -f "%buildroot/%_libdir/pkgconfig"/*.pc;

%post -n %lname -p /sbin/ldconfig

%postun -n %lname -p /sbin/ldconfig

#doc lib/README.curl_off_t
%doc %{_mandir}/man1/curl.1.gz

%files -n %lname

%files -n compat-curl3-devel
%dir %{_prefix}/share/aclocal
%doc %{_mandir}/man1/curl-config.1.gz
%doc %{_mandir}/man3/*
#doc docs/libcurl/symbols-in-versions

* Tue Aug 15 2006
- configure with --enable-hidden-symbols to compile libcurl with
  - fvisibility=hidden, exporting only symbols from the API
* Tue Aug 15 2006
- updated to version 7.15.5
  * added --ftp-ssl-reqd
  * modified the prototype for the socket callback set with
  * added curl_multi_assign()
  * added CURLOPT_FTP_ALTERNATIVE_TO_USER and --ftp-alternative-to-user
  * added a vcproj file for building libcurl
  * added curl_formget()
  * Made -K on a file that couldn't be read cause a warning to be displayed
  * some bugfixes
- dropped epsv-firewall.patch which was intergrated in 7.15.2
* Sat Jul  1 2006
- update to version 7.15.4, changes & fixes for this version:
  * NTLM2 session response support
  * CURLOPT_COOKIELIST set to "SESS" clears all session cookies
  * CURLINFO_LASTSOCKET returned sockets are now checked more before
  * curl-config got a --checkfor option to compare version numbers
  * line end conversions for FTP ASCII transfers
  * curl_multi_socket() API added (still mostly untested)
  * conversion callback options for EBCDIC <=> ASCII conversions
  * less blocking for the multi interface during (Open)SSL connect
  * builds fine on cygwin
  * md5-sess with Digest authentication
  * dict with letters such as space in a word
  * dict with url-encoded words in the URL
  * libcurl.m4 when default=yes but no libcurl was found
  * numerous bugs fixed in the TFTP code
  * possible memory leak when adding easy handles to multi stack
  * TFTP works in a more portable fashion (== on more platforms)
  * WSAGetLastError() is now used (better) on Windows
  * GnuTLS non-block case that could cause data trashing
  * deflate code survives lack of zlib header
  * CURLOPT_INTERFACE works with hostname
  * configure runs fine with ICC
  * closed control connection with FTP when easy handle was removed from
  * curl --trace crash when built with VS2005
  * SSL connect time-out
  * improved NTLM functionality
  * following redirects with more than one question mark in source URL
  * fixed debug build crash with -d
  * generates a fine AIX Toolbox RPM spec
  * treat FTP AUTH failures properly
  * TFTP transfers could trash data
  * -d + -G combo crash
* Wed Jun 14 2006
- fixed syntax error in configure
* Sun May 28 2006
- update to version 7.15.3, changes & fixes for this version:
  * added docs for --ftp-method and CURLOPT_FTP_FILEMETHOD
  * TFTP Packet Buffer Overflow Vulnerability (CVE-2006-1061)
  * properly detecting problems with sending the FTP command USER
  * wrong error message shown when certificate verification failed
  * multi-part formpost with multi interface crash
  * the CURLFTPSSL_CONTROL setting for CURLOPT_FTP_SSL is acknowledged
  * "SSL: couldn't set callback" is now treated as a less serious problem
  * Interix build fix
  * fixed curl "hang" when out of file handles at start
  * prevent FTP uploads to URLs with trailing slash
- changes & fixes in 7.15.2
  * Support for SOCKS4 proxies (added --socks4)
  * Dropped support for the LPRT ftp command
  * Gopher is now officially abandoned as a protocol (lib)curl tries to
  * curl_global_init() and curl_global_cleanup() are now using a refcount so
    that it is now legal to call them multiple times. See updated info for
  * two bugs concerning using curl_multi_remove_handle() before the transfer
    was complete
  * multi-pass authentication and compressed content
  * minor format string mistake in the GSS/Negotiate code
  * cached DNS entries could remain in the cache too long
  * improved GnuTLS check in configure
  * re-used FTP connections when the second request didn't do a transfer
  * plain --limit-rate [num] means bytes
  * re-creating a dead connection is no longer counted internally as a
    followed redirect and thus prevents a weird error that would occur if a
    FTP connection died on an attempted re-use
  * Try PASV after failing to connect to the port the EPSV response
  * -P [IP] with non-local address with ipv6-enabled curl
  * -P [hostname] with ipv6-disabled curl
  * libcurl.m4 was updated
  * configure no longer warns if the current path contains a space
  * test suite kill race condition
  * FTP_SKIP_PASV_IP and FTP_USE_EPSV when doing FTP over HTTP proxy
  * Doing a second request with FTP on the same bath path, would make
    libcurl confuse what current working directory it had
  * FTP over HTTP proxy now sends the second CONNECT properly
  * numerous compiler warnings and build quirks for various compilers have
    been addressed
  * supports name and passwords up to 255 bytes long, embedded in URLs
  * the HTTP_ONLY define disables the TFTP support
- removed curl-7.15.1-CVE-2006-1061.patch, included upstream
- removed curl-7.15.1-aliasing.patch
* Tue Mar 14 2006
- fix buffer overflow in TFTP code
  [#157874] (CVE-2006-1061.patch)
* Wed Feb 15 2006
- added libidn-devel to requires of devel package
* Mon Feb 13 2006
- build with libidn support
* Fri Jan 27 2006
- converted neededforbuild to BuildRequires
* Mon Jan 23 2006
- fallback to PASV if some firewall doesn't let an EPSV connection
* Thu Jan 12 2006
- build with -fstack-protector
- add dependency on curl = %%%%{version} to curl-devel
* Tue Jan 10 2006
- remove non-existent path /usr/ssl, which caused -L/usr/ssl/lib to
  appeared in curl-config output
- use make -j
* Tue Dec 13 2005
- updated to 7.15.1, fixing previous vulnerabilities
* Thu Oct 13 2005
- fix stack buffer overflow in lib/http_ntlm.c [#128065]
* Mon Oct 10 2005
- updated to 7.14.1
- updated curl-7.14.1-aliasing.patch
* Mon Jun 20 2005
- update to 7.14.0
- remove obsolete patch curl-ntlm.patch
* Tue Apr 12 2005
- packaged curl-ca-bundle.crt (bug #64301)
* Thu Feb 24 2005
- enable make test. fixed test 241 to use ::1 directly.
* Tue Feb 22 2005
- fix buffer overflow in NTLM (bug #65752)
* Tue Feb  8 2005
- update to 7.13.0
* Wed Aug 11 2004
- update to 7.12.0
* Wed Apr 28 2004
- strict aliasing fix
* Tue Mar 16 2004
- fix for lfs for in transfer.c (bug #36040)
* Wed Feb 25 2004
- ignore leading slashes of url-path in URLs like
  ftp://user@name//url-path, i.e don't change to the
  root directory (RFC 1738, bug #34471)
* Tue Feb 10 2004
- update to version 7.11.0
* Sat Jan 10 2004
- add %%defattr and %%run_ldconfig
* Wed Nov  5 2003
- added large file support, patch lfs [bug #32411]
* Thu Sep  4 2003
- require zlib-devel, openssl-devel and glibc-devel in curl-devel [bug #29881]
* Fri Aug  8 2003
- terminate array of directory components by NULL (bug #28351, patch dirs)
* Wed Jul 23 2003
- update to version 7.10.5
* Tue Jun  3 2003
- remove unpackaged files from buildroot
* Wed Nov 27 2002
- update to version 7.10.2
- moved curl-config.1.gz to the devel subpackage [bug #21966]
* Sat Jul 13 2002
- update to version 7.9.8
- added automake
* Fri Jan 18 2002
- used macros %%{_lib} and %%{_libdir}
- update to 7.9.2
* Fri Oct 19 2001
- do not pack shared library into both, main and devel package
* Mon Oct  8 2001
- update to version 7.9
* Fri Sep 21 2001
- fix manual in man.patch
* Tue Aug 21 2001
- update to version 7.8.1
* Wed Jul 18 2001
- files devel fixed
* Mon Jul  2 2001
- update to version 7.8
* Wed Jun 13 2001
- fixed to compile with new autoconf
* Mon Apr  9 2001
- update to version 7.7.1
* Tue Mar  6 2001
- update to version 7.6.1
* Wed Jan  3 2001
- fixed Provides and Obsoletes also for curl-devel
* Tue Dec 19 2000
- fixed name
- added Obsoletes: curl_ssl
* Mon Dec 18 2000
- changed to ssl support
* Thu Nov 16 2000
- renamed curldev -> curl-devel
- update to version 7.4.2
* Tue Oct 17 2000
- update to version 7.4.1 - security bug fixed
* Wed Aug 30 2000
- package created