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 more license annotations #104527

Merged
merged 19 commits into from
Mar 11, 2023
Merged

Add more license annotations #104527

merged 19 commits into from
Mar 11, 2023

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Nov 17, 2022

This PR updates the .reuse/dep5 file to include more accurate licensing data for everything in the repository (excluding submodules and dependencies). Some decisions were made in this PR:

  • The standard copyright attribution for files maintained by us is "The Rust Project Developers (see https://thanks.rust-lang.org)", to avoid having to maintain an in-tree AUTHORS file.
  • For files that have specific licensing terms, we added the terms to the .reuse/dep5 rather than adding SPDX comments in the files themselves.
  • REUSE picks up any comment/text line with Copyright on it, so I had to sprinkle around REUSE-IgnoreStart and REUSE-IgnoreEnd comments.

The rendered COPYRIGHT file is available at https://gist.github.com/pietroalbini/efb81103f69596d39758114f3f6a8688.

r? @pnkfelix

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-meta Area: Issues & PRs about the rust-lang/rust repository itself S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 17, 2022
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 1, 2023

☔ The latest upstream changes (presumably #107536) made this pull request unmergeable. Please resolve the merge conflicts.

@WaffleLapkin
Copy link
Member

WaffleLapkin commented Feb 24, 2023

@rustbot author
(marking as waiting author since this is a draft and has merge conflicts)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 24, 2023
@pietroalbini pietroalbini marked this pull request as ready for review March 9, 2023 11:37
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 9, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 9, 2023

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

The Miri subtree was changed

cc @rust-lang/miri

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Mar 9, 2023
@pnkfelix
Copy link
Member

pnkfelix commented Mar 9, 2023

I reviewed this and was not clear about the policy/plan for the blocks surrounded by REUSE-IgnoreStart/REUSE-IgnoreEnd, so I asked @pietroalbini about it on Zulip over here.

Executive Summary: The ignore directives are used to stop the REUSE tool from using the ignore-annotated copyright statements in question when building its resulting report. (as in, "it makes the tool ignore these blocks"). There are two scenarios where it is "okay" to ignore such statements:

  • Old copyright statements that don't match our current templates.
    • These should be ported forward to use the new standard copyright statement that is understood by the REUSE tool.
  • Text that is itself not a copyright statement (at least not about the file in question), but matches the REUSE templates and thus would be picked up without an ignore directive. @pietroalbini gives the example of src/doc/footer.inc, which includes text that is is auto-injected into the generated documentation in order to establish the copyright of the generated documentation, but that text is not itself the copyright assignment for src/doc/footer.inc.
    • These should either be "tweaked" to "appease" REUSE (which I take to mean "rewrite the text/code such that REUSE stops pattern matching these cases") or should keep the ignore-directives. (I think the specific example of src/doc/footer.inc sounds like a scenario where keeping the ignore-directive makes sense. We probably need to consider each such instance on a case-by-case basis, rather than applying a blanket policy for the long-term.)

I also asked Pietro whether our goal was to remove licenses entirely, or to replace licenses with spdx headers. Pietro said that they'd love in the long-term to have spdx headers in every file, but for the short term the focus is to minimal number of changes to get our repository into compliance (and I agree with that.) Overall, these spdx headers seem to require on the order of two lines of machine-parsed comments, so the aforementioned long-term plan seems reasonable to me

@pnkfelix
Copy link
Member

pnkfelix commented Mar 9, 2023

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Mar 9, 2023

📌 Commit 9c24608 has been approved by pnkfelix

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 9, 2023
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
Copy link
Member

Choose a reason for hiding this comment

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

FWIW these are copies of old rust source files, that had their license headers removed in rustc at some point but that change was never synced to Miri. So now this 'fork' has the SPDX header but the original file that still exists in rustc does not... it'd be more consistent to just remove the license header here without adding SPDX headers. But either way is fine for me.

Copy link
Member Author

Choose a reason for hiding this comment

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

The rule of thumb I used is to keep the SPDX header for files that will end up outside of the monorepo, while removing it from files that will be kept only inside (i.e. rust-installer, which was straight up imported).

@bors
Copy link
Contributor

bors commented Mar 10, 2023

⌛ Testing commit 9c24608 with merge 7f10a4cc8073a74f83805676a7772cb25b1583e8...

@bors
Copy link
Contributor

bors commented Mar 10, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 10, 2023
@WaffleLapkin
Copy link
Member

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 10, 2023
@bors
Copy link
Contributor

bors commented Mar 11, 2023

⌛ Testing commit 9c24608 with merge 6dfaa14...

@bors
Copy link
Contributor

bors commented Mar 11, 2023

☀️ Test successful - checks-actions
Approved by: pnkfelix
Pushing 6dfaa14 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 11, 2023
@bors bors merged commit 6dfaa14 into rust-lang:master Mar 11, 2023
@rustbot rustbot added this to the 1.70.0 milestone Mar 11, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6dfaa14): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.8% [1.8%, 1.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.3%, -1.3%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
      | 
D:/a/rust/rust/src/llvm-project/llvm/include/llvm/Support/FormatProviders.h:67: note: adding '-flarge-source-files' will allow for more column-tracking support, at the expense of compilation time and memory
[2757/3025] Building CXX object tools/llvm-exegesis/lib/Mips/CMakeFiles/LLVMExegesisMips.dir/Target.cpp.obj
[2758/3025] Linking CXX static library lib\libLLVMExegesisMips.a
FAILED: lib/libLLVMExegesisMips.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMExegesisMips.a && D:\a\rust\rust\mingw64\bin\ar.exe qc lib\libLLVMExegesisMips.a  tools/llvm-exegesis/lib/Mips/CMakeFiles/LLVMExegesisMips.dir/Target.cpp.obj && D:\a\rust\rust\mingw64\bin\ranlib.exe lib\libLLVMExegesisMips.a && cd ."
D:\a\rust\rust\mingw64\bin\ranlib.exe: could not create temporary file whilst writing archive: no more archived files
[2759/3025] Linking CXX static library lib\libLLVMExegesisX86.a
[2760/3025] Linking CXX executable bin\llvm-dwarfdump.exe
[2761/3025] Linking CXX executable bin\llvm-extract.exe
[2762/3025] Linking CXX shared library bin\libLTO.dll
---

[2765/3025] Linking CXX executable bin\llvm-dwarfutil.exe
lib/libLLVMM68kCodeGen.a(M68kCallLowering.cpp.obj): duplicate section `.rdata$_ZTVN4llvm16FormalArgHandlerE[_ZTVN4llvm16FormalArgHandlerE]' has different size

ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1


build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.48\src\lib.rs:975:5
 finished in 272.850 seconds
Build completed unsuccessfully in 0:05:53
Build completed unsuccessfully in 0:05:53
make: *** [Makefile:80: ci-mingw-subset-2] Error 1

@pietroalbini pietroalbini deleted the pa-more-licenses branch March 13, 2023 08:32
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Mar 15, 2023
Add more license annotations

This PR updates the `.reuse/dep5` file to include more accurate licensing data for everything in the repository (*excluding* submodules and dependencies). Some decisions were made in this PR:

* The standard copyright attribution for files maintained by us is "The Rust Project Developers (see https://thanks.rust-lang.org)", to avoid having to maintain an in-tree `AUTHORS` file.
* For files that have specific licensing terms, we added the terms to the `.reuse/dep5` rather than adding SPDX comments in the files themselves.
* REUSE picks up any comment/text line with `Copyright` on it, so I had to sprinkle around `REUSE-IgnoreStart` and `REUSE-IgnoreEnd` comments.

The rendered `COPYRIGHT` file is available at https://gist.github.com/pietroalbini/efb81103f69596d39758114f3f6a8688.

r? `@pnkfelix`
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 24, 2023
Add more license annotations

This PR updates the `.reuse/dep5` file to include more accurate licensing data for everything in the repository (*excluding* submodules and dependencies). Some decisions were made in this PR:

* The standard copyright attribution for files maintained by us is "The Rust Project Developers (see https://thanks.rust-lang.org)", to avoid having to maintain an in-tree `AUTHORS` file.
* For files that have specific licensing terms, we added the terms to the `.reuse/dep5` rather than adding SPDX comments in the files themselves.
* REUSE picks up any comment/text line with `Copyright` on it, so I had to sprinkle around `REUSE-IgnoreStart` and `REUSE-IgnoreEnd` comments.

The rendered `COPYRIGHT` file is available at https://gist.github.com/pietroalbini/efb81103f69596d39758114f3f6a8688.

r? `@pnkfelix`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants