%global security_hardening none %define uname_r %{KERNEL_VERSION}-%{KERNEL_RELEASE} %define _modulesdir /lib/modules/%{uname_r} # check the release bundle & use the right version, example: # https://github.com/draios/sysdig/blob/0.30.2/cmake/modules/falcosecurity-libs.cmake#L35 %define falcosecurity_libs_ver 0.13.4 Summary: Sysdig is a universal system visibility tool with native support for containers. Name: sysdig Version: 0.34.1 Release: 2%{?kernelsubrelease}%{?dist} License: GPLv2 URL: http://www.sysdig.org Group: Applications/System Vendor: VMware, Inc. Distribution: Photon Source0: https://github.com/draios/sysdig/archive/%{name}-%{version}.tar.gz %define sha512 %{name}=2d7c6369eb6ae85cb7fca50da049470830eb8a88002414f257e5ccf1eb438fe36890d51107ffd782b2cd3b7358094de0795641a1cb6b086a4e29b9a5b6edad4f Source1: https://github.com/falcosecurity/libs/archive/falconsecurity-libs-%{falcosecurity_libs_ver}.tar.gz %define sha512 falconsecurity-libs=e4c9ab4cd8bbe544f13403573df7751b21c977ecefe4ea7c0b71c576a77c308d2f64f5a3d933a2493f23aacbc63148f24be0e897ca779a73879a48c63cbbad33 Patch0: get-googletest-sources-from-photonstage.patch Patch1: falcosecurity-libs-nodownload.patch Patch2: bashcomp-location.patch BuildArch: x86_64 BuildRequires: cmake BuildRequires: linux-devel = %{uname_r} BuildRequires: openssl-devel BuildRequires: curl-devel BuildRequires: zlib-devel BuildRequires: ncurses-devel BuildRequires: wget BuildRequires: which BuildRequires: grpc-devel BuildRequires: jq-devel BuildRequires: c-ares-devel BuildRequires: protobuf-devel BuildRequires: git BuildRequires: net-tools BuildRequires: jsoncpp-devel BuildRequires: re2-devel BuildRequires: tinydir-devel BuildRequires: elfutils-devel BuildRequires: abseil-cpp-devel Requires: linux = %{uname_r} Requires: zlib Requires: ncurses Requires: openssl Requires: curl Requires: grpc Requires: jq Requires: c-ares Requires: protobuf Requires: jsoncpp Requires: re2 Requires: elfutils-libelf Requires: abseil-cpp %description Sysdig is open source, system-level exploration, capture system state and activity from a running Linux instance. Then save, filter and analyze. Sysdig is scriptable in Lua and includes a command line interface and a powerful interactive UI, csysdig, that runs in your terminal %prep %autosetup -p1 -a0 -a1 %build export CFLAGS="-Wno-error=misleading-indentation -Wno-dev" %{cmake} \ -DUSE_BUNDLED_OPENSSL=OFF \ -DCMAKE_CXX_STANDARD=17 \ -DUSE_BUNDLED_CURL=OFF \ -DUSE_BUNDLED_ZLIB=OFF \ -DUSE_BUNDLED_CARES=OFF \ -DUSE_BUNDLED_PROTOBUF=OFF \ -DUSE_BUNDLED_GRPC=OFF \ -DUSE_BUNDLED_JQ=OFF \ -DUSE_BUNDLED_JSONCPP=OFF \ -DUSE_BUNDLED_NJSON=OFF \ -DUSE_BUNDLED_NCURSES=OFF \ -DUSE_BUNDLED_LIBELF=OFF \ -DLIBELF_LIB=%{_libdir}/libelf.so \ -DBUILD_DRIVER=ON \ -DBUILD_LIBSCAP_EXAMPLES=OFF \ -DBUILD_LIBSINSP_EXAMPLES=OFF \ -DFALCOSECURITY_LIBS_SOURCE_DIR=%{_builddir}/%{name}-%{version}/libs-%{falcosecurity_libs_ver} \ -DFALCOSECURITY_LIBS_VERSION=%{falcosecurity_libs_ver} \ -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \ -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \ -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_var} \ -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \ -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \ -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \ -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \ -DBUILD_SHARED_LIBS:BOOL=OFF \ -DCMAKE_BUILD_TYPE=Release export KERNELDIR="%{_modulesdir}/build" %{cmake_build} %install export KERNELDIR="%{_modulesdir}/build" %{cmake_install} rm -rf %{buildroot}%{_datadir}/zsh/ \ %{buildroot}{%{_includedir},%{_libdir}} mkdir -p %{buildroot}%{_modulesdir}/extra mv %{__cmake_builddir}/driver/scap.ko %{buildroot}%{_modulesdir}/extra find %{buildroot}%{_modulesdir} -name *.ko -type f -print0 | xargs -0 xz %clean rm -rf %{buildroot}/* %post /sbin/depmod -a %postun /sbin/depmod -a %files %defattr(-,root,root) %{_bindir}/* %exclude %{_usrsrc}/debug %{_usrsrc}/scap* %{_datadir}/%{name}/* %{_datadir}/bash-completion/* %{_mandir}/* %{_modulesdir}/extra/scap.ko.xz %changelog * Tue Jan 09 2024 Ankit Jain 0.34.1-2 - compress .ko and exclude debug from main package * Wed Nov 29 2023 Shreenidhi Shedi 0.34.1-1 - Upgrade to v0.34.1 * Wed Aug 23 2023 Mukul Sikka 0.30.2-7 - Bump version as a part of grpc upgrade * Mon Jul 31 2023 Mukul Sikka 0.30.2-6 - Bump version as a part of grpc upgrade * Sat Jun 17 2023 Shreenidhi Shedi 0.30.2-5 - Bump version as a part of protobuf upgrade * Thu Jun 01 2023 Nitesh Kumar 0.30.2-4 - Bump version as a part of ncurses upgrade to v6.4 * Fri Apr 14 2023 Shreenidhi Shedi 0.30.2-3 - Bump version as a part of zlib upgrade * Tue Jan 17 2023 Shreenidhi Shedi 0.30.2-2 - Fix build options to make installation work * Mon Dec 19 2022 Bo Gan 0.30.2-1 - Update to 0.30.2 - Correct cmake configurations * Tue Aug 30 2022 Vamsi Krishna Brahmajosyula 0.29.3-1 - Update to latest version * Sat Jul 09 2022 Shreenidhi Shedi 0.27.0-7 - Use cmake macros for build * Fri Jul 08 2022 Harinadh D 0.27.0-6 - fix build errors * Tue Nov 16 2021 Satya Naga Vasamsetty 0.27.0-5 - Bump up release for openssl * Tue Nov 16 2021 Satya Naga Vasamsetty 0.27.0-4 - Fix build failure * Fri Feb 19 2021 Harinadh D 0.27.0-3 - Version bump up to build with latest protobuf * Tue Sep 29 2020 Satya Naga Vasamsetty 0.27.0-2 - openssl 1.1.1 * Mon Jun 22 2020 Gerrit Photon 0.27.0-1 - Automatic Version Bump * Fri Sep 27 2019 Ajay Kaher 0.26.4-1 - Update to version 0.26.4 to fix kernel NULL pointer - dereference crash in record_event_consumer.part * Wed Jun 26 2019 Harinadh Dommaraju 0.26.0-1 - Fix for CVE-2019-8339 * Fri Dec 07 2018 Sujay G 0.23.1-3 - Disabled bundled JQ and use Photon maintained JQ * Mon Oct 22 2018 Ajay Kaher 0.23.1-2 - Adding BuildArch * Wed Sep 19 2018 Ajay Kaher 0.23.1-1 - Update to version 0.23.1 * Wed Dec 13 2017 Xiaolin Li 0.19.1-1 - Update to version 0.19.1 * Wed Apr 12 2017 Vinay Kulkarni 0.15.1-1 - Update to version 0.15.1 * Wed Jan 11 2017 Alexey Makhalov 0.10.1-6 - Fix building for linux-4.9.2 * Mon Dec 19 2016 Xiaolin Li 0.10.1-5 - BuildRequires curl-devel * Thu Dec 15 2016 Alexey Makhalov 0.10.1-4 - Fix building for linux-4.9 * Wed Nov 30 2016 Alexey Makhalov 0.10.1-3 - Expand uname -r to have release number - Exclude /usr/src * Mon Aug 1 2016 Divya Thaluru 0.10.1-2 - Added kernel macros * Thu Jul 14 2016 Harish Udaiya Kumar 0.10.1-2 - Updated sysdig to build the kernel module * Tue Jun 28 2016 Anish Swaminathan 0.10.1-1 - Upgrade sysdig to 0.10.1 * Tue May 24 2016 Priyesh Padmavilasom 0.8.0-4 - GA - Bump release of all rpms * Fri May 20 2016 Divya Thaluru 0.8.0-3 - Removing usage of bundled packages to build sysdig package * Wed Mar 16 2016 Anish Swaminathan 0.8.0-2 - Add openssl to buildrequires. * Tue Feb 23 2016 Kumar Kaushik 0.8.0-1 - Upgraded to new version. * Wed Jan 20 2016 Anish Swaminathan 0.6.0-1 - Upgrade version. * Mon Nov 30 2015 Harish Udaiya Kumar 0.1.101-1 - Initial build. First version