Hi Dario and Michal, On 12.03.21 г. 13:47, Dario Faggioli wrote:
On Fri, 2021-03-12 at 08:46 +0200, Yordan Karadzhov (VMware) wrote:Hi Michal,Hey Michal! Nice to see you here too... well, it's a small world, I guess? :-POn 11.03.21 г. 19:57, Michal Sojka wrote:You're right. I looked at polkit sources and it really seems that only one location is supported. It is determined at configuration time so on some systems it may be different from /usr/share/... I'm talking specifically about NixOS, but it already has the patch I sent. So I leave it up to you whether to apply the patch or not. I think that supporting seamless installation into $HOME is useful if one wants to quickly use a newer version not available in their distribution.Building, installing as root and testing the latest version shouldn't cause any problems/conflicts on your system. Note that there is a script in kernel-shark/build called "cmake_uninstall.sh". It is guaranteed that this script removes every single file that has been installed.Not completely sure, but since NixOS is being mentioned, I think at least part of the point here is making sure that a development/testing version of KS can be installed in those "special" systems that have read-only filesystems (or similar configurations). In such a system, even if you are root, if the makefile tries to put stuff in a part of the fs which is not writable, it's pretty much game-over. In fact, I don't know much about NixOS, but I'm on one of those "immutable" systems myself (openSUSE MicroOS, FTR) so I can relate. :-)
OK, now I see your problem. Please excuse my ignorance.Here's the deal. What you want can be achieved with an almost trivial patch in kernelshark 2. Have a look here:
https://git.kernel.org/pub/scm/utils/trace-cmd/kernel-shark.git/tree/src/CMakeLists.txt#n129 and make the installation of the policy file to be a separate component.Make the installation of "kshark-su-record" part of the new component as well since it relies on the policy file. I guess "kernelshark.desktop" must be there as well.
Then you can edit the helper script "install_gui.sh" and make it install your new component as well. You can also add another helper script that install only the part you want. Send me a patch and I will take it.
Thanks! Yordan
So, although it's definitely a niche use-case (for now!! :-P), I think that either this patch, or at least not making the above issue fatal (as you're saying yourself) would make the life of some users easier. Regards