summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTroy Engel2019-04-08 18:59:05 -0500
committerTroy Engel2019-04-08 18:59:05 -0500
commitda6fcc80823e7f7c4e0e67b5b5f244fdf65d100b (patch)
treeb42cc46c9585007d532c707b9e42a01ab393be8a
parentf0eb172fdd95dee1893a48d6157ba56c7f573f6f (diff)
downloadaur-da6fcc80823e7f7c4e0e67b5b5f244fdf65d100b.tar.gz
updates to match commit g5276e83
-rw-r--r--.SRCINFO6
-rw-r--r--001_ksdir_ksmainwindow.patch92
-rw-r--r--PKGBUILD50
3 files changed, 120 insertions, 28 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c7f8db6151be..efd3c5e3fe12 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = trace-cmd-git
pkgdesc = user-space front-end command-line tool for Ftrace, inclduing the GUI interface application kernelshark as well as trace-graph and trace-view.
- pkgver = 2.7.r358.g5276e83
+ pkgver = 2.7.r368.gff13b78
pkgrel = 1
url = http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git
arch = x86_64
@@ -25,7 +25,9 @@ pkgbase = trace-cmd-git
provides = trace-cmd
conflicts = trace-cmd
source = git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
- sha1sums = SKIP
+ source = 001_ksdir_ksmainwindow.patch
+ sha256sums = SKIP
+ sha256sums = SKIP
pkgname = trace-cmd-git
diff --git a/001_ksdir_ksmainwindow.patch b/001_ksdir_ksmainwindow.patch
new file mode 100644
index 000000000000..04634d9e3131
--- /dev/null
+++ b/001_ksdir_ksmainwindow.patch
@@ -0,0 +1,92 @@
+--- a/kernel-shark/src/KsMainWindow.cpp 2019-04-01 18:33:38.995391098 -0500
++++ b/kernel-shark/src/KsMainWindow.cpp 2019-04-01 19:01:00.669394063 -0500
+@@ -23,6 +23,7 @@
+ #include <QMenuBar>
+ #include <QLabel>
+ #include <QLocalSocket>
++#include <QStandardPaths>
+
+ // KernelShark
+ #include "libkshark.h"
+@@ -133,7 +134,11 @@
+ KsMainWindow::~KsMainWindow()
+ {
+ kshark_context *kshark_ctx(nullptr);
+- QString file = KS_CONF_DIR;
++
++ QString file = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
++ QDir dir(file);
++ if (!dir.exists())
++ dir.mkpath(dir.absolutePath());
+
+ file += "/lastsession.json";
+
+@@ -361,7 +366,7 @@
+ QString fileName =
+ QFileDialog::getOpenFileName(this,
+ "Open File",
+- KS_DIR,
++ QDir::homePath(),
+ "trace-cmd files (*.dat);;All files (*)");
+
+ if (!fileName.isEmpty())
+@@ -370,7 +375,11 @@
+
+ void KsMainWindow::_restoreSession()
+ {
+- QString file = KS_CONF_DIR;
++ QString file = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
++ QDir dir(file);
++ if (!dir.exists())
++ dir.mkpath(dir.absolutePath());
++
+ file += "/lastsession.json";
+
+ loadSession(file);
+@@ -382,7 +391,7 @@
+ QString fileName =
+ QFileDialog::getOpenFileName(this,
+ "Import Session",
+- KS_DIR,
++ QDir::homePath(),
+ "Kernel Shark Config files (*.json);;");
+
+ if (fileName.isEmpty())
+@@ -413,7 +422,7 @@
+ QString fileName =
+ QFileDialog::getSaveFileName(this,
+ "Export Filter",
+- KS_DIR,
++ QDir::homePath(),
+ "Kernel Shark Config files (*.json);;");
+
+ if (fileName.isEmpty())
+@@ -462,7 +471,8 @@
+ if (!kshark_instance(&kshark_ctx))
+ return;
+
+- fileName = QFileDialog::getOpenFileName(this, "Import Filter", KS_DIR,
++ fileName = QFileDialog::getOpenFileName(this, "Import Filter",
++ QDir::homePath(),
+ "Kernel Shark Config files (*.json);;");
+
+ if (fileName.isEmpty())
+@@ -490,7 +500,8 @@
+ if (!kshark_instance(&kshark_ctx))
+ return;
+
+- fileName = QFileDialog::getSaveFileName(this, "Export Filter", KS_DIR,
++ fileName = QFileDialog::getSaveFileName(this, "Export Filter",
++ QDir::homePath(),
+ "Kernel Shark Config files (*.json);;");
+
+ if (fileName.isEmpty())
+@@ -811,7 +822,7 @@
+
+ fileNames =
+ QFileDialog::getOpenFileNames(this, "Add KernelShark plugins",
+- KS_DIR,
++ QDir::homePath(),
+ "KernelShark Plugins (*.so);;");
+
+ if (fileNames.isEmpty())
diff --git a/PKGBUILD b/PKGBUILD
index 8c073c3ddf87..0236bc8f16e7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
# Maintainer: Netanel Shine <netanel at archlinux.org.il>
pkgname=trace-cmd-git
-pkgver=2.7.r358.g5276e83
+pkgver=2.7.r368.gff13b78
pkgrel=1
pkgdesc="user-space front-end command-line tool for Ftrace, inclduing the GUI interface application kernelshark as well as trace-graph and trace-view."
arch=('x86_64' 'aarch64')
@@ -17,8 +17,11 @@ optdepends=('python: for the python plugins'
'glu: for the kernelshark GUI')
provides=("trace-cmd")
conflicts=("trace-cmd")
-source=("git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git")
-sha1sums=("SKIP")
+source=(
+ "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git"
+ "001_ksdir_ksmainwindow.patch"
+)
+sha256sums=("SKIP" "SKIP")
pkgver() {
cd "$srcdir/trace-cmd"
@@ -34,40 +37,35 @@ prepare() {
## fixes for getting kernelshark installed correctly to /usr
- # pass down $prefix to cmake
- sed -i.cip 's|bin/cmake|bin/cmake -DCMAKE_INSTALL_PREFIX=\$(prefix) -DCMAKE_BUILD_TYPE=Release|g' \
+ # this implements QStandardPaths in KsMainWindow.cpp
+ patch -p1 < "${srcdir}/001_ksdir_ksmainwindow.patch"
+
+ # pass down Release as build type
+ sed -i.cip 's|\(-D_INSTALL_PREFIX=\)|-DCMAKE_BUILD_TYPE=Release \1|g' \
Makefile
- cd kernel-shark
- # replace hard-coded /usr/local with /usr all over the place
- for filep in org.freedesktop.kshark-record.policy build/ks.desktop.cmake \
- src/CMakeLists.txt src/plugins/CMakeLists.txt ./CMakeLists.txt; do
- sed -i.ul 's|usr/local|usr|g' "${filep}"
- done
+ # all work below is within kernel-shark/
+ cd kernel-shark
# KS_DIR is the random local build directory, relocate it to /usr
- sed -i.ks 's|@KS_DIR@|/usr/share/kernelshark|g' build/ks.desktop.cmake
- sed -i.ks 's|@KS_DIR@|/usr|g' build/deff.h.cmake
- sed -i.tb 's|@TRACECMD_BIN_DIR@|/usr/bin|g' build/deff.h.cmake
+ sed -i.ks 's|@KS_DIR@|@_INSTALL_PREFIX@/share/kernelshark|g' \
+ build/ks.desktop.cmake
+ sed -i.ks 's|@KS_DIR@|@_INSTALL_PREFIX@|g' build/deff.h.cmake
+ sed -i.tb 's|@TRACECMD_BIN_DIR@|@_INSTALL_PREFIX@/bin|g' build/deff.h.cmake
- # this ends up hard-coded to the build directory
+ # this ends up hard-coded to the build directory, with the above
+ # patches it's no longer useful so set it to a safe directory
sed -i.ksc 's|KS_CONF_DIR "\${KS_DIR}|KS_CONF_DIR "/tmp|g' CMakeLists.txt
- # the gcc/g++ debug flag is enabled even when _DEBUG=0
+ # the gcc/g++ debug flag is enabled even when _DEBUG=0 which causes
+ # the build directory to get coded into the libraries
sed -i.dbg 's/-Wall -g/-Wall/g' CMakeLists.txt
- # this source is hard-coded to KS_DIR/lib/plugin-*
+ # this source is hard-coded to KS_DIR/lib/plugin-* (bug?)
sed -i.plg 's|lib/plugin|lib/kshark/plugin|g' src/KsUtils.cpp
- # these try to use KS_DIR for open/close of files
- for kfile in src/KsMainWindow.cpp src/KsCaptureDialog.cpp; do
- sed -i.hm 's/KS_DIR/QDir::homePath()/g' "${kfile}"
- done
-
- # KS_CONF_DIR was set above to /tmp for the Makefiles, this is to use
- # the user's home directory inside the code itself for saving and
- # restoring their "lastsession.json" file
- sed -i.ksd 's|KS_CONF_DIR;|QDir::homePath()+"/.ksconf";QDir dir(file);if (!dir.exists()) dir.mkpath(".");|g' src/KsMainWindow.cpp
+ # this tries to use KS_DIR for open/close of files
+ sed -i.hm 's/KS_DIR/QDir::homePath()/g' src/KsCaptureDialog.cpp
}
build() {