aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-08-29 15:36:35 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-08-30 19:16:44 +0200
commit7e6617d2272785d16ccefabd95cd2a79e74924b8 (patch)
tree4098aabeb40d936fd061bb351f69cb71d4603f8d
parentcfc1984a9657d63895d69cfbff02b105086c9bf4 (diff)
downloadpasst-7e6617d2272785d16ccefabd95cd2a79e74924b8.tar
passt-7e6617d2272785d16ccefabd95cd2a79e74924b8.tar.gz
passt-7e6617d2272785d16ccefabd95cd2a79e74924b8.tar.bz2
passt-7e6617d2272785d16ccefabd95cd2a79e74924b8.tar.lz
passt-7e6617d2272785d16ccefabd95cd2a79e74924b8.tar.xz
passt-7e6617d2272785d16ccefabd95cd2a79e74924b8.tar.zst
passt-7e6617d2272785d16ccefabd95cd2a79e74924b8.zip
fedora: Define git_hash in spec file and reuse it
...as it's used twice. The short version, however, appears hardcoded only once in the output, and it comes straight from the rpkg macro building the version string -- leave that macro as it is. Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--contrib/fedora/passt.spec6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec
index 9356858..6125a3b 100644
--- a/contrib/fedora/passt.spec
+++ b/contrib/fedora/passt.spec
@@ -7,6 +7,8 @@
# Copyright (c) 2022 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
+%global git_hash {{{ git_head }}}
+
Name: passt
Version: {{{ git_version }}}
Release: 1%{?dist}
@@ -14,7 +16,7 @@ Summary: User-mode networking daemons for virtual machines and namespaces
License: AGPLv3+ and BSD
Group: System Environment/Daemons
URL: https://passt.top/
-Source: https://passt.top/passt/snapshot/passt-{{{ git_head }}}.tar.xz
+Source: https://passt.top/passt/snapshot/passt-%{git_hash}.tar.xz
BuildRequires: gcc, make, checkpolicy, selinux-policy-devel
@@ -40,7 +42,7 @@ Requires(preun): policycoreutils, %{name}
This package adds SELinux enforcement to passt(1) and pasta(1).
%prep
-%setup -q -n passt-{{{ git_head }}}
+%setup -q -n passt-%{git_hash}
%build
%set_build_flags