-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GenerateCopyright
attempts to vendor sources during installation
#136955
Comments
This happens because @rustbot label T-bootstrap A-licensing |
I think running |
The generated HTML needs to be shipped with the binary dist of rustc, not the source tarball, because it contains all things that must be supplied alongside any 'redistribution' of 'the software'. |
Probably shouldn't be vendoring twice though - I can look at using the existing vendor folder if one has already been fetched. |
please do not try to replicate the vendoring logic in a separate tool. instead, do the vendoring all in one place in bootstrap. i understand that this may run even when config.vendor is disabled, so you could switch on that in bootstrap (ideally it would put sources used only for parsing copyright in a different directory on disk). but it should not live in a separate tool. |
I can't see any reason that shipping it in a tarball doesn't meet those requirements. We don't even use html files in Gentoo anyway; we have our own mechanism for identifying and managing licensing (and most [all?] distros do the same thing). If I needed to refer to them I would:
It seems superfluous to run that implicitly as part of the bootstrap |
Yeah, I'll open a PR soon to have bootstrap retrieve the vendored sources (from config.vendor or from the network if needed) and pass them to generate-copyright.
When the Rust project distributes pre-built binaries, we cannot distribute the license file just in the source tarball: if an user just downloads To reduce duplication, |
Opened #137020 with the fix. |
Pass vendored sources from bootstrap to generate-copyright In addition to doing the vendoring in bootstrap, this PR also loads the list of manifests to parse from bootstrap (instead of hardcoding a smaller list in generate-copyright). This is best reviewed commit-by-commit. Fixes rust-lang#136955
Rollup merge of rust-lang#137020 - ferrocene:pa-vendor-sources, r=Kobzol Pass vendored sources from bootstrap to generate-copyright In addition to doing the vendoring in bootstrap, this PR also loads the list of manifests to parse from bootstrap (instead of hardcoding a smaller list in generate-copyright). This is best reviewed commit-by-commit. Fixes rust-lang#136955
Gentoo Linux builds are primarily performed in a sandbox that prevents network activity after sources are fetched.
Unfortunately this leaves us unable to package
nightly
asGenerateCopyright
is invoked byx.py install
, which attempts to vendor crates into the build directory.GenerateCopyright
should only be run when generating the source tarball, or should at the very least at least be a separate step fromRustc
src/tools/generate-copyright
should respectconfig.vendor
I tried this:
`x.py install ...
I expected to see this happen:
A successful installation into
DESTDIR
Instead, this happened:
rust-9999:20250213-003653.log.xz.txt
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: