Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle doas in place of sudo if available, outside of OpenBSD #4991

Open
kit-ty-kate opened this issue Jan 13, 2022 · 1 comment
Open

Handle doas in place of sudo if available, outside of OpenBSD #4991

kit-ty-kate opened this issue Jan 13, 2022 · 1 comment

Comments

@kit-ty-kate
Copy link
Member

Alpine Linux officially started the migration from sudo to doas in Alpine 3.15 (https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.15.0#Move_from_sudo_to_doas).

It would be interesting to automatically use doas if it is present in place of sudo when sudo is not available (or if configured to do so). There doesn’t seem to be any automated way to detect if one or the other is configured so I’d say we should probably:

  • If doas is available but sudo is not: use doas
  • If sudo is available but doas is not: use sudo
  • If both are available: ask the user which one they want to use and store it in the opam config
@dra27
Copy link
Member

dra27 commented Jan 14, 2022

For the case where they're both found, let's "prefer" sudo (on the basis that if it and doas are present then sudo was added explicitly and probably configured) but then display a warning that sudo has been used and advise the required opam config command to set the preference permanently between doas and sudo (cf. various git things)

@kit-ty-kate kit-ty-kate added this to To do in Opam 2.3 via automation Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Opam 2.3
  
To do
Development

No branches or pull requests

2 participants