import oci-seccomp-bpf-hook-1.2.0-1.module+el8.3.1+8686+2a59bca3
This commit is contained in:
commit
9685790d1f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/v1.2.0.tar.gz
|
||||
1
.oci-seccomp-bpf-hook.metadata
Normal file
1
.oci-seccomp-bpf-hook.metadata
Normal file
@ -0,0 +1 @@
|
||||
87e5a6bd76c56b81e779438c531f31f14a6c9b7e SOURCES/v1.2.0.tar.gz
|
||||
140
SPECS/oci-seccomp-bpf-hook.spec
Normal file
140
SPECS/oci-seccomp-bpf-hook.spec
Normal file
@ -0,0 +1,140 @@
|
||||
%global with_devel 0
|
||||
%global with_bundled 1
|
||||
%global with_debug 1
|
||||
%global with_check 0
|
||||
%global with_unit_test 0
|
||||
|
||||
%if 0%{?with_debug}
|
||||
%global _find_debuginfo_dwz_opts %{nil}
|
||||
%global _dwz_low_mem_die_limit 0
|
||||
%else
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel} > 7 && ! 0%{?fedora}
|
||||
%define gobuild(o:) \
|
||||
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -compressdwarf=false -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
|
||||
%endif
|
||||
|
||||
%global provider github
|
||||
%global provider_tld com
|
||||
%global project containers
|
||||
%global repo oci-seccomp-bpf-hook
|
||||
# https://github.com/containers/oci-seccomp-bpf-hook
|
||||
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
||||
%global import_path %{provider_prefix}
|
||||
%global git0 https://%{provider}.%{provider_tld}/%{project}/%{repo}
|
||||
|
||||
# bcc is not built for i686
|
||||
ExcludeArch: i686
|
||||
|
||||
Name: oci-seccomp-bpf-hook
|
||||
Version: 1.2.0
|
||||
Release: 1%{?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
|
||||
BuildRequires: golang
|
||||
BuildRequires: go-md2man
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: bcc-devel
|
||||
BuildRequires: git
|
||||
BuildRequires: gpgme-devel
|
||||
BuildRequires: libseccomp-devel
|
||||
BuildRequires: make
|
||||
Enhances: podman
|
||||
Enhances: cri-o
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
%{repo} provides a library for applications looking to use
|
||||
the Container Pod concept popularized by Kubernetes.
|
||||
|
||||
%prep
|
||||
%autosetup -Sgit
|
||||
sed -i '/$(MAKE) -C docs install/d' Makefile
|
||||
sed -i 's/HOOK_BIN_DIR/\%{_usr}\/libexec\/oci\/hooks.d/' %{name}.json
|
||||
sed -i '/$(HOOK_DIR)\/%{name}.json/d' Makefile
|
||||
|
||||
%build
|
||||
export GO111MODULE=off
|
||||
export GOPATH=$(pwd):$(pwd)/_build
|
||||
export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||
|
||||
mkdir _build
|
||||
pushd _build
|
||||
mkdir -p src/%{provider}.%{provider_tld}/%{project}
|
||||
ln -s ../../../../ src/%{import_path}
|
||||
popd
|
||||
ln -s vendor src
|
||||
|
||||
export GOPATH=$(pwd)/_build:$(pwd)
|
||||
export LDFLAGS="-X main.version=%{version}"
|
||||
%gobuild -o bin/%{name} %{import_path}
|
||||
|
||||
pushd docs
|
||||
go-md2man -in %{name}.md -out %{name}.1
|
||||
popd
|
||||
|
||||
%install
|
||||
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install-nobuild
|
||||
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} GOMD2MAN=go-md2man -C docs install-nobuild
|
||||
|
||||
%check
|
||||
%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
|
||||
# Since we aren't packaging up the vendor directory we need to link
|
||||
# back to it somehow. Hack it up so that we can add the vendor
|
||||
# directory from BUILD dir as a gopath to be searched when executing
|
||||
# tests from the BUILDROOT dir.
|
||||
ln -s ./ ./vendor/src # ./vendor/src -> ./vendor
|
||||
|
||||
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
||||
|
||||
%if ! 0%{?gotest:1}
|
||||
%global gotest go test
|
||||
%endif
|
||||
|
||||
%gotest %{import_path}/src/%{name}
|
||||
%endif
|
||||
|
||||
#define license tag if not already defined
|
||||
%{!?_licensedir:%global license %doc}
|
||||
|
||||
%files
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%dir %{_libexecdir}/oci/hooks.d
|
||||
%{_libexecdir}/oci/hooks.d/%{name}
|
||||
%{_datadir}/containers/oci/hooks.d/%{name}.json
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
|
||||
%changelog
|
||||
* Fri Oct 23 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
|
||||
- Related: #1888571
|
||||
|
||||
* 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
|
||||
|
||||
* Thu Jul 23 2020 Lokesh Mandvekar <lsm5@fedoraproject.org> - 1.1.2-2
|
||||
- Resolves: #1857606
|
||||
|
||||
* 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
|
||||
|
||||
* 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
|
||||
|
||||
* 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
|
||||
|
||||
* Tue May 12 2020 Jindrich Novy <jnovy@redhat.com> - 1.1.0-1
|
||||
- initial build for container-tools-rhel8
|
||||
- Related: #1821193
|
||||
Loading…
Reference in New Issue
Block a user