curl/curl-mini.spec
Tomáš Chvátal fc76886d57 Accepting request 515937 from home:pmonrealgonzalez:branches:devel:libraries:c_c++
- Upstream fix to build libcurl man3 pages
  * Added patch curl-man3.patch

- Disabled test1425 that fails in i586 architecture
  * Added patch curl-disable-test1427-i586.patch

- Update to 7.55.0
 Changes:
  * curl: allow --header and --proxy-header read from file
  * getinfo: provide sizes as curl_off_t
  * curl: prevent binary output spewed to terminal
  * curl: added --request-target
  * curl: added --socks5-{basic,gssapi}: control socks5 auth
  * libcurl: added CURLOPT_REQUEST_TARGET
  * libcurl: added CURLOPT_SOCKS5_AUTH
 Bugfixes:
  * Security Fixes:
    - glob: do not parse after a strtoul() overflow range 
      (CVE-2017-1000101, bsc#1051643)
    - tftp: reject file name lengths that don't fit
      (CVE-2017-1000100, bsc#1051644)
    - file: output the correct buffer to the user
      (CVE-2017-1000099, bsc#1051645)
  * includes: remove curl/curlbuild.h and curl/curlrules.h
  * dist: make the hugehelp.c not get regenerated unnecessarily
  * timers: store internal time stamps as time_t instead of doubles
  * progress: let "current speed" be UL + DL speeds combined
  * http-proxy: do the HTTP CONNECT process entirely non-blocking
  * lib/curl_setup.h: remove CURL_WANTS_CA_BUNDLE_ENV
  * fuzz: bring oss-fuzz initial code converted to C89

OBS-URL: https://build.opensuse.org/request/show/515937
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=201
2017-08-10 16:25:31 +00:00

234 lines
6.9 KiB
RPMSpec

#
# spec file for package curl-mini
#
# Copyright (c) 2017 SUSE LINUX 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/
#
##### WARNING: please do not edit this auto generated spec file. Use the curl.spec! #####
%define bootstrap 1
##### WARNING: please do not edit this auto generated spec file. Use the curl.spec! #####
%define mini -mini
%bcond_with mozilla_nss
# need ssl always for python-pycurl
%bcond_without openssl
%if 0%{?bootstrap}
%bcond_with testsuite
%else
%bcond_without testsuite
%endif
Name: curl-mini
Version: 7.55.0
Release: 0
Summary: A Tool for Transferring Data from URLs
License: curl
Group: Productivity/Networking/Web/Utilities
Url: https://curl.haxx.se/
Source: https://curl.haxx.se/download/curl-%{version}.tar.gz
Source2: https://curl.haxx.se/download/curl-%{version}.tar.gz.asc
Source3: baselibs.conf
Source4: https://daniel.haxx.se/mykey.asc#/curl.keyring
Patch0: libcurl-ocloexec.patch
Patch1: dont-mess-with-rpmoptflags.diff
Patch2: curl-secure-getenv.patch
# PATCH-FIX-OPENSUSE curl-disable-test1427-i586.patch - Disabled test1425 that fails in i586 architecture
Patch3: curl-disable-test1427-i586.patch
# PATCH-FIX-UPSTREAM curl-man3.patch - Fix to build libcurl man3 pages
Patch4: curl-man3.patch
BuildRequires: libtool
BuildRequires: pkgconfig
%if !0%{?bootstrap}
BuildRequires: groff
BuildRequires: krb5-mini-devel
BuildRequires: libidn2-devel
BuildRequires: lzma
BuildRequires: openldap2-devel
BuildRequires: pkgconfig(libmetalink)
BuildRequires: pkgconfig(libnghttp2)
BuildRequires: pkgconfig(libpsl)
BuildRequires: pkgconfig(libssh2)
BuildRequires: pkgconfig(zlib)
%else
Requires: this-is-only-for-build-envs
Conflicts: curl
# The -mini package is sufficient for the build hosts
Provides: curl = %{version}
%endif
Requires: libcurl4%{?mini} = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if %{with openssl}
BuildRequires: pkgconfig(libssl)
%endif
%if %{with mozilla_nss}
BuildRequires: mozilla-nss-devel
%endif
#BuildRequires: openssh
%if 0%{?_with_stunnel:1}
# used by the testsuite
BuildRequires: stunnel
%endif
# 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%{?mini}
Summary: Version 4 of cURL shared library
Group: Productivity/Networking/Web/Utilities
%if 0%{?bootstrap}
Requires: this-is-only-for-build-envs
Conflicts: libcurl4
%endif
%description -n libcurl4%{?mini}
The cURL shared library version 4 for accessing data using different
network protocols.
%package -n libcurl%{?mini}-devel
Summary: A Tool for Transferring Data from URLs
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libcurl4%{?mini} = %{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
%if 0%{?bootstrap}
Requires: this-is-only-for-build-envs
Provides: libcurl-devel = %{version}-%{release}
Conflicts: libcurl-devel
%endif
%description -n libcurl%{?mini}-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
%setup -q -n curl-%version
%patch0
%patch1
%patch2
%patch3 -p1 -R
%patch4 -p1
%build
# curl complains if macro definition is contained in CFLAGS
# see m4/xc-val-flgs.m4
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS=$(echo "%{optflags}" | sed -e 's/-D_FORTIFY_SOURCE=2//')
export CPPFLAGS CFLAGS
export CFLAGS="$CFLAGS -fPIE"
export LDFLAGS="$LDFLAGS -pie"
autoreconf -fiv
# 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/\1no/' configure
%configure \
--enable-ipv6 \
%if %{with openssl}
--with-ssl \
--with-ca-fallback \
--without-ca-path \
--without-ca-bundle \
%else
--without-ssl \
%if %{with mozilla_nss}
--with-nss \
%endif
%endif
%if !0%{?bootstrap}
--with-gssapi=%{_libexecdir}/mit \
--with-libidn2 \
--with-libssh2 \
--with-libmetalink \
%endif
--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} V=1
%if %{with testsuite}
%check
pushd tests
make %{?_smp_mflags}
# 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))
# bug940009 do not run flaky tests for any architecture
# at least test 1510 do fail for i586 and ppc64le
perl ./runtests.pl -a -b$base '!flaky' || exit
popd
%endif
%install
%make_install
rm -f %{buildroot}%{_libdir}/libcurl.la
install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot}%{_datadir}/aclocal/libcurl.m4
pushd scripts
make %{?_smp_mflags} DESTDIR=%{buildroot} install
popd
%post -n libcurl4%{?mini} -p /sbin/ldconfig
%postun -n libcurl4%{?mini} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc README RELEASE-NOTES
%doc docs/{BUGS,FAQ,FEATURES,MANUAL,RESOURCES,TODO,TheArtOfHttpScripting}
%{_bindir}/curl
%{_datadir}/zsh/site-functions/_curl
%{_mandir}/man1/curl.1%{ext_man}
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%files -n libcurl4%{?mini}
%defattr(-,root,root)
%{_libdir}/libcurl.so.4*
%files -n libcurl%{?mini}-devel
%defattr(-,root,root)
%{_bindir}/curl-config
%{_includedir}/curl
%dir %{_datadir}/aclocal/
%{_datadir}/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