Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] kernel-shark: Let polkit decide the environment and path of kshark-record
@ 2019-07-25 19:45 Steven Rostedt
  2019-07-25 19:45 ` [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record Steven Rostedt
  2019-07-25 19:45 ` [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation Steven Rostedt
  0 siblings, 2 replies; 5+ messages in thread
From: Steven Rostedt @ 2019-07-25 19:45 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Yordan Karadzhov

As the policy defined in the polkit actions for KernelShark Record define
both the environment ($DISPLAY and $XAUTHORITY) as well as the path
to the executible, no need to add hacks to the kshark-su-record that
is used. Just revert the code that did so.

Steven Rostedt (VMware) (2):
      kernel-shark: Revert adding environment variables to kshark-su-record
      kernel-shark: Revert adding relative path to policy installation

----
 kernel-shark/bin/kshark-su-record | 3 +--
 kernel-shark/src/CMakeLists.txt   | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record
  2019-07-25 19:45 [PATCH 0/2] kernel-shark: Let polkit decide the environment and path of kshark-record Steven Rostedt
@ 2019-07-25 19:45 ` Steven Rostedt
  2019-07-26  7:51   ` Yordan Karadzhov (VMware)
  2019-07-25 19:45 ` [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation Steven Rostedt
  1 sibling, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-07-25 19:45 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Yordan Karadzhov

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

This reverts:

  8eb0d753e ("kernel-shark: Execute kshark-record from same dir as kshark-su-record")
  b084eb5aa ("kernel-shark: Set the DISPLAY environment for pkexec kshark-record")

As the policykit (when installed correctly), should handle both the path to
the executable, as well as the DISPLAY and XAUTHORITY environment variables.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel-shark/bin/kshark-su-record | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index c14f03da9684..70d781d84335 100755
--- a/kernel-shark/bin/kshark-su-record
+++ b/kernel-shark/bin/kshark-su-record
@@ -2,5 +2,4 @@
 
 xhost +si:localuser:root &>/dev/null
 
-THIS_DIR=`dirname $0`
-pkexec env DISPLAY=${DISPLAY} ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat
+pkexec kshark-record -o ${PWD}/trace.dat
-- 
2.20.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation
  2019-07-25 19:45 [PATCH 0/2] kernel-shark: Let polkit decide the environment and path of kshark-record Steven Rostedt
  2019-07-25 19:45 ` [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record Steven Rostedt
@ 2019-07-25 19:45 ` Steven Rostedt
  2019-07-26  7:51   ` Yordan Karadzhov (VMware)
  1 sibling, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-07-25 19:45 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Yordan Karadzhov

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

This reverts the change in a45ab5a44 ("kernel-shark: Remove hard-coded
install paths") that removed the full path of installing
org.freedesktop.kshark-record.policy to a relative path. This means if we
installed in /usr/local/bin the policy still needs to go into
/usr/share/polkit-1/actions/

This does not affect DESTDIR, as installing still goes in the relative path
from DESTDIR for package maintainers.

Suggested-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 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 d91c3650f0dd..21494cccaf55 100644
--- a/kernel-shark/src/CMakeLists.txt
+++ b/kernel-shark/src/CMakeLists.txt
@@ -93,7 +93,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 ${_INSTALL_PREFIX}/share/polkit-1/actions/)
+            DESTINATION /usr/share/polkit-1/actions/)
 
     install(PROGRAMS "${KS_DIR}/bin/kshark-su-record"
             DESTINATION ${_INSTALL_PREFIX}/bin/)
-- 
2.20.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record
  2019-07-25 19:45 ` [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record Steven Rostedt
@ 2019-07-26  7:51   ` Yordan Karadzhov (VMware)
  0 siblings, 0 replies; 5+ messages in thread
From: Yordan Karadzhov (VMware) @ 2019-07-26  7:51 UTC (permalink / raw)
  To: Steven Rostedt, linux-trace-devel



On 25.07.19 г. 22:45 ч., Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> This reverts:
> 
>    8eb0d753e ("kernel-shark: Execute kshark-record from same dir as kshark-su-record")
>    b084eb5aa ("kernel-shark: Set the DISPLAY environment for pkexec kshark-record")
> 
> As the policykit (when installed correctly), should handle both the path to
> the executable, as well as the DISPLAY and XAUTHORITY environment variables.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>


Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>


> ---
>   kernel-shark/bin/kshark-su-record | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
> index c14f03da9684..70d781d84335 100755
> --- a/kernel-shark/bin/kshark-su-record
> +++ b/kernel-shark/bin/kshark-su-record
> @@ -2,5 +2,4 @@
>   
>   xhost +si:localuser:root &>/dev/null
>   
> -THIS_DIR=`dirname $0`
> -pkexec env DISPLAY=${DISPLAY} ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat
> +pkexec kshark-record -o ${PWD}/trace.dat
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation
  2019-07-25 19:45 ` [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation Steven Rostedt
@ 2019-07-26  7:51   ` Yordan Karadzhov (VMware)
  0 siblings, 0 replies; 5+ messages in thread
From: Yordan Karadzhov (VMware) @ 2019-07-26  7:51 UTC (permalink / raw)
  To: Steven Rostedt, linux-trace-devel



On 25.07.19 г. 22:45 ч., Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> This reverts the change in a45ab5a44 ("kernel-shark: Remove hard-coded
> install paths") that removed the full path of installing
> org.freedesktop.kshark-record.policy to a relative path. This means if we
> installed in /usr/local/bin the policy still needs to go into
> /usr/share/polkit-1/actions/
> 
> This does not affect DESTDIR, as installing still goes in the relative path
> from DESTDIR for package maintainers.
> 
> Suggested-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Thanks!

Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>

> ---
>   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 d91c3650f0dd..21494cccaf55 100644
> --- a/kernel-shark/src/CMakeLists.txt
> +++ b/kernel-shark/src/CMakeLists.txt
> @@ -93,7 +93,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 ${_INSTALL_PREFIX}/share/polkit-1/actions/)
> +            DESTINATION /usr/share/polkit-1/actions/)
>   
>       install(PROGRAMS "${KS_DIR}/bin/kshark-su-record"
>               DESTINATION ${_INSTALL_PREFIX}/bin/)
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25 19:45 [PATCH 0/2] kernel-shark: Let polkit decide the environment and path of kshark-record Steven Rostedt
2019-07-25 19:45 ` [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record Steven Rostedt
2019-07-26  7:51   ` Yordan Karadzhov (VMware)
2019-07-25 19:45 ` [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation Steven Rostedt
2019-07-26  7:51   ` Yordan Karadzhov (VMware)

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox