From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 09/12] fedora: Change source URL to HEAD link with explicit commit SHA Date: Thu, 18 Aug 2022 22:22:32 +0200 Message-ID: <20220818202235.1591828-10-sbrivio@redhat.com> In-Reply-To: <20220818202235.1591828-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3493591895333962085==" --===============3493591895333962085== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is required as Fedora doesn't accept a temporary pointer to a source URL. Reported-by: Ralf Corsepius Reported-by: Artur Frenszek-Iwicki Signed-off-by: Stefano Brivio --- contrib/fedora/passt.spec | 4 ++-- contrib/fedora/rpkg.macros | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/contrib/fedora/passt.spec b/contrib/fedora/passt.spec index ee8f6a4..fcd5ba9 100644 --- a/contrib/fedora/passt.spec +++ b/contrib/fedora/passt.spec @@ -18,7 +18,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-HEAD.tar.xz +Source: https://passt.top/passt/snapshot/passt-{{{ git_head }}}.tar.xz =20 BuildRequires: gcc, make, checkpolicy, selinux-policy-devel =20 @@ -43,7 +43,7 @@ Requires(preun): policycoreutils, %{name} This package adds SELinux enforcement to passt(1) and pasta(1). =20 %prep -%setup -q -n passt-HEAD +%setup -q -n passt-{{{ git_head }}} =20 %build export CFLAGS=3D"%{optflags}" diff --git a/contrib/fedora/rpkg.macros b/contrib/fedora/rpkg.macros index c9ba03d..2032034 100644 --- a/contrib/fedora/rpkg.macros +++ b/contrib/fedora/rpkg.macros @@ -15,6 +15,10 @@ function git_version { printf "0.git.%s.%s" "$(date -u -I | tr - _)" "$(git rev-parse --short HEAD= )" } =20 +function git_head { + git rev-parse HEAD +} + function passt_git_changelog_entry { __from=3D"${2}" __to=3D"${1}" --=20 2.35.1 --===============3493591895333962085==--