#1106654 improve curl build profiles

Package:
src:curl
Source:
src:curl
Submitter:
Helmut Grohne
Date:
2025-05-27 12:03:04 UTC
Severity:
normal
Tags:
#1106654#5
Date:
2025-05-27 11:47:37 UTC
From:
To:
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