After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794625 - dependency on polkit should be optional
dependency on polkit should be optional
Status: RESOLVED FIXED
Product: sysprof
Classification: Other
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: Sysprof maintainer(s)
Sysprof maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-03-23 14:41 UTC by Alexander Kanavin
Modified: 2018-08-30 11:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Kanavin 2018-03-23 14:41:19 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.
Comment 1 Christian Hergert 2018-03-23 21:25:56 UTC
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.
Comment 2 Alexander Kanavin 2018-03-26 10:24:19 UTC
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
Comment 3 Christian Hergert 2018-03-26 21:38:56 UTC
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).
Comment 4 Alexander Kanavin 2018-08-28 10:32:33 UTC
Any news here?
Comment 5 Christian Hergert 2018-08-28 19:31:15 UTC
https://gitlab.gnome.org/GNOME/sysprof/commit/28c28eb11ac1696ce08c9c90e8a7a7759bc5c50b should fix things for you.
Comment 6 Alexander Kanavin 2018-08-30 11:43:03 UTC
Thanks! That works.