Bug 13475 - New post-processing in rpm: strip perl version from shebang
Summary: New post-processing in rpm: strip perl version from shebang
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Thierry Vignaud
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-03 11:02 CEST by Jerome Quelin
Modified: 2016-01-06 10:24 CET (History)
0 users

See Also:
Source RPM: rpm-mageia-setup, spec-helper
CVE:
Status comment:


Attachments

Description Jerome Quelin 2014-06-03 11:02:31 CEST
Some perl packages are installing scripts in /usr/bin, with a shebang line so that kernel knows how to interpret them.

Sometimes, the installed shebang is including the perl version, such as:

    #!/usr/bin/perl5.18.2

I propose that we add a new post-processing step in rpm to strip such perl version from the shebang line, to get back to:

    #!/usr/bin/perl

This would prevent the rebuilding of perl modules shipping scripts with wrong shebangs when updating perl.

It could be as simple as:
for f in $(ls $buildroot/usr/bin/*); do
  perl -pi -E '$.==1 && s{^(#!/usr/bin/perl).*$}{$1}' $f
done

thanks.

Reproducible: 

Steps to Reproduce:
Comment 1 Thierry Vignaud 2014-06-03 15:08:38 CEST
Why not fix perl packages instead?
I've fixed some perl module once that introduced it.
I don't remember which one but that should be easy to find out (beginning with perl-Module/Build*)
Thierry Vignaud 2014-06-03 15:09:35 CEST

Source RPM: rpm => rpm-mageia-setup

Samuel Verschelde 2015-05-19 19:06:38 CEST

Severity: normal => enhancement

Thierry Vignaud 2016-01-06 10:24:05 CET

Source RPM: rpm-mageia-setup => rpm-mageia-setup, spec-helper


Note You need to log in before you can comment on or make changes to this bug.