diff --git a/SOURCES/build-fix.patch b/SOURCES/build-fix.patch new file mode 100644 index 0000000..676352a --- /dev/null +++ b/SOURCES/build-fix.patch @@ -0,0 +1,12 @@ +diff -up oci-seccomp-bpf-hook-1.2.0/vendor/github.com/iovisor/gobpf/bcc/module.go.orig oci-seccomp-bpf-hook-1.2.0/vendor/github.com/iovisor/gobpf/bcc/module.go +--- oci-seccomp-bpf-hook-1.2.0/vendor/github.com/iovisor/gobpf/bcc/module.go.orig 2021-05-21 14:15:44.936127448 +0200 ++++ oci-seccomp-bpf-hook-1.2.0/vendor/github.com/iovisor/gobpf/bcc/module.go 2021-05-21 14:16:03.459454988 +0200 +@@ -258,7 +258,7 @@ func (bpf *Module) attachProbe(evName st + func (bpf *Module) attachUProbe(evName string, attachType uint32, path string, addr uint64, fd, pid int) error { + evNameCS := C.CString(evName) + binaryPathCS := C.CString(path) +- res, err := C.bpf_attach_uprobe(C.int(fd), attachType, evNameCS, binaryPathCS, (C.uint64_t)(addr), (C.pid_t)(pid)) ++ res, err := C.bpf_attach_uprobe(C.int(fd), attachType, evNameCS, binaryPathCS, (C.uint64_t)(addr), (C.pid_t)(pid), 0) + C.free(unsafe.Pointer(evNameCS)) + C.free(unsafe.Pointer(binaryPathCS)) + diff --git a/SPECS/oci-seccomp-bpf-hook.spec b/SPECS/oci-seccomp-bpf-hook.spec index 47e7448..9cff865 100644 --- a/SPECS/oci-seccomp-bpf-hook.spec +++ b/SPECS/oci-seccomp-bpf-hook.spec @@ -26,11 +26,12 @@ ExclusiveArch: %{go_arches} Name: oci-seccomp-bpf-hook Version: 1.2.0 -Release: 1%{?dist} +Release: 3%{?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: build-fix.patch BuildRequires: golang BuildRequires: go-md2man BuildRequires: glib2-devel @@ -108,6 +109,14 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_mandir}/man1/%{name}.1* %changelog +* Fri May 21 2021 Jindrich Novy - 1.2.0-3 +- actually apply the build fix patch +- Related: #1934415 + +* Fri May 21 2021 Jindrich Novy - 1.2.0-2 +- resolve build issue +- Related: #1934415 + * Mon Feb 22 2021 Jindrich Novy - 1.2.0-1 - revert back to 1.2.0 - build issues - Related: #1883490