-
Notifications
You must be signed in to change notification settings - Fork 66
cargo installer trying to write to /etc (creating /etc/bash_completion.d) and failing as user on macos #116
Description
On the latest macos there is no /etc/bash_completion.d yet ./x.py build tries to mkdir /etc/bash_completion.d as per the error message below despite prefix in the config.toml set to a local home folder and not expecting it to write anything outside the user space.
This is doing "./x.py install" after a successful "./x.py build" with config set to have "extended=true" for all the tools to build and install and profile being "compiler".
...
Building stage2 tool cargo-credential-1password (aarch64-apple-darwin)
Compiling syn v1.0.91
Compiling serde_derive v1.0.125
Compiling serde v1.0.125
Compiling serde_json v1.0.59
Compiling cargo-credential-1password v0.1.0 (/Users/alex/Documents/GitHub/rust-lang/rust/src/tools/cargo/crates/credential/cargo-credential-1password)
Finished release [optimized] target(s) in 7.99s
Dist cargo-1.64.0-dev-aarch64-apple-darwin
finished in 5.046 seconds
Install cargo stage2 (Some(aarch64-apple-darwin))
install: creating uninstall script at /Users/alex/.local/lib/rustlib/uninstall.sh
install: installing component 'cargo'
mkdir: /etc/bash_completion.d: Permission denied
install: error: directory creation failed. see logs at '/Users/alex/.local/lib/rustlib/install.log'
Build completed unsuccessfully in 0:06:36
The prefix is set to "/Users/alex/.local" FYI.
Here is the install.log FYI:
$ umask 022 && mkdir -p "/Users/alex/.local/lib/rustlib"
$ echo "3" > "/Users/alex/.local/lib/rustlib/rust-installer-version"
install: creating uninstall script at /Users/alex/.local/lib/rustlib/uninstall.sh
$ cp /Users/alex/Documents/GitHub/rust-lang/rust/build/tmp/tarball/cargo/aarch64-apple-darwin/cargo-1.64.0-dev-aarch64-apple-darwin/install.sh /Users/alex/.local/lib/rustlib/uninstall.sh
install: installing component 'cargo'
$ echo "cargo" >> "/Users/alex/.local/lib/rustlib/components"
$ umask 022 && mkdir -p "/Users/alex/.local/bin"
install: copying file /Users/alex/.local/bin/cargo
$ cp /Users/alex/Documents/GitHub/rust-lang/rust/build/tmp/tarball/cargo/aarch64-apple-darwin/cargo-1.64.0-dev-aarch64-apple-darwin/cargo/bin/cargo /Users/alex/.local/bin/cargo
$ chmod 755 /Users/alex/.local/bin/cargo
$ echo "file:/Users/alex/.local/bin/cargo" >> "/Users/alex/.local/lib/rustlib/manifest-cargo"
$ umask 022 && mkdir -p "/Users/alex/.local/libexec"
install: copying file /Users/alex/.local/libexec/cargo-credential-1password
$ cp /Users/alex/Documents/GitHub/rust-lang/rust/build/tmp/tarball/cargo/aarch64-apple-darwin/cargo-1.64.0-dev-aarch64-apple-darwin/cargo/libexec/cargo-credential-1password /Users/alex/.local/libexec/cargo-credential-1password
$ chmod 755 /Users/alex/.local/libexec/cargo-credential-1password
$ echo "file:/Users/alex/.local/libexec/cargo-credential-1password" >> "/Users/alex/.local/lib/rustlib/manifest-cargo"
$ umask 022 && mkdir -p "/Users/alex/.local/libexec"
install: copying file /Users/alex/.local/libexec/cargo-credential-macos-keychain
$ cp /Users/alex/Documents/GitHub/rust-lang/rust/build/tmp/tarball/cargo/aarch64-apple-darwin/cargo-1.64.0-dev-aarch64-apple-darwin/cargo/libexec/cargo-credential-macos-keychain /Users/alex/.local/libexec/cargo-credential-macos-keychain
$ chmod 755 /Users/alex/.local/libexec/cargo-credential-macos-keychain
$ echo "file:/Users/alex/.local/libexec/cargo-credential-macos-keychain" >> "/Users/alex/.local/lib/rustlib/manifest-cargo"
$ umask 022 && mkdir -p "/etc/bash_completion.d"
install: error: directory creation failed. see logs at '/Users/alex/.local/lib/rustlib/install.log'