Skip to content

Commit 9b63010

Browse files
author
CKI KWF Bot
committed
Merge: redhat: introduce RELEASE_LOCALVERSION variable
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7553 JIRA: INTERNAL Upstream Status: RHEL only Sometimes we run into situation where people forget to set proper localversion during official builds and end up with .test in NVR. Introduce a new variable to Makefile.variables, which will be persisted in source-git as well (contrast to localversion) and take priority when used for dist-rtg targets. The scenarios where we need custom localversion for official build should be very rare, meaning that the maintainer doesn't need to touch this variable and default (empty localversion) will be used instead of whatever may be left in 'localversion' (or DISTLOCALVERSION). Signed-off-by: Jan Stancek <jstancek@redhat.com> Approved-by: Scott Weaver <scweaver@redhat.com> Approved-by: Patrick Talbert <ptalbert@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>
2 parents 0243fa2 + 199ed6d commit 9b63010

26 files changed

+36
-0
lines changed

redhat/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ ifndef RHJOBS
9393
fi)
9494
endif
9595

96+
# for official builds use RELEASE_LOCALVERSION persisted in Makefile.variables
97+
ifneq ($(filter $(MAKECMDGOALS),dist-release dist-release-tag dist-release-git dist-rtg dist-get-tag),)
98+
DISTLOCALVERSION:=$(RELEASE_LOCALVERSION)
99+
ifeq (,$(findstring s,$(firstword -$(MAKEFLAGS))))
100+
$(info DISTLOCALVERSION is "$(DISTLOCALVERSION)".)
101+
endif
102+
else
96103
LOCVERFILE:=../localversion
97104
# create an empty localversion file if you don't want a local buildid
98105
ifneq ($(wildcard $(LOCVERFILE)),)
@@ -110,6 +117,7 @@ else
110117
endif
111118
$(info DISTLOCALVERSION is "$(DISTLOCALVERSION)".)
112119
endif
120+
endif # MAKECMDGOALS
113121

114122
# options for process_configs.sh script
115123
ifdef NO_CONFIGCHECKS

redhat/Makefile.variables

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ NO_CONFIGCHECKS ?=
114114
# considered stable and may be changed or removed without warning.
115115
RHSELFTESTDATA ?=
116116

117+
# Local version to be used for official (non-scratch) builds. Makefile
118+
# dist-{release/tag/git} targets will ignore localversion and DISTLOCALVERSION
119+
RELEASE_LOCALVERSION:=
120+
117121
# This variable is used by the redhat/self-tests. It should not be
118122
# considered stable and my be changed or removed without warning.
119123
RHDISTDATADIR ?=

redhat/self-test/data/centos-6161a435c191.el7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-0.rc4.6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-6161a435c191.fc25

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-0.rc4.6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-9f4ad9e425a1.el7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-9f4ad9e425a1.fc25

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-a5e13c6df0e4.el7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-0.rc5.6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-a5e13c6df0e4.fc25

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-0.rc5.6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-edc9dd1e3c31.el7

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

redhat/self-test/data/centos-edc9dd1e3c31.fc25

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c
4343
PROCESS_CONFIGS_OPTS=-n -w -c
4444
REDHAT=../redhat
4545
RELEASETAG=kernel-5.12.0-6.test
46+
RELEASE_LOCALVERSION=
4647
RHDISTGIT_BRANCH=c9s
4748
RHDISTGIT_USER="shadowman"
4849
RHEL_MAJOR=9

0 commit comments

Comments
 (0)