/usr/sbin and /sbin missing from PATH in cros chroot |
||||||
Issue descriptionAfter creating a fresh chroot, calls to setup_board fail in update_chroot (https://chromium.googlesource.com/chromiumos/platform/crosutils/+/master/update_chroot#130) because etc-update is not in the PATH Modifying .bashrc to add /usr/sbin to the PATH fixes the problem but it's not very user-friendly. We should add those directories to the PATH automatically when creating the chroot.
,
Mar 15 2018
+vapier This is more of an 'cros_sdk' issue than a toolchain issue. Not sure what would be a more appropriate component.
,
Mar 16 2018
sbin paths are supposed to be added to $PATH automatically when using sudo
,
Jun 12 2018
I'm also hitting this. Tried both cyan and veyron_minnie.
,
Jun 12 2018
please check your chroot settings. /sbin:/usr/sbin do not need to be in the non-root user's $PATH. they're in the sudo env which is how etc-update is run. i created a new one from scratch: $ cros_sdk --chroot foo then in there i ran: $ sudo env | grep ^PATH= PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin looks correct. so what about etc-update: $ sudo etc-update --help etc-update: Handle configuration file updates so do you have an alias to `sudo` or something that would be messing this up ? i can't get it to be wrong: # Clear PATH before running sudo. $ env -uPATH /usr/bin/sudo /usr/bin/env | grep ^PATH= PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin # Break PATH before running sudo. $ env PATH=/usr/bin /usr/bin/sudo /usr/bin/env | grep ^PATH= PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin
,
Jun 12 2018
This is what I see in the path below... Let me know if there is anything else I can try to debug. I never had this problem until today, but it's the first time I've nuked a board or started working on a new board for a few weeks. $ sudo env | grep ^PATH= PATH=/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/aarch64-cros-linux-gnu/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/arm-none-eabi/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabi/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/armv7a-cros-linux-gnueabihf/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/i686-pc-linux-gnu/gcc-bin/4.9.x:/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/gcc-bin/4.9.x:/mnt/host/source/chromite/bin:/mnt/host/depot_tools
,
Jun 12 2018
Also the only aliases I have are a few "--colour=auto" on grep and ls.
,
Jun 12 2018
do you both have a /etc/sudoers.d/signer file ? and if you delete it, things work as expected ?
,
Jun 13 2018
Indeed, I have 2 chroots one with the file /etc/sudoers.d/signer and the other without. The former is failing after a vanilla cros_sdk, the latter does not ... deleting the file fixed it Thanks !
,
Jun 13 2018
This worked for me too. Thanks for tracking that down.
,
Jun 13 2018
The following revision refers to this bug: https://chrome-internal.googlesource.com/chromeos/cros-signing/+/b525d5f33c2df7f0acb365ec24bb1ba40e02fbce commit b525d5f33c2df7f0acb365ec24bb1ba40e02fbce Author: Mike Frysinger <vapier@chromium.org> Date: Wed Jun 13 14:39:23 2018
,
Jun 13 2018
i'm going to mark this as fixed because not too many people run the signer unittests, and you guys have manually cleaned up the fragment on your systems. so i don't think we need to roll out anything more widespread. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by norvez@chromium.org
, Mar 15 2018222 bytes
222 bytes Download