linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: 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: Thu, 11 Mar 2021 19:01:59 +0200	[thread overview]
Message-ID: <cf3243d3-65e0-18cd-0a20-81739552c105@gmail.com> (raw)
In-Reply-To: <20210311145059.27147-1-michal.sojka@cvut.cz>

Hi Michal,

Thank you very much for helping us improving kernelshark!


On 11.03.21 г. 16:50, Michal Sojka wrote:
> When one wants to install kernel-shark to a non-standard location,
> e.g., by configuring it as follows:
> 
>      cmake -D_INSTALL_PREFIX=$HOME ..
> 
> then "make install" fails, with the following error:
> 
>      CMake Error at src/cmake_install.cmake:225 (file):
>        file INSTALL cannot copy file
>        "/home/user/src/trace-cmd/kernel-shark/org.freedesktop.kshark-record.policy"
>        to "/usr/share/polkit-1/actions/org.freedesktop.kshark-record.policy".
> 
> This commit fixes that by ensuring that even the
> org.freedesktop.kshark-record.policy file is installed to the
> user-specified prefix and not to /usr where the user has no write
> permission.
In your case the installation fails to install the policy file used by
Polkit. Note that this doesn't mean that the kernelshark installation 
itself fails.

As far as I know the policy file can only go to a special locations so 
that Polkit can find it. Otherwise it will have no effect (I may be 
wrong on this).

If you know how to tell Polkit to search in an arbitrary location for 
those files, please let me know.

Thanks!
Yordan

> ---
>   kernel-shark/src/CMakeLists.txt | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
> index 457c100..687e150 100644
> --- a/kernel-shark/src/CMakeLists.txt
> +++ b/kernel-shark/src/CMakeLists.txt
> @@ -92,7 +92,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
>               DESTINATION ${_INSTALL_PREFIX}/share/icons/${KS_APP_NAME})
>   
>       install(FILES "${KS_DIR}/org.freedesktop.kshark-record.policy"
> -            DESTINATION /usr/share/polkit-1/actions/)
> +            DESTINATION ${_INSTALL_PREFIX}/share/polkit-1/actions/)
>   
>       install(PROGRAMS "${KS_DIR}/bin/kshark-su-record"
>               DESTINATION ${_INSTALL_PREFIX}/bin/)
> 

  parent reply	other threads:[~2021-03-11 17:02 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) [this message]
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)
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=cf3243d3-65e0-18cd-0a20-81739552c105@gmail.com \
    --to=y.karadz@gmail.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).