Compare commits

...

No commits in common. 'c9' and 'c8-stream-4.0' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/v1.2.9.tar.gz
SOURCES/v1.2.5.tar.gz

@ -1 +1 @@
1de067252084b207985bba8851104a2327dbc5e0 SOURCES/v1.2.9.tar.gz
d73e189532884c786d0074ad92a30cf11c209395 SOURCES/v1.2.5.tar.gz

@ -0,0 +1,60 @@
From 245cc45ad45f8024c602696f58ae163d0dc745d5 Mon Sep 17 00:00:00 2001
From: Dominique Martinet <asmadeus@codewreck.org>
Date: Tue, 11 Oct 2022 22:39:28 +0900
Subject: [PATCH] update gobpf: fix compatibility with bcc v0.25.0
bcc v0.25.0 broke compatibility with bcc_func_load and requires updating
the gobpf wrapper.
Fixes: #100
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
---
go.mod | 2 +-
go.sum | 4 +--
vendor/github.com/iovisor/gobpf/bcc/module.go | 25 ++++++++++++++++++-
vendor/modules.txt | 2 +-
4 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/vendor/github.com/iovisor/gobpf/bcc/module.go b/vendor/github.com/iovisor/gobpf/bcc/module.go
index 98a1c93..67d43eb 100644
--- a/vendor/github.com/iovisor/gobpf/bcc/module.go
+++ b/vendor/github.com/iovisor/gobpf/bcc/module.go
@@ -31,6 +31,29 @@ import (
#cgo LDFLAGS: -lbcc
#include <bcc/bcc_common.h>
#include <bcc/libbpf.h>
+#include <bcc/bcc_version.h>
+
+#ifndef LIBBCC_VERSION_GEQ
+#define LIBBCC_VERSION_GEQ(a, b, c) 0
+#endif
+
+int bcc_func_load_wrapper(void *program, int prog_type, const char *name,
+ const struct bpf_insn *insns, int prog_len,
+ const char *license, unsigned kern_version,
+ int log_level, char *log_buf, unsigned log_buf_size,
+ const char *dev_name, int attach_type){
+
+#if LIBBCC_VERSION_GEQ(0, 25, 0)
+ return bcc_func_load(program, prog_type, name, insns, prog_len, license,
+ kern_version, log_level, log_buf, log_buf_size,
+ dev_name, attach_type);
+#else
+ return bcc_func_load(program, prog_type, name, insns, prog_len, license,
+ kern_version, log_level, log_buf, log_buf_size,
+ dev_name);
+#endif
+}
+
*/
import "C"
@@ -227,7 +250,7 @@ func (bpf *Module) load(name string, progType int, logLevel, logSize uint) (int,
logBuf = make([]byte, logSize)
logBufP = (*C.char)(unsafe.Pointer(&logBuf[0]))
}
- fd, err := C.bcc_func_load(bpf.p, C.int(uint32(progType)), nameCS, start, size, license, version, C.int(logLevel), logBufP, C.uint(len(logBuf)), nil)
+ fd, err := C.bcc_func_load_wrapper(bpf.p, C.int(uint32(progType)), nameCS, start, size, license, version, C.int(logLevel), logBufP, C.uint(len(logBuf)), nil, C.int(-1))
if fd < 0 {
return -1, fmt.Errorf("error loading BPF program: %v", err)
}

@ -3,9 +3,6 @@
%global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0
# https://bugzilla.redhat.com/show_bug.cgi?id=1904567
%global _lto_cflags %%{nil}
%if 0%{?rhel} > 7 && ! 0%{?fedora}
%define gobuild(o:) \
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -linkmode=external -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v %{?**};
@ -28,14 +25,15 @@ go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl
ExclusiveArch: %{go_arches}
Name: oci-seccomp-bpf-hook
Version: 1.2.9
Release: 1%{?dist}
Version: 1.2.5
Release: 2%{?dist}
Summary: OCI Hook to generate seccomp json files based on EBF syscalls used by container
License: ASL 2.0
URL: %{git0}
Source0: %{git0}/archive/v%{version}.tar.gz
Patch0: https://github.com/containers/oci-seccomp-bpf-hook/commit/245cc45ad45f8024c602696f58ae163d0dc745d5.patch
BuildRequires: golang
BuildRequires: /usr/bin/go-md2man
BuildRequires: go-md2man
BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: bcc-devel
@ -111,113 +109,73 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%{_mandir}/man1/%{name}.1*
%changelog
* Wed Apr 19 2023 Jindrich Novy <jnovy@redhat.com> - 1.2.9-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.9
- Related: #2176063
* Tue Oct 18 2022 Jindrich Novy <jnovy@redhat.com> - 1.2.8-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.8
- Related: #2124478
* Tue Jul 12 2022 Jindrich Novy <jnovy@redhat.com> - 1.2.6-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.6
- Related: #2061316
* Wed May 11 2022 Jindrich Novy <jnovy@redhat.com> - 1.2.5-2
- BuildRequires: /usr/bin/go-md2man
- Related: #2061316
* Tue Mar 14 2023 Jindrich Novy <jnovy@redhat.com> - 1.2.5-2
- fix compatibility with the new bcc
- Related: #2176055
* Wed Mar 16 2022 Jindrich Novy <jnovy@redhat.com> - 1.2.5-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.5
- Related: #2061316
* Fri Oct 01 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.3-5
- perform only sanity/installability tests for now
- Related: #2000051
- Related: #2061390
* Wed Sep 29 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.3-4
- add gating.yaml
- Related: #2000051
* Wed May 26 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.3-3
- change runc dependency to conflict
- Related: #1934415
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.3-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed May 19 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.3-2
- remove unneeded patch
- Related: #1934415
* Tue Jun 22 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.3-2
- Rebuilt for RHEL 9 BETA for openssl 3.0
Related: rhbz#1971065
* Wed May 19 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.3-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.3
- fix build
- Related: #1934415
* Mon Jun 14 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.3-1
- convert crun dependency to a conflict
- Related: #1970747
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.2.1-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 22 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.0-2
- revert back to 1.2.0 - build issues
- Related: #1883490
* Fri Feb 19 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.1-1
- update to
https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.1
- require crun >= 0.17
- Related: #1883490
* Thu Jan 28 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.0-6
* Thu Jan 28 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.0-1
- revert back to 1.2.0 due to build issues
- Related: #1883490
* Thu Jan 28 2021 Jindrich Novy <jnovy@redhat.com> - 1.2.1-1
- update to
https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.1
* Tue Dec 08 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-5
- use go_arches macro
* Fri Oct 02 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-4
- use the same arch definitions as present in the bcc package
* Fri Oct 02 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-3
- exclude also armv7hl arch as bcc is not built there
* Wed Sep 30 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-2
- fix spec file to accommodate the new upstream release
* Wed Sep 30 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-1
- update to
https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.0
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Jul 17 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.1-1
- update to
https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.1.1
* Fri Jul 17 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.0-2
- switch to mainline releases
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.2.1
- Related: #1883490
* Tue May 19 2020 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.0-1.1.git05a82a1
- bump version
- reuse Makefile targets
* Tue Dec 08 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-2
- sync with RHEL8 devel branch
- Related: #1883490
* Mon Feb 17 2020 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.0.1-0.6.gitba7bbb16
- Resolves: #1799105 - solve ftbfs and build latest upstream commit
* Wed Oct 21 2020 Jindrich Novy <jnovy@redhat.com> - 1.2.0-1
- synchronize with stream-container-tools-rhel8
- Related: #1883490
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.1-0.5.git3baa603a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Aug 11 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.2-3
- propagate proper CFLAGS to CGO_CFLAGS to assure code hardening and optimization
- Related: #1821193
* Tue Nov 05 2019 Jindrich Novy <jnovy@redhat.com> - 0.0.1-0.4.git3baa603a
- limit arches to only those supported by bcc so that this can be built
* Thu Jul 23 2020 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.2-2
- Resolves: #1857606
* Mon Nov 04 2019 Jindrich Novy <jnovy@redhat.com> - 0.0.1-0.3.git3baa603a
- fix the license - should be ASL 2.0
- use %%gobuild
* Fri Jul 17 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.2-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.1.2
- Related: #1821193
* Mon Nov 04 2019 Jindrich Novy <jnovy@redhat.com> - 0.0.1-0.2.git3baa603a
- pull in golang deps as BR
* Thu Jun 18 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.1-1
- update to https://github.com/containers/oci-seccomp-bpf-hook/releases/tag/v1.1.1
- Related: #1821193
* Mon Sep 23 2019 Jindrich Novy <jnovy@redhat.com> - 0.0.1-0.1.git3baa603a
- fix spec file and build
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.0-2
- exclude i686 arch as bcc, the build dependency is not built
for it
- Related: #1821193
* Sun Sep 22 2019 Dan Walsh <dwalsh@redhat.com> - 0.0.1
- Initial Version
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.0-1
- initial build for container-tools-rhel8
- Related: #1821193

Loading…
Cancel
Save