From 656c31c862f86b59d9730a51a1599784676aaae6 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 11:07:57 +0100 Subject: [PATCH 01/19] fix broken collect-license-metadata --- src/tools/collect-license-metadata/src/path_tree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/collect-license-metadata/src/path_tree.rs b/src/tools/collect-license-metadata/src/path_tree.rs index 133ff6837378e..2778f6f0677ab 100644 --- a/src/tools/collect-license-metadata/src/path_tree.rs +++ b/src/tools/collect-license-metadata/src/path_tree.rs @@ -278,10 +278,10 @@ pub(crate) fn expand_interned_licenses( ) -> Node<&License> { match node { Node::Root { childs } => Node::Root { - childs: childs.into_iter().map(|child| strip_interning(child, interner)).collect(), + childs: childs.into_iter().map(|child| expand_interned_licenses(child, interner)).collect(), }, Node::Directory { name, childs, license } => Node::Directory { - childs: childs.into_iter().map(|child| strip_interning(child, interner)).collect(), + childs: childs.into_iter().map(|child| expand_interned_licenses(child, interner)).collect(), license: license.map(|license| interner.resolve(license)), name, }, From 6473ff150f75cd5ac32dd8371be99d66acd16a3c Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 12:04:45 +0100 Subject: [PATCH 02/19] strip leading dots from copyright statements --- src/tools/collect-license-metadata/src/licenses.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/tools/collect-license-metadata/src/licenses.rs b/src/tools/collect-license-metadata/src/licenses.rs index 1c95b1bc8e96c..2855069db0d67 100644 --- a/src/tools/collect-license-metadata/src/licenses.rs +++ b/src/tools/collect-license-metadata/src/licenses.rs @@ -42,6 +42,7 @@ pub(crate) struct License { impl License { fn simplify(&mut self) { self.remove_copyright_prefixes(); + self.remove_trailing_dots(); self.copyright.sort(); self.copyright.dedup(); } @@ -62,4 +63,12 @@ impl License { *copyright = stripped.into(); } } + + fn remove_trailing_dots(&mut self) { + for copyright in &mut self.copyright { + if copyright.ends_with('.') { + *copyright = copyright.trim_end_matches('.').to_string(); + } + } + } } From 49b902f06e69909bfae468b136852d0a9a927bd2 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 12:24:08 +0100 Subject: [PATCH 03/19] include directories in grouped licensing information --- .../collect-license-metadata/src/path_tree.rs | 96 +++++++++++++------ src/tools/generate-copyright/src/main.rs | 6 +- 2 files changed, 72 insertions(+), 30 deletions(-) diff --git a/src/tools/collect-license-metadata/src/path_tree.rs b/src/tools/collect-license-metadata/src/path_tree.rs index 2778f6f0677ab..7a2a440636d91 100644 --- a/src/tools/collect-license-metadata/src/path_tree.rs +++ b/src/tools/collect-license-metadata/src/path_tree.rs @@ -13,7 +13,7 @@ pub(crate) enum Node { Root { childs: Vec> }, Directory { name: PathBuf, childs: Vec>, license: Option }, File { name: PathBuf, license: L }, - FileGroup { names: Vec, license: L }, + Group { files: Vec, directories: Vec, license: L }, Empty, } @@ -22,7 +22,7 @@ impl Node { self.merge_directories(); self.collapse_in_licensed_directories(); self.merge_directory_licenses(); - self.merge_file_groups(); + self.merge_groups(); self.remove_empty(); } @@ -64,8 +64,8 @@ impl Node { Node::Root { .. } => { panic!("can't have a root inside another element"); } - Node::FileGroup { .. } => { - panic!("FileGroup should not be present at this stage"); + Node::Group { .. } => { + panic!("Group should not be present at this stage"); } Node::Directory { license: Some(_), .. } => { panic!("license should not be set at this stage"); @@ -86,8 +86,8 @@ impl Node { } Node::Empty => {} Node::File { .. } => {} - Node::FileGroup { .. } => { - panic!("FileGroup should not be present at this stage"); + Node::Group { .. } => { + panic!("Group should not be present at this stage"); } Node::Directory { license: Some(_), .. } => { panic!("license should not be set at this stage"); @@ -132,7 +132,7 @@ impl Node { } } Node::File { .. } => {} - Node::FileGroup { .. } => {} + Node::Group { .. } => panic!("group should not be present at this stage"), Node::Empty => {} } } @@ -165,8 +165,8 @@ impl Node { Node::Root { .. } => { panic!("can't have a root inside another element"); } - Node::FileGroup { .. } => { - panic!("FileGroup should not be present at this stage"); + Node::Group { .. } => { + panic!("Group should not be present at this stage"); } Node::Directory { name: child_child_name, .. } => { *child_child_name = child_name.join(&child_child_name); @@ -185,38 +185,74 @@ impl Node { } Node::Empty => {} Node::File { .. } => {} - Node::FileGroup { .. } => {} + Node::Group { .. } => panic!("Group should not be present at this stage"), } } /// This pass groups multiple files in a directory with the same license into a single - /// "FileGroup", so that the license of all those files can be reported as a group. + /// "Group", so that the license of all those files can be reported as a group. + /// + /// This also merges directories *without exceptions*. /// /// Crucially this pass runs after collapse_in_licensed_directories, so the most common license /// will already be marked as the directory's license and won't be turned into a group. - fn merge_file_groups(&mut self) { + fn merge_groups(&mut self) { + #[derive(Default)] + struct Grouped { + files: Vec, + directories: Vec, + } match self { Node::Root { childs } | Node::Directory { childs, .. } => { - let mut grouped = BTreeMap::new(); + let mut grouped: BTreeMap = BTreeMap::new(); for child in &mut *childs { - child.merge_file_groups(); - if let Node::File { name, license } = child { - grouped.entry(*license).or_insert_with(Vec::new).push(name.clone()); - *child = Node::Empty; + child.merge_groups(); + match child { + Node::Directory { name, childs, license: Some(license) } => { + if childs.is_empty() { + grouped + .entry(*license) + .or_insert_with(Grouped::default) + .directories + .push(name.clone()); + *child = Node::Empty; + } + } + Node::File { name, license } => { + grouped + .entry(*license) + .or_insert_with(Grouped::default) + .files + .push(name.clone()); + *child = Node::Empty; + } + _ => {} } } - for (license, mut names) in grouped.into_iter() { - if names.len() == 1 { - childs.push(Node::File { license, name: names.pop().unwrap() }); + for (license, mut grouped) in grouped.into_iter() { + if grouped.files.len() + grouped.directories.len() <= 1 { + if let Some(name) = grouped.files.pop() { + childs.push(Node::File { license, name }); + } else if let Some(name) = grouped.directories.pop() { + childs.push(Node::Directory { + name, + childs: Vec::new(), + license: Some(license), + }); + } } else { - childs.push(Node::FileGroup { license, names }); + childs.push(Node::Group { + license, + files: grouped.files, + directories: grouped.directories, + }); } } } Node::File { .. } => {} - Node::FileGroup { .. } => panic!("FileGroup should not be present at this stage"), + Node::Group { .. } => panic!("FileGroup should not be present at this stage"), Node::Empty => {} } } @@ -231,7 +267,7 @@ impl Node { } childs.retain(|child| !matches!(child, Node::Empty)); } - Node::FileGroup { .. } => {} + Node::Group { .. } => {} Node::File { .. } => {} Node::Empty => {} } @@ -278,16 +314,22 @@ pub(crate) fn expand_interned_licenses( ) -> Node<&License> { match node { Node::Root { childs } => Node::Root { - childs: childs.into_iter().map(|child| expand_interned_licenses(child, interner)).collect(), + childs: childs + .into_iter() + .map(|child| expand_interned_licenses(child, interner)) + .collect(), }, Node::Directory { name, childs, license } => Node::Directory { - childs: childs.into_iter().map(|child| expand_interned_licenses(child, interner)).collect(), + childs: childs + .into_iter() + .map(|child| expand_interned_licenses(child, interner)) + .collect(), license: license.map(|license| interner.resolve(license)), name, }, Node::File { name, license } => Node::File { name, license: interner.resolve(license) }, - Node::FileGroup { names, license } => { - Node::FileGroup { names, license: interner.resolve(license) } + Node::Group { files, directories, license } => { + Node::Group { files, directories, license: interner.resolve(license) } } Node::Empty => Node::Empty, } diff --git a/src/tools/generate-copyright/src/main.rs b/src/tools/generate-copyright/src/main.rs index d172c9e157bc8..4d116c7da653a 100644 --- a/src/tools/generate-copyright/src/main.rs +++ b/src/tools/generate-copyright/src/main.rs @@ -36,8 +36,8 @@ fn render_recursive(node: &Node, buffer: &mut Vec, depth: usize) -> Result<( } } } - Node::FileGroup { names, license } => { - render_license(&prefix, names.iter(), license, buffer)?; + Node::Group { files, directories, license } => { + render_license(&prefix, directories.iter().chain(files.iter()), license, buffer)?; } Node::File { name, license } => { render_license(&prefix, std::iter::once(name), license, buffer)?; @@ -76,7 +76,7 @@ pub(crate) enum Node { Root { childs: Vec }, Directory { name: String, childs: Vec, license: License }, File { name: String, license: License }, - FileGroup { names: Vec, license: License }, + Group { files: Vec, directories: Vec, license: License }, } #[derive(serde::Deserialize)] From 8bd2431444f13085c63a5939bac37b2dc25e1a4b Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 25 Oct 2022 13:00:53 +0200 Subject: [PATCH 04/19] add a note that the metadata is currently incomplete --- .reuse/dep5 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index 5135f92a9d82e..59bfa804ef862 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -1,3 +1,5 @@ +# WARNING: this metadata is currently incomplete, do not rely on it yet. + Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files-Excluded: src/llvm-project From 27648b7da1b031ec05cb0f1582f9797cd53d06d1 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 25 Oct 2022 13:05:57 +0200 Subject: [PATCH 05/19] explicitly list files at the top level This helps downstream forks of the compiler like Ferrocene to have their own annotations for their own files, without having the upstream licensing be applied. For Ferrocene specifically we keep custom code in a top-level ferrocene/ directory, and we don't want the dep5 file to apply to it. --- .reuse/dep5 | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.reuse/dep5 b/.reuse/dep5 index 59bfa804ef862..607243841b276 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -4,7 +4,37 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files-Excluded: src/llvm-project -Files: * +# Note that we're explicitly listing the individual files at the root of the +# repository rather than just having `Files: *`. This is explicitly done to +# help downstream forks of the Rust compiler: this way, the files they add +# won't be automatically marked as authored by the Rust project. +Files: compiler/* + library/* + tests/* + src/* + .github/* + Cargo.lock + Cargo.toml + CODE_OF_CONDUCT.md + config.toml.example + configure + CONTRIBUTING.md + COPYRIGHT + LICENSE-APACHE + LICENSE-MIT + README.md + RELEASES.md + rustfmt.toml + triagebot.toml + x + x.ps1 + x.py + .editorconfig + .git-blame-ignore-revs + .gitattributes + .gitignore + .gitmodules + .mailmap Copyright: The Rust Project Developers (see https://thanks.rust-lang.org) License: MIT or Apache-2.0 From f28e2fb9fdab47259135e96d3ad1f9165fa048f2 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 25 Oct 2022 15:38:06 +0200 Subject: [PATCH 06/19] add normalize.css notice from src/librustdoc/html/static/COPYRIGHT.txt --- .reuse/dep5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index 607243841b276..d1fc88844c1a0 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -53,3 +53,7 @@ License: OFL-1.1 Files: src/librustdoc/html/static/fonts/SourceSerif4* Copyright: 2014-2021 Adobe Systems Incorporated License: OFL-1.1 + +Files: src/librustdoc/html/static/css/normalize.css +Copyright: Nicolas Gallagher and Jonathan Neal +License: MIT From 1e40d081ae1a1c27e73a7a8d1e9efb4458fc7c77 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 25 Oct 2022 16:55:26 +0200 Subject: [PATCH 07/19] add notice for file generated with unicode data --- .reuse/dep5 | 4 ++++ LICENSES/Unicode-DFS-2016.txt | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 LICENSES/Unicode-DFS-2016.txt diff --git a/.reuse/dep5 b/.reuse/dep5 index d1fc88844c1a0..85cac0fc1710c 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -38,6 +38,10 @@ Files: compiler/* Copyright: The Rust Project Developers (see https://thanks.rust-lang.org) License: MIT or Apache-2.0 +Files: library/core/src/unicode/unicode_data.rs +Copyright: 1991-2022 Unicode, Inc. All rights reserved. +License: Unicode-DFS-2016 + Files: src/librustdoc/html/static/fonts/FiraSans* Copyright: 2014, Mozilla Foundation, 2014, Telefonica S.A. License: OFL-1.1 diff --git a/LICENSES/Unicode-DFS-2016.txt b/LICENSES/Unicode-DFS-2016.txt new file mode 100644 index 0000000000000..71fd6ac5e12e1 --- /dev/null +++ b/LICENSES/Unicode-DFS-2016.txt @@ -0,0 +1,22 @@ +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +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/. + +Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/. + +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/. + +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. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. + +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 + + (a) this copyright and permission notice appear with all copies of the Data Files or Software, or + (b) this copyright and permission notice appear in associated Documentation. + +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. + +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. From 7455bf4949b9e130b811d6d54e46aa879de14ea2 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 25 Oct 2022 18:04:35 +0200 Subject: [PATCH 08/19] add mermaid.min.js notice --- .reuse/dep5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index 85cac0fc1710c..f1df9b5156eda 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -61,3 +61,7 @@ License: OFL-1.1 Files: src/librustdoc/html/static/css/normalize.css Copyright: Nicolas Gallagher and Jonathan Neal License: MIT + +Files: src/doc/rustc-dev-guide/mermaid.min.js +Copyright: Knut Sveidqvist +License: MIT From f2d9f6dc128253f358b5bd37cff4792a6cb229c9 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 25 Oct 2022 18:09:02 +0200 Subject: [PATCH 09/19] add notice for rustc_apfloat --- .reuse/dep5 | 5 +++++ LICENSES/NCSA.txt | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 LICENSES/NCSA.txt diff --git a/.reuse/dep5 b/.reuse/dep5 index f1df9b5156eda..8d2bb8df16b32 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -38,6 +38,11 @@ Files: compiler/* Copyright: The Rust Project Developers (see https://thanks.rust-lang.org) License: MIT or Apache-2.0 +Files: compiler/rustc_apfloat/* +Copyright: LLVM APFloat authors + The Rust Project Developers (see https://thanks.rust-lang.org) +License: NCSA AND (MIT OR Apache-2.0) + Files: library/core/src/unicode/unicode_data.rs Copyright: 1991-2022 Unicode, Inc. All rights reserved. License: Unicode-DFS-2016 diff --git a/LICENSES/NCSA.txt b/LICENSES/NCSA.txt new file mode 100644 index 0000000000000..cf5413effa25a --- /dev/null +++ b/LICENSES/NCSA.txt @@ -0,0 +1,15 @@ +University of Illinois/NCSA Open Source License + +Copyright (c) . All rights reserved. + +Developed by: + +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: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. + + * 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. + + * Neither the names of , nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. + +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. From 39e8b35df93e968750521d6f035f5887e7abe54f Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 15 Nov 2022 11:49:55 +0100 Subject: [PATCH 10/19] split fira sans copyright notice into multiple lines --- .reuse/dep5 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.reuse/dep5 b/.reuse/dep5 index 8d2bb8df16b32..691f550bc72e6 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -48,7 +48,8 @@ Copyright: 1991-2022 Unicode, Inc. All rights reserved. License: Unicode-DFS-2016 Files: src/librustdoc/html/static/fonts/FiraSans* -Copyright: 2014, Mozilla Foundation, 2014, Telefonica S.A. +Copyright: 2014, Mozilla Foundation + 2014, Telefonica S.A. License: OFL-1.1 Files: src/librustdoc/html/static/fonts/NanumBarun* From 7b9a8e113bd4507bd6bd9bdc976d93571c3a1fa4 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 15 Nov 2022 11:50:09 +0100 Subject: [PATCH 11/19] use the same copyright string for adobe fonts --- .reuse/dep5 | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.reuse/dep5 b/.reuse/dep5 index 691f550bc72e6..ef41c02934e50 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -57,11 +57,8 @@ Copyright: 2010 NAVER Corporation License: OFL-1.1 Files: src/librustdoc/html/static/fonts/SourceCodePro* -Copyright: 2010, 2012 Adobe Systems Incorporated -License: OFL-1.1 - -Files: src/librustdoc/html/static/fonts/SourceSerif4* -Copyright: 2014-2021 Adobe Systems Incorporated + src/librustdoc/html/static/fonts/SourceSerif4* +Copyright: 2010, 2012, 2014-2023, Adobe Systems Incorporated License: OFL-1.1 Files: src/librustdoc/html/static/css/normalize.css From 89867e8b453caeeb240dbb5cf5b48da481f284f8 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 15 Nov 2022 12:09:31 +0100 Subject: [PATCH 12/19] avoid reuse tripping over copyright notices --- src/doc/footer.inc | 2 ++ src/librustdoc/html/static/COPYRIGHT.txt | 4 ++++ src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt | 4 ++++ .../html/static/fonts/NanumBarunGothic-LICENSE.txt | 4 ++++ src/librustdoc/html/static/fonts/SourceCodePro-LICENSE.txt | 4 ++++ src/librustdoc/html/static/fonts/SourceSerif4-LICENSE.md | 5 +++++ src/tools/clippy/COPYRIGHT | 4 ++++ src/tools/clippy/README.md | 4 ++++ src/tools/clippy/rustc_tools_util/README.md | 4 ++++ 9 files changed, 35 insertions(+) diff --git a/src/doc/footer.inc b/src/doc/footer.inc index 77e151235e822..504fe51156d3f 100644 --- a/src/doc/footer.inc +++ b/src/doc/footer.inc @@ -1,3 +1,4 @@ +

Copyright © 2011 The Rust Project Developers. Licensed under the Apache License, Version 2.0 @@ -5,3 +6,4 @@ or the MIT license, at your op

This file may not be copied, modified, or distributed except according to those terms.

+ diff --git a/src/librustdoc/html/static/COPYRIGHT.txt b/src/librustdoc/html/static/COPYRIGHT.txt index 34e48134cc34c..1447df792f68e 100644 --- a/src/librustdoc/html/static/COPYRIGHT.txt +++ b/src/librustdoc/html/static/COPYRIGHT.txt @@ -1,3 +1,5 @@ +# REUSE-IgnoreStart + These documentation pages include resources by third parties. This copyright file applies only to those resources. The following third party resources are included, and carry their own copyright notices and license terms: @@ -44,3 +46,5 @@ included, and carry their own copyright notices and license terms: See SourceSerif4-LICENSE.md. This copyright file is intended to be distributed with rustdoc output. + +# REUSE-IgnoreEnd diff --git a/src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt b/src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt index ff9afab064a28..d7e9c149b7ead 100644 --- a/src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt +++ b/src/librustdoc/html/static/fonts/FiraSans-LICENSE.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. with Reserved Font Name < Fira >, @@ -92,3 +94,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/src/librustdoc/html/static/fonts/NanumBarunGothic-LICENSE.txt b/src/librustdoc/html/static/fonts/NanumBarunGothic-LICENSE.txt index 0bf46682b5b89..4b3edc29eb909 100644 --- a/src/librustdoc/html/static/fonts/NanumBarunGothic-LICENSE.txt +++ b/src/librustdoc/html/static/fonts/NanumBarunGothic-LICENSE.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Copyright (c) 2010, NAVER Corporation (https://www.navercorp.com/), with Reserved Font Name Nanum, Naver Nanum, NanumGothic, Naver NanumGothic, @@ -97,3 +99,5 @@ INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/src/librustdoc/html/static/fonts/SourceCodePro-LICENSE.txt b/src/librustdoc/html/static/fonts/SourceCodePro-LICENSE.txt index 07542572e33bd..0d2941e148df2 100644 --- a/src/librustdoc/html/static/fonts/SourceCodePro-LICENSE.txt +++ b/src/librustdoc/html/static/fonts/SourceCodePro-LICENSE.txt @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + 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. 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 DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +// REUSE-IgnoreEnd diff --git a/src/librustdoc/html/static/fonts/SourceSerif4-LICENSE.md b/src/librustdoc/html/static/fonts/SourceSerif4-LICENSE.md index 5871e1f3d1b33..175fa4f47aecd 100644 --- a/src/librustdoc/html/static/fonts/SourceSerif4-LICENSE.md +++ b/src/librustdoc/html/static/fonts/SourceSerif4-LICENSE.md @@ -1,3 +1,6 @@ + + +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. 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. 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 DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + + diff --git a/src/tools/clippy/COPYRIGHT b/src/tools/clippy/COPYRIGHT index a6be75b5e310a..82703b18fd7d2 100644 --- a/src/tools/clippy/COPYRIGHT +++ b/src/tools/clippy/COPYRIGHT @@ -1,3 +1,5 @@ +// REUSE-IgnoreStart + Copyright 2014-2022 The Rust Project Developers Licensed under the Apache License, Version 2.0 or the MIT license , at your option. All files in the project carrying such notice may not be copied, modified, or distributed except according to those terms. + +// REUSE-IgnoreEnd diff --git a/src/tools/clippy/README.md b/src/tools/clippy/README.md index 3e7379ace7ea5..b69ed8900a491 100644 --- a/src/tools/clippy/README.md +++ b/src/tools/clippy/README.md @@ -275,6 +275,8 @@ If you want to contribute to Clippy, you can find more information in [CONTRIBUT ## License + + Copyright 2014-2022 The Rust Project Developers Licensed under the Apache License, Version 2.0 , at your option. Files in the project may not be copied, modified, or distributed except according to those terms. + + diff --git a/src/tools/clippy/rustc_tools_util/README.md b/src/tools/clippy/rustc_tools_util/README.md index eefc661f96352..e197ea048a0af 100644 --- a/src/tools/clippy/rustc_tools_util/README.md +++ b/src/tools/clippy/rustc_tools_util/README.md @@ -49,6 +49,8 @@ The changelog for `rustc_tools_util` is available under: ## License + + Copyright 2014-2022 The Rust Project Developers Licensed under the Apache License, Version 2.0 or the MIT license , at your option. All files in the project carrying such notice may not be copied, modified, or distributed except according to those terms. + + From 598dd1d7d893ec80dd6723ec84a210501f0d8cd0 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 11:10:33 +0100 Subject: [PATCH 13/19] mark the whole library/std/src/sync/mpmc as copyrighted by crossbeam --- .reuse/dep5 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index ef41c02934e50..14f2f37617b67 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -47,6 +47,11 @@ Files: library/core/src/unicode/unicode_data.rs Copyright: 1991-2022 Unicode, Inc. All rights reserved. License: Unicode-DFS-2016 +Files: library/std/src/sync/mpmc/* +Copyright: 2019 The Crossbeam Project Developers + The Rust Project Developers (see https://thanks.rust-lang.org) +License: MIT OR Apache-2.0 + Files: src/librustdoc/html/static/fonts/FiraSans* Copyright: 2014, Mozilla Foundation 2014, Telefonica S.A. From 9b5ded93f1106c94b94010bc460631625160b792 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 11:16:24 +0100 Subject: [PATCH 14/19] clarify the fuchsia code licensing --- .reuse/dep5 | 5 +++++ LICENSES/BSD-2-Clause.txt | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 LICENSES/BSD-2-Clause.txt diff --git a/.reuse/dep5 b/.reuse/dep5 index 14f2f37617b67..30888ac2fc7e3 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -52,6 +52,11 @@ Copyright: 2019 The Crossbeam Project Developers The Rust Project Developers (see https://thanks.rust-lang.org) License: MIT OR Apache-2.0 +Files: library/std/src/sys/unix/locks/fuchsia_mutex.rs +Copyright: 2016 The Fuchsia Authors + The Rust Project Developers (see https://thanks.rust-lang.org) +License: BSD-2-Clause AND (MIT OR Apache-2.0) + Files: src/librustdoc/html/static/fonts/FiraSans* Copyright: 2014, Mozilla Foundation 2014, Telefonica S.A. diff --git a/LICENSES/BSD-2-Clause.txt b/LICENSES/BSD-2-Clause.txt new file mode 100644 index 0000000000000..5f662b354cd40 --- /dev/null +++ b/LICENSES/BSD-2-Clause.txt @@ -0,0 +1,9 @@ +Copyright (c) + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +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. + +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. From b33172a2df0e2dba66d1a4245edc8f06cf43ff8c Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 17 Nov 2022 10:33:10 +0100 Subject: [PATCH 15/19] replace legacy copyright annotations in submodules --- .../rustc_codegen_cranelift/example/alloc_system.rs | 12 +++--------- compiler/rustc_codegen_gcc/example/alloc_system.rs | 12 +++--------- src/tools/miri/tests/pass/intrinsics-integer.rs | 11 ++--------- src/tools/miri/tests/pass/intrinsics-math.rs | 11 ++--------- src/tools/miri/tests/pass/issues/issue-30530.rs | 11 ++--------- src/tools/miri/tests/pass/tag-align-dyn-u64.rs | 11 ++--------- src/tools/rust-installer/combine-installers.sh | 9 --------- src/tools/rust-installer/gen-install-script.sh | 9 --------- src/tools/rust-installer/gen-installer.sh | 9 --------- src/tools/rust-installer/install-template.sh | 9 --------- src/tools/rust-installer/make-tarballs.sh | 9 --------- 11 files changed, 14 insertions(+), 99 deletions(-) diff --git a/compiler/rustc_codegen_cranelift/example/alloc_system.rs b/compiler/rustc_codegen_cranelift/example/alloc_system.rs index 50261c1939739..e64daf96b01c9 100644 --- a/compiler/rustc_codegen_cranelift/example/alloc_system.rs +++ b/compiler/rustc_codegen_cranelift/example/alloc_system.rs @@ -1,12 +1,6 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) + #![no_std] pub struct System; diff --git a/compiler/rustc_codegen_gcc/example/alloc_system.rs b/compiler/rustc_codegen_gcc/example/alloc_system.rs index fd01fcf1fc82c..9ec18da90d819 100644 --- a/compiler/rustc_codegen_gcc/example/alloc_system.rs +++ b/compiler/rustc_codegen_gcc/example/alloc_system.rs @@ -1,12 +1,6 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) + #![no_std] #![feature(allocator_api, rustc_private)] #![cfg_attr(any(unix, target_os = "redox"), feature(libc))] diff --git a/src/tools/miri/tests/pass/intrinsics-integer.rs b/src/tools/miri/tests/pass/intrinsics-integer.rs index 546931f6ff875..13e7bd8e1b944 100644 --- a/src/tools/miri/tests/pass/intrinsics-integer.rs +++ b/src/tools/miri/tests/pass/intrinsics-integer.rs @@ -1,12 +1,5 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) #![feature(core_intrinsics)] use std::intrinsics::*; diff --git a/src/tools/miri/tests/pass/intrinsics-math.rs b/src/tools/miri/tests/pass/intrinsics-math.rs index 5973f4cd197fe..9f2dc333f33ec 100644 --- a/src/tools/miri/tests/pass/intrinsics-math.rs +++ b/src/tools/miri/tests/pass/intrinsics-math.rs @@ -1,12 +1,5 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) macro_rules! assert_approx_eq { ($a:expr, $b:expr) => {{ diff --git a/src/tools/miri/tests/pass/issues/issue-30530.rs b/src/tools/miri/tests/pass/issues/issue-30530.rs index 472b42adaac85..b50a43ffd83b0 100644 --- a/src/tools/miri/tests/pass/issues/issue-30530.rs +++ b/src/tools/miri/tests/pass/issues/issue-30530.rs @@ -1,12 +1,5 @@ -// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) // Regression test for Issue #30530: alloca's created for storing // intermediate scratch values during brace-less match arms need to be diff --git a/src/tools/miri/tests/pass/tag-align-dyn-u64.rs b/src/tools/miri/tests/pass/tag-align-dyn-u64.rs index 72211a8d3f3af..81a43cc8bcc6b 100644 --- a/src/tools/miri/tests/pass/tag-align-dyn-u64.rs +++ b/src/tools/miri/tests/pass/tag-align-dyn-u64.rs @@ -1,12 +1,5 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. +// SPDX-License-Identifier: MIT OR Apache-2.0 +// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org) use std::mem; diff --git a/src/tools/rust-installer/combine-installers.sh b/src/tools/rust-installer/combine-installers.sh index bdbaab711394f..bee5319fd5502 100755 --- a/src/tools/rust-installer/combine-installers.sh +++ b/src/tools/rust-installer/combine-installers.sh @@ -1,13 +1,4 @@ #!/bin/bash -# Copyright 2014 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. set -ue diff --git a/src/tools/rust-installer/gen-install-script.sh b/src/tools/rust-installer/gen-install-script.sh index b4559d147addd..f112fd4b21f92 100755 --- a/src/tools/rust-installer/gen-install-script.sh +++ b/src/tools/rust-installer/gen-install-script.sh @@ -1,13 +1,4 @@ #!/bin/bash -# Copyright 2014 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. set -ue diff --git a/src/tools/rust-installer/gen-installer.sh b/src/tools/rust-installer/gen-installer.sh index 9a2c3016fee44..eabd8c95cd849 100755 --- a/src/tools/rust-installer/gen-installer.sh +++ b/src/tools/rust-installer/gen-installer.sh @@ -1,13 +1,4 @@ #!/bin/bash -# Copyright 2014 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. set -ue diff --git a/src/tools/rust-installer/install-template.sh b/src/tools/rust-installer/install-template.sh index 7790541a4201a..92a3f1f2c983a 100644 --- a/src/tools/rust-installer/install-template.sh +++ b/src/tools/rust-installer/install-template.sh @@ -1,13 +1,4 @@ #!/bin/bash -# Copyright 2014 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. # No undefined variables set -u diff --git a/src/tools/rust-installer/make-tarballs.sh b/src/tools/rust-installer/make-tarballs.sh index 6fc823666f14b..e342007da373c 100755 --- a/src/tools/rust-installer/make-tarballs.sh +++ b/src/tools/rust-installer/make-tarballs.sh @@ -1,13 +1,4 @@ #!/bin/sh -# Copyright 2014 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. set -ue From 3ff2d59ba1abb9dab6cd00328c83cdf5ffb36318 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 17 Nov 2022 10:35:04 +0100 Subject: [PATCH 16/19] attribute the source code from the enum-primitive crate --- .reuse/dep5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index 30888ac2fc7e3..dfcdb7bb5cc59 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -57,6 +57,10 @@ Copyright: 2016 The Fuchsia Authors The Rust Project Developers (see https://thanks.rust-lang.org) License: BSD-2-Clause AND (MIT OR Apache-2.0) +Files: src/test/rustdoc/auxiliary/enum-primitive.rs +Copyright: 2015 Anders Kaseorg +License: MIT + Files: src/librustdoc/html/static/fonts/FiraSans* Copyright: 2014, Mozilla Foundation 2014, Telefonica S.A. From 95a659f252056bcd8886f3f6083257240b662edf Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 17 Nov 2022 11:19:38 +0100 Subject: [PATCH 17/19] annotate original authors of the ayu theme --- .reuse/dep5 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index dfcdb7bb5cc59..0f033f7cdb05f 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -79,6 +79,11 @@ Files: src/librustdoc/html/static/css/normalize.css Copyright: Nicolas Gallagher and Jonathan Neal License: MIT +Files: src/librustdoc/html/static/css/themes/ayu.css +Copyright: Ike Ku, Jessica Stokes, Leon Guan + The Rust Project Developers (see https://thanks.rust-lang.org) +License: MIT OR Apache-2.0 + Files: src/doc/rustc-dev-guide/mermaid.min.js Copyright: Knut Sveidqvist License: MIT From 1853e113b5b17f32d4ec0f19ef56aa535fc8ee5c Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 12:04:20 +0100 Subject: [PATCH 18/19] add authors for two apache-2-with-llvm-exception files --- .reuse/dep5 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.reuse/dep5 b/.reuse/dep5 index 0f033f7cdb05f..dc6a60e623952 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -43,6 +43,16 @@ Copyright: LLVM APFloat authors The Rust Project Developers (see https://thanks.rust-lang.org) License: NCSA AND (MIT OR Apache-2.0) +Files: compiler/rustc_codegen_cranelift/src/cranelift_native.rs +Copyright: The Cranelift Project Developers + The Rust Project Developers (see https://thanks.rust-lang.org) +License: Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT) + +Files: compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp +Copyright: LLVM authors + The Rust Project Developers (see https://thanks.rust-lang.org) +License: Apache-2.0 WITH LLVM-exception AND (Apache-2.0 OR MIT) + Files: library/core/src/unicode/unicode_data.rs Copyright: 1991-2022 Unicode, Inc. All rights reserved. License: Unicode-DFS-2016 From 9c24608b505cb106204183e8e12b66dad72f1450 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 13:55:23 +0100 Subject: [PATCH 19/19] record the cpu usage in a gitignored directory --- src/ci/scripts/collect-cpu-stats.sh | 3 ++- src/ci/scripts/upload-artifacts.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ci/scripts/collect-cpu-stats.sh b/src/ci/scripts/collect-cpu-stats.sh index 853b4628fab2f..44875b54ddc4d 100755 --- a/src/ci/scripts/collect-cpu-stats.sh +++ b/src/ci/scripts/collect-cpu-stats.sh @@ -6,4 +6,5 @@ set -euo pipefail IFS=$'\n\t' -python3 src/ci/cpu-usage-over-time.py &> cpu-usage.csv & +mkdir -p build +python3 src/ci/cpu-usage-over-time.py &> build/cpu-usage.csv & diff --git a/src/ci/scripts/upload-artifacts.sh b/src/ci/scripts/upload-artifacts.sh index ffa1859fc2253..9755edb6dce58 100755 --- a/src/ci/scripts/upload-artifacts.sh +++ b/src/ci/scripts/upload-artifacts.sh @@ -23,7 +23,7 @@ if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then fi # CPU usage statistics. -cp cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv" +cp build/cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv" # Build metrics generated by x.py. cp "${build_dir}/metrics.json" "${upload_dir}/metrics-${CI_JOB_NAME}.json"