https://sourceware.org/bugzilla/show_bug.cgi?id=25583
Bug ID: 25583 Summary: Use libarchive to extract packages? Product: elfutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: debuginfod Assignee: unassigned at sourceware dot org Reporter: ross at burtonini dot com CC: elfutils-devel at sourceware dot org Target Milestone: --- Using rpm2cpio to extract an RPM isn't ideal because the machine serving the RPMs may not actually have that tool on. However, libarchive which is already a dependency can extract RPMs directly as demonstrated with the libarchive example tool bsdtar: $ bsdtar -tvf /home/ross/Yocto/openbmc/build/tmp/deploy/rpm/noarch/os-release-1.0-r0.noarch.rpm drwxr-xr-x 1 0 0 0 Nov 8 16:41 ./etc lrwxrwxrwx 1 0 0 21 Nov 8 16:41 ./etc/os-release -> ../usr/lib/os-release drwxr-xr-x 1 0 0 0 Nov 8 16:41 ./usr drwxr-xr-x 1 0 0 0 Nov 8 16:41 ./usr/lib -rw-r--r-- 1 0 0 287 Nov 8 16:41 ./usr/lib/os-release Ditto for debs, dpkg-deb may not be present but libarchive can unpack the outer and give you access to the internals: $ bsdtar -tvf /var/cache/apt/archives/gdb_8.2.1-2+b1_amd64.deb -rw-r--r-- 0 0 0 4 Aug 28 16:18 debian-binary -rw-r--r-- 0 0 0 3024 Aug 28 16:18 control.tar.xz -rw-r--r-- 0 0 0 3131068 Aug 28 16:18 data.tar.xz -- You are receiving this mail because: You are on the CC list for the bug.