-
Notifications
You must be signed in to change notification settings - Fork 82
chore(deps): Downgrade 7zip to v16.02 in nix packaging #1167
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. However, I would like the commit to describe what those problems are.
Found some problems with 7z based extractions using the nix environment
which does not happen in debian.
Is the extraction different ? Did options changed ?
Found some problems with 7z based extractions using the nix environment which does not happen in debian. The reason is that debian still using a quite old stable version of the 7z, while a newer one is coming from nixpkgs. This commit downgrades 7zip version used by unblob's nix packaging to the same version (applying the same patches) as debian does, hopefully making the extractors more stable using nix-based environment. 7zip maintainers changed the behavior or MBR extraction between version 16.02 and 17.05: - on 16.02, 7z creates a file per MBR partition in the extraction directory, regardless of the amount of partitions. So we get these files named ("0.img", "1.img") after their partition entry ID. - on 17.05, 7z will automagically extract the partition itself if there is a single partition within the MBR and that partition is a supported filesystem format (e.g. extfs). So instead of having a "0.img" file, you immediately get the content of that partition written to disk. Since one of the main objective of unblob is to identify known/unknown chunks and provide detailed meta-data about them, we consider important to have that intermediate step provided by 16.02. This way we know the MRB contains a partition of a specific type, which itself was handled by a dedicated unblob handler. This behavior is kind of invisible on unblob-core since the MBR handler is only available on the ONEKEY platform right now. 7z 17.05 also has issues when extracting ZIP files, where it does not accept full path for the "-o" option. For example, "-o/tmp/lol" won't work, but "cd /tmp/lol; 7z x -p -y sample.zip -o." will. On top of that, 7z seems to set arbitrary permissions on the output directory.
Investigated and edited the commit message:
|
Also worth mentioning that Debian and RHEL are both sticking to 16.02 as of now. |
No description provided.