GUI frontend issues for pmb
I now have a quite functional GTK installer application that wraps pmbootstrap at https://gitlab.com/postmarketOS/gpmbootstrap/
It both uses import pmb
to fetch info and subprocess.run(pmbootstrap)
to integrate with pmbootstrap currently because doing the integration fully in python would require duplicating a lot of the installation/init/config logic. The current roadblock I have is that the installer can't get past the passwd
stage in pmbootstrap install
, this is probably because of security features of the passwd
tool and it not running inside a terminal.
A solution would be adding passwd --stdin
support and the ability to pass the password through pmbootstrap install --password 147147
to bypass this issue completely. The same issue also happens with adding FDE support to the installer.
A similar issue is that the whole GUI frontend won't work if you don't have sudo set-up with nopasswd or the GUI is launched in a terminal that has recently ran sudo. This is something that's not super easy to fix, it would probably require substituting sudo
calls with an alternative that can use polkit.
The other issue is that the pmb
python module is just not nice to integrate with, which is why I have an ugly hack to make it work. The ugly hack is contained in https://gitlab.com/postmarketOS/gpmbootstrap/-/blob/master/gpmbootstrap/pmos.py