[packages/perl-rpm-build-perl] - added Adjust-to-Perl-5.38.0 patch from Fedora; release 12

qboosh qboosh at pld-linux.org
Mon Jun 10 19:40:38 CEST 2024


commit 95d977dfc29cedebca51bbb6a306f012831a9105
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jun 10 19:21:35 2024 +0200

    - added Adjust-to-Perl-5.38.0 patch from Fedora; release 12

 perl-rpm-build-perl.spec                   |  5 ++-
 rpm-build-perl-Adjust-to-Perl-5.38.0.patch | 50 ++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+), 1 deletion(-)
---
diff --git a/perl-rpm-build-perl.spec b/perl-rpm-build-perl.spec
index af3acb9..127864f 100644
--- a/perl-rpm-build-perl.spec
+++ b/perl-rpm-build-perl.spec
@@ -8,7 +8,7 @@ Summary:	Calculate dependencies for Perl sources
 Summary(pl.UTF-8):	Znajdowanie zależności dla źródeł perlowych
 Name:		perl-rpm-build-perl
 Version:	0.82
-Release:	11
+Release:	12
 License:	GPL v2+
 Group:		Development/Languages/Perl
 Source0:	https://www.cpan.org/modules/by-authors/id/A/AT/ATOURBIN/%{pdir}-%{pnam}-%{version}.tar.gz
@@ -21,6 +21,8 @@ Patch1:		%{name}-non-deterministic-failures.patch
 Patch2:		rpm-build-perl-0.82-Port-to-OpSIBLING-like-macros-required-since-Perl-5..patch
 # CPAN RT#142772
 Patch3:		rpm-build-perl-Adapt-tests-to-Perl-5.35.12.patch
+# from Fedora, CPAN RT #148982
+Patch4:		rpm-build-perl-Adjust-to-Perl-5.38.0.patch
 URL:		https://metacpan.org/dist/rpm-build-perl
 BuildRequires:	perl-devel >= 1:5.8.0
 BuildRequires:	rpm-perlprov >= 4.1-13
@@ -43,6 +45,7 @@ Moduł ten znajduje zależności dla źródeł perlowych.
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %{__perl} Makefile.PL \
diff --git a/rpm-build-perl-Adjust-to-Perl-5.38.0.patch b/rpm-build-perl-Adjust-to-Perl-5.38.0.patch
new file mode 100644
index 0000000..33fdb40
--- /dev/null
+++ b/rpm-build-perl-Adjust-to-Perl-5.38.0.patch
@@ -0,0 +1,50 @@
+From e1342706be0f3e4926082f93bd25f8fa5358bc0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 1 Aug 2023 15:32:22 +0200
+Subject: [PATCH] Adjust to Perl 5.38.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Perl 5.38.0 simplified how annonymous subroutines are compiled
+<https://github.com/Perl/perl5/pull/20290>. As a result,
+t/01-B-PerlReq.t started to fail on hiding module loads from Try::Tiny
+try {} blocks:
+
+    $ prove -b t/01-B-PerlReq.t
+    t/01-B-PerlReq.t .. 9/?
+    #   Failed test at t/01-B-PerlReq.t line 93.
+    #          got: 'perl(Try/Tiny.pm)
+    # perl(Bar.pm)'
+    #     expected: 'perl(Try/Tiny.pm)
+    # perl(Foo.pm)
+    # perl(Bar.pm)'
+
+This patch adjusted to the simplified optree.
+
+CPAN RT #148982
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ lib/B/PerlReq.pm | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/B/PerlReq.pm b/lib/B/PerlReq.pm
+index 2e2a2ba..dbd837a 100644
+--- a/lib/B/PerlReq.pm
++++ b/lib/B/PerlReq.pm
+@@ -273,7 +273,10 @@ my %TryCV;
+ sub grok_try {
+ 	return unless $INC{"Try/Tiny.pm"};
+ 	my (undef, $op) = @_;
+-	if ($op->name eq "srefgen") {
++	if ($op->name eq "anoncode") {
++		# Since v5.38.0, PerlGH #20290
++	} elsif ($op->name eq "srefgen") {
++		# Before v5.38.0
+ 		$op = $op->first->first;
+ 	} elsif ($op->name eq "refgen") {
+ 		$op = $op->first->first->sibling;
+-- 
+2.41.0
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-rpm-build-perl.git/commitdiff/95d977dfc29cedebca51bbb6a306f012831a9105



More information about the pld-cvs-commit mailing list