Skip to content
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

add unrar license and use #341115

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SuperSandro2000
Copy link
Member

Description of changes

Continuation of #328698

Based on the fedora comment I don't think the license allows us to redistribute the binaries.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@emilazy
Copy link
Member

emilazy commented Sep 10, 2024

Based on the fedora comment I don't think the license allows us to redistribute the binaries.

It just means that the use restriction is incompatible with Fedora’s licence policy. I think it is still compatible with our lenient definition of unfreeRedistributable, which in any case does not cause us to redistribute binaries (and never should; cf. my standard spiel about how we would need a specific list of permitted unfree licences).

@SuperSandro2000
Copy link
Member Author

I think it is still compatible with our lenient definition of unfreeRedistributable, which in any case does not cause us to redistribute binaries

The docs say that we would distribute it then https://github.com/SuperSandro2000/nixpkgs/blob/a1ddda46fa838b99460ae4594e3e382231ac1e8b/doc/stdenv/meta.chapter.md#liblicensesunfreeredistributable-unfree-redistributable-liblicensesunfreeredistributable-unfree-redistributable

@CyberShadow
Copy link
Contributor

Thanks for picking this up!

Thinking more on the discussion in #328698, I do think that there's actually a matryoshka of two licenses here:

  1. The full license, which is the one that the original UnRAR source code comes with, and which includes the problematic "you must remove UnRAR files from your storage devices" clause;
  2. Just the 2nd paragraph, which is less burdened.

Some projects have elected to include the code only along with the 2nd paragraph, which does not reference the rest of the license, so it wouldn't be quite correct to lump them together.

Notably, the "2nd paragraph only" variation does look like it should allow redistribution without issues.

@emilazy
Copy link
Member

emilazy commented Sep 11, 2024

The docs say that we would distribute it then https://github.com/SuperSandro2000/nixpkgs/blob/a1ddda46fa838b99460ae4594e3e382231ac1e8b/doc/stdenv/meta.chapter.md#liblicensesunfreeredistributable-unfree-redistributable-liblicensesunfreeredistributable-unfree-redistributable

Weird. The docs lie, I guess.

Some projects have elected to include the code only along with the 2nd paragraph, which does not reference the rest of the license, so it wouldn't be quite correct to lump them together.

IIRC it’s actually that the licence changed to become more burdensome later on (otherwise any project cutting out parts of the licence would be committing a copyright violation and be less redistributable), but I forget the exact details.

@SuperSandro2000
Copy link
Member Author

Weird. The docs lie, I guess.

I think it is intentional. Some programs are unfree (as in open source free) but we are allowed to distribute them.

@emilazy
Copy link
Member

emilazy commented Sep 11, 2024

I think it is intentional. Some programs are unfree (as in open source free) but we are allowed to distribute them.

We don’t do it. See #83884, and #83884 (comment) for why we shouldn’t do it as a blanket policy separate to any ideological concerns.

Comment on lines +199 to +200
license = [ lib.licenses.gpl3Plus ]
++ lib.optional unrarSupport lib.licenses.unrar;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that even though unrar should probably be redistributable = true;, this should be [ lib.licenses.unrar lib.licenses.unfree ] because GPL-3.0-or-later and the UnRAR licence are incompatible and cannot be legally combined or redistributed together.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relevant: #283706

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this?

Suggested change
license = [ lib.licenses.gpl3Plus ]
++ lib.optional unrarSupport lib.licenses.unrar;
# the extra unfree is because gpl license cannot legally be combined with unfree licenses
++ lib.optionals unrarSupport [ lib.licenses.unrar lib.licenses.unfree];

@SuperSandro2000
Copy link
Member Author

Then we should update the docs to be correct. Since I seem to lack some knowledge here I leave it up to the people that are more familiar with licenses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants