diff -Nru curl-7.88.1/debian/changelog curl-7.88.1/debian/changelog --- curl-7.88.1/debian/changelog 2023-03-21 22:39:05.000000000 +0000 +++ curl-7.88.1/debian/changelog 2023-03-26 11:36:24.000000000 +0100 @@ -1,3 +1,16 @@ +curl (7.88.1-8) unstable; urgency=medium + + [ Samuel Henrique ] + * d/gbp.conf: Push gbp conf with sane defaults + * d/salsa-ci.yml: Disable dh_auto_test with DEB_BUILD_OPTIONS + * d/rules: Add new build profiles to limit builds to a single TLS backend + * d/tests: Add new autopkgtests that runs curl's test suite + + [ Sergio Durigan Junior ] + * d/rules: Remove -D_DEB_HOST_ARCH from curl-config's CFLAGS. + + -- Samuel Henrique Sun, 26 Mar 2023 11:36:24 +0100 + curl (7.88.1-7) unstable; urgency=medium * Bump Standards-Version to 4.6.2 diff -Nru curl-7.88.1/debian/gbp.conf curl-7.88.1/debian/gbp.conf --- curl-7.88.1/debian/gbp.conf 1970-01-01 01:00:00.000000000 +0100 +++ curl-7.88.1/debian/gbp.conf 2023-03-26 11:36:24.000000000 +0100 @@ -0,0 +1,15 @@ +[DEFAULT] +pristine-tar = True +cleaner = /bin/true +ignore-branch = True +debian-branch = debian/unstable +sign-tags = True + +[import-orig] +filter-pristine-tar = True + +[pq] +patch-numbers = False + +[dch] +multimaint-merge = True diff -Nru curl-7.88.1/debian/rules curl-7.88.1/debian/rules --- curl-7.88.1/debian/rules 2023-03-21 22:39:05.000000000 +0000 +++ curl-7.88.1/debian/rules 2023-03-26 11:36:24.000000000 +0100 @@ -29,47 +29,88 @@ export DEB_CFLAGS_MAINT_APPEND = -D_DEB_HOST_ARCH=\"$(DEB_HOST_MULTIARCH)\" export DEB_CXXFLAGS_MAINT_APPEND = -D_DEB_HOST_ARCH=\"$(DEB_HOST_MULTIARCH)\" +ifneq ($(filter pkg.curl.openssl-only,$(DEB_BUILD_PROFILES)),) + DEB_BUILD_PROFILES += pkg.curl.no-gnutls pkg.curl.no-nss +endif +ifneq ($(filter pkg.curl.gnutls-only,$(DEB_BUILD_PROFILES)),) + DEB_BUILD_PROFILES += pkg.curl.no-openssl pkg.curl.no-nss +endif +ifneq ($(filter pkg.curl.nss-only,$(DEB_BUILD_PROFILES)),) + DEB_BUILD_PROFILES += pkg.curl.no-openssl pkg.curl.no-gnutls +endif + %: dh $@ override_dh_auto_configure: - mkdir -p debian/build debian/build-gnutls debian/build-nss - # pop the last patch (nss) +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) + mkdir -p debian/build +endif +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) + mkdir -p debian/build-gnutls +endif +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) + mkdir -p debian/build-nss +endif +# pop the last patch (nss) quilt pop - # pop the second last patch (gnutls) +# pop the second last patch (gnutls) quilt pop - # get the source without nss and gnutls patches +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) +# get the source without nss and gnutls patches tar -cf - --exclude=debian/build* --exclude=.pc . \ | tar -xf - -C debian/build - # push the second last patch which must be gnutls +endif +# push the second last patch which must be gnutls quilt push - # get the source with gnutls patch applied +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) +# get the source with gnutls patch applied tar -cf - --exclude=debian/build* --exclude=.pc . \ | tar -xf - -C debian/build-gnutls - # push the last patch which must be nss +endif +# push the last patch which must be nss quilt push - # get the source with nss patch applied +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) +# get the source with nss patch applied tar -cf - --exclude=debian/build* --exclude=.pc . \ | tar -xf - -C debian/build-nss - # run buildconf and make sure to copy the patched ltmain.sh - for flavour in build build-gnutls build-nss; do \ - (cd debian/$$flavour && ./buildconf && cp ../../ltmain.sh .) \ - done - cd debian/build && dh_auto_configure ${CONFIGURE_ARGS} --with-openssl \ +endif +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) + cd debian/build && \ + ./buildconf && \ + cp ../../ltmain.sh . && \ + dh_auto_configure ${CONFIGURE_ARGS} --with-openssl \ --with-ca-path=/etc/ssl/certs \ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt - cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS} --with-gnutls \ +endif +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) + cd debian/build-gnutls && \ + ./buildconf && \ + cp ../../ltmain.sh . && \ + dh_auto_configure ${CONFIGURE_ARGS} --with-gnutls \ --with-ca-path=/etc/ssl/certs - cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS} --with-nss --with-nss-deprecated +endif +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) + cd debian/build-nss && \ + ./buildconf && \ + cp ../../ltmain.sh . && \ + dh_auto_configure ${CONFIGURE_ARGS} --with-nss --with-nss-deprecated +endif override_dh_auto_build: +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) cd debian/build && dh_auto_build +endif +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) cd debian/build-gnutls && dh_auto_build +endif +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) cd debian/build-nss && dh_auto_build +endif # Test parameters that are passed to runtests.pl. # -n disables valgrind usage -TESTS_GENERAL_PARAMETERS := -n +TESTS_GENERAL_PARAMETERS += -n # These tests fail if a IPv6-only builder is used: # https://bugs.debian.org/1032343 @@ -80,36 +121,52 @@ override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_PROFILES)),) +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) # OpenSSL tests. cd debian/build && VERBOSE=1 \ TFLAGS="$(TESTS_GENERAL_PARAMETERS)" \ $(MAKE) test-nonflaky - +endif +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) # GnuTLS tests. cd debian/build-gnutls && VERBOSE=1 \ TFLAGS="$(TESTS_GENERAL_PARAMETERS)" \ $(MAKE) test-nonflaky - +endif +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) # NSS tests. cd debian/build-nss && VERBOSE=1 \ TFLAGS="$(TESTS_GENERAL_PARAMETERS)" \ $(MAKE) test-nonflaky endif +endif override_dh_install: +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) ${MAKE} -C debian/build \ DESTDIR=$(shell pwd)/debian/tmp install +endif +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) ${MAKE} -C debian/build-gnutls \ DESTDIR=$(shell pwd)/debian/tmp-gnutls install +endif +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) ${MAKE} -C debian/build-nss \ DESTDIR=$(shell pwd)/debian/tmp-nss install +endif find debian/tmp* -name '*.la' -delete +ifeq ($(filter pkg.curl.no-openssl,$(DEB_BUILD_PROFILES)),) + dh_install -pcurl -plibcurl4 -plibcurl4-openssl-dev -plibcurl4-doc \ + --sourcedir=debian/tmp +endif +ifeq ($(filter pkg.curl.no-gnutls,$(DEB_BUILD_PROFILES)),) dh_install -plibcurl3-gnutls -plibcurl4-gnutls-dev \ --sourcedir=debian/tmp-gnutls +endif +ifeq ($(filter pkg.curl.no-nss,$(DEB_BUILD_PROFILES)),) dh_install -plibcurl3-nss -plibcurl4-nss-dev \ --sourcedir=debian/tmp-nss - dh_install -pcurl -plibcurl4 -plibcurl4-openssl-dev -plibcurl4-doc \ - --sourcedir=debian/tmp +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 @@ -130,11 +187,15 @@ # 4. In --configure output, remove # -fdebug-prefix-map=/buildd/specific/random/path=. and # -ffile-prefix-map=/buildd/specific/random/path=. +# 5. Remove -D_DEB_HOST_ARCH from CFLAGS. This is a (hopefully +# temporary) hack needed to properly build curl with NSS PEM +# support in Debian. sed -e "/-lcurl /s|`krb5-config --libs gssapi`|\`krb5-config --libs gssapi\`|" \ -e "/--prefix/s|/$(DEB_HOST_MULTIARCH)'|/'\\\\\`dpkg-architecture -qDEB_HOST_MULTIARCH\\\\\`|g" \ -e "/--prefix/s|=$(DEB_BUILD_GNU_TYPE)'|='\\\\\`dpkg-architecture -qDEB_BUILD_GNU_TYPE\\\\\`|g" \ -e "/-fdebug-prefix-map=/s|\(-fdebug-prefix-map=\)/[^ ]*=.||" \ -e "/-ffile-prefix-map=/s|\(-ffile-prefix-map=\)/[^ ]*=.||" \ + -e "/-D_DEB_HOST_ARCH=/s|-D_DEB_HOST_ARCH=\\\\\"[^ ']*\\\\\"||" \ -i `find . -name curl-config` # When we get here, everything has been properly installed. Because # of debhelper-compat 13, we have to remove some files that are diff -Nru curl-7.88.1/debian/salsa-ci.yml curl-7.88.1/debian/salsa-ci.yml --- curl-7.88.1/debian/salsa-ci.yml 2023-03-21 22:39:05.000000000 +0000 +++ curl-7.88.1/debian/salsa-ci.yml 2023-03-26 11:36:24.000000000 +0100 @@ -3,5 +3,4 @@ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml variables: - SALSA_CI_DPKG_BUILDPACKAGE_ARGS: --build-profiles=nocheck - SALSA_CI_DISABLE_REPROTEST: 1 + DEB_BUILD_OPTIONS: nocheck diff -Nru curl-7.88.1/debian/tests/control curl-7.88.1/debian/tests/control --- curl-7.88.1/debian/tests/control 1970-01-01 01:00:00.000000000 +0100 +++ curl-7.88.1/debian/tests/control 2023-03-26 11:36:24.000000000 +0100 @@ -0,0 +1,11 @@ +Tests: upstream-tests-openssl +Depends: curl, @builddeps@ +Restrictions: allow-stderr + +Tests: upstream-tests-gnutls +Depends: @builddeps@ +Restrictions: allow-stderr + +Tests: upstream-tests-nss +Depends: @builddeps@ +Restrictions: allow-stderr diff -Nru curl-7.88.1/debian/tests/upstream-tests-gnutls curl-7.88.1/debian/tests/upstream-tests-gnutls --- curl-7.88.1/debian/tests/upstream-tests-gnutls 1970-01-01 01:00:00.000000000 +0100 +++ curl-7.88.1/debian/tests/upstream-tests-gnutls 2023-03-26 11:36:24.000000000 +0100 @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +# Building curl is required because libauthretry (from "make test") requires +# libcurl. +# +# It might be possible to patch the makefile to have libauthretry link against +# the system's installed libcurl, patches welcome. +# +# gnutls tests run against the built curl and libcurl rather than the installed +# one as we don't ship a curl linked against gnutls (only gnutls libraries). + +export DEB_BUILD_PROFILES="pkg.curl.gnutls-only" +export VERBOSE=1 + +echo "dh_update_autotools_config" +dh_update_autotools_config + +echo "dh_autoreconf" +dh_autoreconf + +echo "debian/rules override_dh_auto_configure " +debian/rules override_dh_auto_configure + +echo "debian/rules override_dh_auto_build" +debian/rules override_dh_auto_build + +echo "debian/rules override_dh_auto_test" +debian/rules override_dh_auto_test diff -Nru curl-7.88.1/debian/tests/upstream-tests-nss curl-7.88.1/debian/tests/upstream-tests-nss --- curl-7.88.1/debian/tests/upstream-tests-nss 1970-01-01 01:00:00.000000000 +0100 +++ curl-7.88.1/debian/tests/upstream-tests-nss 2023-03-26 11:36:24.000000000 +0100 @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +# Building curl is required because libauthretry (from "make test") requires +# libcurl. +# +# It might be possible to patch the makefile to have libauthretry link against +# the system's installed libcurl, patches welcome. +# +# nss tests run against the built curl and libcurl rather than the installed +# one as we don't ship a curl linked against nss (only nss libraries). + +export DEB_BUILD_PROFILES="pkg.curl.nss-only" +export VERBOSE=1 + +echo "dh_update_autotools_config" +dh_update_autotools_config + +echo "dh_autoreconf" +dh_autoreconf + +echo "debian/rules override_dh_auto_configure " +debian/rules override_dh_auto_configure + +echo "debian/rules override_dh_auto_build" +debian/rules override_dh_auto_build + +echo "debian/rules override_dh_auto_test" +debian/rules override_dh_auto_test diff -Nru curl-7.88.1/debian/tests/upstream-tests-openssl curl-7.88.1/debian/tests/upstream-tests-openssl --- curl-7.88.1/debian/tests/upstream-tests-openssl 1970-01-01 01:00:00.000000000 +0100 +++ curl-7.88.1/debian/tests/upstream-tests-openssl 2023-03-26 11:36:24.000000000 +0100 @@ -0,0 +1,32 @@ +#!/bin/sh +set -e + +# Building curl is required because libauthretry (from "make test") requires +# libcurl. +# +# It might be possible to patch the makefile to have libauthretry link against +# the system's installed libcurl, patches welcome. +# +# openssl tests run against the system's installed curl. + +export DEB_BUILD_PROFILES="pkg.curl.openssl-only" +export VERBOSE=1 +TESTS_GENERAL_PARAMETERS="-c /usr/bin/curl" +TESTS_GENERAL_PARAMETERS="-vc /usr/bin/curl" +export TESTS_GENERAL_PARAMETERS + +echo "dh_update_autotools_config" +dh_update_autotools_config + +echo "dh_autoreconf" +dh_autoreconf + +echo "debian/rules override_dh_auto_configure " +debian/rules override_dh_auto_configure + +echo "debian/rules override_dh_auto_build" +debian/rules override_dh_auto_build + +echo "debian/rules override_dh_auto_test" +debian/rules override_dh_auto_test +