diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2021-02-14 16:02:05 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@redhat.com> | 2021-02-17 06:27:51 -0500 |
commit | f146d5ec8e2eee566df6eb4c939cf29d779fc08c (patch) | |
tree | 01fce5027d34923d0890665a2ea7291cee70f794 /debuginfod/debuginfod.cxx | |
parent | 7a5ea4591df5246124ac870c865939ea8f36ac4d (diff) | |
download | elfutils-f146d5ec8e2eee566df6eb4c939cf29d779fc08c.tar.gz |
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 <fche@redhat.com>
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
Diffstat (limited to 'debuginfod/debuginfod.cxx')
-rw-r--r-- | debuginfod/debuginfod.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx index b34eacc2..6fdaf60e 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': |