Fix more python2 residuals.
Fixes 1738158
This commit is contained in:
parent
8b530dd0d5
commit
a831745389
36
0003-change-the-way-of-getting-python-ldflags.patch
Normal file
36
0003-change-the-way-of-getting-python-ldflags.patch
Normal file
@ -0,0 +1,36 @@
|
||||
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
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
Name: trace-cmd
|
||||
Version: 2.7
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: GPLv2 and LGPLv2
|
||||
Summary: A user interface to Ftrace
|
||||
|
||||
@ -17,6 +17,7 @@ Source0: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git/s
|
||||
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
|
||||
BuildRequires: gcc
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: asciidoc
|
||||
@ -53,6 +54,7 @@ Python plugin support for trace-cmd
|
||||
%setup -q -n %{name}-v%{version}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%build
|
||||
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
|
||||
@ -60,7 +62,7 @@ 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} \
|
||||
PYTHON_VERS=python3 all doc gui python-plugin
|
||||
|
||||
sed -i 's/env python2/python3/g' event-viewer.py
|
||||
|
||||
%install
|
||||
make V=1 DESTDIR=%{buildroot}/ prefix=%{_prefix} install install_doc install_gui install_python
|
||||
@ -107,6 +109,10 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Aug 07 2019 Zamir SUN <sztsian@gmail.com> - 2.7-7
|
||||
- Fix more python2 residuals.
|
||||
- Fixes 1738158
|
||||
|
||||
* Sat Aug 03 2019 Zamir SUN <sztsian@gmail.com> - 2.7-6
|
||||
- Switch the python plugin to python3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user