about summary refs log tree commit diff
path: root/src/tools/generate-copyright
AgeCommit message (Collapse)AuthorLines
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-1/+1
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-28Add `serde_json` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-07-27bump cargo_metadataklensy-2/+3
2025-06-01Rollup merge of #141789 - ↵Guillaume Gomez-5/+17
ferrocene:hoverbear/exclude-cargo-home-from-in-tree-consideration, r=clubby789 Exclude `CARGO_HOME` from `generate-copyright` in-tree determination On Ferrocene, we noticed that in our releases the out-of-tree notices were not being included. When `x.py run generate-copyright` was ran on local development machines, it worked fine. After some investigations ``@tshepang`` and I determined that the problem was that the cargo registry (located in `CARGO_HOME`) started with the source directory on CI jobs, and was being excluded by this line: https://github.com/rust-lang/rust/blob/15825b7161f8bd6a3482211fbf6727a52aa1166b/src/tools/generate-copyright/src/cargo_metadata.rs#L85-L88 In Ferrocene's `run.sh` we set `CARGO_HOME` to be `build/cargo-home`: https://github.com/ferrocene/ferrocene/blob/96a45dd9a18c6e54d3cd81750a78fe459fa48af0/ferrocene/ci/run.sh#L34-L46 which caused this issue. This PR passes the `CARGO_HOME` variable to the `generate-copyright` tool and expands the consideration of in-tree-ness to be aware of `CARGO_HOME`. It is an upstreaming of https://github.com/ferrocene/ferrocene/pull/1491. ## Testing Run `CARGO_HOME=build/cargo-home ./x.py run generate-copyright` on `master`, then check `build/host/doc/COPYRIGHT` and look for out of tree dependencies (at the bottom). Then, try running the same command in this branch.
2025-05-30Exclude `CARGO_HOME` from `generate-copyright` in-tree determinationAna Hobden-5/+17
2025-05-24Update `askama` version to `0.14.0` in `generate-copyright` toolGuillaume Gomez-1/+1
2025-04-06Update rinja version in `generate-copyright`Guillaume Gomez-3/+3
2025-02-17generate-copyright: pass the vendored sources from bootstrapPietro Albini-44/+8
2025-02-14generate-copyright: pass the list of manifests from bootstrapPietro Albini-10/+31
2025-02-14generate-copyright: pass the source root from bootstrapPietro Albini-3/+4
2025-02-08Rustfmtbjorn3-9/+16
2025-01-06Ensure generate-copyright is executed from the project root.Jonathan Pallant-1/+4
2024-12-09dist: Re-work how we describe the licence of Rust in our distributionsJonathan Pallant-14/+35
) 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).
2024-11-25generate-copyright: Ensure output has UNIX line-endings for consistency.Jonathan Pallant-0/+8
2024-11-22generate-copyright: Fixup comment for get_metadata_and_notices.Jonathan Pallant-1/+1
2024-11-21generate-copyright: Now generates a library file too.Jonathan Pallant-27/+178
We only run reuse once, so the output has to be filtered to find only the files that are relevant to the library tree. Outputs build/COPYRIGHT.html and build/COPYRIGHT-library.html.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-9/+6
2024-08-06Apparently library/std is now part of a workspace at library/Jonathan Pallant-1/+1
2024-08-06Update to rinja 0.3Jonathan Pallant-1/+1
2024-08-06generate-copyright: gather files inside interesting foldersJonathan Pallant-17/+33
2024-08-06generate-copyright: Render Node with rinja too.Jonathan Pallant-73/+73
2024-08-06generate-copyright: use rinja to format the outputJonathan Pallant-152/+146
I can't find a way to derive rinja::Template for Node - I think because it is a recursive type. So I rendered it manually using html_escape.
2024-08-06generate-copyright: use cargo-metadataJonathan Pallant-62/+19
2024-08-06generate-copyright: Fix typoJonathan Pallant-1/+1
2024-08-06generate-copyright: Produce HTML, not MarkdownJonathan Pallant-102/+151
This format works better with large amounts of structured data. We also mark which deps are in the stdlib
2024-08-06Update generate-copyrightJonathan Pallant-12/+309
This tool now scans for cargo dependencies and includes any important looking license files. We do this because cargo package metadata is not sufficient - the Apache-2.0 license says you have to include any NOTICE file, for example. And authors != copyright holders (cargo has the former, we must include the latter).
2024-07-29Reformat `use` declarations.Nicholas Nethercote-1/+2
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-22Removed CondensedDirectory support from license tools.Jonathan Pallant-29/+9
Now that we have reuse-tool 4.0, we no longer need to massage the JSON license data to collapse LLVM into a single copyright notice and license - reuse-tool can do it for us using an annotation in REUSE.toml. This effectively reverts c6eb03b.
2023-11-27Fix generate-copyright tool.Jonathan Pallant (Ferrous Systems)-2/+2
LLVM copyrights are now condensed to those reported in the .reuse/dep5 file.
2023-11-22condense llvm licensing into a single itemJonathan Pallant (Ferrous Systems)-7/+28
2023-04-10Fix remaining typosDaniPopes-7/+7
2023-03-09include directories in grouped licensing informationPietro Albini-3/+3
2022-11-15initial prototype of the tool to generate copyright noticesPietro Albini-0/+105