Draft: main/postmarketos-base: allow choosing between sudo and doas
Add a virtual postmarketos-root
package that allows choosing between
sudo and doas for getting root access. postmarketos-root-doas
can be
added to the "extra packages" prompt in pmbootstrap init
to install it
instead of sudo.
Together with a related pmbootstrap change (https://gitlab.com/postmarketOS/pmbootstrap/-/merge_requests/2132) there will be a nice
configuration prompt in pmbootstrap init
for these virtual packages:
$ pmbootstrap init
[...]
Available providers for postmarketos-root (2):
* sudo: Use sudo to run root commands (**default**)
* doas: Use doas (minimal replacement for sudo) to run root commands
(Note: Does not support all functionality of sudo)
Provider [default]: ...
Note: "sudo" is the default provider (highest provider_priority
), which
means all existing installations will keep "sudo" when upgrading. This also applies
when merging this MR before the pmbootstrap MR is merged.
Therefore this only mostly Closes #1121 (closed). The default is still sudo but it's possible to select doas
alternatively.
Note that I don't care too much about sudo vs doas myself, this is just a proof of concept that I made for the "provider selection" in pmbootstrap that I want to use for a configuration prompt for the MSM8916-based devices (see https://gitlab.com/postmarketOS/pmbootstrap/-/merge_requests/2132).