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>
This commit is contained in:
parent
cfc1984a96
commit
7e6617d227
1 changed files with 4 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
||||||
# Copyright (c) 2022 Red Hat GmbH
|
# Copyright (c) 2022 Red Hat GmbH
|
||||||
# Author: Stefano Brivio <sbrivio@redhat.com>
|
# Author: Stefano Brivio <sbrivio@redhat.com>
|
||||||
|
|
||||||
|
%global git_hash {{{ git_head }}}
|
||||||
|
|
||||||
Name: passt
|
Name: passt
|
||||||
Version: {{{ git_version }}}
|
Version: {{{ git_version }}}
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
|
@ -14,7 +16,7 @@ Summary: User-mode networking daemons for virtual machines and namespaces
|
||||||
License: AGPLv3+ and BSD
|
License: AGPLv3+ and BSD
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: https://passt.top/
|
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
|
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).
|
This package adds SELinux enforcement to passt(1) and pasta(1).
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n passt-{{{ git_head }}}
|
%setup -q -n passt-%{git_hash}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
|
|
Loading…
Reference in a new issue