Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917209 - app-alternatives/sudo: new portage-managed symlink
Summary: app-alternatives/sudo: new portage-managed symlink
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-11 20:27 UTC by Anna Vyalkova
Modified: 2023-11-26 00:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Vyalkova 2023-11-11 20:27:49 UTC
There are packages that depend on app-admin/sudo. Most of its use is trivial (as in `sudo command-to-call`) and can be replaced with app-admin/doas or something else.

Currently, a user needs to add "app-admin/sudo-9999" to package.provided and create a symlink manually.

I don't know if it's a good idea to add "app-alternatives/sudo" since command-line flags are not compatible. What do you think?
Comment 1 Eli Schwartz gentoo-dev 2023-11-12 03:49:37 UTC
They're not compatible, indeed.


Assuming that it's off the table to symlink not-sudo programs to /usr/bin/sudo, a package such as "app-alternatives/root-elevation-helper" might be more apropos. It wouldn't even be limited to sudo and doas, you can do the same thing with polkit via `pkexec`.



The big problem is that you'd need to invent your own standard for a generic command. Debian does something similar with e.g. `editor` (and `sensible-editor`). Then you'd also need to edit every package that runs sudo, to run the wrapper thing instead (after making sure it doesn't use options incompatible with any providers).

I wouldn't really consider this worth it. There aren't very many packages that use this to begin with, and personally I'm a bit suspicious of even that.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-26 00:20:44 UTC
Closing per above. I don't think we can do this. You may want a virtual or something where packages genuinely want trivial 'sudo' use.