Change-Id: I0efcd95ca6dab73c145eafc844dacd323f71be1f
Reviewed-on: http://photon-jenkins.eng.vmware.com/1187
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: suezzelur <anishs@vmware.com>
(cherry picked from commit c77f66643557710636cb92feea2b9d764e37adcb)
Reviewed-on: http://photon-jenkins.eng.vmware.com/1188
Tested-by: suezzelur <anishs@vmware.com>
| ... | ... |
@@ -1,8 +1,9 @@ |
| 1 | 1 |
%global security_hardening none |
| 2 |
+%define LINUX_VERSION 4.4.8 |
|
| 2 | 3 |
Summary: Sysdig is a universal system visibility tool with native support for containers. |
| 3 | 4 |
Name: sysdig |
| 4 | 5 |
Version: 0.10.1 |
| 5 |
-Release: 1%{?dist}
|
|
| 6 |
+Release: 2%{?dist}
|
|
| 6 | 7 |
License: GPLv2 |
| 7 | 8 |
URL: http://www.sysdig.org/ |
| 8 | 9 |
Group: Applications/System |
| ... | ... |
@@ -10,7 +11,8 @@ Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 | 11 |
Source0: https://github.com/draios/sysdig/archive/%{name}-%{version}.tar.gz
|
| 12 | 12 |
%define sha1 sysdig=272b95ad02be4d194bba66d360ff935084d9c842 |
| 13 |
-BuildRequires: cmake linux-dev |
|
| 13 |
+BuildRequires: cmake |
|
| 14 |
+BuildRequires: linux-dev = %{LINUX_VERSION}
|
|
| 14 | 15 |
BuildRequires: openssl-devel |
| 15 | 16 |
BuildRequires: curl |
| 16 | 17 |
BuildRequires: zlib-devel |
| ... | ... |
@@ -37,18 +39,26 @@ cmake \ |
| 37 | 37 |
-DUSE_BUNDLED_ZLIB=OFF \ |
| 38 | 38 |
-DUSE_BUNDLED_NCURSES=OFF .. |
| 39 | 39 |
|
| 40 |
-make KERNELDIR="/lib/modules/4.4.8/build" |
|
| 40 |
+make KERNELDIR="/lib/modules/%{LINUX_VERSION}/build"
|
|
| 41 | 41 |
|
| 42 | 42 |
%install |
| 43 | 43 |
cd build |
| 44 |
-make install DESTDIR=%{buildroot} KERNELDIR="/lib/modules/4.4.8/build"
|
|
| 44 |
+make install DESTDIR=%{buildroot} KERNELDIR="/lib/modules/%{LINUX_VERSION}/build"
|
|
| 45 | 45 |
mv %{buildroot}/usr/src/sysdig* %{buildroot}/usr/src/sysdig-%{version}
|
| 46 | 46 |
mkdir -p %{buildroot}/etc/
|
| 47 | 47 |
mv %{buildroot}/usr/etc/bash_completion.d %{buildroot}/etc/
|
| 48 | 48 |
rm -rf %{buildroot}/usr/share/zsh/
|
| 49 |
+mkdir -p %{buildroot}/lib/modules/%{LINUX_VERSION}/extra
|
|
| 50 |
+mv driver/sysdig-probe.ko %{buildroot}/lib/modules/%{LINUX_VERSION}/extra
|
|
| 49 | 51 |
|
| 50 | 52 |
%clean |
| 51 | 53 |
rm -rf %{buildroot}/*
|
| 54 |
+ |
|
| 55 |
+%post |
|
| 56 |
+/sbin/depmod -a |
|
| 57 |
+ |
|
| 58 |
+%postun |
|
| 59 |
+/sbin/depmod -a |
|
| 52 | 60 |
|
| 53 | 61 |
%files |
| 54 | 62 |
%defattr(-,root,root) |
| ... | ... |
@@ -56,10 +66,11 @@ rm -rf %{buildroot}/*
|
| 56 | 56 |
%{_bindir}
|
| 57 | 57 |
/usr/src |
| 58 | 58 |
%{_datadir}
|
| 59 |
+/lib/modules/%{LINUX_VERSION}/extra/sysdig-probe.ko
|
|
| 59 | 60 |
|
| 60 | 61 |
%changelog |
| 61 |
-* Thu Jul 14 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.1.101-1 |
|
| 62 |
-- Updated sysdig to build the kernel module |
|
| 62 |
+* Thu Jul 14 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.10.1-2 |
|
| 63 |
+- Updated sysdig to build the kernel module |
|
| 63 | 64 |
* Tue Jun 28 2016 Anish Swaminathan <anishs@vmware.com> 0.10.1-1 |
| 64 | 65 |
- Upgrade sysdig to 0.10.1 |
| 65 | 66 |
* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.8.0-4 |