richard pushed to branch main at The Tor Project / Applications / RBM
Commits: 40acf540 by Nicolas Vigier at 2023-11-15T10:42:52+01:00 Bug 40063: Set PATH when using chroot
This should fix an issue on Fedora (Thanks to @NoisyCoil for reporting it).
- - - - -
1 changed file:
- container
Changes:
===================================== container ===================================== @@ -95,7 +95,9 @@ sub run_chroot { # On some systems resolv.conf is a symlink (see #40015) local $File::Copy::Recursive::CopyLink = 0; fcopy('/etc/resolv.conf', "$rootfsdir/etc/resolv.conf"); - local %ENV = (); + local %ENV = ( + PATH => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + ); path("$rootfsdir/etc/hosts")->append("\n127.0.1.1 rbm\n") unless grep { m/^127.0.1.1 rbm$/ } path("$rootfsdir/etc/hosts")->lines; system('hostname', 'rbm'); @@ -110,6 +112,9 @@ sub copy_file_to { my $filename = fileparse($src); rcopy($src, "$rootfsdir/$dst/$filename") or exit_error "Failed to copy $src to $rootfsdir/$dst/$filename"; + local %ENV = ( + PATH => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', + ); return system('/usr/sbin/chroot', $rootfsdir, 'chown', '-R', $owner, $dst); }
View it on GitLab: https://gitlab.torproject.org/tpo/applications/rbm/-/commit/40acf540fe75055d...