]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
PR27413: use bsdtar to unpack deb-related formats
authorFrank Ch. Eigler <fche@redhat.com>
Sun, 14 Feb 2021 21:02:05 +0000 (16:02 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Wed, 17 Feb 2021 11:27:51 +0000 (06:27 -0500)
dpkg-deb has been reported to be fragile when running under
debuginfod, whereas bsdtar (libarchive) is happy with all these
flavors of files.  Switch to a bsdtar based pipeline, now
equipped with an escaped glob pattern that adapts to a variety
of interior data.tar* compression formats.

No testsuite impact.  .ipk format tested with some random openwrt and
kino-extension binaries found on the net.  Some of these are built
with out buildid, and hardly any with debuginfo, but whatever, bsdtar
and elfutils extract whatever info is there.

Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
debuginfod/ChangeLog
debuginfod/debuginfod.cxx

index 8de885223de327e21bc35602ca5a28bc5ad4e4ac..a66ded383a9f8b047ad9778173ea41c43b214093 100644 (file)
@@ -1,3 +1,8 @@
+2021-02-14  Frank Ch. Eigler <fche@redhat.com>
+
+       * debuginfod.cxx (main -U): Use bsdtar unconditionally.  Also map
+       the debian-compatible .ipk (openembedded distro family) to same.
+
 2021-02-04  Frank Ch. Eigler <fche@redhat.com>
 
        PR27092 low-memory handling
index b34eacc29dc9835c2be60ea31a27baa110f020ba..6fdaf60e6632e53504eefc6a5e5630d2fe18da9d 100644 (file)
@@ -480,16 +480,9 @@ parse_opt (int key, char *arg,
       scan_archives[".rpm"]="cat"; // libarchive groks rpm natively
       break;
     case 'U':
-      if (access("/usr/bin/dpkg-deb", X_OK) == 0)
-        {
-          scan_archives[".deb"]="dpkg-deb --fsys-tarfile";
-          scan_archives[".ddeb"]="dpkg-deb --fsys-tarfile";
-        }
-      else
-        {
-          scan_archives[".deb"]="(bsdtar -O -x -f - data.tar.xz)<";
-          scan_archives[".ddeb"]="(bsdtar -O -x -f - data.tar.xz)<";
-        }
+      scan_archives[".deb"]="(bsdtar -O -x -f - data.tar\\*)<";
+      scan_archives[".ddeb"]="(bsdtar -O -x -f - data.tar\\*)<";
+      scan_archives[".ipk"]="(bsdtar -O -x -f - data.tar\\*)<";
       // .udeb too?
       break;
     case 'Z':