[Bug 507326] [NEW] alien crashes when trying to convert an RPM containing %ghost files
Launchpad Bug Tracker
507326 at bugs.launchpad.net
Wed Jul 14 07:49:25 BST 2010
You have been subscribed to a public bug by Martin Pitt (pitti):
Binary package hint: alien
When trying to convert any RPM that contains one or more files marked (in the RPM specfile) with %ghost, alien fails with a message similar to
chown: cannot access 'foo/bar': No such file or directory
failed chowning bar to 0:0: Illegal seek at /usr/share/perl5/Alien/Package/Rpm.pm line 265, <GETPERMS> line 1.
where 'foo' is the name of the RPM package and 'bar' the pathname of the
first file marked with %ghost. (I would expect instead that alien would
complete with no errors, and generate a .deb file corresponding to the
input .rpm.)
This occurs in:
Ubuntu release: 9.10 (32-bit, although I expect the problem to occur on all archs)
Package version: alien 8.78
To demonstrate, build a test RPM using the attached spec file,
ghost.spec. (rpmbuild -ba ghost.spec; generates ghost-1.0-1.noarch.rpm).
This RPM contains two files - a "real" file /etc/real and a "ghost" file
/etc/ghost.
Next, attempt to convert to .deb with
$ fakeroot alien ghost-1.0-1.noarch.rpm
This fails with
chown: cannot access 'ghost-1.0//etc/ghost': No such file or directory
failed chowning /etc/ghost to 0:0: Illegal seek at /usr/share/perl5/Alien/Package/Rpm.pm line 265, <GETPERMS> line 1.
The failure occurs because alien, after unpacking the cpio archive
containing the actual file contents, attempts to set the permissions and
ownership on each file using information in the RPM header. %ghost files
are not installed by RPM, so are in the RPM header but not the cpio
archive, and so any attempt to chown/chmod these files will fail.
The attached patch (alien-ghost.patch) modifies Rpm.pm to check each
file for existence before chown/chmod, and resolves the issue for me.
** Affects: alien (Ubuntu)
Importance: Undecided
Status: Fix Released
--
alien crashes when trying to convert an RPM containing %ghost files
https://bugs.edge.launchpad.net/bugs/507326
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is a direct subscriber.
More information about the Ubuntu-sponsors
mailing list