Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 448058 - x11-misc/colord: polkit is optional dependency
Summary: x11-misc/colord: polkit is optional dependency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2012-12-21 07:56 UTC by Michal Hrusecky (RETIRED)
Modified: 2014-06-17 08:33 UTC (History)
1 user (show)

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


Attachments
Patch to fix dependencies (colord-polkit.patch,10.72 KB, patch)
2012-12-21 07:59 UTC, Michal Hrusecky (RETIRED)
Details | Diff
proposed ebuild (colord-1.2.0.ebuild,2.99 KB, text/plain)
2014-06-01 22:58 UTC, Michelangelo Scopelliti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Hrusecky (RETIRED) gentoo-dev 2012-12-21 07:56:55 UTC
colord ebuild depends on polkit although this dependency is optional and could be moved under the use flag

Reproducible: Always

Steps to Reproduce:
1. mask polkit
2. Add -policykit to USE
3. try to emerge colord
Actual Results:  
Would complain about unmet dependencies

Expected Results:  
Compiles and installs correctly
Comment 1 Michal Hrusecky (RETIRED) gentoo-dev 2012-12-21 07:59:14 UTC
Created attachment 332892 [details, diff]
Patch to fix dependencies

There is an option to enable/disable polkit dependency, so here is the patch that fixes it. Tested and it's working.
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2012-12-21 09:22:07 UTC
+1

That would reduce some workload from me (maitaining this package in my private overlay)...
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-12-22 01:42:56 UTC
Not every option needs a USE-flag switch to control it. "Compiles and installs" is not a sufficient argument for adding something to portage. So please explain:

Why do you want colord without polkit? Is this an experiment in minimizing the number of dependencies, or is there a specific reason why you cannot use polkit on a machine, but do need colord on that machine?

How did you verify that colord without polkit was working? (compiles != works)

What are the security implications of disabling polkit support? (You should probably start by looking at cd_main_sender_authenticated() in src/cd-common.c, and at the code paths which use that function. I suspect that additional patching of colord would be required to avoid potential attacks.)
Comment 4 Michal Hrusecky (RETIRED) gentoo-dev 2012-12-23 00:17:39 UTC
(In reply to comment #3)
> Not every option needs a USE-flag switch to control it. "Compiles and
> installs" is not a sufficient argument for adding something to portage. So
> please explain:
> 
> Why do you want colord without polkit? Is this an experiment in minimizing
> the number of dependencies, or is there a specific reason why you cannot use
> polkit on a machine, but do need colord on that machine?

Well, with polkit, I would need also consolekit and I don't believe/trust any of them. Frankly, I stumbled upon this when I tried colorhug-client and gnome-color-manager which has it as dependency and I remembered that when I was talking to Richard he told me that I don't need polkit to run colord with usual implications - possibility to mess up with colors remotely. Which I don't care. And these utils have only dependency on polkit through colord and after compiling everything without polkit, I was able to play with my colorhug through them. Ok, better approach might be to verify these dependencies, but at least for gnome, I suspect it will be hard dependency.

> How did you verify that colord without polkit was working? (compiles !=
> works)

Well, it runs, and utilities depending on it works. So far didn't get much deeper.

> What are the security implications of disabling polkit support? (You should
> probably start by looking at cd_main_sender_authenticated() in
> src/cd-common.c, and at the code paths which use that function. I suspect
> that additional patching of colord would be required to avoid potential
> attacks.)

Hmmm, security implications, what about big fat warning about them? I'll take a look at what are they...
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-12-23 01:53:52 UTC
(In reply to comment #4)

OK, I will think about this when I get back from break; it will probably be enough to patch /etc/dbus-1/system.d/org.freedesktop.ColorManager.conf when USE=-polkit to limit who can call into colord.
Comment 6 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-06-21 07:40:20 UTC
Any news here?
Comment 7 theodor 2013-08-13 20:19:45 UTC
Please make polkit optional!
Comment 8 Pacho Ramos gentoo-dev 2013-08-29 12:13:52 UTC
(In reply to Alexandre Rostovtsev from comment #5)
> (In reply to comment #4)
> 
> OK, I will think about this when I get back from break; it will probably be
> enough to patch /etc/dbus-1/system.d/org.freedesktop.ColorManager.conf when
> USE=-polkit to limit who can call into colord.

What patch is needed?
Comment 9 Gino McCarty 2014-03-23 19:39:03 UTC
I can confirm this functions fine,

I also don't see what is offending on /etc/dbus-1/system.d/org.freedesktop.ColorManager.conf in regards to permissions.. 
what do you propose, that only members of some group colord may use colord??


The dbus interface is only accessible from logged in users. colord runs as its own user and functions fine, been utilizing this for several months..

If the developers wanted polkit hard-coded they wouldn't have built their own packages for it to be optional.. think it over..

Just because polkit is popular does not presuppose it is essential, or relevant to all gentoo builds.
Comment 10 Michelangelo Scopelliti 2014-06-01 22:58:11 UTC
Created attachment 378034 [details]
proposed ebuild

I'm currently using this ebuild to use a (working) colord.
polkit is optional, as you can see.
I've changed the memory limit since my PC as a total 4G RAM shared between CPU and GPU, and, as a result, less than 4G.
Besides that, everything seems to work fine.
Comment 11 Pacho Ramos gentoo-dev 2014-06-17 08:33:10 UTC
+*colord-1.2.1 (17 Jun 2014)
+
+  17 Jun 2014; Pacho Ramos <pacho@gentoo.org> +colord-1.2.1.ebuild:
+  Version bump, make polkit optional (#448058)
+