-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Cannot run x.py under sudo as non-root user #93344
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-help-wantedCall for participation: Help is requested to fix this issue.Call for participation: Help is requested to fix this issue.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Type
Fields
Give feedbackNo fields configured for issues without a type.
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.