Bug 4625

Summary: /usr/bin/mimetype: /usr/bin/perl5.12.2: bad interpreter: No such file or directory
Product: Mageia Reporter: Stephen Liberty <stephen>
Component: RPM PackagesAssignee: QA Team <qa-bugs>
Status: RESOLVED FIXED QA Contact: Jerome Quelin <jquelin>
Severity: normal    
Priority: Normal CC: davidwhodgins, jquelin, sysadmin-bugs, tmb
Version: 1Keywords: validated_update
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: perl-File-MimeInfo CVE:
Status comment:

Description Stephen Liberty 2012-02-22 04:34:52 CET
Description of problem:
It looks like mimetype/mimeopen haven't been updated to use perl5.12.3 and perl5.12.2 isn't available to download via package manager.

Version-Release number of selected component (if applicable):
0.150

How reproducible:
Have mageia completely up to date, with perl installed (which I think it is by default)

Steps to Reproduce:
1. run /usr/bin/mimetype
2. run /usr/bin/mimeopen

Both will report back an error of:
/usr/bin/mimetype: /usr/bin/perl5.12.2: bad interpreter: No such file or directory
Comment 1 Dave Hodgins 2012-02-22 05:09:53 CET
I've just tested and just changing the first line from
/usr/bin/perl5.12.2
to
/usr/bin/perl
works for both, so it doesn't seem that they need version
specific shebang names.

CC: (none) => davidwhodgins

Thierry Vignaud 2012-02-22 09:43:21 CET

QA Contact: (none) => jquelin
Source RPM: (none) => perl-File-MimeInfo

Comment 2 Jerome Quelin 2012-02-22 10:21:46 CET
actually, this kind of problem (wrong perl in shebang line) can be fixed by just rebuilding the package.

perl-File-MimeInfo-0.150.0-3.1.mga1 is on its way to updates_testing, please test & move to updates.
Comment 3 Dave Hodgins 2012-02-22 20:12:09 CET
I wonder if it would be bettor to change the shebang to /usr/bin/perl,
without the version number.

Otherwise the package will have to be rebuilt just for the version
change, for 5.12.4 or whatever the next version is, and could
easily be missed again.

Also, please assign to qa when ready for final testing.
Comment 4 Stephen Liberty 2012-02-22 20:28:31 CET
I did a quick grep on /usr/bin, and '/usr/bin/config_data' will suffer from the same problem if not kept up to date on the next perl release, as it is specifically referencing /usr/bin/perl5.12.3

I'd be with Dave on just having it reference perl. IMHO this method of specifying versions in the shebang smells a little like the old 'dll hell'.
Comment 5 Jerome Quelin 2012-02-23 18:03:46 CET
unfortunately, it's not possible to change it. well, it should be possible, but i'm not the one deciding whether to stuff a perl or perl5.x.y shebang line: it's perl and eumm/mb that automatically change the shebang line when installing the scripts, but i don't know exactly when one is used or the other. perl5 porters aren't so sure either (i already asked there).

so now i have a script that is checking packages in need of a rebuild when i update perl. this script was written after mageia 1 release, hence some glitches.

maybe updating rpm/rpmbuild to automatically fix shebang... but i'm not really comfortable with that. i'll check with sysadmins what can be done.


i just pushed perl-Module-Build-0.380.0-1.1.mga1 in core/updates_testing for mga1

==> qa, please test following pkgs:
- perl-File-MimeInfo-0.150.0-3.1.mga1 (/usr/bin/mimetype)
- perl-Module-Build-0.380.0-1.1.mga1 (/usr/bin/config_data)

CC: (none) => jquelin
Assignee: bugsquad => qa-bugs

Comment 6 Dave Hodgins 2012-02-24 01:23:06 CET
Testing complete on i586.  As these are noarch packages, I'll
go ahead and validate the update.

Could someone from the sysadmin team push the srpms
perl-Module-Build-0.380.0-1.1.mga1.src.rpm
perl-File-MimeInfo-0.150.0-3.1.mga1.src.rpm
from Core Updates Testing to Core Updates.

Advisory:  These bugfix updates for perl-File-MimeInfo and
perl-Module-Build corrects the shabang paths in the mimetype,
mimeopen, and config_data scripts.

https://bugs.mageia.org/show_bug.cgi?id=4625

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 7 Thomas Backlund 2012-02-24 21:48:09 CET
update pushed

Status: NEW => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED