Move the existing kernel dep specs to .in template & generate spec files
at the run time for each kernel version supported.
Patch package builder to consider version+release while building
packages.
Change-Id: Ifa9a47eeabe9bf9a11ac576fa5ae92a2b401d33e
Signed-off-by: Shreenidhi Shedi <shreenidhi.shedi@broadcom.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/c/photon/+/23439
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>
| 13 | 16 |
deleted file mode 100644 |
| ... | ... |
@@ -1,199 +0,0 @@ |
| 1 |
-%global security_hardening none |
|
| 2 |
- |
|
| 3 |
-%define uname_r %{KERNEL_VERSION}-%{KERNEL_RELEASE}
|
|
| 4 |
- |
|
| 5 |
-%define _modulesdir /lib/modules/%{uname_r}
|
|
| 6 |
- |
|
| 7 |
-Summary: The Behavioral Activity Monitor With Container Support |
|
| 8 |
-Name: falco |
|
| 9 |
-Version: 0.36.2 |
|
| 10 |
-Release: 2%{?kernelsubrelease}%{?dist}
|
|
| 11 |
-License: GPLv2 |
|
| 12 |
-URL: https://falco.org |
|
| 13 |
-Group: Applications/System |
|
| 14 |
-Vendor: VMware, Inc. |
|
| 15 |
-Distribution: Photon |
|
| 16 |
- |
|
| 17 |
-Source0: https://github.com/falcosecurity/falco/archive/refs/tags/%{name}-%{version}.tar.gz
|
|
| 18 |
-%define sha512 %{name}=a3fef235ab4f3121bd0400827712652530ec417498c44ada8b6bf565f7631d035673b53dad94ea6ae9c854d45202ed71b2771f19e0c92eea3fc3503e5b75b02e
|
|
| 19 |
- |
|
| 20 |
-Patch0: build-Distinguish-yamlcpp-in-USE_BUNDLED-macro.patch |
|
| 21 |
-Patch1: 0001-build-plugins-locally.patch |
|
| 22 |
- |
|
| 23 |
-BuildArch: x86_64 |
|
| 24 |
- |
|
| 25 |
-BuildRequires: cmake |
|
| 26 |
-BuildRequires: openssl-devel |
|
| 27 |
-BuildRequires: curl-devel |
|
| 28 |
-BuildRequires: zlib-devel |
|
| 29 |
-BuildRequires: ncurses-devel |
|
| 30 |
-BuildRequires: linux-devel = %{uname_r}
|
|
| 31 |
-BuildRequires: jq-devel |
|
| 32 |
-BuildRequires: git |
|
| 33 |
-BuildRequires: lua-devel |
|
| 34 |
-BuildRequires: libyaml-devel |
|
| 35 |
-BuildRequires: linux-api-headers |
|
| 36 |
-BuildRequires: wget |
|
| 37 |
-BuildRequires: which |
|
| 38 |
-BuildRequires: grpc-devel |
|
| 39 |
-BuildRequires: c-ares-devel |
|
| 40 |
-BuildRequires: protobuf-devel |
|
| 41 |
-BuildRequires: go |
|
| 42 |
-BuildRequires: re2-devel |
|
| 43 |
-BuildRequires: yaml-cpp-devel |
|
| 44 |
- |
|
| 45 |
-Requires: linux = %{uname_r}
|
|
| 46 |
-Requires: zlib |
|
| 47 |
-Requires: ncurses |
|
| 48 |
-Requires: openssl |
|
| 49 |
-Requires: curl |
|
| 50 |
-Requires: libyaml |
|
| 51 |
-Requires: lua |
|
| 52 |
-Requires: sysdig |
|
| 53 |
-Requires: dkms |
|
| 54 |
-Requires: grpc |
|
| 55 |
-Requires: jq |
|
| 56 |
-Requires: protobuf |
|
| 57 |
-Requires: c-ares |
|
| 58 |
-Requires: re2 |
|
| 59 |
-Requires: yaml-cpp |
|
| 60 |
- |
|
| 61 |
-%package devel |
|
| 62 |
-Summary: falco |
|
| 63 |
-Group: Development/Libraries |
|
| 64 |
-Requires: %{name} = %{version}-%{release}
|
|
| 65 |
- |
|
| 66 |
-%description devel |
|
| 67 |
-Development files for %{name}
|
|
| 68 |
- |
|
| 69 |
-%description |
|
| 70 |
-Sysdig %{name} is an open source, behavioral activity monitor designed to detect anomalous activity in your applications.
|
|
| 71 |
-Falco lets you continuously monitor and detect container, application, host, and network activity; all in one place, from one source of data, with one set of customizable rules. |
|
| 72 |
- |
|
| 73 |
-%prep |
|
| 74 |
-%autosetup -p1 |
|
| 75 |
- |
|
| 76 |
-%build |
|
| 77 |
-%{cmake} \
|
|
| 78 |
- -DCMAKE_BUILD_TYPE=Debug \ |
|
| 79 |
- -DUSE_BUNDLED_DEPS:BOOL=OFF \ |
|
| 80 |
- -DUSE_BUNDLED_OPENSSL:BOOL=OFF \ |
|
| 81 |
- -DUSE_BUNDLED_JQ:BOOL=OFF \ |
|
| 82 |
- -DUSE_BUNDLED_YAMLCPP:BOOL=OFF \ |
|
| 83 |
- -DBUILD_SHARED_LIBS:BOOL=OFF \ |
|
| 84 |
- -DUSE_BUNDLED_LIBELF=OFF \ |
|
| 85 |
- -DLIBELF_LIB=%{_libdir}/libelf.so \
|
|
| 86 |
- -DCMAKE_INSTALL_LIBDIR=%{_lib} \
|
|
| 87 |
- -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}
|
|
| 88 |
- |
|
| 89 |
-export KERNELDIR="%{_modulesdir}/build"
|
|
| 90 |
-%{cmake_build}
|
|
| 91 |
- |
|
| 92 |
-%install |
|
| 93 |
-export KERNELDIR="%{_modulesdir}/build"
|
|
| 94 |
-%{cmake_install}
|
|
| 95 |
-mkdir -p %{buildroot}%{_modulesdir}/extra
|
|
| 96 |
-install -vm 644 %{__cmake_builddir}/driver/%{name}.ko %{buildroot}%{_modulesdir}/extra
|
|
| 97 |
- |
|
| 98 |
-%clean |
|
| 99 |
-rm -rf %{buildroot}/*
|
|
| 100 |
- |
|
| 101 |
-%post |
|
| 102 |
-/sbin/depmod -a |
|
| 103 |
- |
|
| 104 |
-%postun |
|
| 105 |
-/sbin/depmod -a |
|
| 106 |
- |
|
| 107 |
-%files |
|
| 108 |
-%defattr(-,root,root) |
|
| 109 |
-%{_bindir}/*
|
|
| 110 |
-%{_usrsrc}/*
|
|
| 111 |
-%{_sysconfdir}/%{name}
|
|
| 112 |
-%{_datadir}/%{name}
|
|
| 113 |
-%{_modulesdir}/extra/%{name}.ko
|
|
| 114 |
-%{_sysconfdir}/falcoctl/falcoctl.yaml
|
|
| 115 |
- |
|
| 116 |
-%files devel |
|
| 117 |
-%defattr(-,root,root) |
|
| 118 |
-%{_libdir}/pkgconfig/*.pc
|
|
| 119 |
-%{_libdir}/falcosecurity/*
|
|
| 120 |
-%{_includedir}/falcosecurity/*
|
|
| 121 |
- |
|
| 122 |
-%changelog |
|
| 123 |
-* Thu Dec 14 2023 Piyush Gupta <gpiyush@vmware.com> 0.36.2-2 |
|
| 124 |
-- Bump up version to compile with new go |
|
| 125 |
-* Thu Nov 30 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.36.2-1 |
|
| 126 |
-- Upgrade to v0.36.2 |
|
| 127 |
-* Sun Nov 19 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-11 |
|
| 128 |
-- Bump version as a part of openssl upgrade |
|
| 129 |
-* Wed Oct 11 2023 Piyush Gupta <gpiyush@vmware.com> 0.32.2-10 |
|
| 130 |
-- Bump up version to compile with new go |
|
| 131 |
-* Mon Sep 18 2023 Piyush Gupta <gpiyush@vmware.com> 0.32.2-9 |
|
| 132 |
-- Bump up version to compile with new go |
|
| 133 |
-* Wed Aug 09 2023 Mukul Sikka <msikka@vmware.com> 0.32.2-8 |
|
| 134 |
-- Bump version as a part of grpc upgrade |
|
| 135 |
-* Mon Jul 17 2023 Piyush Gupta <gpiyush@vmware.com> 0.32.2-7 |
|
| 136 |
-- Bump up version to compile with new go |
|
| 137 |
-* Wed Jul 05 2023 Brennan Lamoreaux <blamoreaux@vmware.com> 0.32.2-6 |
|
| 138 |
-- Build Go plugins locally, instead of consuming precompiled binary |
|
| 139 |
-* Tue Jun 20 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-5 |
|
| 140 |
-- Bump version as a part of lua upgrade |
|
| 141 |
-* Sat Jun 17 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-4 |
|
| 142 |
-- Bump version as a part of protobuf upgrade |
|
| 143 |
-* Fri Jun 09 2023 Nitesh Kumar <kunitesh@vmware.com> 0.32.2-3 |
|
| 144 |
-- Bump version as a part of ncurses upgrade to v6.4 |
|
| 145 |
-* Fri Apr 14 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-2 |
|
| 146 |
-- Bump version as a part of zlib upgrade |
|
| 147 |
-* Thu Sep 15 2022 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 0.32.2-1 |
|
| 148 |
-- Upgrade to v0.32.2 |
|
| 149 |
-* Fri Jun 17 2022 Shreenidhi Shedi <sshedi@vmware.com> 0.32.0-1 |
|
| 150 |
-- Upgrade to v0.32.0 |
|
| 151 |
-- Introduce devel sub package |
|
| 152 |
-* Tue Nov 23 2021 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 0.30.0-1 |
|
| 153 |
-- Update to version 0.30.0. |
|
| 154 |
-- Add missing runtime dependency on linux. |
|
| 155 |
-* Wed Aug 04 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.25.0-5 |
|
| 156 |
-- compile with openssl 3.0.0 |
|
| 157 |
-* Tue Aug 03 2021 Nitesh Kumar <kunitesh@vmware.com> 0.25.0-4 |
|
| 158 |
-- Patched for CVE-2021-33505. |
|
| 159 |
-* Fri Feb 19 2021 Harinadh D <hdommaraju@vmware.com> 0.25.0-3 |
|
| 160 |
-- Version bump up to build with latest protobuf |
|
| 161 |
-* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.25.0-2 |
|
| 162 |
-- openssl 1.1.1 |
|
| 163 |
-* Wed Sep 16 2020 Bo Gan <ganb@vmware.com> 0.25.0-1 |
|
| 164 |
-- Updated to 0.25.0 |
|
| 165 |
-* Mon Sep 14 2020 Ankit Jain <ankitja@vmware.com> 0.15.1-2 |
|
| 166 |
-- Fix build failure with grpc in patch |
|
| 167 |
-* Wed Jun 26 2019 Harinadh Dommaraju <hdommaraju@vmware.com> 0.15.1-1 |
|
| 168 |
-- Updated to fix CVE-2019-8339 |
|
| 169 |
-* Wed Dec 12 2018 Sujay G <gsujay@vmware.com> 0.12.1-4 |
|
| 170 |
-- Disabled bundled JQ, openssl and instead use Photon maintained packages. |
|
| 171 |
-* Wed Oct 24 2018 Ajay Kaher <akaher@vmware.com> 0.12.1-3 |
|
| 172 |
-- Adding BuildArch |
|
| 173 |
-* Wed Oct 24 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 0.12.1-2 |
|
| 174 |
-- Add depmod for falco-probe.ko and removed patch from new falco-probe-loader |
|
| 175 |
-* Mon Sep 24 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 0.12.1-1 |
|
| 176 |
-- Update falco and sysdig versions to fix build error with linux 4.18 |
|
| 177 |
-* Tue Jan 02 2018 Alexey Makhalov <amakhalov@vmware.com> 0.8.1-1 |
|
| 178 |
-- Version update to build against linux-4.14.y kernel |
|
| 179 |
-* Thu Aug 24 2017 Rui Gu <ruig@vmware.com> 0.6.0-3 |
|
| 180 |
-- Disable check section (Bug 1900272). |
|
| 181 |
-* Thu May 11 2017 Chang Lee <changlee@vmware.com> 0.6.0-2 |
|
| 182 |
-- Add falco-probe.ko and change falco-probe.ko path in falco-probe-loader |
|
| 183 |
-* Mon Apr 03 2017 Chang Lee <changlee@vmware.com> 0.6.0-1 |
|
| 184 |
-- Update to version 0.6.0 |
|
| 185 |
-* Wed Jan 11 2017 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-7 |
|
| 186 |
-- Fix building for linux-4.9.2 |
|
| 187 |
-* Mon Dec 19 2016 Xiaolin Li <xiaolinl@vmware.com> 0.2.0-6 |
|
| 188 |
-- BuildRequires curl-devel |
|
| 189 |
-* Thu Dec 15 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-5 |
|
| 190 |
-- Fix building for linux-4.9 |
|
| 191 |
-* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-4 |
|
| 192 |
-- Expand uname -r to have release number |
|
| 193 |
-- Exclude /usr/src |
|
| 194 |
-* Fri Sep 2 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-3 |
|
| 195 |
-- Use KERNEL_VERSION macro |
|
| 196 |
-* Wed Jul 27 2016 Divya Thaluru <dthaluru@vmware.com> 0.2.0-2 |
|
| 197 |
-- Removed packaging of debug files |
|
| 198 |
-* Tue Jun 28 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.2.0-1 |
|
| 199 |
-- Initial build. First version |
| 200 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,203 @@ |
| 0 |
+%global security_hardening none |
|
| 1 |
+%define uname_r %{KERNEL_VERSION}-%{KERNEL_RELEASE}
|
|
| 2 |
+%define _modulesdir /lib/modules/%{uname_r}
|
|
| 3 |
+ |
|
| 4 |
+Summary: The Behavioral Activity Monitor With Container Support |
|
| 5 |
+Name: falco |
|
| 6 |
+Version: 0.36.2 |
|
| 7 |
+Release: 3%{?kernelsubrelease}%{?dist}
|
|
| 8 |
+License: GPLv2 |
|
| 9 |
+URL: https://falco.org |
|
| 10 |
+Group: Applications/System |
|
| 11 |
+Vendor: VMware, Inc. |
|
| 12 |
+Distribution: Photon |
|
| 13 |
+ |
|
| 14 |
+Source0: https://github.com/falcosecurity/falco/archive/refs/tags/%{name}-%{version}.tar.gz
|
|
| 15 |
+%define sha512 %{name}=a3fef235ab4f3121bd0400827712652530ec417498c44ada8b6bf565f7631d035673b53dad94ea6ae9c854d45202ed71b2771f19e0c92eea3fc3503e5b75b02e
|
|
| 16 |
+ |
|
| 17 |
+Patch0: build-Distinguish-yamlcpp-in-USE_BUNDLED-macro.patch |
|
| 18 |
+Patch1: 0001-build-plugins-locally.patch |
|
| 19 |
+ |
|
| 20 |
+BuildArch: x86_64 |
|
| 21 |
+ |
|
| 22 |
+BuildRequires: cmake |
|
| 23 |
+BuildRequires: openssl-devel |
|
| 24 |
+BuildRequires: curl-devel |
|
| 25 |
+BuildRequires: zlib-devel |
|
| 26 |
+BuildRequires: ncurses-devel |
|
| 27 |
+BuildRequires: linux-devel = %{uname_r}
|
|
| 28 |
+BuildRequires: jq-devel |
|
| 29 |
+BuildRequires: git |
|
| 30 |
+BuildRequires: lua-devel |
|
| 31 |
+BuildRequires: libyaml-devel |
|
| 32 |
+BuildRequires: linux-api-headers |
|
| 33 |
+BuildRequires: wget |
|
| 34 |
+BuildRequires: which |
|
| 35 |
+BuildRequires: grpc-devel |
|
| 36 |
+BuildRequires: c-ares-devel |
|
| 37 |
+BuildRequires: protobuf-devel |
|
| 38 |
+BuildRequires: go |
|
| 39 |
+BuildRequires: re2-devel |
|
| 40 |
+BuildRequires: yaml-cpp-devel |
|
| 41 |
+ |
|
| 42 |
+Requires: linux = %{uname_r}
|
|
| 43 |
+Requires: zlib |
|
| 44 |
+Requires: ncurses |
|
| 45 |
+Requires: openssl |
|
| 46 |
+Requires: curl |
|
| 47 |
+Requires: libyaml |
|
| 48 |
+Requires: lua |
|
| 49 |
+Requires: sysdig |
|
| 50 |
+Requires: dkms |
|
| 51 |
+Requires: grpc |
|
| 52 |
+Requires: jq |
|
| 53 |
+Requires: protobuf |
|
| 54 |
+Requires: c-ares |
|
| 55 |
+Requires: re2 |
|
| 56 |
+Requires: yaml-cpp |
|
| 57 |
+ |
|
| 58 |
+%package devel |
|
| 59 |
+Summary: falco |
|
| 60 |
+Group: Development/Libraries |
|
| 61 |
+Requires: %{name} = %{version}-%{release}
|
|
| 62 |
+ |
|
| 63 |
+%description devel |
|
| 64 |
+Development files for %{name}
|
|
| 65 |
+ |
|
| 66 |
+%description |
|
| 67 |
+Sysdig %{name} is an open source, behavioral activity monitor designed to detect anomalous activity in your applications.
|
|
| 68 |
+Falco lets you continuously monitor and detect container, application, host, and network activity; all in one place, from one source of data, with one set of customizable rules. |
|
| 69 |
+ |
|
| 70 |
+%prep |
|
| 71 |
+%autosetup -p1 |
|
| 72 |
+ |
|
| 73 |
+%build |
|
| 74 |
+%{cmake} \
|
|
| 75 |
+ -DCMAKE_BUILD_TYPE=Debug \ |
|
| 76 |
+ -DUSE_BUNDLED_DEPS:BOOL=OFF \ |
|
| 77 |
+ -DUSE_BUNDLED_OPENSSL:BOOL=OFF \ |
|
| 78 |
+ -DUSE_BUNDLED_JQ:BOOL=OFF \ |
|
| 79 |
+ -DUSE_BUNDLED_YAMLCPP:BOOL=OFF \ |
|
| 80 |
+ -DBUILD_SHARED_LIBS:BOOL=OFF \ |
|
| 81 |
+ -DUSE_BUNDLED_LIBELF=OFF \ |
|
| 82 |
+ -DLIBELF_LIB=%{_libdir}/libelf.so \
|
|
| 83 |
+ -DCMAKE_INSTALL_LIBDIR=%{_lib} \
|
|
| 84 |
+ -DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir}
|
|
| 85 |
+ |
|
| 86 |
+export KERNELDIR="%{_modulesdir}/build"
|
|
| 87 |
+%{cmake_build}
|
|
| 88 |
+ |
|
| 89 |
+%install |
|
| 90 |
+export KERNELDIR="%{_modulesdir}/build"
|
|
| 91 |
+%{cmake_install}
|
|
| 92 |
+mkdir -p %{buildroot}%{_modulesdir}/extra
|
|
| 93 |
+install -vm 644 %{__cmake_builddir}/driver/%{name}.ko %{buildroot}%{_modulesdir}/extra
|
|
| 94 |
+find %{buildroot}%{_modulesdir} -name *.ko -type f -print0 | xargs -0 xz
|
|
| 95 |
+ |
|
| 96 |
+%clean |
|
| 97 |
+rm -rf %{buildroot}/*
|
|
| 98 |
+ |
|
| 99 |
+%post |
|
| 100 |
+/sbin/depmod -a |
|
| 101 |
+ |
|
| 102 |
+%postun |
|
| 103 |
+/sbin/depmod -a |
|
| 104 |
+ |
|
| 105 |
+%files |
|
| 106 |
+%defattr(-,root,root) |
|
| 107 |
+%{_bindir}/*
|
|
| 108 |
+%exclude %{_usrsrc}/debug
|
|
| 109 |
+%{_usrsrc}/%{name}*
|
|
| 110 |
+%{_sysconfdir}/%{name}
|
|
| 111 |
+%{_datadir}/%{name}
|
|
| 112 |
+%{_modulesdir}/extra/%{name}.ko.xz
|
|
| 113 |
+%{_sysconfdir}/falcoctl/falcoctl.yaml
|
|
| 114 |
+ |
|
| 115 |
+%files devel |
|
| 116 |
+%defattr(-,root,root) |
|
| 117 |
+%{_libdir}/pkgconfig/*.pc
|
|
| 118 |
+%{_libdir}/falcosecurity/*
|
|
| 119 |
+%{_includedir}/falcosecurity/*
|
|
| 120 |
+ |
|
| 121 |
+%changelog |
|
| 122 |
+* Tue Jan 09 2024 Ankit Jain <ankitja@vmware.com> 0.36.2-3 |
|
| 123 |
+- compress .ko and exclude debug from main package |
|
| 124 |
+* Thu Dec 14 2023 Piyush Gupta <gpiyush@vmware.com> 0.36.2-2 |
|
| 125 |
+- Bump up version to compile with new go |
|
| 126 |
+* Thu Nov 30 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.36.2-1 |
|
| 127 |
+- Upgrade to v0.36.2 |
|
| 128 |
+* Wed Nov 29 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-12 |
|
| 129 |
+- Bump version as a part of protobuf upgrade |
|
| 130 |
+* Wed Oct 11 2023 Piyush Gupta <gpiyush@vmware.com> 0.32.2-11 |
|
| 131 |
+- Bump up version to compile with new go |
|
| 132 |
+* Mon Sep 18 2023 Piyush Gupta <gpiyush@vmware.com> 0.32.2-10 |
|
| 133 |
+- Bump up version to compile with new go |
|
| 134 |
+* Wed Aug 23 2023 Mukul Sikka <msikka@vmware.com> 0.32.2-9 |
|
| 135 |
+- Bump version as a part of grpc upgrade |
|
| 136 |
+* Mon Jul 31 2023 Mukul Sikka <msikka@vmware.com> 0.32.2-8 |
|
| 137 |
+- Bump version as a part of grpc upgrade |
|
| 138 |
+* Mon Jul 17 2023 Piyush Gupta <gpiyush@vmware.com> 0.32.2-7 |
|
| 139 |
+- Bump up version to compile with new go |
|
| 140 |
+* Wed Jul 05 2023 Brennan Lamoreaux <blamoreaux@vmware.com> 0.32.2-6 |
|
| 141 |
+- Build Go plugins locally, instead of consuming precompiled binary |
|
| 142 |
+* Tue Jun 20 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-5 |
|
| 143 |
+- Bump version as a part of lua upgrade |
|
| 144 |
+* Sat Jun 17 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-4 |
|
| 145 |
+- Bump version as a part of protobuf upgrade |
|
| 146 |
+* Thu Jun 01 2023 Nitesh Kumar <kunitesh@vmware.com> 0.32.2-3 |
|
| 147 |
+- Bump version as a part of ncurses upgrade to v6.4 |
|
| 148 |
+* Fri Apr 14 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.32.2-2 |
|
| 149 |
+- Bump version as a part of zlib upgrade |
|
| 150 |
+* Thu Sep 15 2022 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 0.32.2-1 |
|
| 151 |
+- Upgrade to v0.32.2 |
|
| 152 |
+* Fri Jun 17 2022 Shreenidhi Shedi <sshedi@vmware.com> 0.32.0-1 |
|
| 153 |
+- Upgrade to v0.32.0 |
|
| 154 |
+- Introduce devel sub package |
|
| 155 |
+* Tue Nov 23 2021 Srivatsa S. Bhat (VMware) <srivatsa@csail.mit.edu> 0.30.0-1 |
|
| 156 |
+- Update to version 0.30.0. |
|
| 157 |
+- Add missing runtime dependency on linux. |
|
| 158 |
+* Wed Aug 04 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.25.0-5 |
|
| 159 |
+- compile with openssl 3.0.0 |
|
| 160 |
+* Tue Aug 03 2021 Nitesh Kumar <kunitesh@vmware.com> 0.25.0-4 |
|
| 161 |
+- Patched for CVE-2021-33505. |
|
| 162 |
+* Fri Feb 19 2021 Harinadh D <hdommaraju@vmware.com> 0.25.0-3 |
|
| 163 |
+- Version bump up to build with latest protobuf |
|
| 164 |
+* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.25.0-2 |
|
| 165 |
+- openssl 1.1.1 |
|
| 166 |
+* Wed Sep 16 2020 Bo Gan <ganb@vmware.com> 0.25.0-1 |
|
| 167 |
+- Updated to 0.25.0 |
|
| 168 |
+* Mon Sep 14 2020 Ankit Jain <ankitja@vmware.com> 0.15.1-2 |
|
| 169 |
+- Fix build failure with grpc in patch |
|
| 170 |
+* Wed Jun 26 2019 Harinadh Dommaraju <hdommaraju@vmware.com> 0.15.1-1 |
|
| 171 |
+- Updated to fix CVE-2019-8339 |
|
| 172 |
+* Wed Dec 12 2018 Sujay G <gsujay@vmware.com> 0.12.1-4 |
|
| 173 |
+- Disabled bundled JQ, openssl and instead use Photon maintained packages. |
|
| 174 |
+* Wed Oct 24 2018 Ajay Kaher <akaher@vmware.com> 0.12.1-3 |
|
| 175 |
+- Adding BuildArch |
|
| 176 |
+* Wed Oct 24 2018 Him Kalyan Bordoloi <bordoloih@vmware.com> 0.12.1-2 |
|
| 177 |
+- Add depmod for falco-probe.ko and removed patch from new falco-probe-loader |
|
| 178 |
+* Mon Sep 24 2018 Srivatsa S. Bhat <srivatsa@csail.mit.edu> 0.12.1-1 |
|
| 179 |
+- Update falco and sysdig versions to fix build error with linux 4.18 |
|
| 180 |
+* Tue Jan 02 2018 Alexey Makhalov <amakhalov@vmware.com> 0.8.1-1 |
|
| 181 |
+- Version update to build against linux-4.14.y kernel |
|
| 182 |
+* Thu Aug 24 2017 Rui Gu <ruig@vmware.com> 0.6.0-3 |
|
| 183 |
+- Disable check section (Bug 1900272). |
|
| 184 |
+* Thu May 11 2017 Chang Lee <changlee@vmware.com> 0.6.0-2 |
|
| 185 |
+- Add falco-probe.ko and change falco-probe.ko path in falco-probe-loader |
|
| 186 |
+* Mon Apr 03 2017 Chang Lee <changlee@vmware.com> 0.6.0-1 |
|
| 187 |
+- Update to version 0.6.0 |
|
| 188 |
+* Wed Jan 11 2017 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-7 |
|
| 189 |
+- Fix building for linux-4.9.2 |
|
| 190 |
+* Mon Dec 19 2016 Xiaolin Li <xiaolinl@vmware.com> 0.2.0-6 |
|
| 191 |
+- BuildRequires curl-devel |
|
| 192 |
+* Thu Dec 15 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-5 |
|
| 193 |
+- Fix building for linux-4.9 |
|
| 194 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-4 |
|
| 195 |
+- Expand uname -r to have release number |
|
| 196 |
+- Exclude /usr/src |
|
| 197 |
+* Fri Sep 2 2016 Alexey Makhalov <amakhalov@vmware.com> 0.2.0-3 |
|
| 198 |
+- Use KERNEL_VERSION macro |
|
| 199 |
+* Wed Jul 27 2016 Divya Thaluru <dthaluru@vmware.com> 0.2.0-2 |
|
| 200 |
+- Removed packaging of debug files |
|
| 201 |
+* Tue Jun 28 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.2.0-1 |
|
| 202 |
+- Initial build. First version |
| 0 | 203 |
deleted file mode 100644 |
| ... | ... |
@@ -1,214 +0,0 @@ |
| 1 |
-%global security_hardening none |
|
| 2 |
-%define uname_r %{KERNEL_VERSION}-%{KERNEL_RELEASE}
|
|
| 3 |
-%define _modulesdir /lib/modules/%{uname_r}
|
|
| 4 |
- |
|
| 5 |
-# check the release bundle & use the right version, example: |
|
| 6 |
-# https://github.com/draios/sysdig/blob/0.30.2/cmake/modules/falcosecurity-libs.cmake#L35 |
|
| 7 |
-%define falcosecurity_libs_ver 0.13.4 |
|
| 8 |
- |
|
| 9 |
-Summary: Sysdig is a universal system visibility tool with native support for containers. |
|
| 10 |
-Name: sysdig |
|
| 11 |
-Version: 0.34.1 |
|
| 12 |
-Release: 1%{?kernelsubrelease}%{?dist}
|
|
| 13 |
-License: GPLv2 |
|
| 14 |
-URL: http://www.sysdig.org |
|
| 15 |
-Group: Applications/System |
|
| 16 |
-Vendor: VMware, Inc. |
|
| 17 |
-Distribution: Photon |
|
| 18 |
- |
|
| 19 |
-Source0: https://github.com/draios/sysdig/archive/%{name}-%{version}.tar.gz
|
|
| 20 |
-%define sha512 %{name}=2d7c6369eb6ae85cb7fca50da049470830eb8a88002414f257e5ccf1eb438fe36890d51107ffd782b2cd3b7358094de0795641a1cb6b086a4e29b9a5b6edad4f
|
|
| 21 |
- |
|
| 22 |
-Source1: https://github.com/falcosecurity/libs/archive/falconsecurity-libs-%{falcosecurity_libs_ver}.tar.gz
|
|
| 23 |
-%define sha512 falconsecurity-libs=e4c9ab4cd8bbe544f13403573df7751b21c977ecefe4ea7c0b71c576a77c308d2f64f5a3d933a2493f23aacbc63148f24be0e897ca779a73879a48c63cbbad33 |
|
| 24 |
- |
|
| 25 |
-Patch0: get-googletest-sources-from-photonstage.patch |
|
| 26 |
-Patch1: falcosecurity-libs-nodownload.patch |
|
| 27 |
-Patch2: bashcomp-location.patch |
|
| 28 |
- |
|
| 29 |
-BuildArch: x86_64 |
|
| 30 |
- |
|
| 31 |
-BuildRequires: cmake |
|
| 32 |
-BuildRequires: linux-devel = %{uname_r}
|
|
| 33 |
-BuildRequires: openssl-devel |
|
| 34 |
-BuildRequires: curl-devel |
|
| 35 |
-BuildRequires: zlib-devel |
|
| 36 |
-BuildRequires: ncurses-devel |
|
| 37 |
-BuildRequires: wget |
|
| 38 |
-BuildRequires: which |
|
| 39 |
-BuildRequires: grpc-devel |
|
| 40 |
-BuildRequires: jq-devel |
|
| 41 |
-BuildRequires: c-ares-devel |
|
| 42 |
-BuildRequires: protobuf-devel |
|
| 43 |
-BuildRequires: git |
|
| 44 |
-BuildRequires: net-tools |
|
| 45 |
-BuildRequires: jsoncpp-devel |
|
| 46 |
-BuildRequires: re2-devel |
|
| 47 |
-BuildRequires: tinydir-devel |
|
| 48 |
-BuildRequires: elfutils-devel |
|
| 49 |
-BuildRequires: abseil-cpp-devel |
|
| 50 |
- |
|
| 51 |
-Requires: linux = %{uname_r}
|
|
| 52 |
-Requires: zlib |
|
| 53 |
-Requires: ncurses |
|
| 54 |
-Requires: openssl |
|
| 55 |
-Requires: curl |
|
| 56 |
-Requires: grpc |
|
| 57 |
-Requires: jq |
|
| 58 |
-Requires: c-ares |
|
| 59 |
-Requires: protobuf |
|
| 60 |
-Requires: jsoncpp |
|
| 61 |
-Requires: re2 |
|
| 62 |
-Requires: elfutils-libelf |
|
| 63 |
-Requires: abseil-cpp |
|
| 64 |
- |
|
| 65 |
-%description |
|
| 66 |
-Sysdig is open source, system-level exploration, capture system state and activity from a running Linux instance. |
|
| 67 |
-Then save, filter and analyze. |
|
| 68 |
-Sysdig is scriptable in Lua and includes a command line interface and a powerful interactive UI, csysdig, |
|
| 69 |
-that runs in your terminal |
|
| 70 |
- |
|
| 71 |
-%prep |
|
| 72 |
-%autosetup -p1 -a0 -a1 |
|
| 73 |
- |
|
| 74 |
-%build |
|
| 75 |
-export CFLAGS="-Wno-error=misleading-indentation -Wno-dev" |
|
| 76 |
- |
|
| 77 |
-%{cmake} \
|
|
| 78 |
- -DUSE_BUNDLED_OPENSSL=OFF \ |
|
| 79 |
- -DCMAKE_CXX_STANDARD=17 \ |
|
| 80 |
- -DUSE_BUNDLED_CURL=OFF \ |
|
| 81 |
- -DUSE_BUNDLED_ZLIB=OFF \ |
|
| 82 |
- -DUSE_BUNDLED_CARES=OFF \ |
|
| 83 |
- -DUSE_BUNDLED_PROTOBUF=OFF \ |
|
| 84 |
- -DUSE_BUNDLED_GRPC=OFF \ |
|
| 85 |
- -DUSE_BUNDLED_JQ=OFF \ |
|
| 86 |
- -DUSE_BUNDLED_JSONCPP=OFF \ |
|
| 87 |
- -DUSE_BUNDLED_NJSON=OFF \ |
|
| 88 |
- -DUSE_BUNDLED_NCURSES=OFF \ |
|
| 89 |
- -DUSE_BUNDLED_LIBELF=OFF \ |
|
| 90 |
- -DLIBELF_LIB=%{_libdir}/libelf.so \
|
|
| 91 |
- -DBUILD_DRIVER=ON \ |
|
| 92 |
- -DBUILD_LIBSCAP_EXAMPLES=OFF \ |
|
| 93 |
- -DBUILD_LIBSINSP_EXAMPLES=OFF \ |
|
| 94 |
- -DFALCOSECURITY_LIBS_SOURCE_DIR=%{_builddir}/%{name}-%{version}/libs-%{falcosecurity_libs_ver} \
|
|
| 95 |
- -DFALCOSECURITY_LIBS_VERSION=%{falcosecurity_libs_ver} \
|
|
| 96 |
- -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \
|
|
| 97 |
- -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \
|
|
| 98 |
- -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
|
| 99 |
- -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \
|
|
| 100 |
- -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_var} \
|
|
| 101 |
- -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \
|
|
| 102 |
- -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \
|
|
| 103 |
- -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \
|
|
| 104 |
- -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \
|
|
| 105 |
- -DBUILD_SHARED_LIBS:BOOL=OFF \ |
|
| 106 |
- -DCMAKE_BUILD_TYPE=Release |
|
| 107 |
- |
|
| 108 |
-export KERNELDIR="%{_modulesdir}/build"
|
|
| 109 |
-%{cmake_build}
|
|
| 110 |
- |
|
| 111 |
-%install |
|
| 112 |
-export KERNELDIR="%{_modulesdir}/build"
|
|
| 113 |
-%{cmake_install}
|
|
| 114 |
- |
|
| 115 |
-rm -rf %{buildroot}%{_datadir}/zsh/ \
|
|
| 116 |
- %{buildroot}{%{_includedir},%{_libdir}}
|
|
| 117 |
- |
|
| 118 |
-mkdir -p %{buildroot}%{_modulesdir}/extra
|
|
| 119 |
-mv %{__cmake_builddir}/driver/scap.ko %{buildroot}%{_modulesdir}/extra
|
|
| 120 |
- |
|
| 121 |
-%clean |
|
| 122 |
-rm -rf %{buildroot}/*
|
|
| 123 |
- |
|
| 124 |
-%post |
|
| 125 |
-/sbin/depmod -a |
|
| 126 |
- |
|
| 127 |
-%postun |
|
| 128 |
-/sbin/depmod -a |
|
| 129 |
- |
|
| 130 |
-%files |
|
| 131 |
-%defattr(-,root,root) |
|
| 132 |
-%{_bindir}/*
|
|
| 133 |
-%{_usrsrc}/*
|
|
| 134 |
-%{_datadir}/%{name}/*
|
|
| 135 |
-%{_datadir}/bash-completion/*
|
|
| 136 |
-%{_mandir}/*
|
|
| 137 |
-%{_modulesdir}/extra/scap.ko
|
|
| 138 |
- |
|
| 139 |
-%changelog |
|
| 140 |
-* Wed Nov 29 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.34.1-1 |
|
| 141 |
-- Upgrade to v0.34.1 |
|
| 142 |
-* Sun Nov 19 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-7 |
|
| 143 |
-- Bump version as a part of openssl upgrade |
|
| 144 |
-* Wed Aug 09 2023 Mukul Sikka <msikka@vmware.com> 0.30.2-6 |
|
| 145 |
-- Bump version as a part of grpc upgrade |
|
| 146 |
-* Sat Jun 17 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-5 |
|
| 147 |
-- Bump version as a part of protobuf upgrade |
|
| 148 |
-* Fri Jun 09 2023 Nitesh Kumar <kunitesh@vmware.com> 0.30.2-4 |
|
| 149 |
-- Bump version as a part of ncurses upgrade to v6.4 |
|
| 150 |
-* Fri Apr 14 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-3 |
|
| 151 |
-- Bump version as a part of zlib upgrade |
|
| 152 |
-* Tue Jan 17 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-2 |
|
| 153 |
-- Fix build options to make installation work |
|
| 154 |
-* Mon Dec 19 2022 Bo Gan <ganb@vmware.com> 0.30.2-1 |
|
| 155 |
-- Update to 0.30.2 |
|
| 156 |
-- Correct cmake configurations |
|
| 157 |
-* Tue Aug 30 2022 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 0.29.3-1 |
|
| 158 |
-- Update to latest version |
|
| 159 |
-* Sat Jul 09 2022 Shreenidhi Shedi <sshedi@vmware.com> 0.27.0-7 |
|
| 160 |
-- Use cmake macros for build |
|
| 161 |
-* Fri Jul 08 2022 Harinadh D <hdommaraju@vmware.com> 0.27.0-6 |
|
| 162 |
-- fix build errors |
|
| 163 |
-* Tue Nov 16 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.27.0-5 |
|
| 164 |
-- Bump up release for openssl |
|
| 165 |
-* Tue Nov 16 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.27.0-4 |
|
| 166 |
-- Fix build failure |
|
| 167 |
-* Fri Feb 19 2021 Harinadh D <hdommaraju@vmware.com> 0.27.0-3 |
|
| 168 |
-- Version bump up to build with latest protobuf |
|
| 169 |
-* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.27.0-2 |
|
| 170 |
-- openssl 1.1.1 |
|
| 171 |
-* Mon Jun 22 2020 Gerrit Photon <photon-checkins@vmware.com> 0.27.0-1 |
|
| 172 |
-- Automatic Version Bump |
|
| 173 |
-* Fri Sep 27 2019 Ajay Kaher <akaher@vmware.com> 0.26.4-1 |
|
| 174 |
-- Update to version 0.26.4 to fix kernel NULL pointer |
|
| 175 |
-- dereference crash in record_event_consumer.part |
|
| 176 |
-* Wed Jun 26 2019 Harinadh Dommaraju <hdommaraju@vmware.com> 0.26.0-1 |
|
| 177 |
-- Fix for CVE-2019-8339 |
|
| 178 |
-* Fri Dec 07 2018 Sujay G <gsujay@vmware.com> 0.23.1-3 |
|
| 179 |
-- Disabled bundled JQ and use Photon maintained JQ |
|
| 180 |
-* Mon Oct 22 2018 Ajay Kaher <akaher@vmware.com> 0.23.1-2 |
|
| 181 |
-- Adding BuildArch |
|
| 182 |
-* Wed Sep 19 2018 Ajay Kaher <akaher@vmware.com> 0.23.1-1 |
|
| 183 |
-- Update to version 0.23.1 |
|
| 184 |
-* Wed Dec 13 2017 Xiaolin Li <xiaolinl@vmware.com> 0.19.1-1 |
|
| 185 |
-- Update to version 0.19.1 |
|
| 186 |
-* Wed Apr 12 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.15.1-1 |
|
| 187 |
-- Update to version 0.15.1 |
|
| 188 |
-* Wed Jan 11 2017 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-6 |
|
| 189 |
-- Fix building for linux-4.9.2 |
|
| 190 |
-* Mon Dec 19 2016 Xiaolin Li <xiaolinl@vmware.com> 0.10.1-5 |
|
| 191 |
-- BuildRequires curl-devel |
|
| 192 |
-* Thu Dec 15 2016 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-4 |
|
| 193 |
-- Fix building for linux-4.9 |
|
| 194 |
-* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-3 |
|
| 195 |
-- Expand uname -r to have release number |
|
| 196 |
-- Exclude /usr/src |
|
| 197 |
-* Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.10.1-2 |
|
| 198 |
-- Added kernel macros |
|
| 199 |
-* Thu Jul 14 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.10.1-2 |
|
| 200 |
-- Updated sysdig to build the kernel module |
|
| 201 |
-* Tue Jun 28 2016 Anish Swaminathan <anishs@vmware.com> 0.10.1-1 |
|
| 202 |
-- Upgrade sysdig to 0.10.1 |
|
| 203 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.8.0-4 |
|
| 204 |
-- GA - Bump release of all rpms |
|
| 205 |
-* Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 0.8.0-3 |
|
| 206 |
-- Removing usage of bundled packages to build sysdig package |
|
| 207 |
-* Wed Mar 16 2016 Anish Swaminathan <anishs@vmware.com> 0.8.0-2 |
|
| 208 |
-- Add openssl to buildrequires. |
|
| 209 |
-* Tue Feb 23 2016 Kumar Kaushik <kaushikk@vmware.com> 0.8.0-1 |
|
| 210 |
-- Upgraded to new version. |
|
| 211 |
-* Wed Jan 20 2016 Anish Swaminathan <anishs@vmware.com> 0.6.0-1 |
|
| 212 |
-- Upgrade version. |
|
| 213 |
-* Mon Nov 30 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.1.101-1 |
|
| 214 |
-- Initial build. First version |
| 215 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,218 @@ |
| 0 |
+%global security_hardening none |
|
| 1 |
+%define uname_r %{KERNEL_VERSION}-%{KERNEL_RELEASE}
|
|
| 2 |
+%define _modulesdir /lib/modules/%{uname_r}
|
|
| 3 |
+ |
|
| 4 |
+# check the release bundle & use the right version, example: |
|
| 5 |
+# https://github.com/draios/sysdig/blob/0.30.2/cmake/modules/falcosecurity-libs.cmake#L35 |
|
| 6 |
+%define falcosecurity_libs_ver 0.13.4 |
|
| 7 |
+ |
|
| 8 |
+Summary: Sysdig is a universal system visibility tool with native support for containers. |
|
| 9 |
+Name: sysdig |
|
| 10 |
+Version: 0.34.1 |
|
| 11 |
+Release: 2%{?kernelsubrelease}%{?dist}
|
|
| 12 |
+License: GPLv2 |
|
| 13 |
+URL: http://www.sysdig.org |
|
| 14 |
+Group: Applications/System |
|
| 15 |
+Vendor: VMware, Inc. |
|
| 16 |
+Distribution: Photon |
|
| 17 |
+ |
|
| 18 |
+Source0: https://github.com/draios/sysdig/archive/%{name}-%{version}.tar.gz
|
|
| 19 |
+%define sha512 %{name}=2d7c6369eb6ae85cb7fca50da049470830eb8a88002414f257e5ccf1eb438fe36890d51107ffd782b2cd3b7358094de0795641a1cb6b086a4e29b9a5b6edad4f
|
|
| 20 |
+ |
|
| 21 |
+Source1: https://github.com/falcosecurity/libs/archive/falconsecurity-libs-%{falcosecurity_libs_ver}.tar.gz
|
|
| 22 |
+%define sha512 falconsecurity-libs=e4c9ab4cd8bbe544f13403573df7751b21c977ecefe4ea7c0b71c576a77c308d2f64f5a3d933a2493f23aacbc63148f24be0e897ca779a73879a48c63cbbad33 |
|
| 23 |
+ |
|
| 24 |
+Patch0: get-googletest-sources-from-photonstage.patch |
|
| 25 |
+Patch1: falcosecurity-libs-nodownload.patch |
|
| 26 |
+Patch2: bashcomp-location.patch |
|
| 27 |
+ |
|
| 28 |
+BuildArch: x86_64 |
|
| 29 |
+ |
|
| 30 |
+BuildRequires: cmake |
|
| 31 |
+BuildRequires: linux-devel = %{uname_r}
|
|
| 32 |
+BuildRequires: openssl-devel |
|
| 33 |
+BuildRequires: curl-devel |
|
| 34 |
+BuildRequires: zlib-devel |
|
| 35 |
+BuildRequires: ncurses-devel |
|
| 36 |
+BuildRequires: wget |
|
| 37 |
+BuildRequires: which |
|
| 38 |
+BuildRequires: grpc-devel |
|
| 39 |
+BuildRequires: jq-devel |
|
| 40 |
+BuildRequires: c-ares-devel |
|
| 41 |
+BuildRequires: protobuf-devel |
|
| 42 |
+BuildRequires: git |
|
| 43 |
+BuildRequires: net-tools |
|
| 44 |
+BuildRequires: jsoncpp-devel |
|
| 45 |
+BuildRequires: re2-devel |
|
| 46 |
+BuildRequires: tinydir-devel |
|
| 47 |
+BuildRequires: elfutils-devel |
|
| 48 |
+BuildRequires: abseil-cpp-devel |
|
| 49 |
+ |
|
| 50 |
+Requires: linux = %{uname_r}
|
|
| 51 |
+Requires: zlib |
|
| 52 |
+Requires: ncurses |
|
| 53 |
+Requires: openssl |
|
| 54 |
+Requires: curl |
|
| 55 |
+Requires: grpc |
|
| 56 |
+Requires: jq |
|
| 57 |
+Requires: c-ares |
|
| 58 |
+Requires: protobuf |
|
| 59 |
+Requires: jsoncpp |
|
| 60 |
+Requires: re2 |
|
| 61 |
+Requires: elfutils-libelf |
|
| 62 |
+Requires: abseil-cpp |
|
| 63 |
+ |
|
| 64 |
+%description |
|
| 65 |
+Sysdig is open source, system-level exploration, capture system state and activity from a running Linux instance. |
|
| 66 |
+Then save, filter and analyze. |
|
| 67 |
+Sysdig is scriptable in Lua and includes a command line interface and a powerful interactive UI, csysdig, |
|
| 68 |
+that runs in your terminal |
|
| 69 |
+ |
|
| 70 |
+%prep |
|
| 71 |
+%autosetup -p1 -a0 -a1 |
|
| 72 |
+ |
|
| 73 |
+%build |
|
| 74 |
+export CFLAGS="-Wno-error=misleading-indentation -Wno-dev" |
|
| 75 |
+ |
|
| 76 |
+%{cmake} \
|
|
| 77 |
+ -DUSE_BUNDLED_OPENSSL=OFF \ |
|
| 78 |
+ -DCMAKE_CXX_STANDARD=17 \ |
|
| 79 |
+ -DUSE_BUNDLED_CURL=OFF \ |
|
| 80 |
+ -DUSE_BUNDLED_ZLIB=OFF \ |
|
| 81 |
+ -DUSE_BUNDLED_CARES=OFF \ |
|
| 82 |
+ -DUSE_BUNDLED_PROTOBUF=OFF \ |
|
| 83 |
+ -DUSE_BUNDLED_GRPC=OFF \ |
|
| 84 |
+ -DUSE_BUNDLED_JQ=OFF \ |
|
| 85 |
+ -DUSE_BUNDLED_JSONCPP=OFF \ |
|
| 86 |
+ -DUSE_BUNDLED_NJSON=OFF \ |
|
| 87 |
+ -DUSE_BUNDLED_NCURSES=OFF \ |
|
| 88 |
+ -DUSE_BUNDLED_LIBELF=OFF \ |
|
| 89 |
+ -DLIBELF_LIB=%{_libdir}/libelf.so \
|
|
| 90 |
+ -DBUILD_DRIVER=ON \ |
|
| 91 |
+ -DBUILD_LIBSCAP_EXAMPLES=OFF \ |
|
| 92 |
+ -DBUILD_LIBSINSP_EXAMPLES=OFF \ |
|
| 93 |
+ -DFALCOSECURITY_LIBS_SOURCE_DIR=%{_builddir}/%{name}-%{version}/libs-%{falcosecurity_libs_ver} \
|
|
| 94 |
+ -DFALCOSECURITY_LIBS_VERSION=%{falcosecurity_libs_ver} \
|
|
| 95 |
+ -DCMAKE_INSTALL_BINDIR:PATH=%{_bindir} \
|
|
| 96 |
+ -DCMAKE_INSTALL_SBINDIR:PATH=%{_sbindir} \
|
|
| 97 |
+ -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} \
|
|
| 98 |
+ -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \
|
|
| 99 |
+ -DCMAKE_INSTALL_LOCALSTATEDIR:PATH=%{_var} \
|
|
| 100 |
+ -DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_sharedstatedir} \
|
|
| 101 |
+ -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} \
|
|
| 102 |
+ -DCMAKE_INSTALL_INFODIR:PATH=%{_infodir} \
|
|
| 103 |
+ -DCMAKE_INSTALL_MANDIR:PATH=%{_mandir} \
|
|
| 104 |
+ -DBUILD_SHARED_LIBS:BOOL=OFF \ |
|
| 105 |
+ -DCMAKE_BUILD_TYPE=Release |
|
| 106 |
+ |
|
| 107 |
+export KERNELDIR="%{_modulesdir}/build"
|
|
| 108 |
+%{cmake_build}
|
|
| 109 |
+ |
|
| 110 |
+%install |
|
| 111 |
+export KERNELDIR="%{_modulesdir}/build"
|
|
| 112 |
+%{cmake_install}
|
|
| 113 |
+ |
|
| 114 |
+rm -rf %{buildroot}%{_datadir}/zsh/ \
|
|
| 115 |
+ %{buildroot}{%{_includedir},%{_libdir}}
|
|
| 116 |
+ |
|
| 117 |
+mkdir -p %{buildroot}%{_modulesdir}/extra
|
|
| 118 |
+mv %{__cmake_builddir}/driver/scap.ko %{buildroot}%{_modulesdir}/extra
|
|
| 119 |
+find %{buildroot}%{_modulesdir} -name *.ko -type f -print0 | xargs -0 xz
|
|
| 120 |
+ |
|
| 121 |
+%clean |
|
| 122 |
+rm -rf %{buildroot}/*
|
|
| 123 |
+ |
|
| 124 |
+%post |
|
| 125 |
+/sbin/depmod -a |
|
| 126 |
+ |
|
| 127 |
+%postun |
|
| 128 |
+/sbin/depmod -a |
|
| 129 |
+ |
|
| 130 |
+%files |
|
| 131 |
+%defattr(-,root,root) |
|
| 132 |
+%{_bindir}/*
|
|
| 133 |
+%exclude %{_usrsrc}/debug
|
|
| 134 |
+%{_usrsrc}/scap*
|
|
| 135 |
+%{_datadir}/%{name}/*
|
|
| 136 |
+%{_datadir}/bash-completion/*
|
|
| 137 |
+%{_mandir}/*
|
|
| 138 |
+%{_modulesdir}/extra/scap.ko.xz
|
|
| 139 |
+ |
|
| 140 |
+%changelog |
|
| 141 |
+* Tue Jan 09 2024 Ankit Jain <ankitja@vmware.com> 0.34.1-2 |
|
| 142 |
+- compress .ko and exclude debug from main package |
|
| 143 |
+* Wed Nov 29 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.34.1-1 |
|
| 144 |
+- Upgrade to v0.34.1 |
|
| 145 |
+* Wed Aug 23 2023 Mukul Sikka <msikka@vmware.com> 0.30.2-7 |
|
| 146 |
+- Bump version as a part of grpc upgrade |
|
| 147 |
+* Mon Jul 31 2023 Mukul Sikka <msikka@vmware.com> 0.30.2-6 |
|
| 148 |
+- Bump version as a part of grpc upgrade |
|
| 149 |
+* Sat Jun 17 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-5 |
|
| 150 |
+- Bump version as a part of protobuf upgrade |
|
| 151 |
+* Thu Jun 01 2023 Nitesh Kumar <kunitesh@vmware.com> 0.30.2-4 |
|
| 152 |
+- Bump version as a part of ncurses upgrade to v6.4 |
|
| 153 |
+* Fri Apr 14 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-3 |
|
| 154 |
+- Bump version as a part of zlib upgrade |
|
| 155 |
+* Tue Jan 17 2023 Shreenidhi Shedi <sshedi@vmware.com> 0.30.2-2 |
|
| 156 |
+- Fix build options to make installation work |
|
| 157 |
+* Mon Dec 19 2022 Bo Gan <ganb@vmware.com> 0.30.2-1 |
|
| 158 |
+- Update to 0.30.2 |
|
| 159 |
+- Correct cmake configurations |
|
| 160 |
+* Tue Aug 30 2022 Vamsi Krishna Brahmajosyula <vbrahmajosyula@vmware.com> 0.29.3-1 |
|
| 161 |
+- Update to latest version |
|
| 162 |
+* Sat Jul 09 2022 Shreenidhi Shedi <sshedi@vmware.com> 0.27.0-7 |
|
| 163 |
+- Use cmake macros for build |
|
| 164 |
+* Fri Jul 08 2022 Harinadh D <hdommaraju@vmware.com> 0.27.0-6 |
|
| 165 |
+- fix build errors |
|
| 166 |
+* Tue Nov 16 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.27.0-5 |
|
| 167 |
+- Bump up release for openssl |
|
| 168 |
+* Tue Nov 16 2021 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.27.0-4 |
|
| 169 |
+- Fix build failure |
|
| 170 |
+* Fri Feb 19 2021 Harinadh D <hdommaraju@vmware.com> 0.27.0-3 |
|
| 171 |
+- Version bump up to build with latest protobuf |
|
| 172 |
+* Tue Sep 29 2020 Satya Naga Vasamsetty <svasamsetty@vmware.com> 0.27.0-2 |
|
| 173 |
+- openssl 1.1.1 |
|
| 174 |
+* Mon Jun 22 2020 Gerrit Photon <photon-checkins@vmware.com> 0.27.0-1 |
|
| 175 |
+- Automatic Version Bump |
|
| 176 |
+* Fri Sep 27 2019 Ajay Kaher <akaher@vmware.com> 0.26.4-1 |
|
| 177 |
+- Update to version 0.26.4 to fix kernel NULL pointer |
|
| 178 |
+- dereference crash in record_event_consumer.part |
|
| 179 |
+* Wed Jun 26 2019 Harinadh Dommaraju <hdommaraju@vmware.com> 0.26.0-1 |
|
| 180 |
+- Fix for CVE-2019-8339 |
|
| 181 |
+* Fri Dec 07 2018 Sujay G <gsujay@vmware.com> 0.23.1-3 |
|
| 182 |
+- Disabled bundled JQ and use Photon maintained JQ |
|
| 183 |
+* Mon Oct 22 2018 Ajay Kaher <akaher@vmware.com> 0.23.1-2 |
|
| 184 |
+- Adding BuildArch |
|
| 185 |
+* Wed Sep 19 2018 Ajay Kaher <akaher@vmware.com> 0.23.1-1 |
|
| 186 |
+- Update to version 0.23.1 |
|
| 187 |
+* Wed Dec 13 2017 Xiaolin Li <xiaolinl@vmware.com> 0.19.1-1 |
|
| 188 |
+- Update to version 0.19.1 |
|
| 189 |
+* Wed Apr 12 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.15.1-1 |
|
| 190 |
+- Update to version 0.15.1 |
|
| 191 |
+* Wed Jan 11 2017 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-6 |
|
| 192 |
+- Fix building for linux-4.9.2 |
|
| 193 |
+* Mon Dec 19 2016 Xiaolin Li <xiaolinl@vmware.com> 0.10.1-5 |
|
| 194 |
+- BuildRequires curl-devel |
|
| 195 |
+* Thu Dec 15 2016 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-4 |
|
| 196 |
+- Fix building for linux-4.9 |
|
| 197 |
+* Wed Nov 30 2016 Alexey Makhalov <amakhalov@vmware.com> 0.10.1-3 |
|
| 198 |
+- Expand uname -r to have release number |
|
| 199 |
+- Exclude /usr/src |
|
| 200 |
+* Mon Aug 1 2016 Divya Thaluru <dthaluru@vmware.com> 0.10.1-2 |
|
| 201 |
+- Added kernel macros |
|
| 202 |
+* Thu Jul 14 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.10.1-2 |
|
| 203 |
+- Updated sysdig to build the kernel module |
|
| 204 |
+* Tue Jun 28 2016 Anish Swaminathan <anishs@vmware.com> 0.10.1-1 |
|
| 205 |
+- Upgrade sysdig to 0.10.1 |
|
| 206 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.8.0-4 |
|
| 207 |
+- GA - Bump release of all rpms |
|
| 208 |
+* Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 0.8.0-3 |
|
| 209 |
+- Removing usage of bundled packages to build sysdig package |
|
| 210 |
+* Wed Mar 16 2016 Anish Swaminathan <anishs@vmware.com> 0.8.0-2 |
|
| 211 |
+- Add openssl to buildrequires. |
|
| 212 |
+* Tue Feb 23 2016 Kumar Kaushik <kaushikk@vmware.com> 0.8.0-1 |
|
| 213 |
+- Upgraded to new version. |
|
| 214 |
+* Wed Jan 20 2016 Anish Swaminathan <anishs@vmware.com> 0.6.0-1 |
|
| 215 |
+- Upgrade version. |
|
| 216 |
+* Mon Nov 30 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.1.101-1 |
|
| 217 |
+- Initial build. First version |
| ... | ... |
@@ -183,9 +183,10 @@ class PackageBuilder(object): |
| 183 | 183 |
def _buildPackagePrepareFunction(self, package, version, doneList): |
| 184 | 184 |
self.package = package |
| 185 | 185 |
self.version = version |
| 186 |
- self.logName = f"build-{package}-{version}"
|
|
| 186 |
+ pkg = f"{package}-{version}"
|
|
| 187 |
+ self.logName = f"build-{pkg}"
|
|
| 187 | 188 |
self.logPath = ( |
| 188 |
- f"{constants.logPath}/{package}-{version}.{constants.currentArch}"
|
|
| 189 |
+ f"{constants.logPath}/{pkg}.{constants.currentArch}"
|
|
| 189 | 190 |
) |
| 190 | 191 |
if not os.path.isdir(self.logPath): |
| 191 | 192 |
self.cmdUtils.runBashCmd(f"mkdir -p {self.logPath}")
|
| ... | ... |
@@ -272,7 +273,7 @@ class PackageBuilder(object): |
| 272 | 272 |
) |
| 273 | 273 |
raise Exception("Missing rpm file")
|
| 274 | 274 |
specificRPM = os.path.basename(rpmfile.replace(".rpm", ""))
|
| 275 |
- pkg = package + "-" + packageVersion |
|
| 275 |
+ pkg = self._findPackageNameAndVersionFromRPMFile(f"{package}-{packageVersion}")
|
|
| 276 | 276 |
if pkg in listInstalledPackages: |
| 277 | 277 |
return |
| 278 | 278 |
# mark it as installed - to avoid recursion |
| ... | ... |
@@ -225,9 +225,8 @@ class PackageUtils(object): |
| 225 | 225 |
|
| 226 | 226 |
if version == "*": |
| 227 | 227 |
version = SPECS.getData(arch).getHighestVersion(package) |
| 228 |
- release = SPECS.getData(arch).getRelease(package, version) |
|
| 229 | 228 |
buildarch = SPECS.getData(arch).getBuildArch(package, version) |
| 230 |
- filename = f"{package}-{version}-{release}.{buildarch}.rpm"
|
|
| 229 |
+ filename = f"{package}-{version}.{buildarch}.rpm"
|
|
| 231 | 230 |
|
| 232 | 231 |
fullpath = f"{constants.rpmPath}/{buildarch}/{filename}"
|
| 233 | 232 |
if os.path.isfile(fullpath): |
| ... | ... |
@@ -245,8 +244,7 @@ class PackageUtils(object): |
| 245 | 245 |
def findSourceRPMFile(self, package, version="*"): |
| 246 | 246 |
if version == "*": |
| 247 | 247 |
version = SPECS.getData().getHighestVersion(package) |
| 248 |
- release = SPECS.getData().getRelease(package, version) |
|
| 249 |
- filename = f"{package}-{version}-{release}.src.rpm"
|
|
| 248 |
+ filename = f"{package}-{version}.src.rpm"
|
|
| 250 | 249 |
|
| 251 | 250 |
fullpath = f"{constants.sourceRpmPath}/{filename}"
|
| 252 | 251 |
if os.path.isfile(fullpath): |
| ... | ... |
@@ -259,8 +257,7 @@ class PackageUtils(object): |
| 259 | 259 |
|
| 260 | 260 |
if version == "*": |
| 261 | 261 |
version = SPECS.getData(arch).getHighestVersion(package) |
| 262 |
- release = SPECS.getData(arch).getRelease(package, version) |
|
| 263 |
- filename = f"{package}-debuginfo-{version}-{release}.{arch}.rpm"
|
|
| 262 |
+ filename = f"{package}-debuginfo-{version}.{arch}.rpm"
|
|
| 264 | 263 |
|
| 265 | 264 |
fullpath = f"{constants.rpmPath}/{arch}/{filename}"
|
| 266 | 265 |
if os.path.isfile(fullpath): |
| ... | ... |
@@ -38,7 +38,7 @@ class SpecData(object): |
| 38 | 38 |
|
| 39 | 39 |
# skip the specfile if buildarch differs |
| 40 | 40 |
buildarch = spec.packages.get("default").buildarch
|
| 41 |
- if buildarch != "noarch" and buildarch != self.arch: |
|
| 41 |
+ if buildarch not in {"noarch", self.arch}:
|
|
| 42 | 42 |
self.logger.debug(f"Skipping spec file: {specFile}")
|
| 43 | 43 |
continue |
| 44 | 44 |
|
| ... | ... |
@@ -48,10 +48,10 @@ class SpecData(object): |
| 48 | 48 |
for specPkg in specObj.listPackages: |
| 49 | 49 |
self.mapPackageToSpec[specPkg] = name |
| 50 | 50 |
|
| 51 |
- if name in self.mapSpecObjects: |
|
| 52 |
- self.mapSpecObjects[name].append(specObj) |
|
| 53 |
- else: |
|
| 51 |
+ if name not in self.mapSpecObjects: |
|
| 54 | 52 |
self.mapSpecObjects[name] = [specObj] |
| 53 |
+ else: |
|
| 54 |
+ self.mapSpecObjects[name].append(specObj) |
|
| 55 | 55 |
|
| 56 | 56 |
self.mapSpecFileNameToSpecObj[os.path.basename(specFile)] = specObj |
| 57 | 57 |
|
| ... | ... |
@@ -73,12 +73,12 @@ class SpecData(object): |
| 73 | 73 |
return listSpecFiles |
| 74 | 74 |
|
| 75 | 75 |
def _getProperVersion(self, depPkg): |
| 76 |
- if depPkg.compare == "": |
|
| 76 |
+ if not depPkg.compare: |
|
| 77 | 77 |
return self.getHighestVersion(depPkg.package) |
| 78 | 78 |
specObjs = self.getSpecObjects(depPkg.package) |
| 79 | 79 |
try: |
| 80 | 80 |
for obj in specObjs: |
| 81 |
- verrel = obj.version + "-" + obj.release |
|
| 81 |
+ verrel = obj.version |
|
| 82 | 82 |
if depPkg.compare == ">=": |
| 83 | 83 |
if LooseVersion(verrel) >= LooseVersion(depPkg.version): |
| 84 | 84 |
return obj.version |
| ... | ... |
@@ -88,9 +88,9 @@ class SpecData(object): |
| 88 | 88 |
elif depPkg.compare == "=": |
| 89 | 89 |
if LooseVersion(verrel) == LooseVersion(depPkg.version): |
| 90 | 90 |
return obj.version |
| 91 |
- if LooseVersion(obj.version) == LooseVersion( |
|
| 92 |
- depPkg.version |
|
| 93 |
- ): |
|
| 91 |
+ x = obj.version.rsplit("-", 1)[0]
|
|
| 92 |
+ y = depPkg.version.rsplit("-", 1)[0]
|
|
| 93 |
+ if LooseVersion(x) == LooseVersion(y): |
|
| 94 | 94 |
return obj.version |
| 95 | 95 |
elif depPkg.compare == "<": |
| 96 | 96 |
if LooseVersion(verrel) < LooseVersion(depPkg.version): |
| ... | ... |
@@ -108,19 +108,12 @@ class SpecData(object): |
| 108 | 108 |
raise e |
| 109 | 109 |
|
| 110 | 110 |
# about to throw exception |
| 111 |
- availableVersions = "" |
|
| 111 |
+ availableVersions = [] |
|
| 112 | 112 |
for obj in specObjs: |
| 113 |
- availableVersions += ( |
|
| 114 |
- " " + obj.name + "-" + obj.version + "-" + obj.release |
|
| 115 |
- ) |
|
| 116 |
- raise Exception( |
|
| 117 |
- "Could not find package: " |
|
| 118 |
- + depPkg.package |
|
| 119 |
- + depPkg.compare |
|
| 120 |
- + depPkg.version |
|
| 121 |
- + " available specs:" |
|
| 122 |
- + availableVersions |
|
| 123 |
- ) |
|
| 113 |
+ availableVersions.append(f"{obj.name}-{obj.version}")
|
|
| 114 |
+ raise Exception("Could not find package: "
|
|
| 115 |
+ f"{depPkg.package}{depPkg.compare}{depPkg.version}"
|
|
| 116 |
+ " available specs: " + " ".join(availableVersions)) |
|
| 124 | 117 |
|
| 125 | 118 |
def _getSpecObjField(self, package, version, field): |
| 126 | 119 |
for specObj in self.getSpecObjects(package): |
| ... | ... |
@@ -306,7 +299,7 @@ class SpecData(object): |
| 306 | 306 |
|
| 307 | 307 |
@staticmethod |
| 308 | 308 |
def compareVersions(p): |
| 309 |
- return StrictVersion(p.version) |
|
| 309 |
+ return LooseVersion(p.version) |
|
| 310 | 310 |
|
| 311 | 311 |
def getSpecName(self, package): |
| 312 | 312 |
if package in self.mapPackageToSpec: |
| ... | ... |
@@ -319,8 +312,7 @@ class SpecData(object): |
| 319 | 319 |
def isRPMPackage(self, package): |
| 320 | 320 |
if package in self.mapPackageToSpec: |
| 321 | 321 |
specName = self.mapPackageToSpec[package] |
| 322 |
- if specName in self.mapSpecObjects: |
|
| 323 |
- return True |
|
| 322 |
+ return specName in self.mapSpecObjects |
|
| 324 | 323 |
return False |
| 325 | 324 |
|
| 326 | 325 |
def getSecurityHardeningOption(self, package, version): |
| ... | ... |
@@ -437,7 +429,6 @@ class SPECS(object): |
| 437 | 437 |
|
| 438 | 438 |
def initialize(self): |
| 439 | 439 |
kver_to_rpm_macros_dict = {
|
| 440 |
- "linux": ["KERNEL_VERSION", "KERNEL_RELEASE", "kernelsubrelease"], |
|
| 441 | 440 |
"linux-rt": ["LINUX_RT_KERNEL_VERSION", "LINUX_RT_KERNEL_RELEASE", "linuxrt_kernelsubrelease"], |
| 442 | 441 |
} |
| 443 | 442 |
|
| ... | ... |
@@ -177,13 +177,12 @@ class SpecDependencyGenerator(object): |
| 177 | 177 |
base_package, version |
| 178 | 178 |
) |
| 179 | 179 |
for package in listRPMPackages: |
| 180 |
- release = SPECS.getData(arch).getRelease(package, version) |
|
| 181 | 180 |
buildarch = SPECS.getData(arch).getBuildArch( |
| 182 | 181 |
package, version |
| 183 | 182 |
) |
| 184 | 183 |
filename = os.path.join( |
| 185 | 184 |
buildarch, |
| 186 |
- f"{package}-{version}-{release}.{buildarch}.rpm",
|
|
| 185 |
+ f"{package}-{version}.{buildarch}.rpm",
|
|
| 187 | 186 |
) |
| 188 | 187 |
output.append(filename) |
| 189 | 188 |
""" |
| ... | ... |
@@ -197,8 +196,7 @@ class SpecDependencyGenerator(object): |
| 197 | 197 |
): |
| 198 | 198 |
filename = os.path.join( |
| 199 | 199 |
buildarch, |
| 200 |
- f"{base_package}-debuginfo-{version}-{release}."
|
|
| 201 |
- f"{buildarch}.rpm",
|
|
| 200 |
+ f"{base_package}-debuginfo-{version}.{buildarch}.rpm",
|
|
| 202 | 201 |
) |
| 203 | 202 |
output.append(filename) |
| 204 | 203 |
|
| ... | ... |
@@ -675,7 +675,7 @@ class SpecParser(object): |
| 675 | 675 |
specObj.specFile = self.specfile |
| 676 | 676 |
defPkg = self.packages.get("default")
|
| 677 | 677 |
specObj.name = defPkg.name |
| 678 |
- specObj.version = defPkg.version |
|
| 678 |
+ specObj.version = f"{defPkg.version}-{defPkg.release}"
|
|
| 679 | 679 |
specObj.release = defPkg.release |
| 680 | 680 |
specObj.checksums = defPkg.checksums |
| 681 | 681 |
specObj.license = defPkg.license |
| ... | ... |
@@ -52,9 +52,9 @@ class StringUtils(object): |
| 52 | 52 |
|
| 53 | 53 |
@staticmethod |
| 54 | 54 |
def splitPackageNameAndVersion(pkg): |
| 55 |
- versionindex = pkg.rfind("-")
|
|
| 56 |
- if versionindex == -1: |
|
| 57 |
- raise Exception("Invalid argument")
|
|
| 58 |
- packageName = pkg[:versionindex] |
|
| 59 |
- packageVersion = pkg[versionindex + 1 :] # noqa: E203 |
|
| 55 |
+ packageVersion = pkg.rsplit('-', 1)[0]
|
|
| 56 |
+ if not packageVersion: |
|
| 57 |
+ raise Exception(f"Invalid argument: {pkg}")
|
|
| 58 |
+ packageName = packageVersion.rsplit("-", 1)[0]
|
|
| 59 |
+ packageVersion = pkg.rsplit(packageName)[1][1:] |
|
| 60 | 60 |
return packageName, packageVersion |
| 61 | 61 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,71 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+ |
|
| 2 |
+script_dir="$(dirname ${BASH_SOURCE})"
|
|
| 3 |
+ |
|
| 4 |
+if [ -d "$script_dir/SPECS" ]; then |
|
| 5 |
+ spec_dir="$(realpath $script_dir/SPECS)" |
|
| 6 |
+else |
|
| 7 |
+ spec_dir="$(realpath $script_dir/../../SPECS)" |
|
| 8 |
+fi |
|
| 9 |
+ |
|
| 10 |
+dist=".ph5" |
|
| 11 |
+ |
|
| 12 |
+create_specs() {
|
|
| 13 |
+ if [ $# -ne 4 ]; then |
|
| 14 |
+ echo "ERROR: $FUNCNAME invalid args ..." 1>&2 |
|
| 15 |
+ return 1 |
|
| 16 |
+ fi |
|
| 17 |
+ |
|
| 18 |
+ local i= |
|
| 19 |
+ local kver_str="$1" |
|
| 20 |
+ local krel_str="$2" |
|
| 21 |
+ local ksubrel_str="$3" |
|
| 22 |
+ local pkg="$4" |
|
| 23 |
+ |
|
| 24 |
+ local kver_arr=() |
|
| 25 |
+ local krel_arr=() |
|
| 26 |
+ #local kver_arr=("6.1.75" "6.6.66" "6.8.88")
|
|
| 27 |
+ #local krel_arr=("1" "2" "4")
|
|
| 28 |
+ local sp="" |
|
| 29 |
+ |
|
| 30 |
+ local k_specs=($(grep -lrw "^Name:[[:space:]]*$pkg$" $spec_dir/linux/)) |
|
| 31 |
+ |
|
| 32 |
+ for sp in ${k_specs[@]}; do
|
|
| 33 |
+ kver_arr+=($(grep ^Version: $sp | awk '{print $2}'))
|
|
| 34 |
+ krel_arr+=($(grep ^Release: $sp | awk '{print $2}' | tr -d -c 0-9))
|
|
| 35 |
+ done |
|
| 36 |
+ |
|
| 37 |
+ for i in ${!kver_arr[@]}; do
|
|
| 38 |
+ local kver="${kver_arr[$i]}"
|
|
| 39 |
+ local krel="${krel_arr[$i]}${dist}"
|
|
| 40 |
+ |
|
| 41 |
+ local a="$(echo $kver | cut -d. -f1)" |
|
| 42 |
+ local b="$(echo $kver | cut -d. -f2)" |
|
| 43 |
+ local c="$(echo $kver | cut -d. -f3)" |
|
| 44 |
+ [ -z "$c" ] && c="0" |
|
| 45 |
+ local d="${krel_arr[$i]}"
|
|
| 46 |
+ |
|
| 47 |
+ local ksubrel=$(printf ".%02d%02d%03d%03d" "$a" "$b" "$c" "$d") |
|
| 48 |
+ |
|
| 49 |
+ for sp in ${specs[@]}; do
|
|
| 50 |
+ local target_dir="$(dirname $sp)" |
|
| 51 |
+ local target_fn="$(basename -- ${sp} .spec)-${kver}.spec"
|
|
| 52 |
+ echo "Now operating on '${kver}-${krel}' & ${target_fn} ..."
|
|
| 53 |
+ sed -e "s|$kver_str|${kver}|" \
|
|
| 54 |
+ -e "s|$krel_str|${krel}|" \
|
|
| 55 |
+ -e "s|$ksubrel_str|${ksubrel}|" \
|
|
| 56 |
+ ${sp} > ${target_dir}/${target_fn}
|
|
| 57 |
+ done |
|
| 58 |
+ done |
|
| 59 |
+} |
|
| 60 |
+ |
|
| 61 |
+specs=(falco sysdig) |
|
| 62 |
+for s in ${!specs[@]}; do
|
|
| 63 |
+ rm -f $spec_dir/${specs[$s]}/*.spec
|
|
| 64 |
+ specs[$s]="$spec_dir/${specs[$s]}/${specs[$s]}.spec.in"
|
|
| 65 |
+done |
|
| 66 |
+ |
|
| 67 |
+create_specs "%{KERNEL_VERSION}" "%{KERNEL_RELEASE}" "%{?kernelsubrelease}" "linux"
|
|
| 68 |
+ |
|
| 69 |
+#specs=($(find $spec_dir -name "*.spec.in" | xargs -n1 grep -l -m1 %{LINUX_RT_KERNEL_VERSION}))
|
|
| 70 |
+#create_specs "%{LINUX_RT_KERNEL_VERSION}" "%{LINUX_RT_KERNEL_RELEASE}" "%{?linuxrt_kernelsubrelease}" "linux-rt"
|
| 0 | 71 |
new file mode 100755 |
| ... | ... |
@@ -0,0 +1,15 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+ |
|
| 2 |
+# This is the main script which invokes template creation scripts |
|
| 3 |
+# for now, there is only one script but this can grow. |
|
| 4 |
+# this is invoked by build.py |
|
| 5 |
+ |
|
| 6 |
+script_dir="$(dirname ${BASH_SOURCE[0]})"
|
|
| 7 |
+ |
|
| 8 |
+cd $script_dir |
|
| 9 |
+ |
|
| 10 |
+echo "Generate generic kernel dep specs ..." |
|
| 11 |
+if ! ./create-kernel-deps-specs-from-template.sh; then |
|
| 12 |
+ echo "ERROR: failed to generate kernel dep specs ..." 1>&2 |
|
| 13 |
+ exit 1 |
|
| 14 |
+fi |