linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: Dario Faggioli <dfaggioli@suse.com>,
	Michal Sojka <michal.sojka@cvut.cz>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v2] kernel-shark: Do not hardcode /usr prefix for polkit policies
Date: Fri, 12 Mar 2021 15:02:59 +0200	[thread overview]
Message-ID: <f0289bb7-1c80-bb6a-9f66-6cb08563ffa7@gmail.com> (raw)
In-Reply-To: <58b5888bfe22ee3825362492fab34fe3d0d493d9.camel@suse.com>

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? :-P
> 
>> On 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
> 

  reply	other threads:[~2021-03-12 13:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 13:12 [PATCH] kernel-shark: Do not hardcode /usr prefix for polkit policies Michal Sojka
2021-03-11 14:09 ` Steven Rostedt
2021-03-11 14:48   ` Michal Sojka
2021-03-11 14:50     ` [PATCH v2] " Michal Sojka
2021-03-11 14:54       ` Steven Rostedt
2021-03-11 17:01       ` Yordan Karadzhov (VMware)
2021-03-11 17:57         ` Michal Sojka
2021-03-12  6:46           ` Yordan Karadzhov (VMware)
2021-03-12 11:47             ` Dario Faggioli
2021-03-12 13:02               ` Yordan Karadzhov (VMware) [this message]
2021-03-17 12:59             ` Michal Sojka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f0289bb7-1c80-bb6a-9f66-6cb08563ffa7@gmail.com \
    --to=y.karadz@gmail.com \
    --cc=dfaggioli@suse.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=michal.sojka@cvut.cz \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).