Skip to content
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

Use getuid to check instead of USER env var in rustbuild #100852

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

Samyak2
Copy link
Contributor

@Samyak2 Samyak2 commented Aug 21, 2022

This makes it consistent with x.py as changed in #95671

Fixes #100459

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Aug 21, 2022
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 21, 2022
src/bootstrap/lib.rs Outdated Show resolved Hide resolved
src/bootstrap/lib.rs Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member

r=me with commits squashed

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 23, 2022

📌 Commit 9fc23bb has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 23, 2022
@Mark-Simulacrum Mark-Simulacrum added beta-nominated Nominated for backporting to the compiler in the beta channel. beta-accepted Accepted for backporting to the compiler in the beta channel. labels Aug 23, 2022
@Mark-Simulacrum
Copy link
Member

Also going to approve for beta-backport as a small patch that fixes a stable/stable regression.

JohnTitor added a commit to JohnTitor/rust that referenced this pull request Aug 23, 2022
…lacrum

Use `getuid` to check instead of `USER` env var in rustbuild

This makes it consistent with `x.py` as changed in rust-lang#95671

Fixes rust-lang#100459
@JohnTitor
Copy link
Member

Failed in rollup: #100931 (comment)
@bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 24, 2022
@Mark-Simulacrum
Copy link
Member

Hm, that's annoying. My guess is that this is not really relevant outside cfg(unix) because SUDO_USER won't be defined - but maybe Windows also has sudo?

Let's try to see what the python getuid() equivalent does on Windows, if anything, and go from there.

@bjorn3
Copy link
Member

bjorn3 commented Aug 26, 2022

Windows has runas, which is somewhat similar to sudo, but it doesn't set SUDO_USER.

@Mark-Simulacrum
Copy link
Member

Alright. Then I think putting a #[cfg(unix)] on the condition is reasonable.

@Samyak2
Copy link
Contributor Author

Samyak2 commented Aug 26, 2022

Python's os.getuid() is not available on Windows either:

>>> import os
>>> os.getuid()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'os' has no attribute 'getuid'

Alright. Then I think putting a #[cfg(unix)] on the condition is reasonable.

In that case, will is_sudo be set to false on other platforms?

@Mark-Simulacrum
Copy link
Member

Yes, that would make sense to me.

This makes it consistent with `x.py` as changed in rust-lang#95671

Fixes rust-lang#100459
@Samyak2
Copy link
Contributor Author

Samyak2 commented Aug 30, 2022

I tested on Windows, rustbuild builds successfully.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 1, 2022

📌 Commit b9c47f6 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 1, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 1, 2022
…lacrum

Use `getuid` to check instead of `USER` env var in rustbuild

This makes it consistent with `x.py` as changed in rust-lang#95671

Fixes rust-lang#100459
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Sep 1, 2022
…lacrum

Use `getuid` to check instead of `USER` env var in rustbuild

This makes it consistent with `x.py` as changed in rust-lang#95671

Fixes rust-lang#100459
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 1, 2022
…iaskrgr

Rollup of 14 pull requests

Successful merges:

 - rust-lang#94467 (Add `special_module_name` lint)
 - rust-lang#100852 (Use `getuid` to check instead of `USER` env var in rustbuild)
 - rust-lang#101072 (bootstrap: Add llvm-has-rust-patches target option)
 - rust-lang#101190 (Make docs formulation more consistent for NonZero{int})
 - rust-lang#101245 (Remove unneeded where whitespace)
 - rust-lang#101251 (Fix  bad target name in Walkthrough)
 - rust-lang#101254 (rustdoc: remove unused `.docblock .impl-items` CSS)
 - rust-lang#101256 (Fixes/adjustments to Fuchsia doc walkthrough)
 - rust-lang#101270 (Update outdated comment about output capturing in print_to.)
 - rust-lang#101271 (Fix filename of armv4t-none-eabi.md)
 - rust-lang#101274 (Fix typo in comment)
 - rust-lang#101279 (Fix doc_auto_cfg for impl blocks in different modules with different `cfg`)
 - rust-lang#101285 (Do not suggest adding `move` to closure when `move` is already used)
 - rust-lang#101292 (rustdoc: remove unneeded CSS `.content table td:first-child > a`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b05f97d into rust-lang:master Sep 2, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 2, 2022
@pietroalbini pietroalbini removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 19, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 19, 2022
[stable] Prepare 1.64.0 release

This PR prepares the 1.64.0 stable release builds.

In addition to bumping the channel and including the latest release notes changes, this PR also backports the following PRs:

*  rust-lang#100852
*  rust-lang#101366
*  rust-lang#101468
*  rust-lang#101922

This PR also reverts the following PRs, as decided in rust-lang#101899 (comment):

* rust-lang#95295
* rust-lang#99136 (followup to the previous PR)

r? `@ghost`
cc `@rust-lang/release`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rust 1.63.0 fails to build with: error: failed to download addr2line v0.16.0
8 participants