-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Cannot run x.py
under sudo as non-root user
#93344
Labels
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-help-wanted
Call for participation: Help is requested to fix this issue.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Comments
If the implementation for this is relatively straightforward, a PR is likely to be accepted. |
aarongable
pushed a commit
to chromium/chromium
that referenced
this issue
Jan 28, 2022
x.py was failing due to the use of sudo on builders (see rust-lang/rust#93344). Enabling vendoring bypasses this check and prepares us for future vendoring of dependency sources, which we will likely want to do. The build still touches $HOME/.cargo which is undesirable but a fix will be in a later change. Bug: 1245714 Change-Id: Ic6d2027289ebdbcf82a03b6bc571167245acb398 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3417957 Reviewed-by: Adrian Taylor <adetaylor@chromium.org> Commit-Queue: Collin Baker <collinbaker@chromium.org> Cr-Commit-Position: refs/heads/main@{#964667}
@rustbot label; +E-easy +E-help-wanted |
Error: Parsing relabel command in comment failed: ...'tbot label' | error: a label delta at >| '; +E-easy '... Please let |
@rustbot label: +E-easy +E-help-wanted |
@rustbot claim |
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 10, 2022
feat: Allow usage of sudo [while not accessing root] in x.py # Fixes This PR should fix rust-lang#93344 # Info Allows usage of sudo (while not accessing root) in x.py
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 11, 2022
feat: Allow usage of sudo [while not accessing root] in x.py # Fixes This PR should fix rust-lang#93344 # Info Allows usage of sudo (while not accessing root) in x.py
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this issue
Apr 11, 2022
feat: Allow usage of sudo [while not accessing root] in x.py # Fixes This PR should fix rust-lang#93344 # Info Allows usage of sudo (while not accessing root) in x.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-bug
Category: This is a bug.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
E-help-wanted
Call for participation: Help is requested to fix this issue.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
I am trying to build Rust from source on my project's continuous integration system. I see the following error:
Looking at the message and #40108 it seems the intent is to prevent putting root-owned files in a non-root user's home directory.
Our CI builders use sudo to step down from root to a sandboxed user. See https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8823996676604838337/+/u/build_rust/execution_details for an example environment. I believe it should be safe to build without vendoring in this case.
bootstrap.py should skip the check if SUDO_USER is not root, or an option to bypass this check should be provided.
The text was updated successfully, but these errors were encountered: