From: Frank Ch. Eigler Date: Sun, 14 Feb 2021 21:02:05 +0000 (-0500) Subject: PR27413: use bsdtar to unpack deb-related formats X-Git-Tag: elfutils-0.184~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f146d5ec8e2eee566df6eb4c939cf29d779fc08c;p=thirdparty%2Felfutils.git PR27413: use bsdtar to unpack deb-related formats 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 Signed-off-by: Dorinda Bassey --- diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog index 8de885223..a66ded383 100644 --- a/debuginfod/ChangeLog +++ b/debuginfod/ChangeLog @@ -1,3 +1,8 @@ +2021-02-14 Frank Ch. Eigler + + * debuginfod.cxx (main -U): Use bsdtar unconditionally. Also map + the debian-compatible .ipk (openembedded distro family) to same. + 2021-02-04 Frank Ch. Eigler PR27092 low-memory handling diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index b34eacc29..6fdaf60e6 100644 --- a/debuginfod/debuginfod.cxx +++ b/debuginfod/debuginfod.cxx @@ -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':