Compare commits

...

11 Commits

Author SHA1 Message Date
Kamil Dudka
f0e11fe97a Merge branch 'master' into private-kdudka-libcurl-minimal 2017-04-12 10:35:14 +02:00
Kamil Dudka
e8208d3e4a keep the HTTP/2 support in libcurl-minimal, too 2017-04-05 17:04:59 +02:00
Kamil Dudka
10c005f19a fixup: we use libidn2 in Fedora curl now 2017-04-05 16:26:47 +02:00
Kamil Dudka
7c3b67bb15 switch the TLS backend back to OpenSSL 2017-04-05 14:17:50 +02:00
Kamil Dudka
1426ff4f4a make test1139 pass with out of source tree builds 2017-03-14 14:22:08 +01:00
Kamil Dudka
8bab5c452b Merge branch 'master' into private-kdudka-libcurl-minimal 2017-03-14 14:00:15 +01:00
Kamil Dudka
927009397f keep the GSS-API support in libcurl-minimal, too 2016-03-17 09:14:20 +01:00
Kamil Dudka
68237ca69d Merge branch 'master' into private-kdudka-libcurl-minimal 2016-03-16 15:53:23 +01:00
Kamil Dudka
526ad85741 *-minimal: initial draft of summary and description 2016-02-26 16:41:15 +01:00
Kamil Dudka
c9160a8bb4 provide the curl-minimal subpackage with a lightweight build of curl 2016-02-26 14:43:32 +01:00
Kamil Dudka
ec95edb890 libcurl-minimal: initial draft 2016-02-11 09:28:17 +01:00

144
curl.spec
View File

@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.53.1
Release: 5%{?dist}
Release: 3.6%{?dist}
License: MIT
Group: Applications/Internet
Source: https://curl.haxx.se/download/%{name}-%{version}.tar.lzma
@ -30,8 +30,8 @@ BuildRequires: libnghttp2-devel
BuildRequires: libpsl-devel
BuildRequires: libssh2-devel
BuildRequires: multilib-rpm-config
BuildRequires: nss-devel
BuildRequires: openldap-devel
BuildRequires: openssl-devel
BuildRequires: openssh-clients
BuildRequires: openssh-server
BuildRequires: pkgconfig
@ -86,10 +86,6 @@ Summary: A library for getting files from web servers
Group: Development/Libraries
Requires: libssh2%{?_isa} >= %{libssh2_version}
# libnsspem.so is no longer included in the nss package (#1347336)
BuildRequires: nss-pem
Requires: nss-pem%{?_isa}
%description -n libcurl
libcurl is a free and easy-to-use client-side URL transfer library, supporting
FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP,
@ -122,6 +118,30 @@ The libcurl-devel package includes header files and libraries necessary for
developing programs which use the libcurl library. It contains the API
documentation of the library, too.
%package -n curl-minimal
Summary: Conservatively configured build of curl for minimal installations.
Provides: curl = %{version}-%{release}
Conflicts: curl
RemovePathPostfixes: .minimal
%description -n curl-minimal
This is a replacement of the 'curl' package for minimal installations. It
comes with a limited set of features compared to the 'curl' package. On the
other hand, the package is smaller and requires fewer run-time dependencies to
be installed.
%package -n libcurl-minimal
Summary: Conservatively configured build of libcurl for minimal installations.
Provides: libcurl%{?_isa} = %{version}-%{release}
Conflicts: libcurl
RemovePathPostfixes: .minimal
%description -n libcurl-minimal
This is a replacement of the 'libcurl' package for minimal installations. It
comes with a limited set of features compared to the 'libcurl' package. On the
other hand, the package is smaller and requires fewer run-time dependencies to
be installed.
%prep
%setup -q
@ -152,29 +172,53 @@ printf "1034\n1035\n2046\n2047\n" >> tests/data/DISABLED
%build
[ -x /usr/kerberos/bin/krb5-config ] && KRB5_PREFIX="=/usr/kerberos"
%configure --disable-static \
mkdir build-{full,minimal}
export common_configure_opts=" \
--cache-file=../config.cache \
--disable-static \
--enable-symbol-hiding \
--enable-ipv6 \
--enable-ldaps \
--enable-manual \
--enable-threaded-resolver \
--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \
--with-gssapi${KRB5_PREFIX} \
--with-libidn2 \
--with-libmetalink \
--with-libpsl \
--with-libssh2 \
--with-nghttp2 \
--without-ssl --with-nss
# --enable-debug
# use ^^^ to turn off optimizations, etc.
--with-ssl"
# Remove bogus rpath
sed -i \
-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%global _configure ../configure
make %{?_smp_mflags} V=1
# configure minimal build
(
cd build-minimal
%configure $common_configure_opts \
--disable-ldap \
--disable-ldaps \
--disable-manual \
--without-libidn2 \
--without-libmetalink \
--without-libpsl \
--without-libssh2
)
# configure full build
(
cd build-full
%configure $common_configure_opts \
--enable-ldap \
--enable-ldaps \
--enable-manual \
--with-libidn2 \
--with-libmetalink \
--with-libpsl \
--with-libssh2
)
# avoid using rpath
sed -e 's/^runpath_var=.*/runpath_var=/' \
-e 's/^hardcode_libdir_flag_spec=".*"$/hardcode_libdir_flag_spec=""/' \
-i build-{full,minimal}/libtool
make %{?_smp_mflags} V=1 -C build-minimal
make %{?_smp_mflags} V=1 -C build-full
%check
# we have to override LD_LIBRARY_PATH because we eliminated rpath
@ -182,21 +226,36 @@ LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH
# compile upstream test-cases
cd tests
cd build-full/tests
make %{?_smp_mflags} V=1
# TODO: fix tests/manpage-scan.pl upstream to support out of source tree builds
ln -s ../../docs/curl.1 ../docs
# run the upstream test-suite
./runtests.pl -a -p -v '!flaky'
srcdir=../../tests perl -I../../tests ../../tests/runtests.pl -a -p -v '!flaky'
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
# install and rename the library that will be packaged as libcurl-minimal
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install -C build-minimal/lib
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.{la,so}
for i in ${RPM_BUILD_ROOT}%{_libdir}/*; do
mv -v $i $i.minimal
done
# install and rename the executable that will be packaged as curl-minimal
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install -C build-minimal/src
mv -v ${RPM_BUILD_ROOT}%{_bindir}/curl{,.minimal}
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install -C build-full
# install zsh completion for curl
# (we have to override LD_LIBRARY_PATH because we eliminated rpath)
LD_LIBRARY_PATH="$RPM_BUILD_ROOT%{_libdir}:$LD_LIBRARY_PATH" \
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install -C scripts
make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" \
install -C build-full/scripts
rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
@ -225,7 +284,8 @@ rm -rf $RPM_BUILD_ROOT
%files -n libcurl
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/libcurl.so.*
%{_libdir}/libcurl.so.[0-9]
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9]
%files -n libcurl-devel
%doc docs/examples/*.c docs/examples/Makefile.example docs/INTERNALS.md
@ -238,12 +298,28 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*
%{_datadir}/aclocal/libcurl.m4
%changelog
* Mon Apr 10 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-5
- disable upstream test 2033 (flaky test for HTTP/1 pipelining)
%files -n curl-minimal
%{_bindir}/curl.minimal
%{_mandir}/man1/curl.1*
* Fri Apr 07 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-4
- fix out of bounds read in curl --write-out (CVE-2017-7407)
%files -n libcurl-minimal
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_libdir}/libcurl.so.[0-9].minimal
%{_libdir}/libcurl.so.[0-9].[0-9].[0-9].minimal
%changelog
* Wed Apr 12 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-3.6
- rebase on top of current master
* Wed Apr 05 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-3.5
- keep the HTTP/2 support in libcurl-minimal, too
* Wed Apr 05 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-3.4
- switch the TLS backend back to OpenSSL
* Tue Mar 14 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-3.3
- rebase on top of current master
* Mon Mar 06 2017 Kamil Dudka <kdudka@redhat.com> 7.53.1-3
- make the dependency on nss-pem arch-specific (#1428550)
@ -330,6 +406,12 @@ rm -rf $RPM_BUILD_ROOT
* Wed Mar 23 2016 Kamil Dudka <kdudka@redhat.com> 7.48.0-1
- new upstream release
* Thu Mar 17 2016 Kamil Dudka <kdudka@redhat.com> 7.47.1-4.2
- keep the GSS-API support in libcurl-minimal, too
* Wed Mar 16 2016 Kamil Dudka <kdudka@redhat.com> 7.47.1-4.1
- provide curl-minimal and libcurl-minimal subpkgs with a minimal build of curl
* Wed Mar 02 2016 Kamil Dudka <kdudka@redhat.com> 7.47.1-4
- do not refuse cookies for localhost (#1308791)