From caf056235ff9dca522c8bddfee9ff6e1291d1a1c Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Thu, 22 May 2025 16:46:41 +0200 Subject: [PATCH] Resolves: RHEL-92846 --- Net-SSLeay-1.94-openssl3.4.0-tests-fix.patch | 25 ++++++++++++++++++++ gating.yaml | 1 - perl-Net-SSLeay.spec | 14 ++++++++--- plans/internal.fmf | 12 ++++++++++ tests/upstream-tests.fmf | 5 ---- 5 files changed, 48 insertions(+), 9 deletions(-) create mode 100644 Net-SSLeay-1.94-openssl3.4.0-tests-fix.patch create mode 100644 plans/internal.fmf diff --git a/Net-SSLeay-1.94-openssl3.4.0-tests-fix.patch b/Net-SSLeay-1.94-openssl3.4.0-tests-fix.patch new file mode 100644 index 0000000..f19353e --- /dev/null +++ b/Net-SSLeay-1.94-openssl3.4.0-tests-fix.patch @@ -0,0 +1,25 @@ +diff --git a/t/local/32_x509_get_cert_info.t b/t/local/32_x509_get_cert_info.t +index 0f7e2d5..08316bf 100644 +--- a/t/local/32_x509_get_cert_info.t ++++ b/t/local/32_x509_get_cert_info.t +@@ -188,6 +188,10 @@ for my $f (keys (%$dump)) { + ) { + $ext_data =~ s{(othername:) [^, ]+}{$1}g; + } ++ # Starting with 3.4.0 the double colon in emailAddress has been removed. ++ if (Net::SSLeay::SSLeay >= 0x30400000) { ++ $ext_data =~ s{emailAddress::}{emailAddress:}; ++ } + } + elsif ( $nid == 89 ) { + # The output formatting for certificate policies has a +@@ -214,6 +218,9 @@ for my $f (keys (%$dump)) { + # OpenSSL 1.0.0 to 1.1.1: + $ext_data =~ s{(Full Name:\n )}{\n$1}g; + $ext_data .= "\n"; ++ } elsif ( Net::SSLeay::SSLeay > 0x3040000f ) { ++ $ext_data =~ s{(\nFull Name:)}{\n$1}g; ++ $ext_data .= "\n"; + } + } + elsif ( $nid == 126 ) { diff --git a/gating.yaml b/gating.yaml index 475371b..648918d 100644 --- a/gating.yaml +++ b/gating.yaml @@ -4,4 +4,3 @@ product_versions: decision_context: osci_compose_gate rules: - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/perl-Net-SSLeay.spec b/perl-Net-SSLeay.spec index e0405b9..1335f95 100644 --- a/perl-Net-SSLeay.spec +++ b/perl-Net-SSLeay.spec @@ -6,13 +6,14 @@ Name: perl-Net-SSLeay Version: 1.94 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Perl extension for using OpenSSL License: Artistic-2.0 URL: https://metacpan.org/release/Net-SSLeay Source0: https://cpan.metacpan.org/modules/by-module/Net/Net-SSLeay-%{version}.tar.gz Patch1: Net-SSLeay-1.90-pkgconfig.patch Patch2: Net-SSLeay-1.90-openssl3.0.0-tests-disable_TLS1_and_TLS1_1.patch +Patch3: Net-SSLeay-1.94-openssl3.4.0-tests-fix.patch # =========== Module Build =========================== BuildRequires: coreutils BuildRequires: findutils @@ -62,7 +63,7 @@ BuildRequires: perl(Test::More) >= 0.61 BuildRequires: perl(threads) BuildRequires: perl(warnings) # =========== Optional Tests ========================= -%if %{with perl_Net_SSLeay_enables_optional_test} +%if %{with perl_N et_SSLeay_enables_optional_test} BuildRequires: perl(Crypt::OpenSSL::Bignum) # Test::Kwalitee 1.00 not used BuildRequires: perl(Test::Pod) >= 1.41 @@ -107,6 +108,10 @@ with "%{_libexecdir}/%{name}/test". # Disable TLS1 and TLS1_1 from tests %patch -P2 -p1 +# Fix test suite to work with OpenSSL 3.4.0 and newer +# https://github.com/radiator-software/p5-net-ssleay/pull/520 +%patch -P3 -p1 + # Fix permissions in examples to avoid bogus doc-file dependencies chmod -c 644 examples/* @@ -147,7 +152,6 @@ cd %{_libexecdir}/%{name} && exec prove -I . -r -j "$(getconf _NPROCESSORS_ONLN) EOF chmod +x %{buildroot}%{_libexecdir}/%{name}/test - %check unset RELEASE_TESTING OPENSSL_ENABLE_SHA1_SIGNATURES=1 make test @@ -167,6 +171,10 @@ OPENSSL_ENABLE_SHA1_SIGNATURES=1 make test %{_libexecdir}/%{name} %changelog +* Thu May 22 2025 Jitka Plesnikova - 1.94-2 +- Fix test suite to work with OpenSSL 3.4.0 and newer + Resolves: RHEL-92846 + * Mon Jun 17 2024 Jitka Plesnikova - 1.94-1 - Resolves: RHEL-40758 - Update to 1.94 diff --git a/plans/internal.fmf b/plans/internal.fmf new file mode 100644 index 0000000..74b95cd --- /dev/null +++ b/plans/internal.fmf @@ -0,0 +1,12 @@ +summary: Private (RHEL) beakerlib tests +enabled: false +adjust: + - when: distro == rhel + enabled: true + because: private tests are accesible only within rhel pipline +discover: + - name: rhel + how: fmf + url: https://pkgs.devel.redhat.com/git/tests/perl-Net-SSLeay +execute: + how: tmt diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf index f059fda..519f92b 100644 --- a/tests/upstream-tests.fmf +++ b/tests/upstream-tests.fmf @@ -6,12 +6,7 @@ test: /usr/libexec/perl-Net-SSLeay/test enabled: true tag: - rhel-buildroot - - TestCaseCopy - - Tier1 -tier: '1' adjust: - enabled: false when: distro < rhel-9 or distro < centos-stream-9 continue: false -extra-nitrate: TC#0617567 -id: a695ec04-37b7-4e91-a9a7-00946785912e