Skip to content

extract: improve .deb extraction #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 22, 2019
Merged

Conversation

rossburton
Copy link
Contributor

A Debian package is an 'ar' archive with two files:

  • control.tar.gz (metadata)
  • data.tar.* (content)

Because cve-bin-tool only cares about the content it can skip iterating the
unpacked archives and go straight to data.tar. This file may be compressed with
a number of compressors so don't hardcode gzip, use glob to find the filename
and let tar determine how to unpack it.

Fixes #2

Signed-off-by: Ross Burton ross.burton@intel.com

A Debian package is an 'ar' archive with two files:
- control.tar.gz (metadata)
- data.tar.* (content)

Because cve-bin-tool only cares about the content it can skip iterating the
unpacked archives and go straight to data.tar. This file may be compressed with
a number of compressors so don't hardcode gzip, use glob to find the filename
and let tar determine how to unpack it.

Fixes intel#2

Signed-off-by: Ross Burton <ross.burton@intel.com>
@johnandersen777
Copy link

Tested on debian buster +2

@johnandersen777 johnandersen777 merged commit 1acb73b into intel:master Jan 22, 2019
johnandersen777 pushed a commit that referenced this pull request Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants