From 374bc41060a47dabaf7e76ef469d4d9e880d865f Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sat, 27 Feb 2021 21:01:37 +0100 Subject: [PATCH] - set $0 for scripts executed by runperl (fixes perl.prov functionality) --- perl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl.spec b/perl.spec index 4a5dd55..c5d9279 100644 --- a/perl.spec +++ b/perl.spec @@ -730,7 +730,7 @@ cat > runperl <<'EOF' # Note: you cant use runperl -MXYZ because BEGIN is executed after -M LD_PRELOAD="%{_builddir}/%{name}-%{ver}/libperl.so.%{abi}" \ PERL5LIB="%{buildroot}%{perl_privlib}:%{buildroot}%{perl_archlib}" \ -exec %{buildroot}%{_bindir}/perl -e 'BEGIN { @INC = ("%{buildroot}%{perl_privlib}", "%{buildroot}%{perl_archlib}"); }; if (@ARGV > 0) { do(shift(@ARGV)) or die "Error attempting to execute script: $@\n"; } ' \ +exec %{buildroot}%{_bindir}/perl -e 'BEGIN { @INC = ("%{buildroot}%{perl_privlib}", "%{buildroot}%{perl_archlib}"); }; if (@ARGV > 0) { my $script=shift(@ARGV); $0=$script; do($script) or die "Error attempting to execute script: $@\n"; } ' \ ${1:+"$@"} EOF chmod a+x runperl -- 2.44.0