Open JoelLinn opened 8 months ago
I suspect this might be because /usr/sbin is not in PATH on Arch Linux, maybe there should be a global check added or the PATH overwritten on chroot.
Isn't that a configuration issues with the host OS then?
https://man.archlinux.org/man/file-hierarchy.7#COMPATIBILITY_SYMLINKS
Isn't that a configuration issues with the host OS then?
No since one can theoretically craft a Unix/Posix OS which has its binaries in /beehive
or whatever, but if the corresponding PATH
is not overwritten when chroot
ing, it will fail the pi-gen build.
https://man.archlinux.org/man/file-hierarchy.7#COMPATIBILITY_SYMLINKS
Even if that symlink may exists, it may not be in path by default on the host
Oh right, yeah that makes sense. I didn't realise chroot inherited the host's PATH variable. I wouldn't be against a PR that sets PATH to something sensible when entering the chroot environment
With
FIRST_USER_NAME
being set,/bin/bash: line 2: adduser: command not found
is raised here https://github.com/RPi-Distro/pi-gen/blob/d9668973950853ce3dc026246cad24fcbb5dbcfa/stage1/01-sys-tweaks/00-run.sh#L8-L10 because/usr/sbin
is not inPATH
. Possible fix is to addexport PATH=$PATH:/usr/sbin
inside the branch.