From d6e3410f2b405a8ea46668dfca2b08431aaae593 Mon Sep 17 00:00:00 2001 From: Akarsh Chaudhary Date: Thu, 20 Nov 2025 17:41:18 +0000 Subject: [PATCH 1/4] Upgrade:perl-FFI-CheckLib to version 0.31 --- .../perl-FFI-CheckLib.signatures.json | 2 +- .../perl-FFI-CheckLib/perl-FFI-CheckLib.spec | 102 ++++++++++++++---- cgmanifest.json | 4 +- 3 files changed, 83 insertions(+), 25 deletions(-) diff --git a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.signatures.json b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.signatures.json index abd85ecad0a..b5218b048cc 100644 --- a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.signatures.json +++ b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.signatures.json @@ -1,5 +1,5 @@ { "Signatures": { - "perl-FFI-CheckLib-0.26.tar.gz": "06e33bf0807f841626248197e8f39475ac50d1364a0336836c9b581d19a97f65" + "perl-FFI-CheckLib-0.31.tar.gz": "04d885fc377d44896e5ea1c4ec310f979bb04f2f18658a7e7a4d509f7e80bb80" } } diff --git a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec index 206eb83c520..49fb8720269 100644 --- a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec +++ b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec @@ -1,20 +1,22 @@ +Vendor: Microsoft Corporation +Distribution: Azure Linux # Run optional test %{bcond_without perl_FFI_Changes_enables_optional_test} - + Name: perl-FFI-CheckLib -Version: 0.26 -Release: 3%{?dist} +Version: 0.31 +Release: 1%{?dist} Summary: Check that a library is available for FFI -License: GPL+ or Artistic -Vendor: Microsoft Corporation -Distribution: Azure Linux +License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/FFI-CheckLib Source0: https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-%{version}.tar.gz#/perl-FFI-CheckLib-%{version}.tar.gz BuildArch: noarch +BuildRequires: coreutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(:VERSION) >= 5.6 +BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) BuildRequires: perl(warnings) @@ -22,16 +24,21 @@ BuildRequires: perl(warnings) BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(DynaLoader) +BuildRequires: perl(Env) BuildRequires: perl(Exporter) +BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec) +# File::Which is used from private functions which are only called on Darwin. +BuildRequires: perl(List::Util) >= 1.33 # Tests: -BuildRequires: perl(Config) +# File::Which is a run-time dependency on Darwin only. The code is exhibited by a test, +# but never on Linux in production. +BuildRequires: perl(File::Which) BuildRequires: perl(lib) BuildRequires: perl(Test2::API) >= 1.302015 -BuildRequires: perl(Test2::Mock) -BuildRequires: perl(Test2::Require::EnvVar) >= 0.000060 -BuildRequires: perl(Test2::Require::Module) >= 0.000060 -BuildRequires: perl(Test2::V0) >= 0.000060 +BuildRequires: perl(Test2::Require::EnvVar) >= 0.000121 +BuildRequires: perl(Test2::Require::Module) >= 0.000121 +BuildRequires: perl(Test2::V0) >= 0.000121 %if %{with perl_FFI_Changes_enables_optional_test} # Optional tests: BuildRequires: perl(Env) @@ -39,9 +46,16 @@ BuildRequires: perl(Test::Exit) # Test/More.pl is not helpful # FFI::Platypus not used %endif -Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(DynaLoader) - +Requires: perl(File::Basename) + +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Test2::API|Test2::Require::EnvVar|Test2::Require::Module|Test2::V0)\\)$ + +# Remove private modules +%global __requires_exclude %{__requires_exclude}|^perl\\((Test2::Plugin::FauxOS|Test2::Tools::FauxDynaLoader|Test2::Tools::NoteStderr)\\) +%global __provides_exclude %{?__provides_exclude:%{__provides_exclude}|}^perl\\((Alien::libbar|Test2::Plugin::FauxOS|Test2::Tools::FauxDynaLoader|Test2::Tools::NoteStderr)\\) + %description This Perl module checks whether a particular dynamic library is available for Foreign Function Interface (FFI) to use. It is modeled heavily on @@ -49,29 +63,73 @@ Devel::CheckLib, but will find dynamic libraries even when development packages are not installed. It also provides a find_lib function that will return the full path to the found dynamic library, which can be feed directly into FFI::Platypus or FFI::Raw. - + +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +# Tests: +# File::Which is a run-time dependency on Darwin only. The code is exhibited by a test, +# but never on Linux in production. +Requires: perl(File::Which) +Requires: perl(Test2::API) >= 1.302015 +Requires: perl(Test2::Require::EnvVar) >= 0.000121 +Requires: perl(Test2::Require::Module) >= 0.000121 +Requires: perl(Test2::V0) >= 0.000121 + +%description tests +Tests from %{name}. Execute them +with "%{_libexecdir}/%{name}/test". + %prep %setup -q -n FFI-CheckLib-%{version} - +%if !%{with perl_FFI_Changes_enables_optional_test} +rm t/ffi_checklib__exit.t +perl -i -ne 'print $_ unless m{\A\Qt/ffi_checklib__exit.t\E\b}' MANIFEST +%endif +# Help generators to recognize Perl scripts +for F in t/*.t; do + perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" + chmod +x "$F" +done + %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} - + %install %{make_install} -%{_fixperms} $RPM_BUILD_ROOT/* - +%{_fixperms} %{buildroot}/* +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a corpus t %{buildroot}%{_libexecdir}/%{name} +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +unset CIPSOMETHING FFI_CHECKLIB_PATH +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test + %check -unset EXTRA_CI +unset CIPSOMETHING FFI_CHECKLIB_PATH +export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test - + %files %license LICENSE %doc Changes README -%{perl_vendorlib}/* -%{_mandir}/man3/* +%dir %{perl_vendorlib}/FFI +%{perl_vendorlib}/FFI/CheckLib.pm +%{_mandir}/man3/FFI::CheckLib.* + +%files tests +%{_libexecdir}/%{name} %changelog +* Thu Nov 20 2025 Akarsh Chaudhary - 0.31-1 +- Upgrade to version 0.31 (license: MIT). +- License verified + * Fri Oct 15 2021 Pawel Winogrodzki - 0.26-3 - Initial CBL-Mariner import from Fedora 32 (license: MIT). diff --git a/cgmanifest.json b/cgmanifest.json index 674c95a0ba4..e37e25de2a2 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -17583,8 +17583,8 @@ "type": "other", "other": { "name": "perl-FFI-CheckLib", - "version": "0.26", - "downloadUrl": "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-0.26.tar.gz" + "version": "0.31", + "downloadUrl": "https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/FFI-CheckLib-0.31.tar.gz" } } }, From e2495dcae09613bdaf0379d65d8410f08fddc8a5 Mon Sep 17 00:00:00 2001 From: Akarsh Chaudhary Date: Wed, 3 Dec 2025 05:40:07 +0000 Subject: [PATCH 2/4] Removing test package publishing. --- .../perl-FFI-CheckLib/perl-FFI-CheckLib.spec | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec index 49fb8720269..9e603109238 100644 --- a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec +++ b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec @@ -63,23 +63,16 @@ Devel::CheckLib, but will find dynamic libraries even when development packages are not installed. It also provides a find_lib function that will return the full path to the found dynamic library, which can be feed directly into FFI::Platypus or FFI::Raw. - + +%if %{with tests} %package tests -Summary: Tests for %{name} -Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} -Requires: perl-Test-Harness -# Tests: -# File::Which is a run-time dependency on Darwin only. The code is exhibited by a test, -# but never on Linux in production. -Requires: perl(File::Which) -Requires: perl(Test2::API) >= 1.302015 -Requires: perl(Test2::Require::EnvVar) >= 0.000121 -Requires: perl(Test2::Require::Module) >= 0.000121 -Requires: perl(Test2::V0) >= 0.000121 - +Summary: Tests for %{name} +Requires: %{name} = %{version}-%{release} + %description tests Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". +%endif %prep %setup -q -n FFI-CheckLib-%{version} @@ -121,10 +114,9 @@ make test %dir %{perl_vendorlib}/FFI %{perl_vendorlib}/FFI/CheckLib.pm %{_mandir}/man3/FFI::CheckLib.* - -%files tests %{_libexecdir}/%{name} + %changelog * Thu Nov 20 2025 Akarsh Chaudhary - 0.31-1 - Upgrade to version 0.31 (license: MIT). From d77e5e97c67c71dbc74b57ac03711d4ea8c12d86 Mon Sep 17 00:00:00 2001 From: Akarsh Chaudhary Date: Wed, 3 Dec 2025 06:12:20 +0000 Subject: [PATCH 3/4] Udating test package. --- .../perl-FFI-CheckLib/perl-FFI-CheckLib.spec | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec index 9e603109238..5974bb9c638 100644 --- a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec +++ b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec @@ -66,9 +66,18 @@ into FFI::Platypus or FFI::Raw. %if %{with tests} %package tests -Summary: Tests for %{name} -Requires: %{name} = %{version}-%{release} - +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +# Tests: +# File::Which is a run-time dependency on Darwin only. The code is exhibited by a test, +# but never on Linux in production. +Requires: perl(File::Which) +Requires: perl(Test2::API) >= 1.302015 +Requires: perl(Test2::Require::EnvVar) >= 0.000121 +Requires: perl(Test2::Require::Module) >= 0.000121 +Requires: perl(Test2::V0) >= 0.000121 + %description tests Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". From d0b8b59420ae990cb88096c6604ad0f584976d9c Mon Sep 17 00:00:00 2001 From: AkarshHCL Date: Wed, 3 Dec 2025 11:47:14 +0530 Subject: [PATCH 4/4] Remove unnecessary blank lines in spec file --- SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec index 5974bb9c638..eb3f38305a0 100644 --- a/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec +++ b/SPECS-EXTENDED/perl-FFI-CheckLib/perl-FFI-CheckLib.spec @@ -2,7 +2,7 @@ Vendor: Microsoft Corporation Distribution: Azure Linux # Run optional test %{bcond_without perl_FFI_Changes_enables_optional_test} - + Name: perl-FFI-CheckLib Version: 0.31 Release: 1%{?dist} @@ -98,7 +98,7 @@ done %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} - + %install %{make_install} %{_fixperms} %{buildroot}/* @@ -116,7 +116,7 @@ chmod +x %{buildroot}%{_libexecdir}/%{name}/test unset CIPSOMETHING FFI_CHECKLIB_PATH export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test - + %files %license LICENSE %doc Changes README