Open JonasVautherin opened 11 months ago
Hi!
Do you encounter the problem that I have in #470 while using --sudo doas
?
Do you encounter the problem that I have in #470 while using
--sudo doas
?
I do, yes, but I thought it would be the next problem to solve :see_no_evil:. I am using OpenDoas on Alpine.
Do you have the problem I have above?
Yes, I have the same problem as you mentioned above, but I installed doas-sudo-shim to get around it, which is just a shim for the sudo command that utilizes doas. Seems you are also using OpenDoas from Duncaen, same as mine.
but I installed doas-sudo-shim to get around it
Right, sounds like a valid workaround. In my case I really would like to fix the tomb script, because ideally I would like to make and maintain a package for Alpine.
Hi @JonasVautherin ! thanks for this and the other report. You are welcome to file a PR with the fix you propose here, also remove sudo from the list of requirements.
The req check is there to issue an error before processing in case vital system components are missing, else tomb would proceed processing and perhaps hang in the mid of it (mapper without mount etc.) with third party error messages. We cannot rely on packaging for requirements, many of us use tomb as a simple drop-in script.
Tomb is supposed to support alternatives to
sudo
(e.g.doas
), but the script fails ifsudo
is not installed. I have seen it fail in two places:_ensure_dependencies()
:Maybe
sudo
should not be in that list? Also I am not completely sure if that list should exist: I tried to run it from an alpine container, and other dependencies were missing (includinglosetup
,e2fsprogs
). To me it feels like the system package manager should take care of the dependencies. Or at least maybe_ensure_dependencies()
could check the value of--sudo
?_ensure_dependencies
, this fails for me if I don't have sudo installed (even if I specify--sudo doas
):Same as above, maybe it could be solved by checking
--sudo
?Other than that, it works for me with
--sudo doas
:+1:. I would be happy to make a patch, test it and open a PR, but I'd like to have your opinion first. Can it just useoption_is_set --sudo
in_ensure_dependencies()
?