SHA256
1
0
forked from pool/curl
curl/curl.spec
Stephan Kulow 1d9cf0e872 Accepting request 248327 from home:vitezslav_cizek:branches:devel:libraries:c_c++
- update to 7.38.0
  * fixes CVE-2014-3613 (bnc#894575) and CVE-2014-3620 (bnc#895991)
  * cookie leaks with IP address as domain and TLDs respectively
  Changes:
    supports HTTP/2 draft-14
    CURLE_HTTP2 is a new error code
    CURLAUTH_NEGOTIATE is a new auth define
    CURL_VERSION_GSSAPI is a new capability bit
    no longer use fbopenssl for anything
    schannel: use CryptGenRandom for random numbers
    axtls: define curlssl_random using axTLS's PRNG
    cyassl: use RNG_GenerateBlock to generate a good random number
    findprotocol: show unsupported protocol within quotes
    version: detect and show LibreSSL
    version: detect and show BoringSSL
    imap/pop3/smtp: Kerberos (SASL GSSAPI) authentication via Windows SSPI
    http2: requires nghttp2 0.6.0 or later
  Bugfixes:
    SECURITY ADVISORY: cookie leak with IP address as domain
    SECURITY ADVISORY: cookie leak for TLDs
    And many other fixes

OBS-URL: https://build.opensuse.org/request/show/248327
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=113
2014-09-10 11:58:09 +00:00

194 lines
5.5 KiB
RPMSpec

#
# spec file for package curl
#
# Copyright (c) 2014 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 http://bugs.opensuse.org/
#
%bcond_without openssl
%bcond_with mozilla_nss
%bcond_without testsuite
Name: curl
Version: 7.38.0
Release: 0
Summary: A Tool for Transferring Data from URLs
License: BSD-3-Clause and MIT
Group: Productivity/Networking/Web/Utilities
Url: http://curl.haxx.se/
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
Source2: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma.asc
Source3: baselibs.conf
Source4: %{name}.keyring
Patch: libcurl-ocloexec.patch
Patch1: dont-mess-with-rpmoptflags.diff
Patch3: curl-secure-getenv.patch
# Use rpmbuild -D 'VERIFY_SIG 1' to verify signature during build or run one-shot check by "gpg-offline --verify --package=curl curl-*.asc".
%if 0%{?VERIFY_SIG}
BuildRequires: gpg-offline
%endif
BuildRequires: libidn-devel
BuildRequires: libtool
BuildRequires: lzma
BuildRequires: openldap2-devel
BuildRequires: pkg-config
BuildRequires: zlib-devel
%if %{with openssl}
BuildRequires: openssl-devel
%endif
%if %{with mozilla_nss}
BuildRequires: mozilla-nss-devel
%endif
BuildRequires: krb5-mini-devel
BuildRequires: libssh2-devel
#BuildRequires: openssh
%if 0%{?_with_stunnel:1}
# used by the testsuite
BuildRequires: stunnel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# bug437293
%ifarch ppc64
Obsoletes: curl-64bit
%endif
%description
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 libcurl4
Summary: Version 4 of cURL shared library
Group: Productivity/Networking/Web/Utilities
%description -n libcurl4
The cURL shared library version 4 for accessing data using different
network protocols.
%package -n libcurl-devel
Summary: A Tool for Transferring Data from URLs
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libcurl4 = %{version}
# curl-devel (v 7.15.5) was last used in 10.2
Provides: curl-devel <= 7.15.5
Obsoletes: curl-devel < 7.16.2
%description -n libcurl-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.
%prep
%if 0%{?VERIFY_SIG}
%gpg_verify %{S:2}
%endif
%setup -q
%patch
%patch1
%patch3
%build
# curl complains if macro definition is contained in CFLAGS
# see m4/xc-val-flgs.m4
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS=$(echo $RPM_OPT_FLAGS | sed 's/-D_FORTIFY_SOURCE=2//')
export CPPFLAGS CFLAGS
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/ \
%else
--without-ssl \
%if %{with mozilla_nss}
--with-nss \
%endif
%endif
--with-gssapi=/usr/lib/mit \
--with-libssh2\
--enable-hidden-symbols \
--disable-static \
--enable-threaded-resolver
: 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}
%check
cd tests
make
# make sure the testsuite runs don't race on MP machines in autobuild
if test -z "$BUILD_INCARNATION" -a -r /.buildenv; then
. /.buildenv
fi
if test -z "$BUILD_INCARNATION"; then
BUILD_INCARNATION=0
fi
base=$((8990 + $BUILD_INCARNATION * 20))
perl ./runtests.pl -a -b$base || {
%if 0%{?curl_testsuite_fatal:1}
exit
%else
echo "WARNING: runtests.pl failed with code $?, continuing nevertheless"
%endif
}
%endif
%install
%{makeinstall}
rm $RPM_BUILD_ROOT%_libdir/libcurl.la
install -d $RPM_BUILD_ROOT/usr/share/aclocal
install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/usr/share/aclocal/
%post -n libcurl4 -p /sbin/ldconfig
%postun -n libcurl4 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc README RELEASE-NOTES
%doc docs/{BUGS,FAQ,FEATURES,MANUAL,RESOURCES,TODO,TheArtOfHttpScripting}
%doc lib/README.curl_off_t
%{_prefix}/bin/curl
%doc %{_mandir}/man1/curl.1%{ext_man}
%files -n libcurl4
%defattr(-,root,root)
%{_libdir}/libcurl.so.4*
%files -n libcurl-devel
%defattr(-,root,root)
%{_prefix}/bin/curl-config
%{_prefix}/include/curl
%dir %{_prefix}/share/aclocal
%{_prefix}/share/aclocal/libcurl.m4
%{_libdir}/libcurl.so
%{_libdir}/pkgconfig/libcurl.pc
%{_mandir}/man1/curl-config.1%{ext_man}
%{_mandir}/man3/*
%doc docs/libcurl/symbols-in-versions
%changelog