From 5e0af5c5072e9bc1cd5071f83906d44a4467392c Mon Sep 17 00:00:00 2001 From: Jitka Plesnikova Date: Mon, 8 Dec 2025 09:52:09 +0100 Subject: [PATCH] Resolves: RHEL-131157 - Update tests for Image Mode --- gating.yaml | 7 +++++++ perl-ExtUtils-CBuilder.spec | 24 +++++++++++++++++------- tests/upstream-tests.fmf | 7 +++++++ 3 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 gating.yaml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..1608530 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +# RHEL +--- !Policy +product_versions: + - rhel-* +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/perl-ExtUtils-CBuilder.spec b/perl-ExtUtils-CBuilder.spec index e5c8982..f04f868 100644 --- a/perl-ExtUtils-CBuilder.spec +++ b/perl-ExtUtils-CBuilder.spec @@ -3,7 +3,7 @@ Name: perl-ExtUtils-CBuilder Epoch: 1 # Mimic perl.spec Version: 0.280236 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Compile and link C code for Perl modules License: GPL+ or Artistic URL: https://metacpan.org/release/ExtUtils-CBuilder @@ -85,31 +85,41 @@ perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %install %{make_install} +%{_fixperms} %{buildroot}/* # Install tests mkdir -p %{buildroot}/%{_libexecdir}/%{name} cp -a t %{buildroot}/%{_libexecdir}/%{name} cat > %{buildroot}/%{_libexecdir}/%{name}/test << 'EOF' -#!/bin/sh -cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +#!/bin/bash +set -e +# Tests write into temporary files/directories. The solution is to copy the +# tests into a writable directory and execute them from there. +DIR=$(mktemp -d) +pushd "$DIR" +cp -a %{_libexecdir}/%{name}/* ./ +prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +popd +rm -rf "$DIR" EOF chmod +x %{buildroot}/%{_libexecdir}/%{name}/test -%{_fixperms} $RPM_BUILD_ROOT/* - %check make test %files %license LICENSE %doc Changes CONTRIBUTING README README.mkdn -%{perl_vendorlib}/* -%{_mandir}/man3/* +%{perl_vendorlib}/ExtUtils* +%{_mandir}/man3/ExtUtils::CBuilder* %files tests %{_libexecdir}/%{name} %changelog +* Fri Nov 28 2025 Jitka Plesnikova - 1:0.280236-5 +- Resolves: RHEL-131157 - Update tests for Image Mode + * Mon Aug 09 2021 Mohan Boddu - 1:0.280236-4 - Rebuilt for IMA sigs, glibc 2.34, aarch64 flags Related: rhbz#1991688 diff --git a/tests/upstream-tests.fmf b/tests/upstream-tests.fmf index 33779cf..5a0fe16 100644 --- a/tests/upstream-tests.fmf +++ b/tests/upstream-tests.fmf @@ -2,3 +2,10 @@ summary: Upstream tests component: perl-ExtUtils-CBuilder require: perl-ExtUtils-CBuilder-tests test: /usr/libexec/perl-ExtUtils-CBuilder/test +enabled: true +tag: + - rhel-buildroot +adjust: + - enabled: false + when: distro < rhel-9 or distro < centos-stream-9 + continue: false