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

bootstrap: sanity check install prefix and sysconfdir #113580

Closed
cuviper opened this issue Jul 11, 2023 · 2 comments · Fixed by #116127
Closed

bootstrap: sanity check install prefix and sysconfdir #113580

cuviper opened this issue Jul 11, 2023 · 2 comments · Fixed by #116127
Assignees
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@cuviper
Copy link
Member

cuviper commented Jul 11, 2023

In the followup discussion on #110906, we discovered that their original problem was because they had chosen a path under their home directory for [install] prefix, but they had not changed the default sysconfdir = "/etc". So most things installed fine, but they didn't have permission to write /etc/bash_completion.d/cargo.

Bootstrap could sanity check this when starting an install, seeing that prefix is writable by the current user but the absolute sysconfdir is not. (A relative sysconfdir goes under prefix, which should be fine.) This should also take DESTDIR into account as a further prefix on all installation paths.

@cuviper cuviper added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jul 11, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jul 11, 2023
@Noratrieb Noratrieb added C-enhancement Category: An issue proposing an enhancement or a PR with one. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jul 12, 2023
@LJason77
Copy link

I have just updated to version 1.71.0, and now I'm receiving the terminal warning:
~/.rustup/toolchains/stable-aarch64-unknown-linux-gnu/etc/bash_completion.d/cargo: No such file or directory

In my previous setup, I added the line source $(rustc --print sysroot)/etc/bash_completion.d/cargo to my ~/.bashrc file.

@cuviper
Copy link
Member Author

cuviper commented Jul 15, 2023

@LJason77 yeah, #110906 made that effectively $sysroot/src/etc. That was reverted in #113579, and now proposed for stable and beta backports. So you could add src/ for now, but it will be going back to the way it was.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants