Change:
hey everyone, I get this message from when is executed: It seems there are some backports still missing for beta, since I can fix this by reverting locally, and there are some subsequent fixes in nightly who seemed to have fixed the issue for good. So, is there somewhere a list of the nightly backports needed to fix this problem? Thanks.
can I ping you on this? Beta is not compiling on gentoo, I assume at least one patch from nightly still needs to be backported to beta.
There is that should have fixed that and it's .
Hi, I'm on latest beta from last week. If I apply locally and compile, I get access denied error:
Logs says you don't have permission to put files into path from your build configuration. Without you would still get permission error.
I believe this is a sandbox error, so x.py install tries to write to / instead of it's prefix, and this is caused either by or it was already introduced by the older If I revert them both locally, I get a working x.py install
Interesting :thinking: Can you share your build configuration?
it basically does this: which translates to: and the patch seems to make x.py ignore the DESTDIR="" command In the rust context, the build config you asked me to share is the Have it attached for you, please feel free to ask for any additional information. also I can provide you with the full build log:
Did you wait for whole process(x.py install) to be finished? I don't understand how mkdir gets you into access denied error for path while you can actually create dirs/files in it..
Maybe there is some confusion about relative and absolute path? The access denied error is valid, as x.py never should mess with /usr/lib/ in install, but use /var/tmp/portage/dev-lang/rust-1.74.0_beta/image/ as it's prefix, if you want to name it like that.
True, there is a confusion between prefix and DESTDIR right now. I will fix it today.
Thank you, I'm happy to test any patch before you commit it to master.
You can test
yes this works for me, please also beta nominate
has this been beta-nominated? I'm new to this process, it's just I can't see a rollup pullrequest anywhere and the release of 1.74.0 is coming closer every day.
It is cc
for backport, the PR's responsible team (T-bootstrap) also needs to label it beta-accepted. Once it has both labels, the release team will handle the actual backport.

Discussion:
let prefix = default_path(&builder.config.prefix, "/usr/local"); let sysconfdir = prefix.join(default_path(&builder.config.sysconfdir, "/etc")); <ins> let destdir_env = env::var_os("DESTDIR").map(PathBuf::from); </ins> <del> // Sanity check for the user write access on prefix and sysconfdir assert!( is_dir_writable_for_user(&prefix), "User doesn't have write access on `install.prefix` path in the `config.toml`.", ); assert!( is_dir_writable_for_user(&sysconfdir), "User doesn't have write access on `install.sysconfdir` path in `config.toml`." ); </del> <ins> // Sanity checks on the write access of user. // // When the `DESTDIR` environment variable is present, there is no point to // check write access for `prefix` and `sysconfdir` individually, as they // are combined with the path from the `DESTDIR` environment variable. In // this case, we only need to check the `DESTDIR` path, disregarding the // `prefix` and `sysconfdir` paths. if let Some(destdir) = &destdir_env { assert!(is_dir_writable_for_user(destdir), "User doesn't have write access on DESTDIR."); } else { assert!( is_dir_writable_for_user(&prefix), "User doesn't have write access on `install.prefix` path in the `config.toml`.", ); assert!( is_dir_writable_for_user(&sysconfdir), "User doesn't have write access on `install.sysconfdir` path in `config.toml`." ); } </ins> let datadir = prefix.join(default_path(&builder.config.datadir, "share")); let docdir = prefix.join(default_path(&builder.config.docdir, "share/doc/rust"));

let mut cmd = Command::new(SHELL); cmd.current_dir(&empty_dir) .arg(sanitize_sh(&tarball.decompressed_output().join("install.sh"))) <del> .arg(format!("--prefix={}", prepare_dir(prefix))) .arg(format!("--sysconfdir={}", prepare_dir(sysconfdir))) .arg(format!("--datadir={}", prepare_dir(datadir))) .arg(format!("--docdir={}", prepare_dir(docdir))) .arg(format!("--bindir={}", prepare_dir(bindir))) .arg(format!("--libdir={}", prepare_dir(libdir))) .arg(format!("--mandir={}", prepare_dir(mandir))) </del> <ins> .arg(format!("--prefix={}", prepare_dir(&destdir_env, prefix))) .arg(format!("--sysconfdir={}", prepare_dir(&destdir_env, sysconfdir))) .arg(format!("--datadir={}", prepare_dir(&destdir_env, datadir))) .arg(format!("--docdir={}", prepare_dir(&destdir_env, docdir))) .arg(format!("--bindir={}", prepare_dir(&destdir_env, bindir))) .arg(format!("--libdir={}", prepare_dir(&destdir_env, libdir))) .arg(format!("--mandir={}", prepare_dir(&destdir_env, mandir))) </ins> .arg("--disable-ldconfig"); builder.run(&mut cmd); t!(fs::remove_dir_all(&empty_dir));

config.as_ref().cloned().unwrap_or_else(|| PathBuf::from(default)) } <del> fn prepare_dir(mut path: PathBuf) -> String { </del> <ins> fn prepare_dir(destdir_env: &Option<PathBuf>, mut path: PathBuf) -> String { </ins> // The DESTDIR environment variable is a standard way to install software in a subdirectory // while keeping the original directory structure, even if the prefix or other directories // contain absolute paths. // // More information on the environment variable is available here: // https://www.gnu.org/prep/standards/html_node/DESTDIR.html <del> if let Some(destdir) = env::var_os("DESTDIR").map(PathBuf::from) { // Sanity check for the user write access on DESTDIR assert!(is_dir_writable_for_user(&destdir), "User doesn't have write access on DESTDIR."); </del> <ins> if let Some(destdir) = destdir_env { </ins> let without_destdir = path.clone(); <del> path = destdir; </del> <ins> path = destdir.clone(); </ins> // Custom .join() which ignores disk roots. for part in without_destdir.components() { if let Component::Normal(s) = part {