Skip to content

switch from 'sudo' to 'doas'

This was proposed in this comment (copied below to save a click):

To make the base system even lighter, you should replace sudo with doas (package name in Alpine repos is doas). So, in the postmarketos-base APKBUILD, replace sudo with doas and then add a command in postmarketos-base.post-install which copies a file with the following contents to /etc/doas.conf: permit persist keepenv :wheel as root Further explanation:

permit tells doas that this rule permits X to execute commands as Y.

persist tells doas not to ask for a password for some time after a successful authentication, optional but very desirable.

keepenv tells doas to carry over the user's environment variables to the root session, optional.

:wheel tells doas that this rule applies to all members of wheel. (in doas, any identity prefixed with : is considered a group name)

as root tells doas to allow (in this case) members of wheel to execute commands as root.

doas is not a drop-in replacement for sudo. Replacing sudo as a requirement for pmbootstrap may not be desired though, since doas is(?) less common(?) than sudo on systems.

cc @LegoLivesMatter

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information