about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorJonathan Pallant <jonathan.pallant@ferrous-systems.com>2024-11-25 16:06:02 +0000
committerJonathan Pallant <jonathan.pallant@ferrous-systems.com>2024-12-09 10:18:55 +0000
commitf9c16997dc016a3ef1456f56df2ab564a1c48cb2 (patch)
tree9f59e7399ca2e5657910f0bad7a8b37dfab4184d /src/tools
parent9b4d7c6a40b328d212095c28670c629facf1557d (diff)
dist: Re-work how we describe the licence of Rust in our distributions
) add COPYRIGHT*.html files to the rustc binary distribution
) add contents of LICENSE folder to dist tarballs, because some of our in-tree licences will require that the license text is reproduced.
) The wording of COPYRIGHT is adjusted to not include license text (`reuse` ensures that it's in the LICENSE folder)
) A blanket copyright notice is added to LICENCE-MIT as required by the text.

The general approach is that the license statements are now compiled using a tool in CI (generate-copyright), and you get either:

* the source code (COPYRIGHT, LICENCE-APACHE, LICENCE-MIT, REUSE.toml and the LICENCES folder), or
* the compiled version (COPYRIGHT.html, COPYRIGHT-library.html and the LICENCES folder).
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/generate-copyright/templates/COPYRIGHT-library.html23
-rw-r--r--src/tools/generate-copyright/templates/COPYRIGHT.html26
2 files changed, 35 insertions, 14 deletions
diff --git a/src/tools/generate-copyright/templates/COPYRIGHT-library.html b/src/tools/generate-copyright/templates/COPYRIGHT-library.html
index 2c1eba741db..590a84dd931 100644
--- a/src/tools/generate-copyright/templates/COPYRIGHT-library.html
+++ b/src/tools/generate-copyright/templates/COPYRIGHT-library.html
@@ -8,20 +8,31 @@
 
 <h1>Copyright notices for The Rust Standard Library</h1>
 
-<p>This file describes the copyright and licensing information for the Rust
-Standard Library source code within The Rust Project git tree, and the
-third-party dependencies used when building the Rust Standard Library.</p>
-
 <h2>Table of Contents</h2>
 <ul>
+    <li><a href="#short-version">Short version for non-lawyers</a></li>
+    <li><a href="#longer-version">Longer version</a></li>
     <li><a href="#in-tree-files">In-tree files</a></li>
     <li><a href="#out-of-tree-dependencies">Out-of-tree dependencies</a></li>
 </ul>
 
+<h2 id="short-version">Short version for non-lawyers</h2>
+
+The Rust Standard Library is dual-licensed under Apache 2.0 and MIT terms.
+
+<h2 id="longer-version">Longer version</h2>
+
+<p>Copyrights in the Rust Standard Library are retained by their contributors. No copyright assignment is required to contribute to the Rust project.</p>
+
+<p>Some files include explicit copyright notices and/or license notices. For full authorship information, see the version control history or <a href="https://thanks.rust-lang.org">https://thanks.rust-lang.org</a>.</p>
+
+<p>Except as otherwise noted (below and/or in individual files), the Rust Standard Library is licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> or the <a href="http://opensource.org/licenses/MIT">MIT</a> license, at your option.</p>
+
+<p>This file describes the copyright and licensing information for the source code within The Rust Project git tree related to the Rust Standard Library, and the third-party dependencies used when building the Rust Standard Library.</p>
+
 <h2 id="in-tree-files">In-tree files</h2>
 
-<p>The following licenses cover the in-tree source files that were used in this
-release:</p>
+<p>The following licenses cover the in-tree source files that were used in this release:</p>
 
 {{ in_tree|safe }}
 
diff --git a/src/tools/generate-copyright/templates/COPYRIGHT.html b/src/tools/generate-copyright/templates/COPYRIGHT.html
index ccb177a54d4..a0ed7bfb8d0 100644
--- a/src/tools/generate-copyright/templates/COPYRIGHT.html
+++ b/src/tools/generate-copyright/templates/COPYRIGHT.html
@@ -8,27 +8,37 @@
 
 <h1>Copyright notices for The Rust Toolchain</h1>
 
-<p>This file describes the copyright and licensing information for the source
-code within The Rust Project git tree, and the third-party dependencies used
-when building the Rust toolchain (including the Rust Standard Library).</p>
-
 <h2>Table of Contents</h2>
 <ul>
+    <li><a href="#short-version">Short version for non-lawyers</a></li>
+    <li><a href="#longer-version">Longer version</a></li>
     <li><a href="#in-tree-files">In-tree files</a></li>
     <li><a href="#out-of-tree-dependencies">Out-of-tree dependencies</a></li>
 </ul>
 
+<h2 id="short-version">Short version for non-lawyers</h2>
+
+The Rust Project is dual-licensed under Apache 2.0 and MIT terms.
+
+<h2 id="longer-version">Longer version</h2>
+
+<p>Copyrights in the Rust project are retained by their contributors. No copyright assignment is required to contribute to the Rust project.</p>
+
+<p>Some files include explicit copyright notices and/or license notices. For full authorship information, see the version control history or <a href="https://thanks.rust-lang.org">https://thanks.rust-lang.org</a>.</p>
+
+<p>Except as otherwise noted (below and/or in individual files), Rust is licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> or the <a href="http://opensource.org/licenses/MIT">MIT</a> license, at your option.</p>
+
+<p>This file describes the copyright and licensing information for the source code within The Rust Project git tree, and the third-party dependencies used when building the Rust toolchain (including the Rust Standard Library).</p>
+
 <h2 id="in-tree-files">In-tree files</h2>
 
-<p>The following licenses cover the in-tree source files that were used in this
-release:</p>
+<p>The following licenses cover the in-tree source files that were used in this release:</p>
 
 {{ in_tree|safe }}
 
 <h2 id="out-of-tree-dependencies">Out-of-tree dependencies</h2>
 
-<p>The following licenses cover the out-of-tree crates that were used in this
-release:</p>
+<p>The following licenses cover the out-of-tree crates that were used in this release:</p>
 
 {% for (key, value) in dependencies %}
     <h3>📦 {{key.name}}-{{key.version}}</h3>