Update to 2.8.3 and workaround GCC10 multiple definition check
Signed-off-by: Zamir SUN <sztsian@gmail.com>
This commit is contained in:
parent
040ba79130
commit
d8c1b05ee3
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@
|
||||
/trace-cmd-2.6.1.tar.gz
|
||||
/trace-cmd-v2.6.2.tar.gz
|
||||
/trace-cmd-v2.7.tar.gz
|
||||
/trace-cmd-v2.8.3.tar.gz
|
||||
|
68
0001-libdir-cmake.patch
Normal file
68
0001-libdir-cmake.patch
Normal file
@ -0,0 +1,68 @@
|
||||
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/)
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (trace-cmd-v2.7.tar.gz) = e507eb6609f1fd3dddec541e9f69c466f4f3f66c28f0a7f4292615e3984cebaaf42725f3d82b8c625e5c60977d1f9b5e96cce7664b951eb5f99b955cc440efe4
|
||||
SHA512 (trace-cmd-v2.8.3.tar.gz) = 51166c4276abda209a099cc6fe9081ad6d403cbfd9d4a53bc5bb068392327e88fe647e9324a527e68730d73d1a5f7f74126718547f94c652bb12e51c7518a58b
|
||||
|
@ -3,8 +3,8 @@
|
||||
#%%global git_commit 57371aaa2f469d0ba15fd85276deca7bfdd7ce36
|
||||
|
||||
Name: trace-cmd
|
||||
Version: 2.7
|
||||
Release: 9%{?dist}
|
||||
Version: 2.8.3
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2 and LGPLv2
|
||||
Summary: A user interface to Ftrace
|
||||
|
||||
@ -13,20 +13,21 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
||||
# git clone git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
|
||||
# cd trace-cmd
|
||||
# git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-v%%{version}.tar.gz %%{git_commit}
|
||||
Source0: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/snapshot/%{name}-v%{version}.tar.gz
|
||||
Source1: kernelshark.desktop
|
||||
Patch1: 0001-trace-cmd-Figure-out-the-arch-and-install-library-to.patch
|
||||
Patch2: 0002-trace-cmd-Fix-the-logic-behind-SWIG_DEFINED-in-the-M.patch
|
||||
Patch3: 0003-change-the-way-of-getting-python-ldflags.patch
|
||||
Source0: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-v%{version}.tar.gz
|
||||
Patch0: 0001-libdir-cmake.patch
|
||||
BuildRequires: gcc
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: asciidoc
|
||||
BuildRequires: mlocate
|
||||
BuildRequires: graphviz doxygen
|
||||
# needed for the GUI parts
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: gtk2-devel
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: desktop-file-utils
|
||||
BuildRequires: cmake
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: freeglut-devel
|
||||
BuildRequires: json-c-devel
|
||||
|
||||
%description
|
||||
trace-cmd is a user interface to Ftrace. Instead of needing to use the
|
||||
@ -52,25 +53,26 @@ Python plugin support for trace-cmd
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-v%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
||||
# -z muldefs to workaround the enforcing multi definition check of gcc10.
|
||||
# and it need to be removed once upstream fixed the variable name
|
||||
MANPAGE_DOCBOOK_XSL=`rpm -ql docbook-style-xsl | grep manpages/docbook.xsl`
|
||||
make V=1 CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags}" \
|
||||
MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL prefix=%{_prefix} \
|
||||
CFLAGS="%{optflags} -D_GNU_SOURCE" LDFLAGS="%{build_ldflags} -z muldefs " BUILD_TYPE=Release \
|
||||
libdir=%{_libdir} make V=1 MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK_XSL \
|
||||
prefix=%{_prefix} libdir=%{_libdir} \
|
||||
PYTHON_VERS=python3 all doc gui python-plugin
|
||||
sed -i 's/env python2/python3/g' event-viewer.py
|
||||
for i in python/*.py ; do
|
||||
sed -i 's/env python2/python3/g' $i
|
||||
done
|
||||
|
||||
%install
|
||||
make V=1 DESTDIR=%{buildroot}/ prefix=%{_prefix} install install_doc install_gui install_python
|
||||
make libdir=%{_libdir} prefix=%{_prefix} V=1 DESTDIR=%{buildroot}/ prefix=%{_prefix} install install_doc install_gui install_python
|
||||
find %{buildroot}%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find %{buildroot}%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||
find %{buildroot}%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
||||
install -dm 755 %{buildroot}/%{_datadir}/applications
|
||||
install -pm 644 %{SOURCE1} %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||
desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||
|
||||
%files
|
||||
@ -81,6 +83,7 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||
%{_libdir}/%{name}/plugins/plugin_blk.so
|
||||
%{_libdir}/%{name}/plugins/plugin_cfg80211.so
|
||||
%{_libdir}/%{name}/plugins/plugin_function.so
|
||||
%{_libdir}/%{name}/plugins/plugin_futex.so
|
||||
%{_libdir}/%{name}/plugins/plugin_hrtimer.so
|
||||
%{_libdir}/%{name}/plugins/plugin_jbd2.so
|
||||
%{_libdir}/%{name}/plugins/plugin_kmem.so
|
||||
@ -90,16 +93,20 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||
%{_libdir}/%{name}/plugins/plugin_scsi.so
|
||||
%{_libdir}/%{name}/plugins/plugin_tlb.so
|
||||
%{_libdir}/%{name}/plugins/plugin_xen.so
|
||||
%{_mandir}/man1/*
|
||||
%{_mandir}/man5/*
|
||||
%{_mandir}/man1/%{name}*
|
||||
%{_mandir}/man5/%{name}*
|
||||
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||
|
||||
%files -n kernelshark
|
||||
%{_bindir}/trace-view
|
||||
%{_bindir}/trace-graph
|
||||
%{_bindir}/kernelshark
|
||||
%{_bindir}/kshark-record
|
||||
%{_bindir}/kshark-su-record
|
||||
%{_datadir}/kernelshark
|
||||
%{_libdir}/kernelshark
|
||||
%{_datadir}/applications/kernelshark.desktop
|
||||
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||
%{_datadir}/icons/kernelshark
|
||||
%{_mandir}/man1/kernelshark.1.gz
|
||||
%{_datadir}/polkit-1/actions/org.freedesktop.kshark-record.policy
|
||||
|
||||
%files python3
|
||||
%doc Documentation/README.PythonPlugin
|
||||
@ -109,6 +116,12 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Feb 08 2020 Zamir SUN <sztsian@gmail.com> - 2.8-1
|
||||
- Update to 2.8
|
||||
- Add workaround to resolve gcc 10 multiple definition of `common_type_field' problem
|
||||
- Resolves 1794296
|
||||
- Resolves 1727368
|
||||
|
||||
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.7-9
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user