nixpkgs-suyu/pkgs/tools
Emily 95f82e2a45 p7zip: remove non-free RAR support
7-Zip's RAR implementation is built on the non-free UnRAR source code;
DOC/License.txt says:

      Licenses for files are:
    
        1) CPP/7zip/Compress/Rar* files:  GNU LGPL + unRAR restriction
        2) All other files:  GNU LGPL
    
      The GNU LGPL + unRAR restriction means that you must follow both 
      GNU LGPL rules and unRAR restriction rules.
    
    ...
    
      unRAR restriction
      -----------------
    
        The decompression engine for RAR archives was developed using source 
        code of unRAR program.
        All copyrights to original unRAR code are owned by Alexander Roshal.
    
        The license for original unRAR code has the following restriction:
    
        The unRAR sources cannot be used to re-create the RAR compression algorithm, 
        which is proprietary. Distribution of modified unRAR sources in separate form 
        or as a part of other software is permitted, provided that it is clearly
        stated in the documentation and source comments that the code may
        not be used to develop a RAR (WinRAR) compatible archiver.

The unrar licensing is [infamously restrictive and non-free][fedora];
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][7zip]).

[fedora]: https://fedoraproject.org/wiki/Licensing:Unrar
[7zip]: https://sourceforge.net/p/sevenzip/feature-requests/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's
`archiver`, which is written in a memory-safe language, and `unar`,
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:
    
    emily@renko ~/tmp> curl -L -O https://www.philippwinterberg.com/download/example.rar
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 5715k  100 5715k    0     0  6716k      0 --:--:-- --:--:-- --:--:-- 6716k
    emily@renko ~/tmp> 7z x example.rar
    
    7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
    p7zip Version 16.02 (locale=en_CA.UTF-8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)
    
    Scanning the drive for archives:
    1 file, 5853119 bytes (5716 KiB)
    
    Extracting archive: example.rar
    ERROR: example.rar
    Can not open the file as archive
    
        
    Can't open as archive: 1
    Files: 0
    Size:       0
    Compressed: 0
2020-04-22 15:01:48 +00:00
..
admin Merge pull request #85626 from filalex77/procs-0.10.0 2020-04-20 18:20:58 +01:00
archivers p7zip: remove non-free RAR support 2020-04-22 15:01:48 +00:00
audio Merge pull request #85045 from r-ryantm/auto-update/pulsemixer 2020-04-12 06:36:37 +01:00
backup wal-g: remove Security 2020-04-13 13:10:04 +10:00
bluetooth treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
bootloaders/refind treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
cd-dvd treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
compression advancecomp: version number correctly embedded in binaries 2020-04-13 10:21:29 +02:00
filesystems fuse-overlayfs: 0.7.8 -> 1.0.0 2020-04-18 21:25:51 +10:00
graphics Merge pull request #79454 from Flakebi/spirv-cross 2020-04-21 23:44:41 +00:00
inputmethods treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
misc Merge pull request #85636 from matthewbauer/blas-lapack-fix-fallout-from-83888 2020-04-21 19:59:16 +02:00
networking yggdrasil: declare tests from nixosTests 2020-04-22 11:45:04 +05:30
nix treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
package-management nix-prefetch: 0.3.0 -> 0.3.1 (#85367) 2020-04-17 21:10:24 +08:00
security Merge pull request #85282 from xrelkd/add/sn0int 2020-04-20 08:55:26 -04:00
system tre-command: 0.2.2 -> 0.2.3 2020-04-22 08:20:59 +02:00
text transifex-client: 0.13.6 -> 0.13.9 2020-04-21 19:46:48 +02:00
toml2nix
typesetting sile: 0.10.3 -> 0.10.4 2020-04-22 08:21:20 +02:00
video treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
virtualization Merge pull request #83936 from saschagrunert/cri-tools 2020-04-21 18:20:30 -05:00
wayland/ydotool
X11 treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00