Move all python related stuff to trace-cmd-python3
Signed-off-by: Zamir SUN <sztsian@gmail.com>
This commit is contained in:
parent
57b6456aa8
commit
afb202a066
@ -1,68 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 2bcc383..159b87f 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -262,7 +262,7 @@ all_cmd: $(CMD_TARGETS)
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
$(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
|
||||
- $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -D_INSTALL_PREFIX=$(prefix) ..
|
||||
+ $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -D_INSTALL_PREFIX=$(prefix) -D_LIBDIR=$(libdir) ..
|
||||
|
||||
gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
|
||||
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
|
||||
diff --git a/kernel-shark/CMakeLists.txt b/kernel-shark/CMakeLists.txt
|
||||
index 145b058..bf24ed6 100644
|
||||
--- a/kernel-shark/CMakeLists.txt
|
||||
+++ b/kernel-shark/CMakeLists.txt
|
||||
@@ -30,17 +30,21 @@ if (Qt5Widgets_FOUND)
|
||||
|
||||
endif (Qt5Widgets_FOUND)
|
||||
|
||||
-set(LIBRARY_OUTPUT_PATH "${KS_DIR}/lib")
|
||||
-set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/bin")
|
||||
-
|
||||
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
|
||||
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")
|
||||
-
|
||||
if(NOT _INSTALL_PREFIX)
|
||||
set(_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
|
||||
-set(KS_PLUGIN_INSTALL_PREFIX ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/plugins/)
|
||||
+if (NOT _LIBDIR)
|
||||
+ set(_LIBDIR "${_INSTALL_PREFIX}/lib")
|
||||
+endif (NOT _LIBDIR)
|
||||
+
|
||||
+set(LIBRARY_OUTPUT_PATH "${KS_DIR}/${_LIBDIR}")
|
||||
+set(EXECUTABLE_OUTPUT_PATH "${KS_DIR}/${_INSTALL_PREFIX}/bin")
|
||||
+
|
||||
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -pthread -fPIC")
|
||||
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -g -std=c++11 -pthread -fPIC")
|
||||
+
|
||||
+set(KS_PLUGIN_INSTALL_PREFIX ${_LIBDIR}/${KS_APP_NAME}/plugins/)
|
||||
set(KS_ICON ksharkicon.png)
|
||||
|
||||
if (NOT _DEBUG)
|
||||
@@ -50,7 +54,7 @@ if (NOT _DEBUG)
|
||||
|
||||
endif (NOT _DEBUG)
|
||||
|
||||
-SET(CMAKE_INSTALL_RPATH "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/")
|
||||
+SET(CMAKE_INSTALL_RPATH "${_LIBDIR}/${KS_APP_NAME}/")
|
||||
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
||||
|
||||
include_directories(${KS_DIR}/src/
|
||||
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||
index 6cbc00f..b790c7a 100644
|
||||
--- a/kernel-shark/src/CMakeLists.txt
|
||||
+++ b/kernel-shark/src/CMakeLists.txt
|
||||
@@ -79,7 +79,7 @@ if (Qt5Widgets_FOUND AND Qt5Network_FOUND)
|
||||
|
||||
install(TARGETS ${KS_APP_NAME} kshark-record kshark kshark-plot kshark-gui
|
||||
RUNTIME DESTINATION ${_INSTALL_PREFIX}/bin/
|
||||
- LIBRARY DESTINATION ${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/)
|
||||
+ LIBRARY DESTINATION ${_LIBDIR}/${KS_APP_NAME}/)
|
||||
|
||||
install(FILES "${KS_DIR}/${KS_APP_NAME}.desktop"
|
||||
DESTINATION ${_INSTALL_PREFIX}/share/applications/)
|
@ -1,33 +0,0 @@
|
||||
From 7e8a6e3d03c0a6a7a5014ce488be1e16f99db006 Mon Sep 17 00:00:00 2001
|
||||
From: Zamir SUN <sztsian@gmail.com>
|
||||
Date: Sat, 11 Nov 2017 10:28:32 +0800
|
||||
Subject: [PATCH] trace-cmd: Figure out the arch and install library to the
|
||||
right place
|
||||
|
||||
Signed-off-by: Zamir SUN <sztsian@gmail.com>
|
||||
---
|
||||
Makefile | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 5c35143..d10e547 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -47,7 +47,13 @@ html_install = $(prefix)/share/kernelshark/html
|
||||
html_install_SQ = '$(subst ','\'',$(html_install))'
|
||||
img_install = $(prefix)/share/kernelshark/html/images
|
||||
img_install_SQ = '$(subst ','\'',$(img_install))'
|
||||
-libdir ?= $(prefix)/lib
|
||||
+
|
||||
+# figure out what arch we are on and install to the right place
|
||||
+ARCH = $(shell getconf LONG_BIT)
|
||||
+LIBDIR_32 = /lib
|
||||
+LIBDIR_64 = /lib64
|
||||
+
|
||||
+libdir ?= $(prefix)/$(LIBDIR_$(ARCH))
|
||||
libdir_SQ = '$(subst ','\'',$(libdir))'
|
||||
includedir = $(prefix)/include/trace-cmd
|
||||
includedir_SQ = '$(subst ','\'',$(includedir))'
|
||||
--
|
||||
2.13.4
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 2abc926978474c4588ad43fd49c54f6a7fa3abaf Mon Sep 17 00:00:00 2001
|
||||
From: "Vladislav Valtchev (VMware)" <vladislav.valtchev@gmail.com>
|
||||
Date: Tue, 6 Feb 2018 10:48:59 +0200
|
||||
Subject: [PATCH 01/25] trace-cmd: Fix the logic behind SWIG_DEFINED in the
|
||||
Makefile
|
||||
|
||||
At least on Ubuntu, the $(shell ...) command used in the master Makefile to test
|
||||
for the existence of the 'swig' command does not work in the negative case.
|
||||
That causes the build to report ugly errors in case 'swig' is not installed on
|
||||
the system.
|
||||
This one-line patch, fixes the problem by using the POSIX 'comamnd -v {CMD}'
|
||||
in $(shell ...) to detect the presence of the swig and restores this way the
|
||||
fake report_noswig target.
|
||||
|
||||
Signed-off-by: Vladislav Valtchev (VMware) <vladislav.valtchev@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
Makefile | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6217037..85433b8 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -92,7 +92,7 @@ ifndef VERBOSE
|
||||
VERBOSE = 0
|
||||
endif
|
||||
|
||||
-SWIG_DEFINED := $(shell if swig -help &> /dev/null; then echo 1; else echo 0; fi)
|
||||
+SWIG_DEFINED := $(shell if command -v swig; then echo 1; else echo 0; fi)
|
||||
ifeq ($(SWIG_DEFINED), 0)
|
||||
BUILD_PYTHON := report_noswig
|
||||
NO_PYTHON = 1
|
||||
@@ -105,7 +105,7 @@ PYTHON_GUI := ctracecmd.so ctracecmdgui.so
|
||||
PYTHON_VERS ?= python
|
||||
|
||||
# Can build python?
|
||||
-ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && which swig && echo y"), y)
|
||||
+ifeq ($(shell sh -c "pkg-config --cflags $(PYTHON_VERS) > /dev/null 2>&1 && echo y"), y)
|
||||
PYTHON_PLUGINS := plugin_python.so
|
||||
BUILD_PYTHON := $(PYTHON) $(PYTHON_PLUGINS)
|
||||
PYTHON_SO_INSTALL := ctracecmd.install
|
||||
--
|
||||
2.14.3
|
||||
|
@ -1,36 +0,0 @@
|
||||
From c7e94b0d5d654162851bd6f62ed535c8721091e3 Mon Sep 17 00:00:00 2001
|
||||
From: Zamir SUN <sztsian@gmail.com>
|
||||
Date: Sun, 4 Feb 2018 11:20:14 +0800
|
||||
Subject: trace-cmd: Change the way of getting python ldflags.
|
||||
|
||||
Prior than this patch, Makefile detects python ldflags using a hardcoded
|
||||
python command. It will cause problems if we are building against
|
||||
python3 in the future when ldflags for python2 and python3 are
|
||||
different. With this patch, python ldflags are detected by
|
||||
corresponding python{,3}-config which will detect the right config for
|
||||
python plugins.
|
||||
|
||||
Link: http://lkml.kernel.org/r/20180204032014.6962-3-sztsian@gmail.com
|
||||
|
||||
Signed-off-by: Zamir SUN (Red Hat) <sztsian@gmail.com>
|
||||
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 6b0c3c5..f9b7f65 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -642,7 +642,7 @@ report_noswig: force
|
||||
|
||||
PYTHON_INCLUDES = `pkg-config --cflags $(PYTHON_VERS)`
|
||||
PYTHON_LDFLAGS = `pkg-config --libs $(PYTHON_VERS)` \
|
||||
- $(shell python2 -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LINKFORSHARED')")
|
||||
+ $(shell $(PYTHON_VERS)-config --ldflags)
|
||||
PYGTK_CFLAGS = `pkg-config --cflags pygtk-2.0`
|
||||
|
||||
ctracecmd.so: $(TCMD_LIB_OBJS) ctracecmd.i
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/kernel-shark/src/CMakeLists.txt b/kernel-shark/src/CMakeLists.txt
|
||||
index b790c7a..b78e8d2 100644
|
||||
--- a/kernel-shark/src/CMakeLists.txt
|
||||
+++ b/kernel-shark/src/CMakeLists.txt
|
||||
@@ -10,7 +10,8 @@ add_library(kshark SHARED libkshark.c
|
||||
target_link_libraries(kshark ${CMAKE_DL_LIBS}
|
||||
${JSONC_LIBRARY}
|
||||
${TRACEEVENT_LIBRARY}
|
||||
- ${TRACECMD_LIBRARY})
|
||||
+ ${TRACECMD_LIBRARY}
|
||||
+ ${TRACEEVENT_LIBRARY})
|
||||
|
||||
set_target_properties(kshark PROPERTIES SUFFIX ".so.${KS_VERSION_STRING}")
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name: trace-cmd
|
||||
Version: 2.9.1
|
||||
# Note: After libtraceevent separated, remember to bump release to more than 20 to force a kernelshark update
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2 and LGPLv2
|
||||
Summary: A user interface to Ftrace
|
||||
Requires: trace-cmd-libs%{_isa} = %{version}-%{release}
|
||||
@ -97,9 +97,11 @@ mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/%{_sysconfdir}/bash_compl
|
||||
|
||||
%files libs
|
||||
%dir %{_libdir}/%{name}
|
||||
%dir %{_libdir}/traceevent/
|
||||
%dir %{_libdir}/tracefs/
|
||||
%{_libdir}/trace-cmd/
|
||||
%dir %{_libdir}/traceevent
|
||||
%dir %{_libdir}/tracefs
|
||||
%dir %{_libdir}/trace-cmd
|
||||
%{_libdir}/trace-cmd/libtracecmd.so
|
||||
%{_libdir}/trace-cmd/plugins
|
||||
%{_libdir}/traceevent/
|
||||
%{_libdir}/tracefs/
|
||||
|
||||
@ -109,6 +111,9 @@ mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/%{_sysconfdir}/bash_compl
|
||||
%{_includedir}/tracefs
|
||||
|
||||
%changelog
|
||||
* Wed Dec 02 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-4
|
||||
- Move %{_libdir}/trace-cmd/python/ to trace-cmd-python3
|
||||
|
||||
* Mon Oct 12 2020 Zamir SUN <sztsian@gmail.com> - 2.9.1-3
|
||||
- Temporary move libtraceevent back to trace-cmd/plugins to mitigate the conflicts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user