public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug debuginfod/25583] New: Use libarchive to extract packages?
@ 2020-02-21 11:08 ross at burtonini dot com
  2020-02-22  0:57 ` [Bug debuginfod/25583] " fche at redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ross at burtonini dot com @ 2020-02-21 11:08 UTC (permalink / raw)
  To: elfutils-devel

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-26 19:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-21 11:08 [Bug debuginfod/25583] New: Use libarchive to extract packages? ross at burtonini dot com
2020-02-22  0:57 ` [Bug debuginfod/25583] " fche at redhat dot com
2020-02-25 12:12 ` mark at klomp dot org
2020-02-25 15:21 ` fche at redhat dot com
2020-02-25 19:31 ` fche at redhat dot com
2020-03-03  8:51 ` [Bug debuginfod/25583] Use libarchive to extract .deb packages? mark at klomp dot org
2020-03-03 11:25 ` fche at redhat dot com
2020-03-23 15:19 ` fche at redhat dot com
2020-03-25 14:58 ` fche at redhat dot com
2020-03-26 19:52 ` fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).