public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "ross at burtonini dot com" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug debuginfod/25583] New: Use libarchive to extract packages?
Date: Fri, 21 Feb 2020 11:08:00 -0000	[thread overview]
Message-ID: <bug-25583-10460@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2020-02-21 11:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-21 11:08 ross at burtonini dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-25583-10460@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).