From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 5/7] fedora: Define git_hash in spec file and reuse it Date: Mon, 29 Aug 2022 17:17:07 +0200 Message-ID: <20220829151709.2650896-6-sbrivio@redhat.com> In-Reply-To: <20220829151709.2650896-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2644668968465408345==" --===============2644668968465408345== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable ...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=C3=A9 Signed-off-by: Stefano Brivio --- contrib/fedora/passt.spec | 6 ++++-- 1 file 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 =20 +%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 =20 BuildRequires: gcc, make, checkpolicy, selinux-policy-devel =20 @@ -40,7 +42,7 @@ Requires(preun): policycoreutils, %{name} This package adds SELinux enforcement to passt(1) and pasta(1). =20 %prep -%setup -q -n passt-{{{ git_head }}} +%setup -q -n passt-%{git_hash} =20 %build %set_build_flags --=20 2.35.1 --===============2644668968465408345==--