Compare commits
58 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8937eb77a | ||
|
|
c749037af1 | ||
|
|
bc41311897 |
||
|
|
20152b5b78 |
||
|
|
5050fb326d |
||
|
|
88e605d698 | ||
|
|
af9f11c2c0 | ||
|
|
3ee046b6b9 | ||
|
|
7143c18a51 |
||
|
|
da96fc1a24 | ||
|
|
b6fe9940c0 | ||
|
|
27e8c567ab |
||
|
|
f5914e0b64 | ||
|
|
aaeb9efbc2 | ||
|
|
6029d3dea1 | ||
|
|
ed6e6734ab | ||
|
|
4245f81edc | ||
|
|
24e1c0d9e8 | ||
|
|
f23961e422 | ||
|
|
7a1ca241c3 | ||
|
|
f695fe0757 | ||
|
|
f6b112051c | ||
|
|
eed31dbdef | ||
|
|
eb89f37659 | ||
|
|
c619846e89 | ||
|
|
eb4ba043a6 | ||
|
|
569622f0de |
||
|
|
12712a60dc | ||
|
|
7c6c2cc67d | ||
|
|
6d281ff84e | ||
|
|
13a1b88435 | ||
|
|
6e0993f21d | ||
|
|
549895ef91 | ||
|
|
67eda2df3f | ||
|
|
a6db1a6bb5 | ||
|
|
c6ac6db7f3 | ||
|
|
2fa11559fc | ||
|
|
08f9734a05 | ||
|
|
ab95792a5e | ||
|
|
f112b741a5 | ||
|
|
30bcfd9777 | ||
|
|
d9dabc69eb | ||
|
|
775741546f | ||
|
|
98bff6bd71 | ||
|
|
1622aa44a4 | ||
|
|
c386b4ac75 | ||
|
|
439a759ae0 | ||
|
|
bd7cd8fcf3 | ||
|
|
f77e6051e8 | ||
|
|
e64fe494c4 | ||
|
|
d5c011c822 | ||
|
|
95d64a7043 | ||
|
|
0265d48e3e | ||
|
|
a78e3e3cd8 | ||
|
|
a22e275c52 | ||
|
|
020a994cd6 | ||
|
|
86c83d8d25 | ||
|
|
8afebad6aa |
8 changed files with 82 additions and 67 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1 +1 @@
|
|||
/oci-seccomp-bpf-hook-3baa603a.tar.gz
|
||||
/*.tar.gz
|
||||
|
|
|
|||
9
gating.yaml
Normal file
9
gating.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_testing
|
||||
- bodhi_update_push_stable
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
%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}
|
||||
|
|
@ -11,34 +7,21 @@
|
|||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
# %if ! 0% {?gobuild:1}
|
||||
%define gobuild(o:) go build -tags="$BUILDTAGS" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -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}
|
||||
%global commit0 3baa603ae910f2aad29ea694b78b2f7f34b5d5ce
|
||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:8})
|
||||
|
||||
# bcc is built only for these arches
|
||||
ExclusiveArch: x86_64 %{power64} aarch64 s390x
|
||||
%global gomodulesmode GO111MODULE=on
|
||||
|
||||
Name: oci-seccomp-bpf-hook
|
||||
Version: 0.0.1
|
||||
Release: 0.5.git%{shortcommit0}%{?dist}
|
||||
Version: 1.2.10
|
||||
License: Apache-2.0 and BSD-2-Clause and BSD-3-Clause and ISC and MIT
|
||||
Release: %autorelease
|
||||
# use the same arch definitions as present in the bcc package
|
||||
ExclusiveArch: x86_64 %{power64} aarch64 s390x armv7hl
|
||||
Summary: OCI Hook to generate seccomp json files based on EBF syscalls used by container
|
||||
License: ASL 2.0
|
||||
URL: %{git0}
|
||||
Source0: %{git0}/archive/%{commit0}/%{repo}-%{shortcommit0}.tar.gz
|
||||
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
|
||||
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
|
||||
BuildRequires: golang-github-cpuguy83-md2man
|
||||
URL: https://github.com/containers/%{name}
|
||||
# Tarball fetched from upstream
|
||||
Source0: %{url}/archive/v%{version}.tar.gz
|
||||
BuildRequires: golang
|
||||
BuildRequires: go-md2man
|
||||
BuildRequires: go-rpm-macros
|
||||
BuildRequires: glib2-devel
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: bcc-devel
|
||||
|
|
@ -46,40 +29,54 @@ BuildRequires: git
|
|||
BuildRequires: gpgme-devel
|
||||
BuildRequires: libseccomp-devel
|
||||
BuildRequires: make
|
||||
Requires: bcc
|
||||
Enhances: podman
|
||||
Enhances: cri-o
|
||||
|
||||
%description
|
||||
%{summary}
|
||||
%{repo} provides a library for applications looking to use
|
||||
%{name} provides a library for applications looking to use
|
||||
the Container Pod concept popularized by Kubernetes.
|
||||
|
||||
%package remote
|
||||
Summary: Remote Oci-Seccomp-Bpf client
|
||||
%package tests
|
||||
Summary: Tests for %{name}
|
||||
|
||||
%description remote
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: bats
|
||||
Requires: podman
|
||||
|
||||
%description tests
|
||||
%{summary}
|
||||
%{repo} provides a library for applications looking to use
|
||||
the Container Pod concept popularized by Kubernetes.
|
||||
|
||||
This package contains system tests for %{name}
|
||||
|
||||
%prep
|
||||
%autosetup -Sgit -n %{repo}-%{commit0}
|
||||
%autosetup -Sgit -n %{name}-%{version}
|
||||
sed -i 's;HOOK_BIN_DIR;%{_libexecdir}/oci/hooks.d;' %{name}.json
|
||||
sed -i '/$(HOOK_DIR)\/%{name}.json/d' Makefile
|
||||
|
||||
%build
|
||||
mkdir _build
|
||||
pushd _build
|
||||
mkdir -p src/%{provider}.%{provider_tld}/%{project}
|
||||
ln -s ../../../../ src/%{import_path}
|
||||
popd
|
||||
ln -s vendor src
|
||||
%set_build_flags
|
||||
export CGO_CFLAGS=$CFLAGS
|
||||
# These extra flags present in $CFLAGS have been skipped for now as they break the build
|
||||
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
|
||||
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')
|
||||
CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g')
|
||||
|
||||
%ifarch x86_64
|
||||
export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"
|
||||
%endif
|
||||
|
||||
export LDFLAGS="-X main.version=%{version}"
|
||||
%gobuild -o bin/%{name} .
|
||||
|
||||
export GOPATH=$(pwd)/_build:$(pwd)
|
||||
export GO111MODULE=off
|
||||
export BUILDTAGS=""
|
||||
BUILDTAGS=$BUILDTAGS %gobuild -o bin/%{name} %{import_path}
|
||||
%{__make} docs
|
||||
|
||||
%install
|
||||
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} OCI-SECCOMP-BPF_VERSION=%{version} install
|
||||
%{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install.docs-nobuild install-nobuild
|
||||
|
||||
install -d -p %{buildroot}/%{_datadir}/%{name}/test/system
|
||||
cp -pav test/. %{buildroot}/%{_datadir}/%{name}/test/system
|
||||
|
||||
%check
|
||||
%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
|
||||
|
|
@ -109,22 +106,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||
%{_datadir}/containers/oci/hooks.d/%{name}.json
|
||||
%{_mandir}/man1/%{name}.1*
|
||||
|
||||
%files tests
|
||||
%license LICENSE
|
||||
%{_datadir}/%{name}/test
|
||||
|
||||
%changelog
|
||||
* 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 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
|
||||
|
||||
* 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
|
||||
|
||||
* Mon Nov 04 2019 Jindrich Novy <jnovy@redhat.com> - 0.0.1-0.2.git3baa603a
|
||||
- pull in golang deps as BR
|
||||
|
||||
* Mon Sep 23 2019 Jindrich Novy <jnovy@redhat.com> - 0.0.1-0.1.git3baa603a
|
||||
- fix spec file and build
|
||||
|
||||
* Sun Sep 22 2019 Dan Walsh <dwalsh@redhat.com> - 0.0.1
|
||||
- Initial Version
|
||||
%autochangelog
|
||||
|
|
|
|||
5
plans/main.fmf
Normal file
5
plans/main.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
summary: Run all smoke tests
|
||||
discover:
|
||||
how: fmf
|
||||
execute:
|
||||
how: tmt
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (oci-seccomp-bpf-hook-3baa603a.tar.gz) = c2a6cbd5a16e2c60f8a2dabb377918d4e161e39570b42ec73de51eb139950b8be4b278b3952987af8df0b7327b06d5fcc1dc13bda35083b0c037b9ebc0f354af
|
||||
SHA512 (v1.2.10.tar.gz) = 184045dbbc2d6a08c49939f9fb1dc1ed1c24d5e33005f2f8f3d4d09d2f2edac0f97cf30c27b5fb0afa478a2eb377657952de505076bbddf4be013c11e1c8bac3
|
||||
|
|
|
|||
2
tests/main.fmf
Normal file
2
tests/main.fmf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
summary: bats tests
|
||||
test: ./test_osbh.sh
|
||||
14
tests/test_osbh.sh
Executable file
14
tests/test_osbh.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
# Log program and kernel versions
|
||||
echo "Important package versions:"
|
||||
(
|
||||
uname -r
|
||||
rpm -qa | egrep 'podman|conmon|crun|runc|iptable|slirp|systemd|container-selinux' | sort
|
||||
) | sed -e 's/^/ /'
|
||||
|
||||
# Log environment; or at least the useful bits
|
||||
echo "Environment:"
|
||||
env | grep -v LS_COLORS= | sort | sed -e 's/^/ /'
|
||||
|
||||
bats /usr/share/oci-seccomp-bpf-hook/test/system
|
||||
Loading…
Add table
Add a link
Reference in a new issue