GNOME Bugzilla – Bug 794625
dependency on polkit should be optional
Last modified: 2018-08-30 11:43:03 UTC
Somewhere before 3.28.0 release, sysprof's dependency on polkit turned from optional to mandatory. Previously, polkit was only required in this case: if get_option('with_sysprofd') != 'none' libsysprof_deps += dependency('polkit-gobject-1') libsysprof_c_args += '-DENABLE_POLKIT' endif Now, lib/symbols/sp-kernel-symbol.c contains #include <polkit/polkit.h> without any way to turn it off, and so compilation fails if polkit is absent, even if with_sysprofd is set to none.
Can I ask where this is getting built without polkit? It's really really really not a good idea if you want things to work reliably.
In Yocto project we offer two options to distro/image makers: 1) '-Dwith_sysprofd=none' - default, doesn't require polkit. 2) '-Dwith_sysprofd=bundled' - can be configured, does require polkit. We don't impose one or the other. [1] Sysprof should be consistent here - either it does require polkit in all cases, but then it should check for presence of polkit at configuration step, rather than fail during compilation with a missing #include. Or the code should be fixed to make polkit optional again. [1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-kernel/sysprof/sysprof_3.26.1.bb
Yeah, no doubt it should be fixed. Just trying to take inventory of how things are built and where. Basically, using Sysprof as non-root will do pretty much nothing without polkit. It's fine to do "sudo sysprof-cli -c ...", but anything other than that is likely do not work. (Especially using the UI to capture, as it won't be running as root).
Any news here?
https://gitlab.gnome.org/GNOME/sysprof/commit/28c28eb11ac1696ce08c9c90e8a7a7759bc5c50b should fix things for you.
Thanks! That works.