Package init
This commit is contained in:
parent
1d95208ab2
commit
0652c6ba2d
@ -0,0 +1,33 @@
|
|||||||
|
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
|
||||||
|
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
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
|
||||||
|
|
||||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# trace-cmd
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
|||||||
# trace-cmd
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
{**以下是码云平台说明,您可以替换此简介**
|
|
||||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
|
||||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
7
kernelshark.desktop
Normal file
7
kernelshark.desktop
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Name=Kernelshark
|
||||||
|
Comment=Analyze data output by trace-cmd
|
||||||
|
Exec=kernelshark
|
||||||
|
Type=Application
|
||||||
|
Categories=Development;Profiling;
|
||||||
|
Icon=applications-development
|
||||||
BIN
trace-cmd-v2.7.tar.gz
Normal file
BIN
trace-cmd-v2.7.tar.gz
Normal file
Binary file not shown.
93
trace-cmd.spec
Normal file
93
trace-cmd.spec
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
Name: trace-cmd
|
||||||
|
Version: 2.7
|
||||||
|
Release: 4
|
||||||
|
Summary: A front-end for Ftrace
|
||||||
|
License: GPLv2 and LGPLv2
|
||||||
|
URL: http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary
|
||||||
|
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
|
||||||
|
|
||||||
|
BuildRequires: gcc xmlto asciidoc mlocate libxml2-devel
|
||||||
|
BuildRequires: gtk2-devel glib2-devel desktop-file-utils
|
||||||
|
|
||||||
|
Provides: kernelshark
|
||||||
|
Obsoletes: kernelshark
|
||||||
|
|
||||||
|
%description
|
||||||
|
This package is a user-space front-end command-line tool for Ftrace.
|
||||||
|
|
||||||
|
%package python2
|
||||||
|
Summary: Python plugin support for trace-cmd
|
||||||
|
Requires: trace-cmd%{_isa} = %{version}-%{release}
|
||||||
|
BuildRequires: swig python2-devel
|
||||||
|
|
||||||
|
%description python2
|
||||||
|
Python plugin support for trace-cmd.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-v%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
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} all doc gui python-plugin
|
||||||
|
|
||||||
|
%install
|
||||||
|
make V=1 DESTDIR=$RPM_BUILD_ROOT/ prefix=%{_prefix} install install_doc install_gui install_python
|
||||||
|
find $RPM_BUILD_ROOT%{_mandir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
|
find $RPM_BUILD_ROOT%{_datadir} -type f | xargs chmod u-x,g-x,o-x
|
||||||
|
find $RPM_BUILD_ROOT%{_libdir} -type f -iname "*.so" | xargs chmod 0755
|
||||||
|
install -d -m 755 $RPM_BUILD_ROOT/%{_datadir}/applications
|
||||||
|
install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
||||||
|
desktop-file-validate $RPM_BUILD_ROOT/%{_datadir}/applications/kernelshark.desktop
|
||||||
|
|
||||||
|
%pre
|
||||||
|
|
||||||
|
%preun
|
||||||
|
|
||||||
|
%post
|
||||||
|
|
||||||
|
%postun
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%license COPYING COPYING.LIB
|
||||||
|
%doc README
|
||||||
|
%{_bindir}/trace-cmd
|
||||||
|
%dir %{_libdir}/%{name}
|
||||||
|
%dir %{_libdir}/%{name}/plugins
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_blk.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_cfg80211.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_function.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_hrtimer.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_jbd2.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_kmem.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_kvm.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_mac80211.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_sched_switch.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_scsi.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_tlb.so
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_xen.so
|
||||||
|
%{_bindir}/trace-view
|
||||||
|
%{_bindir}/trace-graph
|
||||||
|
%{_bindir}/kernelshark
|
||||||
|
%{_datadir}/kernelshark
|
||||||
|
%{_datadir}/applications/kernelshark.desktop
|
||||||
|
%{_sysconfdir}/bash_completion.d/trace-cmd.bash
|
||||||
|
|
||||||
|
%files python2
|
||||||
|
%doc Documentation/README.PythonPlugin
|
||||||
|
%{_libdir}/%{name}/plugins/plugin_python.so
|
||||||
|
%{_libdir}/%{name}/python/
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/man1/*
|
||||||
|
%{_mandir}/man5/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Nov 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.7-4
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user