NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.73k stars 13.86k forks source link

Dotnet license #169427

Open linsui opened 2 years ago

linsui commented 2 years ago

Describe the bug

According to https://github.com/dotnet/installer#license, the pre-built dotnot binaries are not licensed under MIT but https://dotnet.microsoft.com/en-us/dotnet_library_license.htm. According to the EULA it seems the binary can't be redistributed. See https://devblogs.microsoft.com/premier-developer/net-core-overview/ also.

Licensing model: Source (MIT), Binary (Microsoft EULA)

Notify maintainers

@tonyhoglund @IvarWithoutBones @prusnak

06kellyjac commented 2 years ago

Where do we distribute the prebuilt binaries?

We build our own dotnet binaries from source

https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/development/compilers/dotnet/build-dotnet.nix

prusnak commented 2 years ago

@06kellyjac "cp -r" is not building from source

06kellyjac commented 2 years ago

:facepalm:

I guess we swap to unfree then

Has anyone tried a build from src previously?

prusnak commented 2 years ago

According to the EULA it seems the binary can't be redistributed.

@linsui Why do you think EULA makes the binaries non-redistributable?

I guess we swap to unfree then

@06kellyjac maybe we will still be able to use unfreeRedistributable

06kellyjac commented 2 years ago

under "ii. Distribution Requirements. For any Distributable Code you distribute, you must"

require distributors and external end users to agree to terms that protect it at least as much as this agreement; and indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified Distributable Code.

is pretty scary

how does it compare to other EULAs like minecraft etc?

linsui commented 2 years ago
  1. Scope of License. The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not

· work around any technical limitations in the software;

· reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software, except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software;

· remove, minimize, block or modify any notices of Microsoft or its suppliers in the software;

· use the software in any way that is against the law; or

· share, publish, rent or lease the software, provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party.

I thought the last item means that we can't redistribute it but of course I'm not a lawyer.

linsui commented 2 years ago

But I'm confused why this EULA can't be found on the download page and even not shipped in the download files.

omajid commented 1 year ago

Hey folks. I am involved with .NET development and I think I can clear some of this up.

When .NET (Core) was first started, the source was under some open source licenses (primarily MIT and Apache-2.0, but also a few others) but all the built binaries were all under a proprietary EULA.

We found that concerning and worked with Microsoft to try and resolve that.

This got addressed a few years ago, at least to a certain extent. Some builds of .NET contain bits that are not open source - for example, the builds for Windows include (proprietary) Windows-specific libraries. Other builds, specially for Linux, are under an MIT license now.

In general, if you download a .NET SDK zip or tarball, it should include a LICENSE file and a ThirdPartyNotices.txt. Those should, combined, reflect the actual license.

The LICENSE file for the linux SDK tarballs, as far as I am aware, is not the proprietary EULA. The README in dotnet/installer seems wrong on that point. The LICENSE is just plain MIT. The ThirdPartyNotices.txt has a much longer list of copyright and license notices but all of them seem open source-ish and none of them are anywhere close to the proprietary EULA. Over in Fedora-land, we still have minor some issues with those license and are working with Microsoft to sort them out (eg, https://github.com/dotnet/runtime/issues/79231).

YoshiRulz commented 1 year ago

re: building from source, it's apparently easier now https://devblogs.microsoft.com/dotnet/announcing-dotnet-8-preview-1/#build-your-own-net-from-dotnet-dotnet

06kellyjac commented 1 year ago

Thanks for the link. Looking forward to reading through this

corngood commented 8 months ago

I just found this thread. I've been working on the source build mentioned above (#190129).

In order to build it in nixpkgs, we still need to bootstrap with a binary sdk (and some other stuff from nuget). Currently it uses the existing one packaged in nixpkgs, but I suppose we could avoid that by building our own bootstrap blobs.

Anyone have any thoughts on that?

corngood commented 7 months ago

The source build is in master now for .net 8 and .net 9 preview 1. One problem is that they don't actually support source builds (yet) for each release, so we have 8.0.102 source and 8.0.201 binary :|.

GGG-KILLER commented 7 months ago

To add some input into this discussion, I've downloaded the following tarballs from the Microsoft website:

The LICENSE.txt for them was all MIT. ``` cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-6.0.27-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-6.0.27-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-6.0.27-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-6.0.27-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-7.0.16-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-7.0.16-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-7.0.16-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-7.0.16-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-8.0.2-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-8.0.2-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-8.0.2-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 aspnetcore-runtime-8.0.2-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-6.0.27-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-6.0.27-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-6.0.27-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-6.0.27-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-7.0.16-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-7.0.16-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-7.0.16-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-7.0.16-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-8.0.2-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-8.0.2-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-8.0.2-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-runtime-8.0.2-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-6.0.419-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-6.0.419-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-6.0.419-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-6.0.419-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-7.0.406-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-7.0.406-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-7.0.406-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-7.0.406-osx-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-8.0.201-linux-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-8.0.201-linux-x64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-8.0.201-osx-arm64/LICENSE.txt cfc21f5e8bd655ae997eec916138b707b1d290b83272c02a95c9f821b8c87310 dotnet-sdk-8.0.201-osx-x64/LICENSE.txt ```

I'm still in the process of evaluating the ThirdPartyNotices.txt for the rest, but I think they're all safe to redistribute as well if anyone wants to help me check: https://gist.github.com/GGG-KILLER/9885555747457d4cacd6eb16dc9c7de3

So tl;dr: I think this is not a worry we need to have at the moment unless if MS changes the license for .NET