Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 402797 - ebuild request: virtual/gsu virtual ebuild for graphical su
Summary: ebuild request: virtual/gsu virtual ebuild for graphical su
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Proxy Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-09 05:28 UTC by Julian Ospald
Modified: 2012-03-25 09:38 UTC (History)
4 users (show)

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


Attachments
gsu-0.ebuild (gsu-0.ebuild,441 bytes, text/plain)
2012-02-09 05:28 UTC, Julian Ospald
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2012-02-09 05:28:11 UTC
Created attachment 301339 [details]
gsu-0.ebuild

Since there are already 3 solutions for graphical su (gksu, kdesu and ktsuss) I think it would be good to have a virtual package in the tree in case an app relies on any graphical su
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-02-09 16:35:33 UTC
Assigning randomly. I doubt this is going to work without a wrapper/eselect.
Comment 2 Maxim Koltsov (RETIRED) gentoo-dev 2012-02-09 16:39:32 UTC
I don't like the look of deps
You can set REQUIRED_USE="|| ( gtk kde )"
RDEPEND="
gtk? ( || ( x11-libs/gksu x11-misc/ktsuss ) )
kde? ( kde-base/kdesu )"

Also, what ebuilds in tree should depend on this by your design?
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2012-02-09 18:29:43 UTC
I don't see how a virtual can help in this case. Like Jeroen said, you need an eselect module or something. Even that is not good enough. Can you please give us a test case on where this virtual can be used?
Comment 4 Julian Ospald 2012-02-10 06:03:41 UTC
x11-misc/spacefm provides an internal option whether to use gksu/kdesu/ktsuss for the "root window"/"root terminal" functionality. (Bug #402135 made me think about a 'virtual'-solution)

gparted ebuild has some fancy lines to put either gksu or kdesu in gparted{,-kde}.desktop.

wicd also depends on either gksu or kdesu...

I am not sure myself what would make sense. Wouldn't an eselect/wrapper break things, because gksu/kdesu/ktsuss have different command line options?

The initial idea was to provied at least one graphical sudo or a specific one depending on the useflags. 
I dont like "gtk? ( || ( x11-libs/gksu x11-misc/ktsuss ) )" because I can't control which one to install this way.
I didn't use REQUIRED_USE because there may be packages that dont care which graphical su to install (like spacefm). I sorted the line "|| ( x11-misc/ktsuss x11-libs/gksu kde-base/kdesu )" by dependency-bloat.

another approach:
IUSE="gnome gtk kde"
REQUIRED_USE="|| ( gtk kde )"
RDEPEND="
gtk? ( !gnome? ( x11-misc/ktsuss )
          gnome? ( x11-libs/gksu ) )
kde? ( kde-base/kdesu )"

or without required_use

IUSE="gnome gtk kde"
RDEPEND="
gtk? ( !gnome? ( x11-misc/ktsuss )
          gnome? ( x11-libs/gksu ) )
kde? ( kde-base/kdesu )"
|| ( x11-misc/ktsuss x11-libs/gksu kde-base/kdesu )"
Comment 5 Johannes Huber (RETIRED) gentoo-dev 2012-02-10 11:18:17 UTC
As long as there is no specification[1] by the freedesktop community i think its not guaranteed that you can replace the dialog by another in each app. A virtual would make more troubles than just specify the deps for the provided su dialogs by the application.

[1] http://www.freedesktop.org/wiki/Specifications
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2012-02-10 21:20:18 UTC
(In reply to comment #4)
> x11-misc/spacefm provides an internal option whether to use gksu/kdesu/ktsuss
> for the "root window"/"root terminal" functionality. (Bug #402135 made me think
> about a 'virtual'-solution)

No because you need to know which gsu is installed to fix the code appropriately.
> 
> gparted ebuild has some fancy lines to put either gksu or kdesu in
> gparted{,-kde}.desktop.

Same. virtual/gsu says nothing about which gsu is installed so you can't use it to do fancy staff.

An eselect module could implement a symlink say, /usr/bin/gentoo-gsu where you can point either kdesu or gksu to that. That's the only way to implement it in my opinion. Of course all packages that depend on virtual/gsu need to be patched to set the /usr/bin/gentoo-su as the default gui application. Personally I see no reason to do that just to avoid the 3 extra lines of deps.
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-02-12 15:00:23 UTC
afaik, some distros started removing graphical su/sudo programs by a polkit based solution. I never bothered to investigate but this would be a better solution imho. I'm not a big fan of polkit but it gives more flexibility for sure.
Comment 8 Johannes Huber (RETIRED) gentoo-dev 2012-03-22 16:02:46 UTC
wontfix?
Comment 9 Andreas K. Hüttel archtester gentoo-dev 2012-03-25 09:38:15 UTC
I guess we've collected enough comments. Wontfix.