You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 (including losetup, 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?
Still in _ensure_dependencies, this fails for me if I don't have sudo installed (even if I specify --sudo doas):
[[ "$SUDO"=="sudo" ]] && {
command -v sudo 1>/dev/null 2>/dev/null ||
_failure "No privilege escalation tool found, not even sudo"
}
Same as above, maybe it could be solved by checking --sudo?
Other than that, it works for me with --sudo doas 👍. 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 use option_is_set --sudo in _ensure_dependencies()?
The text was updated successfully, but these errors were encountered:
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.
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
👍. 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()
?The text was updated successfully, but these errors were encountered: