Package: libnet-ssleay-perl Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu kinetic ubuntu-patch X-Debbugs-Cc: simon.cho...@canonical.com
Hi! In Ubuntu, we've noticed that when using OpenSSL 3.0, the autopkgtests for this package systematically fail on new upstream revisions, needing a package rebuild every time. This patch should address this issue moving forward. Thanks for considering the patch. Simon -- System Information: Debian Release: bookworm/sid APT prefers jammy-updates APT policy: (500, 'jammy-updates'), (500, 'jammy-security'), (500, 'jammy-proposed'), (500, 'jammy') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.15.0-30-generic (SMP w/24 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru libnet-ssleay-perl-1.92/debian/patches/series libnet-ssleay-perl-1.92/debian/patches/series --- libnet-ssleay-perl-1.92/debian/patches/series 2022-01-13 19:47:44.000000000 +0100 +++ libnet-ssleay-perl-1.92/debian/patches/series 2022-05-10 09:22:17.000000000 +0200 @@ -1 +1,2 @@ 20no-stray-libz-link.patch +version_check_on_autopkgtest.patch diff -Nru libnet-ssleay-perl-1.92/debian/patches/version_check_on_autopkgtest.patch libnet-ssleay-perl-1.92/debian/patches/version_check_on_autopkgtest.patch --- libnet-ssleay-perl-1.92/debian/patches/version_check_on_autopkgtest.patch 1970-01-01 01:00:00.000000000 +0100 +++ libnet-ssleay-perl-1.92/debian/patches/version_check_on_autopkgtest.patch 2022-05-10 09:35:19.000000000 +0200 @@ -0,0 +1,32 @@ +Subject: Loosen the OpenSSL version checks on autopkgtests +Author: Simon Chopin <simon.cho...@canonical.com> +Origin: ubuntu +Forwarded: not-needed, only makes sense in a Debian-ish context +Last-Update: 2022-05-10 + +The test suite checks that the OPENSSL_version_*() calls match the compile-time +constants, which is reasonable in a unit test that is run in the same time +frame as the compilation, as is usually the case. However, this check doesn't +make as much sense in the autopkgtest context, where the src:openssl package +might have been updated for a bugfix release, for instance. Such updates would +trigger an autopkgtest run, and barring regressions in OpenSSL the tests for +this packages should reasonably not fail, especially given the explicit +versioning policy from 3.0.0 forward: + +https://www.openssl.org/policies/general/versioning-policy.html +--- a/t/local/04_basic.t ++++ b/t/local/04_basic.t +@@ -55,8 +55,11 @@ + cmp_ok($patch, '>=', 0, 'OPENSSL_version_patch'); + + is(Net::SSLeay::OPENSSL_VERSION_MAJOR(), $major, 'OPENSSL_VERSION_MAJOR and OPENSSL_version_major are equal'); +- is(Net::SSLeay::OPENSSL_VERSION_MINOR(), $minor, 'OPENSSL_VERSION_MINOR and OPENSSL_version_minor are equal'); +- is(Net::SSLeay::OPENSSL_VERSION_PATCH(), $patch, 'OPENSSL_VERSION_PATCH and OPENSSL_version_patch are equal'); ++ if (not defined $ENV{'AUTOPKGTEST_TMP'}) # This only makes sense when testing directly after the build ++ { ++ is(Net::SSLeay::OPENSSL_VERSION_MINOR(), $minor, 'OPENSSL_VERSION_MINOR and OPENSSL_version_minor are equal'); ++ is(Net::SSLeay::OPENSSL_VERSION_PATCH(), $patch, 'OPENSSL_VERSION_PATCH and OPENSSL_version_patch are equal'); ++ } + + isnt(defined Net::SSLeay::OPENSSL_version_pre_release(), undef, 'OPENSSL_version_pre_release returns a defined value'); + isnt(defined Net::SSLeay::OPENSSL_version_build_metadata(), undef, 'OPENSSL_version_build_metadata returns a defined value');