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

Consider building unfreeRedistributable Packages #83884

Open
mkg20001 opened this issue Mar 31, 2020 · 55 comments
Open

Consider building unfreeRedistributable Packages #83884

mkg20001 opened this issue Mar 31, 2020 · 55 comments
Labels
0.kind: enhancement Add something new 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions

Comments

@mkg20001
Copy link
Member

Per definition those packages are redistributable without any legal problems (or at least should be, otherwise I feel like the license is wrongly described)

So we could build those as well, because there doesn't seem to be a reason not to

@mkg20001
Copy link
Member Author

The required change would be probably this one

nixpkgs.config.allowUnfreePredicate = (x: if x ? meta.license then x.meta.license.shortName == "unfreeRedistributable" else false);

@stale

This comment was marked as outdated.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 16, 2021
@mkg20001
Copy link
Member Author

Still not resolved

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 16, 2021
@domenkozar
Copy link
Member

domenkozar commented Mar 25, 2021

As per #15162 we might actually also want to whitelist what drivers to install into an ISO.

As per https://discourse.nixos.org/t/pytorch-and-cuda-torch-not-compiled-with-cuda-enabled/11272 we could then support data science by shipping CUDA-enabled binaries by default.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/comparing-nix-and-conda/11366/65

@petrosagg
Copy link
Member

I hit the same problem today after getting the package for materialize which is BSL licensed merged. The software license "grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work." so it should be perfectly fine to build and distribute binaries through Hydra.

I'd like to help resolve this problem, is the direction set forth in this issue and #97789 still the way to go here?

@mkg20001
Copy link
Member Author

I think so, I'm just not sure which way to implement the flag to enable it (ref #97789 (comment))

@Atemu
Copy link
Member

Atemu commented Aug 11, 2021

All Licenses now have a redistributable attr. (See PR above)

The work that remains is:

  • introduce an allowRedistributable config option
  • Allow redist even if unfree in Hydra jobsets

@K900
Copy link
Contributor

K900 commented Nov 13, 2021

Any updates here?

@mkg20001
Copy link
Member Author

Redistributable is now a thing

nix-repl> lib.licenses.free
{ deprecated = false; free = true; fullName = "Unspecified free software license"; redistributable = true; shortName = "free"; }

nix-repl> lib.licenses.free.redistributable
true

Hydra building and caching redistributable unfree things is still pending

@mkg20001
Copy link
Member Author

The quick fix for hydra would be this:

nixpkgs.config.allowUnfreePredicate = (x: if x ? meta.license then x.meta.license.redistributable else false);

It only checks redistributable but this is true automatically for all free licenses and being redistributable is all that matters in the case of hydra builds, I suppose.

@K900
Copy link
Contributor

K900 commented Nov 13, 2021

Is anything preventing us from making that change on Hydra, like, now?

@mkg20001
Copy link
Member Author

Not really, it could just be done

@grahamc
Copy link
Member

grahamc commented Nov 13, 2021

We'd need sign-off from the NixOS Foundation which is responsible for supporting the infrastructure, and might have ethical objections. One concern they've raised is NixOS should be fully usable without any unfree software, and allowing it in Hydra could make NixOS an inadvertently unfree Linux distribution.

@K900
Copy link
Contributor

K900 commented Nov 13, 2021

How does proprietary firmware fit into this? That's already distributed in a bunch of places, so NixOS isn't strictly fsf!free...

@grahamc
Copy link
Member

grahamc commented Nov 13, 2021

I don't have a good answer about that.

@mkg20001
Copy link
Member Author

I propose building every redistributable derivation on hydra, but keeping the allowUnfreePredicate on a regular machine to check for whether a package is free, so vanilla nixOS is still mostly free but the user can enjoy the cache benefits for unfree redistributable packages aswell

Note that this would also fix the issue of having to label some drivers as free to get them to build on hydra, so allowUnfree=false would finally do what it says

@K900
Copy link
Contributor

K900 commented Nov 13, 2021

It should also be possible to run at least a subset of tests an extra time without allowing unfree?

@grahamc
Copy link
Member

grahamc commented Nov 13, 2021

It should also be possible to run at least a subset of tests an extra time without allowing unfree?

Perhaps one option is having Hydra's jobs for nixpkgs allow unfree and leaving NixOS's jobs as-is.

@mkg20001
Copy link
Member Author

mkg20001 commented Nov 13, 2021

Enabling hydra to build redistributable unfree jobs/tests would allow testing for unfree packages aswell, which might not even be such a bad idea.
But then some "is vanilla nixOS still fsf free" tests would be need

Edit: Which isn't really the case right now either because of the linux unfree firmware that is shipped in some installation images.

@grahamc
Copy link
Member

grahamc commented Nov 13, 2021

vanilla nixOS still fsf free

Note that our concept of "Free" is not really documented and doesn't have a well defined philosophy, and already does not mirror FSF or OSI Free. In other words, there are lots of related improvements to be made.

A related issue: #83433

@Atemu
Copy link
Member

Atemu commented Nov 13, 2021

No matter where the discussion of what is considered free and what isn't leads us, we have a status quo on that and don't need to change it in order to redistribute unfree software on hydra.

What we need to do, as @mkg20001 said, is to create an explicit assurement that regular NixOS stays still as "free" as before because hydra wouldn't catch a deviation anymore otherwise.

Other than that, I see no issue from a user perspective. The only issue would be the ethics of distributing unfree software via the cache.

IMO hydra also serving unfree software doesn't impact any user in a negative way. People that only allow free software on their systems have unfree software forbidden in their local eval before anything gets pulled from hydra and will see no change. For them it's just an output path they will never access because of systematic prevention.

A much bigger issue is what happens when a derivation is mistakenly marked as redistributable or becomes unredistributable in the future. Is it possible to remove an output path from the cache after the fact?
This could cause legal trouble for the NixOS foundation.

@grahamc
Copy link
Member

grahamc commented Nov 13, 2021

hydra also serving unfree software doesn't impact any user in a negative way.

Some additional consideration is building unfree software takes away time from building free software, and the storage costs money over time. These may not be compelling points.

A much bigger issue is what happens when a derivation is mistakenly marked as redistributable or becomes unredistributable in the future. Is it possible to remove an output path from the cache after the fact? This could cause legal trouble for the NixOS foundation.

This is already true. For an example from just today: #145607 / #145766. Typically issues around redistribution are not complicated to deal with: we get a nastygram asking us to take it down and we do, and that settles it.

@domenkozar
Copy link
Member

If someone creates a flake that builds only unfree redistributable software from nixpkgs, I'll sponsor and setup linux/macos builders and a big cache.

If foundation decides to do that upstream at some point we can just switch over :)

@mkg20001
Copy link
Member Author

@domenkozar I made one https://github.com/mkg20001/redistributable-nix

I don't know if eval needs all packages successfully evaluating for your CI to work, otherwise I'd have to add some try-catch iteration to it, similar as hydra has it right now.

@Madouura
Copy link
Contributor

Yes, I'm in the dev channel. I can join the cuda one as well.

@nixos-discourse

This comment was marked as off-topic.

@tomodachi94 tomodachi94 added the 0.kind: enhancement Add something new label May 13, 2024
@obadz

This comment was marked as duplicate.

@emilazy
Copy link
Member

emilazy commented Jul 20, 2024

Just throwing in the opinion I’ve stated elsewhere here: We already don’t do a fantastic job at complying with the letter of FOSS licences and rely somewhat on general community goodwill to paper over our failure to retain copyright notices and licence texts. Having Hydra and its administrators essentially agree to arbitrary EULA texts that can run into several pages and that were designed by potentially‐litigious corporations not trying to help create a software commons would not, in my eyes, be an improvement, even separate to any ideological opposition to non‐free software.

A version of this proposal that I would find more acceptable would involve having a specific curated list of unfreeRedistributable licences that have been specifically approved for Hydra, rather than blanket allowance. I think that the curated list should also have lack of use restrictions (as opposed to modification restrictions) as a criterion, both because of the potential increased risk for our infrastructure when it builds and tests packages, and because I don’t think we really have a good way of informing users of use restrictions at present.

All that said, I really think we should make sure we can handle the basic task of retaining and distributing licence notices before we think about dabbling in trying to comply with far more stringent legal obligations.

@SomeoneSerge
Copy link
Contributor

specific curated list of unfreeRedistributable licences

Agreed, if this were to go we'd need a list of licenses we consider "safe enough". That's the direction we tried with an external builder at

allowUnfreePredicate =
p:
builtins.all (
license:
license.free
|| builtins.elem license.shortName [
"CUDA EULA"
"cuDNN EULA"
"cuTENSOR EULA"
"NVidia OptiX EULA"
]
) (ensureList p.meta.license);

Having Hydra and its administrators essentially agree to arbitrary EULA texts that can run into several pages and that were designed by potentially‐litigious corporations not trying to help create a software commons would not, in my eyes, be an improvement, even separate to any ideological opposition to non‐free software.

Let's be honest, it'd be a lie to talk of "compliance" or of "agreeing to terms" in this context. These EULAs aren't designed to be "complied with", they're designed to create and maintain a capacity for non-physical violence.

In the specific case of CUDA, it is being redistributed by every imaginable distribution (julia even distributes a patchelfed driver, which the EULA explicitly prohibits to distribute in any form whatsoever) based on some private sign offs from nvidia. I've no doubts that if nvidia wished to sue any of these said distributions, they could and they would, regardless of whatever prior communication they have had.

Rather than talking about "agreeing to EULAs", I think we're rather openly talking about one or another party, providing a cache (the nixos hydra currently owned by the foundation being one candidate), taking the risk of being sued, acting either under the assumption that the corporation would abstain from resorting to violence, or that they'd be able to (financially) sustain a trial. One could consider whether or not to take such a risk depending on whether or not that'd accommodate use-cases that attract the "useful" kind of contributions (e.g., whether it'd be "useful" to attract HPC users). We try to comply to the best of our abilities to reduce the risk for Nixpkgs: e.g., in the specific case, we tried contacting nvidia through several channels, ultimately getting no attention whatever, and we never distributed the drivers in the external/third-party caches, and we try to communicate to the end user that they should acquaint with the EULAs and that it's a risk they are taking.

Also, to keep a perspective, let's remember that the binary cache is only there for efficiency: the Nixpkgs expressions could be consumed by the end user without any substituters (thus without the substituters "redistributing" any artifacts or committing to any imposed contracts), and often enough the result would be equivalent to substitution, except they'd generate more heat. Arguably, the optimization offered by substituters is not a "bad thing" for "the society". If the legal framework of one or another jurisdiction hinders such optimizations, maybe it's the legal framework that needs adjustment, and maybe we should work with the upstream projects towards making peaceful co-existence possible.

@eclairevoyant
Copy link
Contributor

eclairevoyant commented Jul 20, 2024

based on some private sign offs from nvidia

If that's really the blocker then let's get that for nixpkgs as well. The rest of this response is off-topic.

EDIT: since you mentioned that nvidia was contacted already and that failed, we should probably drop discussion of nvidia packages unless we can comply with said EULA.

@emilazy
Copy link
Member

emilazy commented Jul 20, 2024

I think I am basically in agreement with @SomeoneSerge on the fundamentals here even if we see the issue through different lenses, despite my personally being a FOSS licence compliance stickler. Changing copyright law is certainly beyond the scope or means of the NixOS project, though, for better or worse.

If the CUDA EULAs themselves were not considered acceptable but we had a public sign‐off from NVIDIA that seemed acceptable to the community, then certainly I’d consider CUDA packages to be reasonable candidates for any curated list of Hydra‐acceptable non‐free licences. I’m not sure whether this would be necessary or not, depending on what criteria (if any) we could agree on for acceptable non‐free licences or how onerous the EULAs are in the first place (they’re rather tl;dr). But I personally wouldn’t feel good about informal backroom permission even if they would give it to us.

@SomeoneSerge
Copy link
Contributor

EDIT: since you mentioned that nvidia was contacted already and that failed, we should probably drop discussion of nvidia packages unless we can comply with said EULA

I didn't emphasize this enough, but I don't think this is a Nixpkgs issue. This is a discussion to be had be anyone who volunteers to provide a cache. In case of the nixos hydra, it was a question considered a while ago by the foundation (rejecting the idea at that time), and later, perhaps, it'd be a matter for an Association/Assembly/etc to pick up.

@samuela
Copy link
Member

samuela commented Jul 22, 2024

If the CUDA EULAs themselves were not considered acceptable but we had a public sign‐off from NVIDIA that seemed acceptable to the community, then certainly I’d consider CUDA packages to be reasonable candidates for any curated list of Hydra‐acceptable non‐free licences.

FWIW I consider the precedent of nearly every other distribution republishing CUDA as a sort of de facto public sign-off from NVIDIA. I genuinely believe that it is in their best interest to maximize distribution channels for their software, and based on their behavior I glean that they see things similarly. It's my personal guess that some lawyer was tasked with writing up a generic EULA a decade ago and since then no one has fussed too much about it, internal or external to the company.

This was referenced Sep 11, 2024
@tomodachi94 tomodachi94 added 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions and removed 6.topic: hydra.nixos.org Issues affecting the build cache at hydra.nixos.org labels Nov 4, 2024
@Ekleog
Copy link
Member

Ekleog commented Dec 15, 2024

FWIW, I just opened a RFC at NixOS/rfcs#185 .

For the CUDA-specific part of things, it is orthogonal to the new RFC: if its license is not actually redistributable, then it should be fixed in the nixpkgs expressions, and RFC 185 can still land for all other software.

Also FWIW, according to #83433 we have already received cease-and-desists to remove non-redistributable software. We just complied and everything went fine. EDIT: the proper link is here: #83884 (comment)

People can make mistake by tagging unfree stuff as unfreeRedistributable, but they can also make the same mistake by tagging these things as free anyway.

So let's keep the discussion on the RFC (and probably here too) focused on redistributing redistributable software.

The question of whether CUDA is actually redistributable or not should probably be left to some other issue with the proper title. And similarly for all other licenses that people would feel should not be redistributed by hydra: we should just mark them as redistributable = false, instead of adding a new curated list of licenses.

@Atemu
Copy link
Member

Atemu commented Dec 15, 2024

Are you sure you linked the correct discussion? I don't remeber a C&D being discussed there.

@Ekleog
Copy link
Member

Ekleog commented Dec 15, 2024

Oh you're right, I misremembered which discussion the comment I was thinking of was coming from!

Here is the proper link: #83884 (comment)

@vcunat
Copy link
Member

vcunat commented Dec 15, 2024

I wonder... feels like a political topic rather than technical one. Maybe it's more suitable for the Steering Committee instead of the RFC process? (just an idea; I don't know really)

@Ekleog
Copy link
Member

Ekleog commented Dec 15, 2024

I totally agree! But I don't know of any way to reach the Steering Committee as a whole other than the RFC process, so I decided to just open an RFC and let them make a choice — I do think that the Shepherd Team here should most likely be exactly the members of the Steering Committee.

@zimbatm
Copy link
Member

zimbatm commented Dec 30, 2024

FYI: unfree packages are available today in the https://nix-community.cachix.org cache. For more context see https://nix-community.org/package-sets/

@srd424
Copy link
Contributor

srd424 commented Dec 30, 2024

FYI: unfree packages are available today in the https://nix-community.cachix.org cache. For more context see https://nix-community.org/package-sets/

Ooh, it's got zerotier builds! Nice one, thanks to everyone that's made this happen :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions
Projects
None yet
Development

No branches or pull requests