Skip to content

Commit 1ee8327

Browse files
authored
Rollup merge of #118445 - ferrocene:jp-support-reuse-in-submodules, r=Mark-Simulacrum
Let `reuse` look inside git submodules Changes `collect-license-metadata` and `generate-copyright` so they can now look at the git submodules. Unfortunately `reuse` chokes on the LLVM submodule - it finds the word "Copyright" or the unicode copyright symbol in all kinds of places, including UTF-8 test cases. The `reuse` tool expressly won't let you ignore folders, so we let it scan everything and then strip out the LLVM sub-folder in post. Instead, we add in a hand-curated list of copyright information gleaned by reading the LLVM codebase carefully, which is stored in `.reuse/dep5` in Debian format where `reuse` can find and use it. The `.reuse/dep5` continues to track copyright info for files in the tree that do not have SPDX metadata in them (i.e. all of them)
2 parents 5f5d248 + eba02ab commit 1ee8327

File tree

11 files changed

+1031
-29
lines changed

11 files changed

+1031
-29
lines changed

.reuse/dep5

+37-11
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# WARNING: this metadata is currently incomplete, do not rely on it yet.
22

33
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
4-
Files-Excluded:
5-
src/llvm-project
64

75
# Note that we're explicitly listing the individual files at the root of the
86
# repository rather than just having `Files: *`. This is explicitly done to
@@ -39,13 +37,8 @@ Files: compiler/*
3937
Copyright: The Rust Project Developers (see https://thanks.rust-lang.org)
4038
License: MIT or Apache-2.0
4139

42-
Files: compiler/rustc_codegen_cranelift/src/cranelift_native.rs
43-
Copyright: The Cranelift Project Developers
44-
The Rust Project Developers (see https://thanks.rust-lang.org)
45-
License: Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT)
46-
4740
Files: compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
48-
Copyright: LLVM authors
41+
Copyright: 2003-2019 University of Illinois at Urbana-Champaign.
4942
The Rust Project Developers (see https://thanks.rust-lang.org)
5043
License: Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT)
5144

@@ -85,11 +78,44 @@ Files: src/librustdoc/html/static/css/normalize.css
8578
Copyright: Nicolas Gallagher and Jonathan Neal
8679
License: MIT
8780

88-
Files: src/librustdoc/html/static/css/themes/ayu.css
89-
Copyright: Ike Ku, Jessica Stokes, Leon Guan
81+
Files: src/librustdoc/html/static/css/rustdoc.css
82+
Copyright: 2016 Ike Ku, Jessica Stokes and Leon Guan
9083
The Rust Project Developers (see https://thanks.rust-lang.org)
9184
License: MIT OR Apache-2.0
9285

9386
Files: src/doc/rustc-dev-guide/mermaid.min.js
94-
Copyright: Knut Sveidqvist
87+
Copyright: 2014-2021 Knut Sveidqvist
9588
License: MIT
89+
90+
Files: library/backtrace/*
91+
Copyright: 2014 Alex Crichton
92+
The Rust Project Developers (see https://thanks.rust-lang.org)
93+
License: MIT OR Apache-2.0
94+
95+
Files: src/doc/embedded-book/*
96+
Copyright: Rust on Embedded Devices Working Group
97+
The Rust Project Developers (see https://thanks.rust-lang.org)
98+
License: MIT OR Apache-2.0 OR CC-BY-SA-4.0
99+
100+
Files: src/doc/rust-by-example/*
101+
Copyright: 2014 Jorge Aparicio
102+
The Rust Project Developers (see https://thanks.rust-lang.org)
103+
License: MIT OR Apache-2.0
104+
105+
# Reuse cannot process the LLVM source tree, and so the copyrights for the LLVM
106+
# submodule are written out here manually. The collect-licence-metadata tool
107+
# has a specific exception coded within it to ignore ./src/llvm-project so
108+
# any time LLVM is updated, please revisit this section. The copyrights are
109+
# taken from the relevant LLVM sub-folders: llvm, lld, lldb, compiler-rt and libunwind.
110+
#
111+
# The git hash for the CREDITS.TXT file is taken from the current git submodule
112+
# commit for ./src/llvm-project.
113+
#
114+
# The copyright years were compiled by looking at all the relevant
115+
# ./src/llvm-project/*/LICENSE.txt files
116+
117+
Files: src/llvm-project/*
118+
Copyright: 2003-2019 by the contributors listed in [CREDITS.TXT](https://github.com/rust-lang/llvm-project/blob/7738295178045041669876bf32b0543ec8319a5c/llvm/CREDITS.TXT)
119+
2010 Apple Inc
120+
2003-2019 University of Illinois at Urbana-Champaign.
121+
License: NCSA AND Apache-2.0 WITH LLVM-exception

LICENSES/CC-BY-3.0.txt

+319
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)