SPECS/ktap/ktap.spec
0e73fcc5
 Summary: A New Scripting Dynamic Tracing Tool For Linux
 Name:    ktap
 Version: 0.4
aecc7617
 Release: 8%{?kernelsubrelease}%{?dist}
0e73fcc5
 License: GPLv2
 URL: https://github.com/ktap/ktap
 Source: %{name}-master.zip
 %define sha1 ktap=8dca9a25e8917ad8cabdf176de487949c235ec80
 Group:      Development/Tools
 Vendor:     VMware, Inc.
fc081194
 Patch0:        linux-4.9-support.patch
aecc7617
 Patch1:        linux-4.14-support.patch
0e73fcc5
 Distribution:  Photon
 BuildRequires: elfutils-devel
7c85d55b
 BuildRequires: linux-devel = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
9b2f8b85
 BuildRequires: linux = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
0e73fcc5
 BuildRequires: unzip
 Requires: kmod
9b2f8b85
 Requires: linux = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
0e73fcc5
 
 %description
 ktap is a new scripting dynamic tracing tool for Linux, it uses a scripting language and lets users trace the Linux kernel dynamically. ktap is designed to give operational insights with interoperability that allows users to tune, troubleshoot and extend the kernel and applications. It's similar to Linux Systemtap and Solaris Dtrace.
 
 %prep
 %setup -q -n ktap-master
a217ee0e
 %patch0 -p1
aecc7617
 %patch1 -p1
0e73fcc5
 
 %build
 make ktap
 # ugly hack: disable security hardening to build kernel module
 # we need to remove sec hard specs file for that.
 rm -f `dirname $(gcc --print-libgcc-file-name)`/../specs
bf36478b
 make KVERSION=%{KERNEL_VERSION}-%{KERNEL_RELEASE} mod
0e73fcc5
 
 %install
 mkdir -p %{buildroot}%{_bindir}
bf36478b
 make install DESTDIR=%{buildroot} KVERSION=%{KERNEL_VERSION}-%{KERNEL_RELEASE}
0e73fcc5
 
 %post
 /sbin/depmod -a
 
 %postun
 /sbin/depmod -a
 
 %files
 %defattr(-, root, root, 0755)
 %doc README.md
 %{_bindir}/ktap
bf36478b
 /lib/modules/%{KERNEL_VERSION}-%{KERNEL_RELEASE}/extra/ktapvm.ko
0e73fcc5
 
 %changelog
aecc7617
 *   Tue Dec 26 2017 Alexey Makhalov <amakhalov@vmware.com> 0.4-8
 -   Update to linux-4.14.y. Added support patch
a216894e
 *   Fri Jun 09 2017 Chang Lee <changlee@vmware.com> 0.4-7
 -   Remove %check
fc081194
 *   Thu Dec 15 2016 Alexey Makhalov <amakhalov@vmware.com> 0.4-6
 -   Update to linux-4.9.0. Added support patch
bf36478b
 *   Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.4-5
 -   Expand uname -r to have release number
 *   Thu Oct 06 2016 ChangLee <changlee@vmware.com> 0.4-4
 -   Modified %check
 *   Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.4-3
 -   Added kernel macros
 *   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.4-3
 -   GA - Bump release of all rpms
a217ee0e
 *   Thu Apr 28 2016 Alexey Makhalov <amakhalov@vmware.com> 0.4-2
 -   Update to linux-4.4.8
 *   Fri Dec 04 2015 Xiaolin Li <xiaolinl@vmware.com> 0.4-1
0e73fcc5
 -   Initial build.  First version