alien crashes when trying to convert an RPM containing %ghost files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
alien (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
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/
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.
Next, attempt to convert to .deb with
$ fakeroot alien ghost-1.
This fails with
chown: cannot access 'ghost-
failed chowning /etc/ghost to 0:0: Illegal seek at /usr/share/
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.
Related branches
tags: | added: patch-accepted-debian |
Changed in alien (Ubuntu Lucid): | |
assignee: | nobody → Andrew Starr-Bochicchio (andrewsomething) |
Changed in alien (Ubuntu Lucid): | |
assignee: | Andrew Starr-Bochicchio (andrewsomething) → nobody |
tags: |
added: verification-done removed: verification-needed |
Excellent - this solves the issue I have with using alien on some SLES 11 kernels.
The patch worked a treat. I haven't tested extensively, but it at least works on the kernel-xen-base package at ftp://ftp. suse.com/ pub/projects/ kernel/ kotd/SLE11_ BRANCH/ for x64.