diff --git a/.gitignore b/.gitignore index 9631009..f6a3a77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1 @@ -/oci-seccomp-bpf-hook-3baa603a.tar.gz -/oci-seccomp-bpf-hook-ba7bbb16.tar.gz -/oci-seccomp-bpf-hook-05a82a12.tar.gz +/*.tar.gz diff --git a/oci-seccomp-bpf-hook.spec b/oci-seccomp-bpf-hook.spec index 92fd224..67b1b8e 100644 --- a/oci-seccomp-bpf-hook.spec +++ b/oci-seccomp-bpf-hook.spec @@ -22,8 +22,6 @@ # https://github.com/containers/oci-seccomp-bpf-hook %global import_path %{provider}.%{provider_tld}/%{project}/%{repo} %global git0 https://%{import_path} -%global commit0 05a82a1227fb47c34a28537699d3c05e8d4463f8 -%global shortcommit0 %(c=%{commit0}; echo ${c:0:8}) # bcc is built only for these arches ExclusiveArch: x86_64 %{power64} aarch64 s390x @@ -35,11 +33,11 @@ ExclusiveArch: x86_64 %{power64} aarch64 s390x Name: oci-seccomp-bpf-hook Version: 1.1.0 -Release: 1.1.git%{shortcommit0}%{?dist} +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/%{commit0}/%{repo}-%{shortcommit0}.tar.gz +Source0: %{git0}/archive/v%{version}.tar.gz BuildRequires: golang BuildRequires: go-md2man BuildRequires: glib2-devel @@ -58,7 +56,7 @@ Enhances: cri-o the Container Pod concept popularized by Kubernetes. %prep -%autosetup -Sgit -n %{repo}-%{commit0} +%autosetup -Sgit %build mkdir _build @@ -72,12 +70,16 @@ export GOPATH=$(pwd)/_build:$(pwd) %{__make} GOMD2MAN=go-md2man -C docs %install -%{__make} \ - DESTDIR=%{buildroot} \ - PREFIX=%{_prefix} \ - OCI-SECCOMP-BPF_VERSION=%{version} \ - install-nobuild \ - install.docs-nobuild +# install binary +%{__make} PREFIX=%{buildroot}%{_usr} ETCDIR=%{buildroot}%{_sysconfdir} OCI-SECCOMP-BPF_VERSION=%{version} install + +# install %%{name}.json to /usr/share/containers/oci/hooks.d +install -dp %{buildroot}%{_datadir}/containers/oci/hooks.d +install -m 0644 %{name}.json %{buildroot}%{_datadir}/containers/oci/hooks.d + +# install manpage +install -dp %{buildroot}%{_mandir}/man1 +install -m 0644 docs/%{name}.1 %{buildroot}/%{_mandir}/man1 %check %if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel} @@ -112,6 +114,9 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath} %{_mandir}/man1/%{name}.1* %changelog +* Fri Jul 17 2020 Jindrich Novy - 1.1.0-2 +- switch to mainline releases + * Tue May 19 2020 Lokesh Mandvekar - 1.1.0-1.1.git05a82a1 - bump version - reuse Makefile targets diff --git a/sources b/sources index 823b181..2d0c96c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (oci-seccomp-bpf-hook-05a82a12.tar.gz) = 5ffdb773128763d1288795148567a4b39cfaea669f4342046c66325285032ed4ea98d3fff925e2b54a3bbeedfb15fdcf55a6e2e4c2f64a51d6d734e68d1d21e1 +SHA512 (v1.1.0.tar.gz) = df9e569423cc12aeea51f617e780cea3dd6ce014a9d7513efa0e9e28eb909b8e30572c46229df0bd0d0fca56ecf726e301988c1e168d4726e10816af27be17d7