Between x11-misc/xdg-utils-1.1.1-r1 and x11-misc/xdg-utils-1.1.3-r1 a hard requirement for dbus was added. My understanding is that the only component of x11-misc/xdg-utils that requires it is xdg-screensaver which has always required dbus. Many of us don't use dbus and have no need for xdg-screensaver, but use packages that require x11-misc/xdg-utils. Could that requirement at least be optional based on perhaps the existing dbus USE or the like? Thanks!
By the way, it may help some, I just copied xdg-screensaver to ~/bin and commented the lines from `detectDE` to `xautolock -enable > /dev/null 2>&1 && DE="xautolock_screensaver"` (1389-1397) and just set the DE myself (`DE=xscreensaver`) so mpv can still inhibit xscreensaver without relying on heartbeat-cmd and the dbus cancer can be avoided.
I would accept a patch to add a "screensaver" USE flag, which would control the installation the xdg-screensaver program.
*** Bug 668200 has been marked as a duplicate of this bug. ***
Maybe someone can come up with that. Looking at it I'm not clear what that would involve. Clearly the configure script has no option related to that, and offhand I don't follow exactly how the install process there works.
The other utils also use dbus-send but the notes indicate that it is needed for gnome. I've patched it out and am happily using it on Mate-1.12 I can easily mark it up to use the existing gnome flag and the new screensaver flag if you wish. Perhaps you would want them to be default ON ?
(In reply to Anthony Segredo from comment #5) > I can easily mark it up to use the existing gnome flag and the new > screensaver flag if you wish. Yeah, I guess that makes sense. > Perhaps you would want them to be default ON ? gnome should default to off, screensaver should default to on.
Hi everyone! Super late to the party, sorry. Had a busy week. Is anyone actively working on this issue? I would be willing to modify what is necessary, introduce configure flags and patch involved files to skip GNOME-specific checks if "gnome" flag is disabled and skip xdg-screensaver installation if "screensaver" flag is disabled. I would also like to send all this work to an upstream, but I'm not sure how to do so?..
Created attachment 552030 [details] ebuild
Created attachment 552032 [details, diff] patch to remove dbus
Created attachment 552034 [details, diff] patch to remove screensaver
Looks like my comment got lost! Not used to working with Bugzilla. 1. Although the documentation says dbus is needed for gnome, the actual code shows dbus (actually gdbus) called directly only for something called "flatpak". I there fore called the flag dbus instead of gnome because I think it's a misnomer. If the DE is gnome, the code makes a gnome call. Similarly KDE and Mate make their own unique calls. Also, repoman complained about screensaver as a flag so I went with xscreensaver. Of course, Mike as the dev can call them whatever. It's his call. 2. Repoman (2.3.9) called a fatal error on Line 1 (copyright) so I changed it from "Gentoo authors" back to "Gentoo Foundation" solely for that reason. 3. I updated the EAPI to 7. It only needed the edit. It works as either 6 or 7. 4. I haven't updated metadata.xml. Waiting for Mike's final say on the flag names. 5. I had lost my work, so I had to recreate it. I'm sorry for the delay. Tom and Garry, why don't you put this ebuild in your local overlay and see how they work for you. I've tested the three new flag combos and they seem to work for me.
Comment on attachment 552032 [details, diff] patch to remove dbus This patch seems mostly pointless. We can just let the gdbus calls fail if gdbus is not available. Removing the dbus-send call from xdg-utils-common seems wrong.
Comment on attachment 552034 [details, diff] patch to remove screensaver It would be simpler to just remove the script in src_install.
Upon further review, I think we can just drop the gnome/dbus USE flag, and let it get pulled in implicitly if the user happens to be running gnome. I would still like to see a "screensaver" USE flag to control installation of the xdg-screensaver script since that utilizes dbus more extensively than the others.
re. comment 13, it would be even simpler to just make 1.1.3 be like 1.1.1, ie no dbus "dependency" and if screensaver script fails, it'll spit out a message. I would imagine the number of people that actually use that script could be counted on my fingers. As far as the dbus-send call in the other scripts, if it's not there, then the if-else just falls through to the next choice. It's always worked that way, when dbus wasn't installed. So all that really needs to be done is remove dev-perl/Net-DBus and sys-apps/dbus from the RDEPEND section. All my opinion, of course.
The simplest solution is for me to close this as WONTFIX; I'm trying to reach a compromise here.
(In reply to Mike Gilbert from comment #16) > The simplest solution is for me to close this as WONTFIX; I'm trying to > reach a compromise here. That's disappointing, why isn't what you said in comment #13 about having a "screensaver" flag do nothing more but exclude the screensaver script from src_install() a good solution?
(In reply to Martin Cihlář from comment #17) I never said it wasn't a good solution. Please consider comment 16 in the context of comment 15.
I apologise, I see what you meant now. The option of installing the screensaver script and just having it fail if D-Bus is absent as outlined in comment #15 feels inherently wrong to me; I would personally like to see the aforementioned solution of the script's inclusion be controlled by a corresponding USE flag implemented. Sidenote, I have x11-misc/xdg-utils-1.1.1-r1 installed, xdg-screensaver as a script is present and working (xdg-screensaver activate, xdg-screensaver lock with XScreensaver 5.40); what changed in the 1.1.3 version to warrant the D-Bus dependency? (Something in this bug that I missed?)
Sorry if I offended you, Mike, that certainly wasn't my intention. re comment 15
I hope I don't offend again, but let me try and explain what I see in xscreensaver. It tries to find which DE is running gnome mate cinnamon kde3 xfce generic and a couple of other choices. It only uses dbus IF gnome, mate or cinnamon are used, and they likely have it installed already. It uses dcop for kde3 For generic ie. xfce and non-main DE (openbox, etc) it uses xset which works without dbus. I hope I explained it well, enough.
(In reply to Don O from comment #20) No offense taken.
(In reply to Don O from comment #21) It looks like dbus-send is also used for modern KDE environment. Point taken though: the xdg-screeensaver script doesn't completely depend on dbus. Maybe a "dbus" USE flag to control optional runtime deps would suffice. Or we emit a message in pkg_postinst.
The USE flag sounds like the best option, since some GNOME/KDE stuff will probably need to depends on it.
Created attachment 555360 [details] Add dbus and gnome USE flags So, I was poking around in xdg-screensaver, and just to summarize: * Multiple DE are supported. * Most rely on dbus-send. * Some use a command provided by the DE or screensaver (xset, dcop, xscreensaver-command) * Only gnome relies on perl Net::DBus and X11::Protocol. IMHO, gnome warrants its own USE flag because it is a special case. If the user already has gnome installed, they probably have the gnome USE flag set as well. Regarding general dbus-send support, I see two options. Add a dbus USE flag, or drop the dependency and let the screensaver/DE pull it in. This ebuild adds dbus and gnome to the USE flags. These flags only control dependencies.
What is the current status of this? Is any of the attached ebuilds acceptable or should it be done in a different way?
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=233397e2e14c07337bddcf0ed68007a240444d54 commit 233397e2e14c07337bddcf0ed68007a240444d54 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2020-07-25 16:06:14 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-07-25 17:53:02 +0000 x11-misc/xdg-utils: dbus and gnome optional Taking over changes from attachment https://bugs.gentoo.org/attachment.cgi?id=555360 Closes: https://bugs.gentoo.org/668156 Closes: https://github.com/gentoo/gentoo/pull/16815 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Mike Gilbert <floppym@gentoo.org> .../xdg-utils/xdg-utils-1.1.3_p20200220-r1.ebuild | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+)