Alien does not always get permissions right in RPM to DEB

Bug #525561 reported by Duane Waddle
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
alien (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: alien

I am using alien version 8.73 on Ubuntu Jaunty. A particular RPM I was trying to convert had some non-root suid/sgid binaries - these permissions were not being preserved in the alien-produced .deb package. The alien postinst script was setting the ownership correctly, but not the permissions. I think I found an operator precedence bug in /usr/share/perl5/Alien/Package/Rpm.pm, line 258:

if (defined($owninfo{$file}) && ($mode & 07000 > 0)) {

This line should read as:

if (defined($owninfo{$file}) && (($mode & 07000) > 0)) {

The precedence of ">" above "&" appears to have the effect of the owninfo hash only being updated on files with world-execute set.

Patch is attached

Revision history for this message
Duane Waddle (duane-waddle) wrote :
tags: added: patch
Revision history for this message
Anzenketh (anzenketh) wrote :

Thanks for reporting this bug and any supporting documentation. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in alien (Ubuntu):
status: New → Confirmed
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Thank you for helping make Ubuntu better.

Can you please provide a sample rpm which has this problem? I couldn't find a valid candidate as a test case for this problem. Thanks.

tags: added: patch-needswork
removed: patch
Changed in alien (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Duane Waddle (duane-waddle) wrote :

Hi Dmitrijs - The only example I have is a piece of commercial software, IBM WebSphere MQ 7.0.1. The RPM I was trying to work on was MQSeriesServer-7.0.1-0.i386.rpm. It is far from a simple testcase however.

I think you can download a copy from http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2009-08-28+03:34:46.648052R&S_TACT=104CBW71&S_CMP=%20wmqtrk

I can understand if you don't want to fool with this particular RPM. If necessary, I will make up a simplified testcase based on the WebSphere RPM. Please advise.

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 525561] Re: Alien does not always get permissions right in RPM to DEB

>
> I can understand if you don't want to fool with this particular RPM.  If
> necessary, I will make up a simplified testcase based on the WebSphere
> RPM.  Please advise.
>

Nah, I'm fine =) I will fool around with it. Thanks a lot.

Revision history for this message
Andrew Starr-Bochicchio (andrewsomething) wrote :

Fixed in Maverick:

alien (8.81) unstable; urgency=low

   * Avoid uninitialized value warning when debian/rules fails to run
     due to alien being run in a noexec directory. Closes: #579216
   * Prevent DESTROY stomping on alien's exit code sometimes.
   * Support extracting lzma compressed RPMs.
     (Patch by unnamed person on some bug tracking system I don't frequent.)
   * Suggest lzma. If not installed, alien will still fail to decompress
     RPMs using it, but will support most rpms, which are not.
   * Fix precedence problem that prevented alien from preserving permissions
     of suid/sgid binaries that are not owned by root.
     (Patch by Duane Waddle, on a bug tracking system I don't frequent, that
     was about the "expire" it 4 days from now. We got lucky Duane, but please
     use the Debian BTS next time!)
   * Support RPMs containing ghost files.
     (Patch by Ben Webb, who would get his patches applied quicker if he
     actually communicated them to the program's author.)

 -- Joey Hess <email address hidden> Mon, 17 May 2010 20:56:59 -0400

Changed in alien (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.