post-install scripts should work without existing user
Some postmarketos-* pmaports rely on pmbootstrap to create the user before installing all packages during pmbootstrap install
. This isn't nice code, and practically, it prevents us from having a configurable username in the on-device installer (postmarketos-ondev#21).
$ git grep 'getent passwd'
main/postmarketos-boot-hwtest/postmarketos-boot-hwtest.post-install:autologin="$(getent passwd 10000 | cut -d ":" -f 1)"
main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/65-autologin.conf
main/postmarketos-ui-i3wm/postmarketos-ui-i3wm.post-upgrade:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/65-autologin.conf
main/postmarketos-ui-kodi/postmarketos-ui-kodi.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/63-autologin.conf
main/postmarketos-ui-mate/postmarketos-ui-mate.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/61-autologin.conf
main/postmarketos-ui-plasma-bigscreen/postmarketos-ui-plasma-bigscreen.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/60-autologin.conf
main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/62-autologin.conf
main/postmarketos-ui-sway/postmarketos-ui-sway.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/67-autologin.conf
main/postmarketos-ui-weston/postmarketos-ui-weston.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/66-autologin.conf
main/postmarketos-ui-xfce4/postmarketos-ui-xfce4.post-install:sed -i "s/username/$(getent passwd 10000 | cut -d: -f1)/g" /usr/share/lightdm/lightdm.conf.d/64-autologin.conf
Note that it's mostly lightdm configuration, but not in all instances (boot-hwtest).
Also using the mobile greeter is not the perfect solution, it broke plasma mobile before. (And with phosh it isn't integrated so great: it's just not the same as the phosh lockscreen, meaning it looks completely different, but would also behave different if we added something like double-tap on power button opens the camera app while lockscreen is visible. But that's a separate discussion.)
It would be nice to fix this long-term, opening this issue now for future reference.