When bootstrapping perl, rpmbuild warns on building perl.spec: Processing files: perl-interpreter-5.40.0-512.fc42.x86_64 warning: Ignoring invalid regex .*/usr/share/doc|.*%{perl_archlib}/.*\.pl$|.*%{perl_privlib}/.*\.pl$ Provides: perl-interpreter = 4:5.40.0-512.fc42 perl-interpreter(x86-64) = 4:5.40.0-512.fc42 The cause is that perl_archlib and perl_privlib macros are undefined because perl-macros package does not exist until perl.spec is built. The macros are used at line 16 of perl.spec: %global __provides_exclude_from .*%{_docdir}|.*%{perl_archlib}/.*\\.pl$|.*%{perl_privlib}/.*\\.pl$
It has been happening since perl.spec using pregenerated dependencies on bootstrapping [1] instead of perl-generators, which requires perl-macros. It was done as one of changes related to 'Removing Perl from Build Root' [2] [1] https://src.fedoraproject.org/rpms/perl/c/c1d0a9658155c0f512faad7b54e20e00f3d682e3 [2] https://fedoraproject.org/wiki/Changes/Build_Root_Without_Perl
There are two way how to solve it 1) Check if %{perl_archlib} is defined. If not then it means that perl-macros and perl-generators are not installed. In that case, no Perl dependencies will be generated. So we can set %__provides_exclude_from only to .*%{_docdir} 2) When %perl_bootstrap is defined, set %__provides_exclude_from only to .*%{_docdir}. It could cause issue describe in BZ#924938 when somebody rebuild perl on system with installed perl-generators. For me, the first option is better.
Or there is a third way: 3) Use %{privlib} and %{archlib} macros in the definition of __provides_exclude_from. That would require more shuffling in the spec because the macros are defined later. From your two options, the first one seems better.
commit 1b8ff5b6041c5465a6c0c0b15dfd91223d447966 (HEAD -> rawhide, origin/rawhide, origin/main, origin/f41, origin/HEAD, f41) Author: Jitka Plesnikova <jplesnik> Date: Tue Oct 8 14:25:46 2024 +0200 Use Perl specific macros when they are defined When bootstrapping perl, the perl_archlib and perl_privlib macros are undefined because perl-macros package does not exist. Resolves: rhzb#2316067