Bug 1321335 - rpm2cpio does not provide all rpm package content
Summary: rpm2cpio does not provide all rpm package content
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-25 15:44 UTC by billiboy
Modified: 2016-03-25 18:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-25 17:13:51 UTC
Type: Bug


Attachments (Terms of Use)

Description billiboy 2016-03-25 15:44:10 UTC
Description of problem:

rpm2cpio does not provide all rpm package content

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

How reproducible:

always with kernel-core-*.rpm

Steps to Reproduce:

check package content
e.g. "rpm -qlp kernel-core-4.6.0-0.rc0.git25.1.fc25.armv7hl.rpm"
the output will list content for "boot", "lib" and "usr" directory
extract content with rpm2cpio
e.g. "rpm2cpio kernel-core-4.6.0-0.rc0.git25.1.fc25.armv7hl.rpm > kernel-core-4.6.0-0.rc0.git25.1.fc25.armv7hl.cpio"

Actual results:

The *.cpio is missing the "boot" directory
No way to access e.g /boot/initramfs-4.6.0-0.rc0.git25.1.fc25.armv7hl.img

Expected results:

The *.cpio will contain "boot", "lib" and "usr" directory with all content for access

Additional info:

"rpm2cpio kernel-core-4.6.0-0.rc0.git25.1.fc25.armv7hl.rpm | cpio -dium" will also left out "boot" directory
rpm2archive is missing "boot" directory also in the *.tgz

Comment 1 Yanko Kaneti 2016-03-25 17:13:51 UTC
Everything under /boot is a %ghost file http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-GHOST-DIRECTIVE
, its created at the moment the kernel package is actually installed, as in current fedora by the kernel-install script.

Specifically
/boot/vmlinuz-XXX is a copy of /lib/modules/XXX/vmlinuz
/boot/config-XXX is a copy of /lib/modules/XXX/config
/boot/System.map-XXX is a copy of /lib/modules/XXX/System.map
/boot/initramfs-XXX is the intrd thats created on each kernel install by dracut

Comment 2 billiboy 2016-03-25 18:28:05 UTC
Thank you for the clarification, I almost suspected something like this.
But from the provided link:
"There file touched in the %install stage will not be installed to /var/log/blather.log although it will be added to the rpm database, as we can see from querying the file, however it is not visible from a package listing, but as it is owned by the package it will be removed when the package is removed."
it should not be listed by "rpm -ql". This was what confused me in the first place assuming rpm2cpio has left out something. Maybe not listing the files as stated or mark the %ghost files as such in the listing may prevent someone else struggle about this, but solved for me.


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