SPECS/ktap/ktap.spec
0e73fcc5
 Summary: A New Scripting Dynamic Tracing Tool For Linux
 Name:    ktap
 Version: 0.4
9b2f8b85
 Release: 3%{?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.
a217ee0e
 Patch0:        linux-4.4-support.patch
0e73fcc5
 Distribution:  Photon
 BuildRequires: elfutils-devel
9b2f8b85
 BuildRequires: linux-dev = %{KERNEL_VERSION}-%{KERNEL_RELEASE}
 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
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
9b2f8b85
 make KVERSION=%{KERNEL_VERSION} mod
0e73fcc5
 
 %install
 mkdir -p %{buildroot}%{_bindir}
9b2f8b85
 make install DESTDIR=%{buildroot} KVERSION=%{KERNEL_VERSION}
0e73fcc5
 
 %post
 /sbin/depmod -a
 
 %postun
 /sbin/depmod -a
 
 %files
 %defattr(-, root, root, 0755)
 %doc README.md
 %{_bindir}/ktap
9b2f8b85
 /lib/modules/%{KERNEL_VERSION}/extra/ktapvm.ko
0e73fcc5
 
 %changelog
9b2f8b85
 *   Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.4-3
 -   Added kernel macros
c3a3fd12
 *	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