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

Update licensing to MIT AND (MIT OR Apache-2.0) #317

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

tgross35
Copy link
Contributor

@tgross35 tgross35 commented Oct 25, 2024

Currently both Cargo.toml and the license files indicate that this library may be used under either MIT or Apache-2.0. However, this is not accurate; since portions of this library were derived from musl libc, which is available under the MIT license, this terms of use for this library must also include use under the MIT license. That is, it is not correct that this library may be used under only the Apache-2.0 license.

Update the SPDX license identifier to MIT OR (MIT AND Apache-2.0) to indicate that use must include the MIT license, but to clarify that contributions are made under MIT OR Apache-2.0. This is compatible with the current state of this repository since it has always contained both license files, and the Cargo.toml license field has indicated MIT OR Apache-2.0 since it was added.

In accordance with the above, replace the two license files with a combined LICENSE.txt that makes these terms clear and gives attribution to works from which this library is derived.

Fixes: #215
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT

@tgross35
Copy link
Contributor Author

tgross35 commented Oct 25, 2024

Requesting review from @joshtriplett since you have been knowledgeable about all this.

I changed the copyrights to "Rust Developers", @japaric would you be able to ack this since your name is currently on the copyrights?

This doesn't affect the copyright headers mentioned in #73

LICENSE.txt Outdated
terms compatible with the above MIT license:

* musl libc, copyright Rich Felker, et al. https://www.musl-libc.org/
* The CORE-MATH project https://core-math.gitlabpages.inria.fr/
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't yet have anything from CORE-MATH in the repository, but I included it here since I am already starting on the ports.

@joshtriplett
Copy link
Member

@tgross35 Strictly speaking, you have to preserve all copyright notices. For instance, since we're copying code from projects under the MIT license, if the version of the license they're using starts with copyright notices, we need to preserve all of those.

For that exact reason, I would recommend that we not add any more, "Rust Developers" or otherwise. But we have to preserve all the ones that already exist within the projects we're copying from.

@joshtriplett
Copy link
Member

Other than the issue of preserving copyright notices (and not adding any more), LGTM.

@tgross35
Copy link
Contributor Author

tgross35 commented Oct 25, 2024

I did include Copyright © 2005-2020 Rich Felker, et al. at the bottom, but made this text more explicit. This is what is included at the top of the MIT license https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT - is this sufficient?

Later in the file it states:

Much of the math library code (src/math/* and src/complex/*) is
Copyright © 1993,2004 Sun Microsystems or
Copyright © 2003-2011 David Schultz or
Copyright © 2003-2009 Steven G. Kargl or
Copyright © 2003-2009 Bruce D. Evans or
Copyright © 2008 Stephen L. Moshier or
Copyright © 2017-2018 Arm Limited
and labelled as such in comments in the individual source files. All
have been licensed under extremely permissive terms.

But I assume we are probably okay to not include this since we retain the copyright headers in our math source files.

Edit: later it also states:

All other files which have no copyright comments are original works
produced specifically for use as part of this library, written either
by Rich Felker, the main author of the library, or by one or more
contibutors listed above. Details on authorship of individual files
can be found in the git version control history of the project. The
omission of copyright and license comments in each file is in the
interest of source tree size.

I'm not sure how to handle this. It doesn't seem very useful to list all musl contributors, so I think Rich Felker, et al. could cover this as well, but I'm not sure how we should be propagating this to source files (if at all).

@joshtriplett
Copy link
Member

The requirement is to preserve all copyright notices you receive. We should not be pruning any. We can preserve them either in the source files or the license, as long as they're preserved. It'd probably be convenient for downstream users if they were all in the license, but the requirement on our end is just to preserve them all somewhere.

@tgross35 tgross35 force-pushed the update-licensing branch 2 times, most recently from 1671216 to 1362db2 Compare October 25, 2024 01:09
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Oct 25, 2024
Currently, Cargo.toml specifies Apache-2.0 OR MIT, but LICENSE.txt
describes MIT OR NCSA. compiler-builtins is derived from LLVM's
compiler-rt. LICENSE.txt correctly reflects the state of compiler-rt
prior to relicensing on 2019-01-19, during which time software was
available for use under either MIT or the University of Illinois NCSA
license. After relicensing, however, compiler-rt is available for use
only under Apache-2.0 with the LLVM exception; this is not reflected
anywhere in the repository.

Update the SPDX license identifier to `Apache-2.0 WITH LLVM-exception
AND MIT AND (MIT OR Apache-2.0)`. Each AND portion covers something
specific:

* Apache-2.0 WITH LLVM-exception: this covers work that is derived from
  the LLVM repository since after the LLVM relicensing.
* MIT: This covers work that is derived from LLVM before the LLVM
  relicensing (under MIT OR NCSA).
* MIT AND Apache-2.0: This ensures that any contributions to this
  repository, in addition to meeting the above required licenses, is
  also released for use under the Rust-standard Apache-2.0 with no LLVM
  exception.

See also the parallel license update in rust-lang/libm [1].

Fixes: rust-lang#307
Closes: rust-lang#511
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: rust-lang/libm#317 [1]
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Oct 25, 2024
Currently, Cargo.toml specifies Apache-2.0 OR MIT, but LICENSE.txt
describes MIT OR NCSA. compiler-builtins is derived from LLVM's
compiler-rt. LICENSE.txt correctly reflects the state of compiler-rt
prior to relicensing on 2019-01-19, during which time software was
available for use under either MIT or the University of Illinois NCSA
license. After relicensing, however, compiler-rt is available for use
only under Apache-2.0 with the LLVM exception; this is not reflected
anywhere in the repository.

Update the SPDX license identifier to `Apache-2.0 WITH LLVM-exception
AND MIT AND (MIT OR Apache-2.0)`. Each AND portion covers something
specific:

* Apache-2.0 WITH LLVM-exception: this covers work that is derived from
  the LLVM repository since after the LLVM relicensing.
* MIT: This covers work that is derived from LLVM before the LLVM
  relicensing (under MIT OR NCSA).
* MIT AND Apache-2.0: This ensures that any contributions to this
  repository, in addition to meeting the above required licenses, is
  also released for use under the Rust-standard Apache-2.0 with no LLVM
  exception.

See also the parallel license update in rust-lang/libm [1].

Fixes: rust-lang#307
Closes: rust-lang#511
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: rust-lang/libm#317 [1]
@tgross35
Copy link
Contributor Author

I updated this to include the first excerpt from above (with specific copyright notices) verbatim. I think that anything else should be covered by license headers, but let me know if specific updates are needed.

tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Oct 25, 2024
Currently, Cargo.toml specifies Apache-2.0 OR MIT, but LICENSE.txt
describes MIT OR NCSA. compiler-builtins is derived from LLVM's
compiler-rt. LICENSE.txt correctly reflects the state of compiler-rt
prior to relicensing on 2019-01-19, during which time software was
available for use under either MIT or the University of Illinois NCSA
license. After relicensing, however, compiler-rt is available for use
only under Apache-2.0 with the LLVM exception; this is not reflected
anywhere in the repository.

Update the SPDX license identifier to `Apache-2.0 WITH LLVM-exception
AND MIT AND (MIT OR Apache-2.0)`. Each AND portion covers something
specific:

* Apache-2.0 WITH LLVM-exception: this covers work that is derived from
  the LLVM repository since after the LLVM relicensing.
* MIT: This covers work that is derived from LLVM before the LLVM
  relicensing (under MIT OR NCSA).
* MIT AND Apache-2.0: This ensures that any contributions to this
  repository, in addition to meeting the above required licenses, is
  also released for use under the Rust-standard Apache-2.0 with no LLVM
  exception.

See also the parallel license update in rust-lang/libm [1].

Fixes: rust-lang#307
Closes: rust-lang#511
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: rust-lang/libm#317 [1]
Copy link
Member

@joshtriplett joshtriplett left a comment

Choose a reason for hiding this comment

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

This looks correct to me, and it's a massive improvement.

I personally think we should also copy the copyright notices present in source files into the license file, so that they're all in one place, but that doesn't need to be a blocker for this commit.

@tgross35
Copy link
Contributor Author

@japaric would you be able to ack this since your name is currently on the copyrights?

As suggested by @joshtriplett, I updated the file to persist this copyright since there are quite a few we have to retain anyway:

libm/LICENSE.txt

Lines 228 to 230 in b8d8354

This Rust library contains the following copyrights:
Copyright (c) 2018 Jorge Aparicio

Currently both Cargo.toml and the license files indicate that this
library may be used under either MIT or Apache-2.0. However, this is not
accurate; since portions of this library were derived from musl libc,
which is available under the MIT license, this terms of use for this
library must also include use under the MIT license. That is, it is not
correct that this library may be used under only the Apache-2.0 license.

Update the SPDX license identifier to `MIT OR (MIT AND Apache-2.0)` to
indicate that use must include the MIT license, but to clarify that
contributions are made under `MIT OR Apache-2.0`. This is compatible
with the current state of this repository since it has always contained
both license files, and the `Cargo.toml` license field has indicated
`MIT OR Apache-2.0` since it was added.

In accordance with the above, replace the two license files with a
combined LICENSE.txt that makes these terms clear and gives attribution
to works from which this library is derived.

Fixes: rust-lang#215
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT
@tgross35 tgross35 merged commit e4934f1 into rust-lang:master Oct 26, 2024
13 checks passed
@tgross35 tgross35 deleted the update-licensing branch October 26, 2024 22:20
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Oct 26, 2024
Currently, Cargo.toml specifies Apache-2.0 OR MIT, but LICENSE.txt
describes MIT OR NCSA. compiler-builtins is derived from LLVM's
compiler-rt. LICENSE.txt correctly reflects the state of compiler-rt
prior to relicensing on 2019-01-19, during which time software was
available for use under either MIT or the University of Illinois NCSA
license. After relicensing, however, compiler-rt is available for use
only under Apache-2.0 with the LLVM exception; this is not reflected
anywhere in the repository.

Update the SPDX license identifier to `Apache-2.0 WITH LLVM-exception
AND MIT AND (MIT OR Apache-2.0)`. Each AND portion covers something
specific:

* Apache-2.0 WITH LLVM-exception: this covers work that is derived from
  the LLVM repository since after the LLVM relicensing.
* MIT: This covers work that is derived from LLVM before the LLVM
  relicensing (under MIT OR NCSA).
* MIT AND Apache-2.0: This ensures that any contributions to this
  repository, in addition to meeting the above required licenses, is
  also released for use under the Rust-standard Apache-2.0 with no LLVM
  exception.

See also the parallel license update in rust-lang/libm [1].

Fixes: rust-lang#307
Closes: rust-lang#511
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: rust-lang/libm#317 [1]
tgross35 added a commit to tgross35/compiler-builtins that referenced this pull request Oct 26, 2024
Currently, Cargo.toml specifies Apache-2.0 OR MIT, but LICENSE.txt
describes MIT OR NCSA. compiler-builtins is derived from LLVM's
compiler-rt. LICENSE.txt correctly reflects the state of compiler-rt
prior to relicensing on 2019-01-19, during which time software was
available for use under either MIT or the University of Illinois NCSA
license. After relicensing, however, compiler-rt is available for use
only under Apache-2.0 with the LLVM exception; this is not reflected
anywhere in the repository.

Update the SPDX license identifier to `MIT AND Apache-2.0 WITH
LLVM-exception AND (MIT OR Apache-2.0)`. Each AND portion covers
something specific:

* Apache-2.0 WITH LLVM-exception: this covers work that is derived from
  the LLVM repository since after the LLVM relicensing.
* MIT: This covers work that is derived from LLVM before the LLVM
  relicensing (under MIT OR NCSA), as well as the vendored `libm`
  components.
* MIT AND Apache-2.0: This ensures that any contributions to this
  repository, in addition to meeting the above required licenses, is
  also released for use under the Rust-standard Apache-2.0 with no LLVM
  exception.

See also the parallel license update in rust-lang/libm [1].

Fixes: rust-lang#307
Closes: rust-lang#511
Link: https://rust-lang.zulipchat.com/#narrow/channel/335408-foundation/topic/Request.20for.20legal.20team.20input.20on.20crate.20licensing
Link: rust-lang/libm#317 [1]
tgross35 added a commit to tgross35/rust that referenced this pull request Oct 26, 2024
This includes:

* The license change
  rust-lang/compiler-builtins#717
* The `libm` submodule update, which also has a license change
  rust-lang/libm#317
* Re-enabling `math` on i686 UEFI
  rust-lang/compiler-builtins#715
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 31, 2024
Update compiler-builtins to 0.1.136

This includes:

* The license change rust-lang/compiler-builtins#717
* The `libm` submodule update, which also has a license change rust-lang/libm#317
* Re-enabling `math` on i686 UEFI rust-lang/compiler-builtins#715

Fixes: rust-lang#128533
tgross35 added a commit to tgross35/rust that referenced this pull request Nov 1, 2024
This includes:

* The license change
  rust-lang/compiler-builtins#717
* The `libm` submodule update, which also has a license change
  rust-lang/libm#317
* Re-enabling `math` on i686 UEFI
  rust-lang/compiler-builtins#715
lnicola pushed a commit to lnicola/rust-analyzer that referenced this pull request Nov 1, 2024
Update compiler-builtins to 0.1.136

This includes:

* The license change rust-lang/compiler-builtins#717
* The `libm` submodule update, which also has a license change rust-lang/libm#317
* Re-enabling `math` on i686 UEFI rust-lang/compiler-builtins#715

Fixes: rust-lang/rust#128533
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Nov 2, 2024
Update compiler-builtins to 0.1.136

This includes:

* The license change rust-lang/compiler-builtins#717
* The `libm` submodule update, which also has a license change rust-lang/libm#317
* Re-enabling `math` on i686 UEFI rust-lang/compiler-builtins#715

Fixes: rust-lang/rust#128533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package is incorrectly licensed Apache/MIT
3 participants