From eed31dbdef8894ec5ff16bca0588ad562f4561ea Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Tue, 4 Oct 2022 14:51:53 -0400 Subject: [PATCH] adjust macros for getting correct version Signed-off-by: Lokesh Mandvekar --- oci-seccomp-bpf-hook.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/oci-seccomp-bpf-hook.spec b/oci-seccomp-bpf-hook.spec index 9bbc3f0..be52017 100644 --- a/oci-seccomp-bpf-hook.spec +++ b/oci-seccomp-bpf-hook.spec @@ -16,12 +16,14 @@ %global git0 https://%{import_path} %global built_tag v1.2.6 +%global built_tag_strip %(b=%{built_tag}; echo ${b:1}) +%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"}) # use the same arch definitions as present in the bcc package ExclusiveArch: x86_64 %{power64} aarch64 s390x armv7hl Name: %{repo} -Version: 1.2.6 +Version: %{gen_version} License: ASL 2.0 and BSD and ISC and MIT Release: %autorelease Summary: OCI Hook to generate seccomp json files based on EBF syscalls used by container @@ -67,7 +69,7 @@ Requires: podman This package contains system tests for %{name} %prep -%autosetup -Sgit +%autosetup -Sgit -n %{name}-%{built_tag_strip} sed -i 's;HOOK_BIN_DIR;%{_libexecdir}/oci/hooks.d;' %{name}.json sed -i '/$(HOOK_DIR)\/%{name}.json/d' Makefile