Accepting request 1182050 from devel:libraries:c_c++

OBS-URL: https://build.opensuse.org/request/show/1182050
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/curl?expand=0&rev=199
This commit is contained in:
Ana Guerrero 2024-06-22 11:22:55 +00:00 committed by Git OBS Bridge
commit 39af82d78c
3 changed files with 218 additions and 134 deletions

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>mini</package>
</multibuild>

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Jun 20 15:22:47 UTC 2024 - Dirk Müller <dmueller@suse.com>
- add multibuild for minimal libcurl flavored build (useful for
container environments)
-------------------------------------------------------------------
Thu Jun 20 14:58:27 UTC 2024 - Dirk Müller <dmueller@suse.com>
- split zsh and fish completion into subpackages to have
proper supplements
-------------------------------------------------------------------
Mon Jun 17 21:29:09 UTC 2024 - Dirk Müller <dmueller@suse.com>
- remove mozilla-nss code (unsupported since 8.3.0)
------------------------------------------------------------------- -------------------------------------------------------------------
Fri May 24 11:05:25 UTC 2024 - Pedro Monreal <pmonreal@suse.com> Fri May 24 11:05:25 UTC 2024 - Pedro Monreal <pmonreal@suse.com>

116
curl.spec
View File

@ -17,10 +17,18 @@
%bcond_without testsuite %bcond_without testsuite
%bcond_with mozilla_nss
# need ssl always for python-pycurl # need ssl always for python-pycurl
%bcond_without openssl %bcond_without openssl
Name: curl %define target @BUILD_FLAVOR@%{nil}
%if "%{target}" == "mini"
%bcond_without mini
%global psuffix -mini
%else
%bcond_with mini
%global psuffix %{nil}
%endif
Name: curl%{?psuffix}
Version: 8.8.0 Version: 8.8.0
Release: 0 Release: 0
Summary: A Tool for Transferring Data from URLs Summary: A Tool for Transferring Data from URLs
@ -37,29 +45,26 @@ Patch2: curl-secure-getenv.patch
Patch3: curl-disabled-redirect-protocol-message.patch Patch3: curl-disabled-redirect-protocol-message.patch
#PATCH-FIX-UPSTREAM Fix make install for curl-config.1 github.com/curl/curl/pull/13741 #PATCH-FIX-UPSTREAM Fix make install for curl-config.1 github.com/curl/curl/pull/13741
Patch4: curl-make-install-curl-config.patch Patch4: curl-make-install-curl-config.patch
BuildRequires: groff
BuildRequires: libtool BuildRequires: libtool
BuildRequires: pkgconfig BuildRequires: pkgconfig
Requires: libcurl4 = %{version}
BuildRequires: groff
BuildRequires: lzma
BuildRequires: openldap2-devel
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(libbrotlidec)
BuildRequires: pkgconfig(libidn2) BuildRequires: pkgconfig(libidn2)
# Disable metalink [bsc#1188218, CVE-2021-22923][bsc#1188217, CVE-2021-22922] # Disable metalink [bsc#1188218, CVE-2021-22923][bsc#1188217, CVE-2021-22922]
# BuildRequires: pkgconfig(libmetalink) # BuildRequires: pkgconfig(libmetalink)
BuildRequires: pkgconfig(libnghttp2) BuildRequires: pkgconfig(libnghttp2)
BuildRequires: pkgconfig(libpsl) BuildRequires: pkgconfig(libpsl)
BuildRequires: pkgconfig(libssh)
BuildRequires: pkgconfig(libzstd) BuildRequires: pkgconfig(libzstd)
BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(zlib)
Requires: libcurl4 = %{version}
%if %{with openssl} %if %{with openssl}
BuildRequires: pkgconfig(libssl) BuildRequires: pkgconfig(libssl)
%endif %endif
%if %{with mozilla_nss} %if !%{with mini}
BuildRequires: mozilla-nss-devel BuildRequires: openldap2-devel
BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(libbrotlidec)
BuildRequires: pkgconfig(libssh)
%endif %endif
#BuildRequires: openssh
%if 0%{?_with_stunnel:1} %if 0%{?_with_stunnel:1}
# used by the testsuite # used by the testsuite
BuildRequires: stunnel BuildRequires: stunnel
@ -71,13 +76,19 @@ server using any of the supported protocols (HTTP, HTTPS, FTP, FTPS,
TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work TFTP, DICT, TELNET, LDAP, or FILE). The command is designed to work
without user interaction or any kind of interactivity. without user interaction or any kind of interactivity.
%package -n libcurl4 %package -n libcurl%{?psuffix}4
Summary: Library for transferring data from URLs Summary: Library for transferring data from URLs
%if %{with mini}
Provides: libcurl4 = %{version}
%else
Obsoletes: libcurl-mini4 <= %{version}
%endif
%description -n libcurl4 %description -n libcurl%{?psuffix}4
The cURL shared library for accessing data using different The cURL shared library for accessing data using different
network protocols. network protocols.
%if !%{with mini}
%package -n libcurl-devel %package -n libcurl-devel
Summary: Development files for the curl library Summary: Development files for the curl library
Requires: glibc-devel Requires: glibc-devel
@ -93,14 +104,35 @@ user interaction or any kind of interactivity.
%package -n libcurl-devel-doc %package -n libcurl-devel-doc
Summary: Manual pages for libcurl Summary: Manual pages for libcurl
BuildArch: noarch
Provides: libcurl-devel:%{_mandir}/man1/curl-config.1%{?ext_man} Provides: libcurl-devel:%{_mandir}/man1/curl-config.1%{?ext_man}
BuildArch: noarch
%description -n libcurl-devel-doc %description -n libcurl-devel-doc
Manual pages for the libcurl C API. Manual pages for the libcurl C API.
%package fish-completion
Summary: Fish completion for curl
Group: System/Shells
Requires: fish
Supplements: (curl and fish)
BuildArch: noarch
%description fish-completion
Fish command line completion support for %name.
%package zsh-completion
Summary: Zsh Completion for %name
Group: System/Shells
Requires: zsh
Supplements: (curl and zsh)
BuildArch: noarch
%description zsh-completion
ZSH command line completion support for %name.
%endif
%prep %prep
%autosetup -p1 %autosetup -p1 -n curl-%{version}
%build %build
# curl complains if macro definition is contained in CFLAGS # curl complains if macro definition is contained in CFLAGS
@ -115,7 +147,9 @@ autoreconf -fiv
# (currently, libtool sets link_all_deplibs=(yes|unknown) everywhere, # (currently, libtool sets link_all_deplibs=(yes|unknown) everywhere,
# will hopefully change in the future) # will hopefully change in the future)
sed -i 's/\(link_all_deplibs=\)unknown/\1no/' configure sed -i 's/\(link_all_deplibs=\)unknown/\1no/' configure
%configure \ %configure \
--enable-hsts \
--enable-ipv6 \ --enable-ipv6 \
%if %{with openssl} %if %{with openssl}
--with-openssl \ --with-openssl \
@ -124,13 +158,32 @@ sed -i 's/\(link_all_deplibs=\)unknown/\1no/' configure
--without-ca-bundle \ --without-ca-bundle \
%else %else
--without-openssl \ --without-openssl \
%if %{with mozilla_nss}
--with-nss \
%endif %endif
%endif
--with-gssapi=$(krb5-config --prefix) \
--with-libidn2 \ --with-libidn2 \
--with-nghttp2 \
--enable-docs \
%if %{with mini}
--disable-dict \
--disable-ftp \
--disable-gopher \
--disable-imap \
--disable-mqtt \
--disable-ntlm \
--disable-ntlm-wb \
--disable-pop3 \
--disable-rtsp \
--disable-smtp \
--disable-telnet \
--disable-tftp \
--disable-tls-srp \
--disable-websockets \
--without-brotli \
--without-libssh \
%else
--with-gssapi=$(krb5-config --prefix) \
--with-brotli \
--with-libssh \ --with-libssh \
%endif
--enable-symbol-hiding \ --enable-symbol-hiding \
--disable-static \ --disable-static \
--enable-threaded-resolver \ --enable-threaded-resolver \
@ -157,29 +210,39 @@ popd
%install %install
%make_install %make_install
rm -f %{buildroot}%{_libdir}/libcurl.la rm -f %{buildroot}%{_libdir}/libcurl.la
%if %{with mini}
rm -rv %{buildroot}%{_includedir}/curl %{buildroot}/%{_libdir}/pkgconfig %{buildroot}%{_datadir}
rm -v %{buildroot}%{_bindir}/curl %{buildroot}%{_bindir}/curl-config %{buildroot}%{_libdir}/libcurl.so
%else
install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot}%{_datadir}/aclocal/libcurl.m4 install -Dm 0644 docs/libcurl/libcurl.m4 %{buildroot}%{_datadir}/aclocal/libcurl.m4
pushd scripts pushd scripts
%make_install %make_install
popd popd
%endif
%ldconfig_scriptlets -n libcurl4 %ldconfig_scriptlets -n libcurl%{?psuffix}4
%files -n libcurl%{?psuffix}4
%license COPYING
%{_libdir}/libcurl.so.4*
%if !%{with mini}
%files %files
%doc README RELEASE-NOTES CHANGES %doc README RELEASE-NOTES CHANGES
%doc docs/{BUGS.md,FAQ,FEATURES.md,TODO,TheArtOfHttpScripting.md} %doc docs/{BUGS.md,FAQ,FEATURES.md,TODO,TheArtOfHttpScripting.md}
%{_bindir}/curl %{_bindir}/curl
%{_datadir}/zsh/site-functions/_curl
%{_mandir}/man1/curl.1%{?ext_man} %{_mandir}/man1/curl.1%{?ext_man}
%files zsh-completion
%dir %{_datadir}/zsh %dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions %dir %{_datadir}/zsh/site-functions
%{_datadir}/zsh/site-functions/_curl
%files fish-completion
%dir %{_datadir}/fish/ %dir %{_datadir}/fish/
%dir %{_datadir}/fish/vendor_completions.d/ %dir %{_datadir}/fish/vendor_completions.d/
%{_datadir}/fish/vendor_completions.d/curl.fish %{_datadir}/fish/vendor_completions.d/curl.fish
%files -n libcurl4
%license COPYING
%{_libdir}/libcurl.so.4*
%files -n libcurl-devel %files -n libcurl-devel
%{_bindir}/curl-config %{_bindir}/curl-config
%{_includedir}/curl %{_includedir}/curl
@ -192,5 +255,6 @@ popd
%{_mandir}/man1/curl-config.1%{?ext_man} %{_mandir}/man1/curl-config.1%{?ext_man}
%{_mandir}/man3/* %{_mandir}/man3/*
%doc docs/libcurl/symbols-in-versions %doc docs/libcurl/symbols-in-versions
%endif
%changelog %changelog