redhat: move the DIST variable setting to Makefile.variables

The DIST value is dynamically detected on ARK, but it can be set to a
fixed value for a branch which forks from it (as some branches are built
only for a given distro and we don't want the DIST value to change even
if building eg. the src.rpm in a different environment). So it makes sense
in this case to move it to the Makefile.variables file.

Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
This commit is contained in:
Herton R. Krzesinski 2021-09-24 17:07:32 -03:00 committed by Justin M. Forbes
parent 0ea14215d0
commit 7d747454a0
No known key found for this signature in database
GPG Key ID: B8FA7924A4B1C140
2 changed files with 4 additions and 1 deletions

View File

@ -32,7 +32,6 @@ else
PREBUILD:=
endif
DIST ?= $(shell $(RPMBUILD) --eval '%{?dist}')
ifneq ($(findstring .fc,$(DIST)),)
DISTRO ?= fedora
else

View File

@ -8,6 +8,10 @@
# the current branch.
DIST_BRANCH ?= "os-build"
# This is the dist release suffix used in the package release, eg. .fc34,
# .el8 etc. In a different branch this may be set to a fixed value.
DIST ?= $(shell $(RPMBUILD) --eval '%{?dist}')
# The branch used as upstream. This is what the upstream tarball is it
# should be tracked in a local branch. This would be "master" for the
# Linus master branch or linux-5.x.y for a stable branch. It can also be