From patchwork Thu Jul 25 19:45:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11059639 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 93CC417EF for ; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8478428900 for ; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7951A28A4C; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F377A289C4 for ; Thu, 25 Jul 2019 19:47:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726230AbfGYTrk (ORCPT ); Thu, 25 Jul 2019 15:47:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:47502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726333AbfGYTrk (ORCPT ); Thu, 25 Jul 2019 15:47:40 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB0FB229F9; Thu, 25 Jul 2019 19:47:39 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.92) (envelope-from ) id 1hqjiF-0002Ig-3S; Thu, 25 Jul 2019 15:47:39 -0400 Message-Id: <20190725194738.979632340@goodmis.org> User-Agent: quilt/0.65 Date: Thu, 25 Jul 2019 15:45:38 -0400 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: Yordan Karadzhov Subject: [PATCH 1/2] kernel-shark: Revert adding environment variables to kshark-su-record References: <20190725194537.884800321@goodmis.org> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Steven Rostedt (VMware)" 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) Reviewed-by: Yordan Karadzhov (VMware) --- 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 From patchwork Thu Jul 25 19:45:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 11059641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B2632112C for ; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1DF828900 for ; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9687A28A04; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BB44289FB for ; Thu, 25 Jul 2019 19:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726333AbfGYTrl (ORCPT ); Thu, 25 Jul 2019 15:47:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:47506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbfGYTrl (ORCPT ); Thu, 25 Jul 2019 15:47:41 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1B2E122BE8; Thu, 25 Jul 2019 19:47:40 +0000 (UTC) Received: from rostedt by gandalf.local.home with local (Exim 4.92) (envelope-from ) id 1hqjiF-0002JC-8B; Thu, 25 Jul 2019 15:47:39 -0400 Message-Id: <20190725194739.140392211@goodmis.org> User-Agent: quilt/0.65 Date: Thu, 25 Jul 2019 15:45:39 -0400 From: Steven Rostedt To: linux-trace-devel@vger.kernel.org Cc: Yordan Karadzhov Subject: [PATCH 2/2] kernel-shark: Revert adding relative path to policy installation References: <20190725194537.884800321@goodmis.org> MIME-Version: 1.0 Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Steven Rostedt (VMware)" 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) Signed-off-by: Steven Rostedt (VMware) Reviewed-by: Yordan Karadzhov (VMware) --- 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/)