Source: curl Version: 8.13.0-5 Tags: patch Hello Samuel,
due to a customer request, I happened to look into curl build profiles. In that process I have encountered several improvements to be made. The cumulative changes can be found in the attached patch. I do not think that the patch is appropriate for inclusion in trixie, because it does not address a release-critical bug. It should be reasonably safe though, because I verified that the patch does not affect binary artifacts of a default build. I compared a patched build to an unpatched build with identical debian/changelog and the results were bit-identical. Let's go through the suggested changes. A pending debian-policy change suggests documenting non-trivial build profiles in debian/README.source. My patch proposes such an addition. While debian/rules has support for build profiles, they are not declared in debian/control. My patch adds the relevant declarations. As a result, dh_install can figure when it should skip operation and two conditionals in debian/rules become redundant. The pkg.curl.gnutls-only profiles does not actually work, because it attempts installing curl-config from the openssl build. I propose installing the one from the gnutls build instead. In earlier times, debian/rules used quilt to vary patches for differentiating build flavours. It no longer does and we may drop the quilt dependency as a result. ca-certificates is only used for testing curl and can be skipped in a nocheck build. In addition to comparing a patched to an unpatched build, I also compared the artifacts produced by a pkg.curl.gnutls-only and pkg.curl.openssl-only build to the artifacts produced by a full build and observed that they also are bit-identical (subject to the packages actually generated). Last but not least, allow me to observe that libcurl4t64 links gnutls (via librtmp1) and libcurl3t64-gnutls links openssl via libldap2. A truly openssl-free build may be obtained by additionally enabling pkg.curl.noldap, but there is no pkg.curl.nortmp profile yet. This latter aspect is separately reported by Matthias Klose in #1065566. Hope you like the patch Helmut
diff --minimal -Nru curl-8.13.0/debian/README.source curl-8.13.0/debian/README.source --- curl-8.13.0/debian/README.source 1970-01-01 01:00:00.000000000 +0100 +++ curl-8.13.0/debian/README.source 2025-05-26 21:44:35.000000000 +0200 @@ -0,0 +1,29 @@ +The curl package supports the following build profiles: + + * nocheck + Disable build-time testing. + + * pkg.curl.noldap + The curl libraries are built without ldap support. Packages change + functionality in a way that may break reverse dependencies. + + * pkg.curl.openssl-only + Build only the openssl-flavoured curl library. Those binary packages still + built remain unchanged. + + * pkg.curl.no-gnutls + Skip building binary packages that use gnutls. This presently includes the + curl binary package. Those binary packages still built remain unchanged. + + * pkg.curl.gnutls-only + Build only the gnutls-flavoured curl library and cli packages. Those binary + packages still built remain unchanged. + + * pkg.curl.no-openssl + Skip building binary packages that use openssl. Those binary packages still + built remain unchanged. + + * pkg.curl.debug + Build additional functionality relevant to debugging. This changes binary + packages such that packages built against such a build may become + incompatible with a non-debug build. diff --minimal -Nru curl-8.13.0/debian/changelog curl-8.13.0/debian/changelog --- curl-8.13.0/debian/changelog 2025-04-25 22:31:31.000000000 +0200 +++ curl-8.13.0/debian/changelog 2025-05-26 21:49:02.000000000 +0200 @@ -1,3 +1,16 @@ +curl (8.13.0-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Improve build profile support (Closes: #-1) + + Document build profiles in debian/README.source + + Add build profile metadata to debian/control + + Drop unnecessary conditions from debian/rules + + Intall the gnutls curl-config into libcurl4-gnutls-dev + + Drop unused quilt build dependency + + Annotate ca-certificates build dependency <!nocheck> + + -- Helmut Grohne <hel...@subdivi.de> Mon, 26 May 2025 21:49:02 +0200 + curl (8.13.0-5) unstable; urgency=medium * d/t/upstream-*: ensure clean build by calling override_dh_auto_clean diff --minimal -Nru curl-8.13.0/debian/control curl-8.13.0/debian/control --- curl-8.13.0/debian/control 2025-04-25 22:31:31.000000000 +0200 +++ curl-8.13.0/debian/control 2025-05-26 21:49:02.000000000 +0200 @@ -9,10 +9,10 @@ debhelper-compat (= 13), autoconf, automake, - ca-certificates, + ca-certificates <!nocheck>, groff-base, libbrotli-dev, - libgnutls28-dev, + libgnutls28-dev <!pkg.curl.no-gnutls !pkg.curl.openssl-only>, libidn2-dev, libkrb5-dev, libldap2-dev <!pkg.curl.noldap>, @@ -20,18 +20,17 @@ libpsl-dev, librtmp-dev, libssh2-1-dev, - libssl-dev, + libssl-dev <!pkg.curl.no-openssl !pkg.curl.gnutls-only>, libtool, libzstd-dev, locales-all <!nocheck>, - libngtcp2-dev (>= 1.2.0), - libngtcp2-crypto-gnutls-dev (>= 1.2.0), + libngtcp2-dev (>= 1.2.0) <!pkg.curl.no-gnutls !pkg.curl.openssl-only>, + libngtcp2-crypto-gnutls-dev (>= 1.2.0) <!pkg.curl.no-gnutls !pkg.curl.openssl-only>, libnghttp3-dev (>= 1.1.0), openssh-server <!nocheck>, python3:native <!nocheck>, python3-impacket [!alpha !hppa !m68k !sh4] <!nocheck>, gnutls-bin [!ppc64el] <!nocheck>, - quilt, stunnel4 <!nocheck>, zlib1g-dev, Build-Conflicts: autoconf2.13, automake1.4 @@ -46,6 +45,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, libcurl4t64 (= ${binary:Version}) Recommends: bash-completion Multi-Arch: foreign +Build-Profiles: <!pkg.curl.no-openssl !pkg.curl.gnutls-only> Description: command line tool for transferring data with URL syntax curl is a command line tool for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, @@ -68,6 +68,7 @@ Conflicts: libcurl3 Replaces: libcurl4, libcurl3 Multi-Arch: same +Build-Profiles: <!pkg.curl.no-openssl !pkg.curl.gnutls-only> Description: easy-to-use client-side URL transfer library (OpenSSL flavour) libcurl is an easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, @@ -95,6 +96,7 @@ Recommends: ca-certificates Pre-Depends: ${misc:Pre-Depends} Multi-Arch: same +Build-Profiles: <!pkg.curl.no-gnutls !pkg.curl.openssl-only> Description: easy-to-use client-side URL transfer library (GnuTLS flavour) libcurl is an easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, @@ -139,6 +141,7 @@ libidn-dev, pkgconf, Multi-Arch: same +Build-Profiles: <!pkg.curl.no-openssl !pkg.curl.gnutls-only> Description: development files and documentation for libcurl (OpenSSL flavour) libcurl is an easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, @@ -187,6 +190,7 @@ libidn-dev, pkgconf, Multi-Arch: same +Build-Profiles: <!pkg.curl.no-gnutls !pkg.curl.openssl-only> Description: development files and documentation for libcurl (GnuTLS flavour) libcurl is an easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, @@ -211,6 +215,7 @@ Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} +Build-Profiles: <!pkg.curl.no-openssl !pkg.curl.gnutls-only> Description: documentation for libcurl libcurl is an easy-to-use client-side URL transfer library, supporting DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, diff --minimal -Nru curl-8.13.0/debian/libcurl4-gnutls-dev.manpages curl-8.13.0/debian/libcurl4-gnutls-dev.manpages --- curl-8.13.0/debian/libcurl4-gnutls-dev.manpages 2025-04-25 22:31:31.000000000 +0200 +++ curl-8.13.0/debian/libcurl4-gnutls-dev.manpages 2025-05-26 21:49:02.000000000 +0200 @@ -1 +1 @@ -usr/share/man/man1/curl-config.1 +debian/tmp-gnutls/usr/share/man/man1/curl-config.1 diff --minimal -Nru curl-8.13.0/debian/rules curl-8.13.0/debian/rules --- curl-8.13.0/debian/rules 2025-04-25 22:31:31.000000000 +0200 +++ curl-8.13.0/debian/rules 2025-05-26 21:49:02.000000000 +0200 @@ -120,15 +120,11 @@ DESTDIR=$(shell pwd)/debian/tmp-gnutls install endif find debian/tmp* -name '*.la' -delete -ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) dh_install -plibcurl4t64 -plibcurl4-openssl-dev -plibcurl4-doc \ -pcurl \ --sourcedir=debian/tmp -endif -ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) dh_install -plibcurl3t64-gnutls -plibcurl4-gnutls-dev \ --sourcedir=debian/tmp-gnutls -endif # Modify curl-config to make it architecture-independent: # 1. In --static-libs output, replace the output of krb5-config (which # currently includes architecture-specific paths) with a call at