Bug 1054638
Summary: | Extracting single files does not work | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Fabian Deutsch <fdeutsch> |
Component: | cpio | Assignee: | Ondrej Vasik <ovasik> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | kdudka, ovasik, praiskup |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-01-17 07:51:38 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Fabian Deutsch
2014-01-17 07:34:17 UTC
It seems to work if I append a leading "." to the path to be extracted: $ rpm2cpio http://ovirt.org/releases/ovirt-release-el.noarch.rpm | cpio --to-stdout -iv ./etc/yum.repos.d/glusterfs-epel.repo # Place this file in your /etc/yum.repos.d/ directory [glusterfs-epel] name=GlusterFS is a clustered file-system capable of scaling to several petabytes. baseurl=http://download.gluster.org/pub/gluster/glusterfs/LATEST/EPEL.repo/epel-$releasever/$basearch/ .... It could be the correct behavior (as rpmls also showed the leading dot) Thanks for the report. That is most probably problem in rpmls. Try the rpm2cpio (or extract the CONTENTS.cpio other way) and then try to look for the archive contents. E.g. cat CONTENTS.cpio | cpio -t That shows you that the files are not stored absolutely inside. Ok, I missed the point what is exactly a problem because we have probably a little bit different rpmls versions (my is not showing leading dot): $ rpmls ovirt-release-el.noarch.rpm -rw-r--r-- /etc/yum.repos.d/el6-ovirt.repo -rw-r--r-- /etc/yum.repos.d/glusterfs-epel.repo drwxr-xr-x /usr/share/doc/ovirt-release-el6-10 -rw-r--r-- /usr/share/doc/ovirt-release-el6-10/ASL But the content is: $ rpm2cpio ovirt-release-el.noarch.rpm | cpio -t ./etc/yum.repos.d/el6-ovirt.repo ./etc/yum.repos.d/glusterfs-epel.repo ./usr/share/doc/ovirt-release-el6-10 ./usr/share/doc/ovirt-release-el6-10/ASL --- You want to make the './xx' be equivalent of 'xx' (in both archive contents and parameters). So far, all archivers I am aware of distinguish between those patterns inside archive. Just libarchive (bsdtar) takes those patterns in arguments equivalently (but usual case is to compare verbatim): $ bsdtar -cf a.tar a ./a $ bsdtar -tf a.tar a/ a/b/ a/b/c ./a/ ./a/b/ ./a/b/c $ bsdtar -tf a.tar a/b/c a/b/c ./a/b/c $ bsdtar -tf a.tar ./a/b/c a/b/c ./a/b/c But, for GNU cpio (same upstream as GNU tar), this is imo NOTABUG. Verbatim comparison was always there. And in GNU tar that is also documented as wanted (2.7 How to List Archives). But I'll rather ask upstream. Pavel |