Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Zamir SUN
00d74e9eb3 Add missing patch 2017-03-27 22:44:12 +08:00
Zamir SUN
58eb04e8e0 Fix bz1389219 segmentation fault in trace-cmd snapshot 2017-03-27 22:36:54 +08:00
zsun
9e1a9f5bc5 Add bz1386451-trace-cmd-record-crash-f-before-e.patch
- Fix rpmlint error unstripped-binary-or-object
- Related rhbz 1386451
2016-10-19 23:05:32 +08:00
Jon Stanley
fe13f08e6a Merge branch 'f25' of ssh://pkgs.fedoraproject.org/rpms/trace-cmd into f25 2016-08-19 22:16:23 -04:00
Jon Stanley
5ca76b067b Update to latest upstream
Remove old patch that was rebased and renamed.
2016-08-19 22:15:47 -04:00
Jon Stanley
84852db9e4 Update to latest upstream
Remove old patch that was rebased and renamed.
2016-08-19 22:14:27 -04:00
7 changed files with 67 additions and 29 deletions

1
.gitignore vendored
View file

@ -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

View file

@ -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;

View file

@ -0,0 +1,13 @@
diff --git a/trace-snapshot.c b/trace-snapshot.c
index 9d3608c..f1036f6 100644
--- a/trace-snapshot.c
+++ b/trace-snapshot.c
@@ -42,7 +42,7 @@ static void write_file(const char *name, char *val)
n = write(fd, val, strlen(val));
if (n < 0)
- die("failed to write '%d' to %s\n", path);
+ die("failed to write to %s\n", path);
tracecmd_put_tracing_file(path);
close(fd);
}

View file

@ -1 +1,2 @@
19d5516fe013127e5f26c1aecf2eddd0 trace-cmd-2.2.1.tar.gz
fb5148dc8ba05b2d30a24d801ae92eeb trace-cmd-2.6.tar.gz

View file

@ -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)"

View file

@ -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.

View file

@ -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: 2.1%{?dist}
License: GPLv2 and LGPLv2
Summary: A user interface to Ftrace
@ -17,7 +17,9 @@ 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
Patch2: bz1386451-trace-cmd-record-crash-f-before-e.patch
Patch3: bz1389219-segmentation-fault-in-trace-snapshot.patch
BuildRequires: xmlto
BuildRequires: asciidoc
@ -45,6 +47,8 @@ Kernelshark is the GUI frontend for analyzing data produced by
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
# MANPAGE_DOCBOOK_XSL define is hack to avoid using locate
@ -56,6 +60,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 +81,19 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/kernelshark.desktop
%changelog
* Mon Mar 27 2017 Zamir SUN <zsun@fedoraproject.org> - 2.6-2.1
- Fix bz1389219 segmentation fault in trace-cmd snapshot
* Wed Oct 19 2016 Zamir SUN <zsun@fedoraproject.org> - 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 <jonstanley@gmail.com> - 2.6-1
- Update to latest upstream
- Update distro libdir patch
- Resolves: rhbz#1365951
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild