p7zip: remove non-free RAR support #85780
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
7-Zip's RAR implementation is built on the non-free UnRAR source code; DOC/License.txt says:
The unrar licensing is infamously restrictive and non-free; it's inappropriate for us to keep the RAR support while labelling the package as free software (and indeed there's a commented-out line pointing out that the current
meta.license
is false). Unfortunately, the 7-Zip upstream seems uninterested in replacing the code with a freely-licensed alternative (see 7-Zip ticket #1229).An alternative solution would be to mark the p7zip package as non-free instead; I decided not to because its other functionality (especially
.7z
support) is freely-licensed and useful, and there are free software alternatives for extracting RAR files (e.g. in nixpkgs there'sarchiver
, which is written in a memory-safe language, andunar
, which at least doesn't have two patches for CVEs that haven't been addressed upstream...).I checked that
7z(1)
fails gracefully on.rar
files now:Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)