Skip to content

Commit 6dfaa14

Browse files
committed
Auto merge of #104527 - ferrocene:pa-more-licenses, r=pnkfelix
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`
2 parents ff4b772 + 9c24608 commit 6dfaa14

29 files changed

+261
-137
lines changed

.reuse/dep5

+82-6
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,99 @@
1+
# WARNING: this metadata is currently incomplete, do not rely on it yet.
2+
13
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
24
Files-Excluded:
35
src/llvm-project
46

5-
Files: *
7+
# Note that we're explicitly listing the individual files at the root of the
8+
# repository rather than just having `Files: *`. This is explicitly done to
9+
# help downstream forks of the Rust compiler: this way, the files they add
10+
# won't be automatically marked as authored by the Rust project.
11+
Files: compiler/*
12+
library/*
13+
tests/*
14+
src/*
15+
.github/*
16+
Cargo.lock
17+
Cargo.toml
18+
CODE_OF_CONDUCT.md
19+
config.toml.example
20+
configure
21+
CONTRIBUTING.md
22+
COPYRIGHT
23+
LICENSE-APACHE
24+
LICENSE-MIT
25+
README.md
26+
RELEASES.md
27+
rustfmt.toml
28+
triagebot.toml
29+
x
30+
x.ps1
31+
x.py
32+
.editorconfig
33+
.git-blame-ignore-revs
34+
.gitattributes
35+
.gitignore
36+
.gitmodules
37+
.mailmap
638
Copyright: The Rust Project Developers (see https://thanks.rust-lang.org)
739
License: MIT or Apache-2.0
840

41+
Files: compiler/rustc_apfloat/*
42+
Copyright: LLVM APFloat authors
43+
The Rust Project Developers (see https://thanks.rust-lang.org)
44+
License: NCSA AND (MIT OR Apache-2.0)
45+
46+
Files: compiler/rustc_codegen_cranelift/src/cranelift_native.rs
47+
Copyright: The Cranelift Project Developers
48+
The Rust Project Developers (see https://thanks.rust-lang.org)
49+
License: Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT)
50+
51+
Files: compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
52+
Copyright: LLVM authors
53+
The Rust Project Developers (see https://thanks.rust-lang.org)
54+
License: Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT)
55+
56+
Files: library/core/src/unicode/unicode_data.rs
57+
Copyright: 1991-2022 Unicode, Inc. All rights reserved.
58+
License: Unicode-DFS-2016
59+
60+
Files: library/std/src/sync/mpmc/*
61+
Copyright: 2019 The Crossbeam Project Developers
62+
The Rust Project Developers (see https://thanks.rust-lang.org)
63+
License: MIT OR Apache-2.0
64+
65+
Files: library/std/src/sys/unix/locks/fuchsia_mutex.rs
66+
Copyright: 2016 The Fuchsia Authors
67+
The Rust Project Developers (see https://thanks.rust-lang.org)
68+
License: BSD-2-Clause AND (MIT OR Apache-2.0)
69+
70+
Files: src/test/rustdoc/auxiliary/enum-primitive.rs
71+
Copyright: 2015 Anders Kaseorg <[email protected]>
72+
License: MIT
73+
974
Files: src/librustdoc/html/static/fonts/FiraSans*
10-
Copyright: 2014, Mozilla Foundation, 2014, Telefonica S.A.
75+
Copyright: 2014, Mozilla Foundation
76+
2014, Telefonica S.A.
1177
License: OFL-1.1
1278

1379
Files: src/librustdoc/html/static/fonts/NanumBarun*
1480
Copyright: 2010 NAVER Corporation
1581
License: OFL-1.1
1682

1783
Files: src/librustdoc/html/static/fonts/SourceCodePro*
18-
Copyright: 2010, 2012 Adobe Systems Incorporated
84+
src/librustdoc/html/static/fonts/SourceSerif4*
85+
Copyright: 2010, 2012, 2014-2023, Adobe Systems Incorporated
1986
License: OFL-1.1
2087

21-
Files: src/librustdoc/html/static/fonts/SourceSerif4*
22-
Copyright: 2014-2021 Adobe Systems Incorporated
23-
License: OFL-1.1
88+
Files: src/librustdoc/html/static/css/normalize.css
89+
Copyright: Nicolas Gallagher and Jonathan Neal
90+
License: MIT
91+
92+
Files: src/librustdoc/html/static/css/themes/ayu.css
93+
Copyright: Ike Ku, Jessica Stokes, Leon Guan
94+
The Rust Project Developers (see https://thanks.rust-lang.org)
95+
License: MIT OR Apache-2.0
96+
97+
Files: src/doc/rustc-dev-guide/mermaid.min.js
98+
Copyright: Knut Sveidqvist
99+
License: MIT

LICENSES/BSD-2-Clause.txt

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Copyright (c) <year> <owner>
2+
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4+
5+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
7+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
9+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

LICENSES/NCSA.txt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
University of Illinois/NCSA Open Source License
2+
3+
Copyright (c) <Year> <Owner Organization Name>. All rights reserved.
4+
5+
Developed by: <Name of Development Group> <Name of Institution> <URL for Development Group/Institution>
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8+
9+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
10+
11+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
12+
13+
* Neither the names of <Name of Development Group, Name of Institution>, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.

LICENSES/Unicode-DFS-2016.txt

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
2+
3+
Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/.
4+
5+
Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/.
6+
7+
Software includes any source code published in the Unicode Standard or under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/.
8+
9+
NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
10+
11+
COPYRIGHT AND PERMISSION NOTICE
12+
13+
Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
14+
15+
Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either
16+
17+
(a) this copyright and permission notice appear with all copies of the Data Files or Software, or
18+
(b) this copyright and permission notice appear in associated Documentation.
19+
20+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE.
21+
22+
Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder.

compiler/rustc_codegen_cranelift/example/alloc_system.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org)
3+
104
#![no_std]
115

126
pub struct System;

compiler/rustc_codegen_gcc/example/alloc_system.rs

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org)
3+
104
#![no_std]
115
#![feature(allocator_api, rustc_private)]
126
#![cfg_attr(any(unix, target_os = "redox"), feature(libc))]

src/ci/scripts/collect-cpu-stats.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
set -euo pipefail
77
IFS=$'\n\t'
88

9-
python3 src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
9+
mkdir -p build
10+
python3 src/ci/cpu-usage-over-time.py &> build/cpu-usage.csv &

src/ci/scripts/upload-artifacts.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
2323
fi
2424

2525
# CPU usage statistics.
26-
cp cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"
26+
cp build/cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"
2727

2828
# Build metrics generated by x.py.
2929
cp "${build_dir}/metrics.json" "${upload_dir}/metrics-${CI_JOB_NAME}.json"

src/doc/footer.inc

+2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
<!-- REUSE-IgnoreStart -->
12
<footer><p>
23
Copyright &copy; 2011 The Rust Project Developers. Licensed under the
34
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
45
or the <a href="https://opensource.org/licenses/MIT">MIT license</a>, at your option.
56
</p><p>
67
This file may not be copied, modified, or distributed except according to those terms.
78
</p></footer>
9+
<!-- REUSE-IgnoreEnd -->

src/librustdoc/html/static/COPYRIGHT.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# REUSE-IgnoreStart
2+
13
These documentation pages include resources by third parties. This copyright
24
file applies only to those resources. The following third party resources are
35
included, and carry their own copyright notices and license terms:
@@ -44,3 +46,5 @@ included, and carry their own copyright notices and license terms:
4446
See SourceSerif4-LICENSE.md.
4547

4648
This copyright file is intended to be distributed with rustdoc output.
49+
50+
# REUSE-IgnoreEnd

src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REUSE-IgnoreStart
2+
13
Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A.
24
with Reserved Font Name < Fira >,
35

@@ -92,3 +94,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
9294
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9395
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
9496
OTHER DEALINGS IN THE FONT SOFTWARE.
97+
98+
// REUSE-IgnoreEnd

src/librustdoc/html/static/fonts/NanumBarunGothic-LICENSE.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REUSE-IgnoreStart
2+
13
Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/),
24

35
with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic,
@@ -97,3 +99,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
9799
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98100
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
99101
OTHER DEALINGS IN THE FONT SOFTWARE.
102+
103+
// REUSE-IgnoreEnd

src/librustdoc/html/static/fonts/SourceCodePro-LICENSE.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REUSE-IgnoreStart
2+
13
Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries.
24

35
This Font Software is licensed under the SIL Open Font License, Version 1.1.
@@ -91,3 +93,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
9193
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9294
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
9395
OTHER DEALINGS IN THE FONT SOFTWARE.
96+
97+
// REUSE-IgnoreEnd

src/librustdoc/html/static/fonts/SourceSerif4-LICENSE.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- REUSE-IgnoreStart -->
2+
3+
Copyright 2014-2021 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
14
Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
25

36
This Font Software is licensed under the SIL Open Font License, Version 1.1.
@@ -91,3 +94,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
9194
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
9295
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
9396
OTHER DEALINGS IN THE FONT SOFTWARE.
97+
98+
<!-- REUSE-IgnoreEnd -->

src/tools/clippy/COPYRIGHT

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
// REUSE-IgnoreStart
2+
13
Copyright 2014-2022 The Rust Project Developers
24

35
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
46
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
57
<LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
68
option. All files in the project carrying such notice may not be
79
copied, modified, or distributed except according to those terms.
10+
11+
// REUSE-IgnoreEnd

src/tools/clippy/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -275,10 +275,14 @@ If you want to contribute to Clippy, you can find more information in [CONTRIBUT
275275

276276
## License
277277

278+
<!-- REUSE-IgnoreStart -->
279+
278280
Copyright 2014-2022 The Rust Project Developers
279281

280282
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
281283
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)> or the MIT license
282284
<LICENSE-MIT or [https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT)>, at your
283285
option. Files in the project may not be
284286
copied, modified, or distributed except according to those terms.
287+
288+
<!-- REUSE-IgnoreEnd -->

src/tools/clippy/rustc_tools_util/README.md

+4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ The changelog for `rustc_tools_util` is available under:
4949

5050
## License
5151

52+
<!-- REUSE-IgnoreStart -->
53+
5254
Copyright 2014-2022 The Rust Project Developers
5355

5456
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5557
http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5658
<LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
5759
option. All files in the project carrying such notice may not be
5860
copied, modified, or distributed except according to those terms.
61+
62+
<!-- REUSE-IgnoreEnd -->

src/tools/collect-license-metadata/src/licenses.rs

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub(crate) struct License {
4242
impl License {
4343
fn simplify(&mut self) {
4444
self.remove_copyright_prefixes();
45+
self.remove_trailing_dots();
4546
self.copyright.sort();
4647
self.copyright.dedup();
4748
}
@@ -62,4 +63,12 @@ impl License {
6263
*copyright = stripped.into();
6364
}
6465
}
66+
67+
fn remove_trailing_dots(&mut self) {
68+
for copyright in &mut self.copyright {
69+
if copyright.ends_with('.') {
70+
*copyright = copyright.trim_end_matches('.').to_string();
71+
}
72+
}
73+
}
6574
}

0 commit comments

Comments
 (0)