From 656c31c862f86b59d9730a51a1599784676aaae6 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 11:07:57 +0100 Subject: fix broken collect-license-metadata --- src/tools/collect-license-metadata/src/path_tree.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/tools/collect-license-metadata/src/path_tree.rs b/src/tools/collect-license-metadata/src/path_tree.rs index 133ff683737..2778f6f0677 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, }, -- cgit 1.4.1-3-g733a5 From 6473ff150f75cd5ac32dd8371be99d66acd16a3c Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 12:04:45 +0100 Subject: strip leading dots from copyright statements --- src/tools/collect-license-metadata/src/licenses.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/tools/collect-license-metadata/src/licenses.rs b/src/tools/collect-license-metadata/src/licenses.rs index 1c95b1bc8e9..2855069db0d 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(); + } + } + } } -- cgit 1.4.1-3-g733a5 From 49b902f06e69909bfae468b136852d0a9a927bd2 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 12:24:08 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/tools/collect-license-metadata/src/path_tree.rs b/src/tools/collect-license-metadata/src/path_tree.rs index 2778f6f0677..7a2a440636d 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 d172c9e157b..4d116c7da65 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)] -- cgit 1.4.1-3-g733a5 From 89867e8b453caeeb240dbb5cf5b48da481f284f8 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Tue, 15 Nov 2022 12:09:31 +0100 Subject: 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 ++++ src/librustdoc/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(+) (limited to 'src') diff --git a/src/doc/footer.inc b/src/doc/footer.inc index 77e151235e8..504fe51156d 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 34e48134cc3..1447df792f6 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 ff9afab064a..d7e9c149b7e 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 0bf46682b5b..4b3edc29eb9 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 07542572e33..0d2941e148d 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 5871e1f3d1b..175fa4f47ae 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 a6be75b5e31..82703b18fd7 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 3e7379ace7e..b69ed8900a4 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 eefc661f963..e197ea048a0 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. + + -- cgit 1.4.1-3-g733a5 From b33172a2df0e2dba66d1a4245edc8f06cf43ff8c Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 17 Nov 2022 10:33:10 +0100 Subject: replace legacy copyright annotations in submodules --- compiler/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(-) (limited to 'src') diff --git a/compiler/rustc_codegen_cranelift/example/alloc_system.rs b/compiler/rustc_codegen_cranelift/example/alloc_system.rs index 50261c19397..e64daf96b01 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 fd01fcf1fc8..9ec18da90d8 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 546931f6ff8..13e7bd8e1b9 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 5973f4cd197..9f2dc333f33 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 472b42adaac..b50a43ffd83 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 72211a8d3f3..81a43cc8bcc 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 bdbaab71139..bee5319fd55 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 b4559d147ad..f112fd4b21f 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 9a2c3016fee..eabd8c95cd8 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 7790541a420..92a3f1f2c98 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 6fc823666f1..e342007da37 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 -- cgit 1.4.1-3-g733a5 From 9c24608b505cb106204183e8e12b66dad72f1450 Mon Sep 17 00:00:00 2001 From: Pietro Albini Date: Thu, 9 Mar 2023 13:55:23 +0100 Subject: 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(-) (limited to 'src') diff --git a/src/ci/scripts/collect-cpu-stats.sh b/src/ci/scripts/collect-cpu-stats.sh index 853b4628fab..44875b54ddc 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 ffa1859fc22..9755edb6dce 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" -- cgit 1.4.1-3-g733a5