public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jitka Plesnikova <jplesnik@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/perl-rpm-build-perl] rawhide: Support 'package NAME VERSION;' syntax in perl.prov
Date: Mon, 15 Jun 2026 13:15:00 GMT [thread overview]
Message-ID: <178152930034.1.8972360288881345232.rpms-perl-rpm-build-perl-73e5cdd7ef94@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-rpm-build-perl
Branch : rawhide
Commit : 73e5cdd7ef940c71cbeed8751253ce9a87a84d60
Author : Jitka Plesnikova <jplesnik@redhat.com>
Date : 2026-06-15T09:07:59+02:00
Stats : +67/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/perl-rpm-build-perl/c/73e5cdd7ef940c71cbeed8751253ce9a87a84d60?branch=rawhide
Log:
Support 'package NAME VERSION;' syntax in perl.prov
Update patch based on the comment
---
diff --git a/perl-rpm-build-perl.spec b/perl-rpm-build-perl.spec
index 2b09577..52e71f4 100644
--- a/perl-rpm-build-perl.spec
+++ b/perl-rpm-build-perl.spec
@@ -1,6 +1,6 @@
Name: perl-rpm-build-perl
Version: 0.82
-Release: 51%{?dist}
+Release: 52%{?dist}
# ConstOptree/ConstOptree.pm: GPL-2.0-or-later
# lib/B/Clobbers.pm: GPL-2.0-or-later
# lib/B/PerlReq.pm: GPL-2.0-or-later
@@ -27,6 +27,8 @@ Patch2: rpm-build-perl-0.82-Port-to-OpSIBLING-like-macros-required-since-Per
Patch3: rpm-build-perl-0.82-Adapt-tests-to-Perl-5.35.12.patch
# Perl 5.38 compatibility, bug #2222640, CPAN RT#148982
Patch4: rpm-build-perl-0.82-Adjust-to-Perl-5.38.0.patch
+# Support "package NAME VERSION;" syntax in perl.prov, CPAN RT#178747
+Patch5: rpm-build-perl-0.82-Support-package-NAME-VERSION-syntax-in-perl.prov.patch
BuildRequires: coreutils
BuildRequires: gcc
BuildRequires: make
@@ -190,6 +192,9 @@ make test
%{_libexecdir}/%{name}
%changelog
+* Thu Jun 11 2026 Jitka Plesnikova <jplesnik@redhat.com> - 0.82-52
+- Support "package NAME VERSION;" syntax in perl.prov
+
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.82-51
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
diff --git a/rpm-build-perl-0.82-Support-package-NAME-VERSION-syntax-in-perl.prov.patch b/rpm-build-perl-0.82-Support-package-NAME-VERSION-syntax-in-perl.prov.patch
new file mode 100644
index 0000000..9710a36
--- /dev/null
+++ b/rpm-build-perl-0.82-Support-package-NAME-VERSION-syntax-in-perl.prov.patch
@@ -0,0 +1,61 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jitka=20Plesn=C3=ADkov=C3=A1?= <jplesnik@redhat.com>
+Date: Thu, 11 Jun 2025 12:00:00 +0200
+Subject: [PATCH] Support "package NAME VERSION" syntax in perl.prov
+
+Perl 5.12 introduced the "package NAME VERSION;" syntax as an
+alternative to the traditional "$VERSION = ..." assignment. Upstream
+perl commit 4f8316fa3a ("Modernize attributes.pm for v5.40") converted
+ext/attributes/attributes.pm to use this syntax, removing the explicit
+"$VERSION" assignment. This caused perl.prov to output
+"perl(attributes.pm)" without a version, failing the t/03-perlprov.t
+test.
+
+Extend the package declaration regex to optionally capture a version
+from "package NAME VERSION;" and record it as the module's provided
+version.
+
+Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
+---
+ perl.prov | 17 +++++++++++++----
+ 1 file changed, 13 insertions(+), 4 deletions(-)
+
+--- a/perl.prov 2026-06-15 08:10:32.393857387 +0200
++++ perl.prov 2026-06-15 08:11:08.271242411 +0200
+@@ -55,6 +55,7 @@ sub process_file {
+ }
+ my $cur_pkg = my $pkg0 = "main"; my $pkg1;
+ my $re_pkg = qr/\b\w+(?:::\w+)*/;
++ my $re_ver = qr/v?[0-9][0-9._]*/;
+ open my $fh, $fname or die "$0: $fname: $!\n";
+ local $_;
+ while (<$fh>) {
+@@ -63,14 +64,22 @@ sub process_file {
+ next if /^=\w/ .. (/^=cut/ or eof);
+ last if /^__(DATA|END)__\b/;
+ s/\s+#\s.*//; # strip comments
+- if (/^(\s*\{?\s*)package\s+($re_pkg)\s*;/) {
+- if ($1) {
++ if (/^(\s*\{?\s*)package\s+($re_pkg)(?:\s+($re_ver))?\s*;/) {
++ my ($indent, $pkgname, $pkgver) = ($1, $2, $3);
++ if (defined $pkgver && mod2path($pkgname) eq $basename) {
++ my $v = verf($pkgver);
++ if ($v) {
++ $prov{$basename}{ver}{$v} = 1;
++ warn "# VERSION $v (from package line) at $fname line $.\n" if $Verbose;
++ }
++ }
++ if ($indent) {
+ # block package
+- $cur_pkg = $pkg1 = $2;
++ $cur_pkg = $pkg1 = $pkgname;
+ }
+ else {
+ # toplevel package
+- $cur_pkg = $pkg0 = $2;
++ $cur_pkg = $pkg0 = $pkgname;
+ undef $pkg1;
+ }
+ warn "# package $cur_pkg at $fname line $.\n" if $Verbose > 1;
+--
+2.49.0
reply other threads:[~2026-06-15 13:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178152930034.1.8972360288881345232.rpms-perl-rpm-build-perl-73e5cdd7ef94@fedoraproject.org \
--to=jplesnik@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox