From 0bafdc8e71344e0b67db690638791b6edd3429c3 Mon Sep 17 00:00:00 2001 From: Jon Stanley Date: Fri, 19 Aug 2016 22:41:15 -0400 Subject: [PATCH 1/2] Rebase to latest upstream Rebase and rename distro specific patch --- .gitignore | 1 + sources | 1 + trace-cmd-2.1.0-plugin-dir.patch | 25 ------------------------- trace-cmd-2.6-libdir.patch | 17 +++++++++++++++++ trace-cmd.spec | 13 +++++++++---- 5 files changed, 28 insertions(+), 29 deletions(-) delete mode 100644 trace-cmd-2.1.0-plugin-dir.patch create mode 100644 trace-cmd-2.6-libdir.patch diff --git a/.gitignore b/.gitignore index e2e4811..37cb892 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /trace-cmd-1.2.20120606git8266dff.tar.gz /trace-cmd-2.1.0.tar.gz /trace-cmd-2.2.1.tar.gz +/trace-cmd-2.6.tar.gz diff --git a/sources b/sources index 03eacab..ae9bdc8 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 19d5516fe013127e5f26c1aecf2eddd0 trace-cmd-2.2.1.tar.gz +fb5148dc8ba05b2d30a24d801ae92eeb trace-cmd-2.6.tar.gz diff --git a/trace-cmd-2.1.0-plugin-dir.patch b/trace-cmd-2.1.0-plugin-dir.patch deleted file mode 100644 index f1d784f..0000000 --- a/trace-cmd-2.1.0-plugin-dir.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up trace-cmd-2.1.0/Makefile.orig trace-cmd-2.1.0/Makefile ---- trace-cmd-2.1.0/Makefile.orig 2013-02-13 10:50:10.355656277 -0500 -+++ trace-cmd-2.1.0/Makefile 2013-02-13 10:51:37.409584197 -0500 -@@ -31,6 +31,12 @@ $(call allow-override,AR,$(CROSS_COMPILE - EXT = -std=gnu99 - INSTALL = install - -+# 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=$(LIBDIR_$(ARCH)) -+ - # Use DESTDIR for installing into a different root directory. - # This is useful for building a package. The program will be - # installed in this directory as if it was the root directory. -@@ -56,7 +62,7 @@ ifeq ($(prefix),$(HOME)) - plugin_dir = $(HOME)/.trace-cmd/plugins - python_dir = $(HOME)/.trace-cmd/python - else --plugin_dir = $(prefix)/lib/trace-cmd/plugins -+plugin_dir = $(prefix)/$(LIBDIR)/trace-cmd - python_dir = $(prefix)/lib/trace-cmd/python - PLUGIN_DIR = -DPLUGIN_DIR="$(plugin_dir)" - PYTHON_DIR = -DPYTHON_DIR="$(python_dir)" diff --git a/trace-cmd-2.6-libdir.patch b/trace-cmd-2.6-libdir.patch new file mode 100644 index 0000000..cd930ba --- /dev/null +++ b/trace-cmd-2.6-libdir.patch @@ -0,0 +1,17 @@ +diff -up ./Makefile.orig ./Makefile +--- ./Makefile.orig 2016-08-18 00:26:57.580940826 -0400 ++++ ./Makefile 2016-08-18 00:29:51.594273746 -0400 +@@ -31,6 +31,13 @@ $(call allow-override,AR,$(CROSS_COMPILE + EXT = -std=gnu99 + INSTALL = install + ++# 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=$(LIBDIR_$(ARCH)) ++ ++ + # Use DESTDIR for installing into a different root directory. + # This is useful for building a package. The program will be + # installed in this directory as if it was the root directory. diff --git a/trace-cmd.spec b/trace-cmd.spec index 40abb88..7d33432 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -1,10 +1,10 @@ #%global checkout 20130723git07f0eee2 # git tag -%global git_commit trace-cmd-v2.2.1 +%global git_commit trace-cmd-v2.6 Name: trace-cmd -Version: 2.2.1 -Release: 7%{?dist} +Version: 2.6 +Release: 1%{?dist} License: GPLv2 and LGPLv2 Summary: A user interface to Ftrace @@ -17,7 +17,7 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary # git archive --prefix=trace-cmd-%%{version}/ -o trace-cmd-%%{version}.tar.gz %%{git_commit} Source0: trace-cmd-%{version}.tar.gz Source1: kernelshark.desktop -Patch1: trace-cmd-2.1.0-plugin-dir.patch +Patch1: trace-cmd-2.6-libdir.patch BuildRequires: xmlto BuildRequires: asciidoc @@ -76,6 +76,11 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop %changelog +* Fri Aug 19 2016 Jon Stanley - 2.6-1 +- Update to latest upstream +- Rebase distro patch +- Resolves: rhbz#1365951 + * Fri Feb 05 2016 Fedora Release Engineering - 2.2.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From eec8854ad1ee2400996044a251c31cee8702477b Mon Sep 17 00:00:00 2001 From: zsun Date: Wed, 19 Oct 2016 22:32:53 +0800 Subject: [PATCH 2/2] Add bz1386451-trace-cmd-record-crash-f-before-e.patch - Fix rpmlint error unstripped-binary-or-object - Related rhbz 1386451 --- bz1386451-trace-cmd-record-crash-f-before-e.patch | 13 +++++++++++++ trace-cmd.spec | 10 +++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 bz1386451-trace-cmd-record-crash-f-before-e.patch diff --git a/bz1386451-trace-cmd-record-crash-f-before-e.patch b/bz1386451-trace-cmd-record-crash-f-before-e.patch new file mode 100644 index 0000000..ec972ea --- /dev/null +++ b/bz1386451-trace-cmd-record-crash-f-before-e.patch @@ -0,0 +1,13 @@ +diff --git a/trace-record.c b/trace-record.c +index a8d32d3..ab64418 100644 +--- a/trace-record.c ++++ b/trace-record.c +@@ -3803,7 +3803,7 @@ void trace_record (int argc, char **argv) + const char *output = NULL; + const char *option; + struct event_list *event = NULL; +- struct event_list *last_event; ++ struct event_list *last_event = NULL; + struct buffer_instance *instance = &top_instance; + enum trace_type type = 0; + char *pids; diff --git a/trace-cmd.spec b/trace-cmd.spec index 7d33432..1d847c0 100644 --- a/trace-cmd.spec +++ b/trace-cmd.spec @@ -4,7 +4,7 @@ Name: trace-cmd Version: 2.6 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and LGPLv2 Summary: A user interface to Ftrace @@ -18,6 +18,7 @@ URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary Source0: trace-cmd-%{version}.tar.gz Source1: kernelshark.desktop Patch1: trace-cmd-2.6-libdir.patch +Patch2: bz1386451-trace-cmd-record-crash-f-before-e.patch BuildRequires: xmlto BuildRequires: asciidoc @@ -45,6 +46,7 @@ Kernelshark is the GUI frontend for analyzing data produced by %prep %setup -q -n %{name}-%{version} %patch1 -p1 +%patch2 -p1 %build # MANPAGE_DOCBOOK_XSL define is hack to avoid using locate @@ -56,6 +58,7 @@ make V=1 CFLAGS="%{optflags} -D_GNU_SOURCE" MANPAGE_DOCBOOK_XSL=$MANPAGE_DOCBOOK make V=1 DESTDIR=%{buildroot} prefix=%{_prefix} install install_doc install_gui 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 @@ -76,6 +79,11 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop %changelog +* Wed Oct 19 2016 Zamir SUN - 2.6-2 +- Add bz1386451-trace-cmd-record-crash-f-before-e.patch +- Fix rpmlint error unstripped-binary-or-object +- Related rhbz 1386451 + * Fri Aug 19 2016 Jon Stanley - 2.6-1 - Update to latest upstream - Rebase distro patch