Skip to content

Conversation

tshepang
Copy link
Member

@tshepang tshepang commented Mar 20, 2025

Upstream recently added an automated way of generating copyright files (rust-lang/rust#135588), so we also need to do similar, because we have a different way of generating release tarballs.

@@ -138,6 +141,11 @@ impl Step for SourceTarball {
subsetter.add_file(&builder.src, &builder.src.join(item));
}

// Generate comprehensive copyright data and include the generated files
for item in builder.ensure(GenerateCopyright) {
subsetter.add_file(&builder.src, &item);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will be the path COPYRIGHT.html and COPYRIGHT-library.html will be copied to? They should be placed at the top level, not inside the build/ directory in the tarball (if that's the case).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is what happens... will adjust

@tshepang tshepang changed the title dist: add complete copyright/licensing info add complete copyright/licensing info to source tarball Mar 21, 2025
@tshepang tshepang force-pushed the tshepang-dist-complete-licensing-info branch from 0e5d525 to d1de901 Compare March 21, 2025 11:30
@tshepang
Copy link
Member Author

am unsure about the latest commit... writing to the root of the repo smells unpleasant

@pietroalbini
Copy link
Contributor

Yeah we should find a better approach. If you look at the implementation of add_file, the first parameter is the prefix that will be stripped from the path: so, something like this should result in the file being placed at the top level:

subsetter.add_file(&path.parent().unwrap(), &path);

@tshepang tshepang force-pushed the tshepang-dist-complete-licensing-info branch from d1de901 to 5bbe736 Compare March 21, 2025 15:54
@tshepang
Copy link
Member Author

bors try

bors-ferrocene bot added a commit that referenced this pull request Mar 22, 2025
@bors-ferrocene
Copy link
Contributor

try

Build failed:

@tshepang tshepang force-pushed the tshepang-dist-complete-licensing-info branch from 5bbe736 to bddba99 Compare March 25, 2025 09:47
This currently adds the following files:
- build/COPYRIGHT.html
- build/COPYRIGHT-library.html
- license-metadata.json
@tshepang tshepang force-pushed the tshepang-dist-complete-licensing-info branch from bddba99 to d3dc1cc Compare March 25, 2025 09:53
Copy link
Contributor

@pietroalbini pietroalbini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

@bors-ferrocene
Copy link
Contributor

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors-ferrocene
Copy link
Contributor

Build succeeded:

@bors-ferrocene bors-ferrocene bot merged commit d6f7da0 into main Mar 25, 2025
2 checks passed
@bors-ferrocene bors-ferrocene bot deleted the tshepang-dist-complete-licensing-info branch March 25, 2025 13:07
@github-actions github-actions bot added backport:maybe PR candidate for backport merged-in:1.87 labels Mar 25, 2025
@github-actions github-actions bot removed the backport:maybe PR candidate for backport label Apr 8, 2025
ferrocene-automations bot pushed a commit that referenced this pull request Apr 8, 2025
This currently adds the following files:
- build/COPYRIGHT.html
- build/COPYRIGHT-library.html
- license-metadata.json

Ferrocene-backport-of: #1375
bors-ferrocene bot added a commit that referenced this pull request Apr 9, 2025
1398: Backport to `release/1.86` r=tshepang a=ferrocene-automations[bot]

This PR backports the following PRs to the `release/1.86` branch:

* #1326
* #1342
* #1350
* #1370
* #1377
* #1375

Co-authored-by: Tshepang Mbambo <tshepang.mbambo@ferrous-systems.com>
Co-authored-by: Ana Hobden <operator@hoverbear.org>
Co-authored-by: Lukas Wirth <lukas.wirth@ferrous-systems.com>
Co-authored-by: Samuel Wright <samuel.wright@ferrous-systems.com>
@ferrocene-automations ferrocene-automations bot added the backport:manual PR requiring manual intervention to backport label Apr 10, 2025
@tshepang tshepang removed backport:manual PR requiring manual intervention to backport backport:1.86 labels Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants