From: Jan Stancek on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386
This MR brings initial support for Gemini kernels, which will similar to ARK/ELN follow upstream, but with a different config set (not part of this MR). Main feature of these kernels is that they decouple RPM version from uname. This is controlled by new GEMINI variable, which is turned off by default for Fedora/ARK/ELN builds.
Signed-off-by: Jan Stancek jstancek@redhat.com
--- redhat/configs/generate_all_configs.sh | 2 +- redhat/scripts/genspec/genspec.sh | 2 + redhat/self-test/data/centos-2585cf9dfaad.el7 | 5 + redhat/self-test/data/centos-2585cf9dfaad.el7.spec | 2 + redhat/self-test/data/centos-2585cf9dfaad.fc25 | 5 + redhat/self-test/data/centos-2585cf9dfaad.fc25.spec | 2 + redhat/self-test/data/centos-78e36f3b0dae.el7 | 5 + redhat/self-test/data/centos-78e36f3b0dae.el7.spec | 2 + redhat/self-test/data/centos-78e36f3b0dae.fc25 | 5 + redhat/self-test/data/centos-78e36f3b0dae.fc25.spec | 2 + redhat/self-test/data/centos-df0cc57e057f.el7 | 5 + redhat/self-test/data/centos-df0cc57e057f.el7.spec | 2 + redhat/self-test/data/centos-df0cc57e057f.fc25 | 5 + redhat/self-test/data/centos-df0cc57e057f.fc25.spec | 2 + redhat/self-test/data/centos-fce15c45d3fb.el7 | 5 + redhat/self-test/data/centos-fce15c45d3fb.el7.spec | 2 + redhat/self-test/data/centos-fce15c45d3fb.fc25 | 5 + redhat/self-test/data/centos-fce15c45d3fb.fc25.spec | 2 + redhat/self-test/data/fedora-2585cf9dfaad.el7 | 5 + redhat/self-test/data/fedora-2585cf9dfaad.el7.spec | 2 + redhat/self-test/data/fedora-2585cf9dfaad.fc25 | 5 + redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec | 2 + redhat/self-test/data/fedora-78e36f3b0dae.el7 | 5 + redhat/self-test/data/fedora-78e36f3b0dae.el7.spec | 2 + redhat/self-test/data/fedora-78e36f3b0dae.fc25 | 5 + redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec | 2 + redhat/self-test/data/fedora-df0cc57e057f.el7 | 5 + redhat/self-test/data/fedora-df0cc57e057f.el7.spec | 2 + redhat/self-test/data/fedora-df0cc57e057f.fc25 | 5 + redhat/self-test/data/fedora-df0cc57e057f.fc25.spec | 2 + redhat/self-test/data/fedora-fce15c45d3fb.el7 | 5 + redhat/self-test/data/fedora-fce15c45d3fb.el7.spec | 2 + redhat/self-test/data/fedora-fce15c45d3fb.fc25 | 5 + redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec | 2 + redhat/self-test/data/rhel-2585cf9dfaad.el7 | 5 + redhat/self-test/data/rhel-2585cf9dfaad.el7.spec | 2 + redhat/self-test/data/rhel-2585cf9dfaad.fc25 | 5 + redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec | 2 + redhat/self-test/data/rhel-78e36f3b0dae.el7 | 5 + redhat/self-test/data/rhel-78e36f3b0dae.el7.spec | 2 + redhat/self-test/data/rhel-78e36f3b0dae.fc25 | 5 + redhat/self-test/data/rhel-78e36f3b0dae.fc25.spec | 2 + redhat/self-test/data/rhel-df0cc57e057f.el7 | 5 + redhat/self-test/data/rhel-df0cc57e057f.el7.spec | 2 + redhat/self-test/data/rhel-df0cc57e057f.fc25 | 5 + redhat/self-test/data/rhel-df0cc57e057f.fc25.spec | 2 + redhat/self-test/data/rhel-fce15c45d3fb.el7 | 5 + redhat/self-test/data/rhel-fce15c45d3fb.el7.spec | 2 + redhat/self-test/data/rhel-fce15c45d3fb.fc25 | 5 + redhat/self-test/data/rhel-fce15c45d3fb.fc25.spec | 2 + redhat/Makefile | 26 +++- redhat/Makefile.variables | 12 ++- redhat/kernel.spec.template | 108 ++++++++++++------- Makefile.rhelver | 13 ++ 54 files changed, 282 insertions(+), 49 deletions(-)
From: Jan Stancek jstancek@redhat.com
redhat: introduce GEMINI and RHEL_REBASE_NUM variable
Signed-off-by: Jan Stancek jstancek@redhat.com
diff --git a/Makefile.rhelver b/Makefile.rhelver index blahblah..blahblah 100644 --- a/Makefile.rhelver +++ b/Makefile.rhelver @@ -14,6 +14,19 @@ RHEL_MINOR = 99 # Do not trim this comment. RHEL_RELEASE = 42
+# +# RHEL_REBASE_NUM +# ---------------- +# +# Used in RPM version string for Gemini kernels, which dont use upstream +# VERSION/PATCHLEVEL/SUBLEVEL. The number represents rebase number for +# current MAJOR release. +# +# Use this spot to avoid future merge conflicts. +# Do not trim this comment. +RHEL_REBASE_NUM = 1 + + # # ZSTREAM # ------- diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables index blahblah..blahblah 100644 --- a/redhat/Makefile.variables +++ b/redhat/Makefile.variables @@ -125,6 +125,12 @@ RHJOBS ?= # considered stable and may be changed or removed without warning. RHSELFTESTDATA ?=
+# Use Gemini project versioning - $PACKAGE_NAME-A.B-C.$disttag +# A - major that introduced this kernel +# B - rebase number +# C - build number (X or X.Y.Z) +SPECGEMINI ?= 0 + # If set to 1, this variable will cause the kernel package build to fail if # the selftests fail to build. SPECSELFTESTS_MUST_BUILD ?= 0 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=2585cf9dfaad RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-0.rc5.6.test.el7 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=2585cf9dfaad RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-0.rc5.6.test.fc25 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7 b/redhat/self-test/data/centos-78e36f3b0dae.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.el7 +++ b/redhat/self-test/data/centos-78e36f3b0dae.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=78e36f3b0dae RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc0.78e36f3b0dae.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.17.0-0.rc0.78e36f3b0dae.6.test.el7 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25 b/redhat/self-test/data/centos-78e36f3b0dae.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.fc25 +++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=78e36f3b0dae RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc0.78e36f3b0dae.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.17.0-0.rc0.78e36f3b0dae.6.test.fc25 diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7 b/redhat/self-test/data/centos-df0cc57e057f.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-df0cc57e057f.el7 +++ b/redhat/self-test/data/centos-df0cc57e057f.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=df0cc57e057f RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-6.test.el7 diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25 b/redhat/self-test/data/centos-df0cc57e057f.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-df0cc57e057f.fc25 +++ b/redhat/self-test/data/centos-df0cc57e057f.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=df0cc57e057f RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-6.test.fc25 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7 b/redhat/self-test/data/centos-fce15c45d3fb.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-fce15c45d3fb.el7 +++ b/redhat/self-test/data/centos-fce15c45d3fb.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=fce15c45d3fb RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.fce15c45d3fb.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-0.rc5.fce15c45d3fb.6.test.el7 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25 b/redhat/self-test/data/centos-fce15c45d3fb.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-fce15c45d3fb.fc25 +++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=fce15c45d3fb RHJOBS=1 RHPKG_BIN=centpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.fce15c45d3fb.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-0.rc5.fce15c45d3fb.6.test.fc25 diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7 b/redhat/self-test/data/fedora-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-2585cf9dfaad.el7 +++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=2585cf9dfaad RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0 diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.fc25 b/redhat/self-test/data/fedora-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/fedora-2585cf9dfaad.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=2585cf9dfaad RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0 diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.el7 b/redhat/self-test/data/fedora-78e36f3b0dae.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-78e36f3b0dae.el7 +++ b/redhat/self-test/data/fedora-78e36f3b0dae.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=78e36f3b0dae RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc0.78e36f3b0dae.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.17.0 diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.fc25 b/redhat/self-test/data/fedora-78e36f3b0dae.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-78e36f3b0dae.fc25 +++ b/redhat/self-test/data/fedora-78e36f3b0dae.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=78e36f3b0dae RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc0.78e36f3b0dae.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.17.0 diff --git a/redhat/self-test/data/fedora-df0cc57e057f.el7 b/redhat/self-test/data/fedora-df0cc57e057f.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-df0cc57e057f.el7 +++ b/redhat/self-test/data/fedora-df0cc57e057f.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=df0cc57e057f RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0 diff --git a/redhat/self-test/data/fedora-df0cc57e057f.fc25 b/redhat/self-test/data/fedora-df0cc57e057f.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-df0cc57e057f.fc25 +++ b/redhat/self-test/data/fedora-df0cc57e057f.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=df0cc57e057f RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0 diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.el7 b/redhat/self-test/data/fedora-fce15c45d3fb.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-fce15c45d3fb.el7 +++ b/redhat/self-test/data/fedora-fce15c45d3fb.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=fce15c45d3fb RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.fce15c45d3fb.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0 diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.fc25 b/redhat/self-test/data/fedora-fce15c45d3fb.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/fedora-fce15c45d3fb.fc25 +++ b/redhat/self-test/data/fedora-fce15c45d3fb.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=fce15c45d3fb RHJOBS=1 RHPKG_BIN=fedpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.fce15c45d3fb.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0 diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.el7 b/redhat/self-test/data/rhel-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/rhel-2585cf9dfaad.el7 +++ b/redhat/self-test/data/rhel-2585cf9dfaad.el7 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=2585cf9dfaad RHJOBS=1 RHPKG_BIN=rhpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-0.rc5.6.test.el7 diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.fc25 b/redhat/self-test/data/rhel-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/rhel-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/rhel-2585cf9dfaad.fc25 @@ -59,6 +59,7 @@ RHDISTGIT_CACHE= RHDISTGIT_TMP=/tmp RHEL_MAJOR=9 RHEL_MINOR=99 +RHEL_REBASE_NUM=1 RHGITCOMMIT=2585cf9dfaad RHJOBS=1 RHPKG_BIN=rhpkg @@ -71,6 +72,7 @@ SPECBPFTOOLVERSION=7.2.0 SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECGEMINI=0 SPECINCLUDE_FEDORA_FILES=1 SPECINCLUDE_RHEL_FILES=1 SPECKABIVERSION=5.16.0-0.rc5.6.test.fc25
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386
From: Jan Stancek jstancek@redhat.com
redhat: separate RPM version from uname version
This defines new variables, which allow for RPMs and configs to have version and release, which is not tied to (upstream) kernel uname version.
For ARK/Fedora/ELN both remain identical - matching kernel uname.
Signed-off-by: Jan Stancek jstancek@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -218,13 +218,14 @@ endif # This can be evaluated as # # $(SPECPACKAGE_NAME)-$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL)-$(SPECBUILD) $(DIST) -# $(SPECPACKAGE_NAME)-$(SPECVERSION) -$(SPECBUILD) $(DIST) +# $(SPECPACKAGE_NAME)-$(SPECRPMVERSION) -$(SPECBUILD) $(DIST) # $(SPECPACKAGE_NAME)-$(BASEVERSION) $(DIST) # $(RELEASETAG) $(DIST) # SPECBUILD:=$(UPSTREAMBUILD)$(BUILD)$(DISTLOCALVERSION) SPECVERSION:=$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL) -BASEVERSION:=$(SPECVERSION)-$(SPECBUILD) +SPECRPMVERSION:=$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL) +BASEVERSION:=$(SPECRPMVERSION)-$(SPECBUILD) RELEASETAG:=$(SPECPACKAGE_NAME)-$(BASEVERSION) SRPM:=$(SRPMS)/$(RELEASETAG)$(DIST).src.rpm
@@ -241,7 +242,7 @@ ifeq ("$(DISTRO)", "fedora") # replace the tarball from one with upstream, rebuild, and then deploy # without changing anything else in the specfile. SPECTARFILE_RELEASE:=$(UPSTREAM_TARBALL_NAME) - SPECKABIVERSION:=$(SPECVERSION) + SPECKABIVERSION:=$(SPECRPMVERSION) DISTRELEASETAG:=$(RELEASETAG) DISTBASEVERSION:=$(BASEVERSION) RHPKG_BIN:=fedpkg @@ -503,11 +504,11 @@ dist-kabi-dw-check: dist-kabi
dist-configs-commit: dist-configs-prep +@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\ - ./process_configs.sh -z "$(SPECVERSION)" "$(FLAVOR)" + ./process_configs.sh -z "$(SPECRPMVERSION)" "$(FLAVOR)"
dist-configs: dist-configs-prep +@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\ - ./process_configs.sh $(PROCESS_CONFIGS_OPTS) "$(SPECVERSION)" "" + ./process_configs.sh $(PROCESS_CONFIGS_OPTS) "$(SPECRPMVERSION)" ""
dist-fedora-configs: FLAVOR = fedora dist-fedora-configs: dist-configs diff --git a/redhat/configs/generate_all_configs.sh b/redhat/configs/generate_all_configs.sh index blahblah..blahblah 100755 --- a/redhat/configs/generate_all_configs.sh +++ b/redhat/configs/generate_all_configs.sh @@ -22,7 +22,7 @@ fi # The +1 is to remove the - at the end of the SPECPACKAGE_NAME string specpackage_name_len=$((${#SPECPACKAGE_NAME} + 1)) for i in ${SPECPACKAGE_NAME}*-"$FLAVOR".config; do - NEW=${SPECPACKAGE_NAME}-"$SPECVERSION"-$(echo ${i:$specpackage_name_len} | sed s/-"$FLAVOR"//) + NEW=${SPECPACKAGE_NAME}-"$SPECRPMVERSION"-$(echo ${i:$specpackage_name_len} | sed s/-"$FLAVOR"//) mv "$i" "$NEW" done
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -141,6 +141,7 @@ Summary: The Linux kernel # the --with-release option overrides this setting.) %define debugbuildsenabled 1 %%SPECBUILDID%% +%define specrpmversion %%SPECRPMVERSION%% %define specversion %%SPECVERSION%% %define patchversion %%SPECKVERSION%%.%%SPECKPATCHLEVEL%% %define pkgrelease %%SPECBUILD%% @@ -318,7 +319,7 @@ Summary: The Linux kernel %define make_target bzImage %define image_install_path boot
-%define KVERREL %{version}-%{release}.%{_target_cpu} +%define KVERREL %{specversion}-%{release}.%{_target_cpu} %define KVERREL_RE %(echo %KVERREL | sed 's/+/[+]/g') %define hdrarch %_target_cpu %define asmarch %_target_cpu @@ -427,7 +428,7 @@ Summary: The Linux kernel %define with_bpftool 0 %define with_selftests 0 %define with_debug 0 -%define all_arch_configs %{name}-%{version}-*.config +%define all_arch_configs %{name}-%{specrpmversion}-*.config %endif
# sparse blows up on ppc @@ -450,13 +451,13 @@ Summary: The Linux kernel %ifarch i686 %define asmarch x86 %define hdrarch i386 -%define all_arch_configs %{name}-%{version}-i?86*.config +%define all_arch_configs %{name}-%{specrpmversion}-i?86*.config %define kernel_image arch/x86/boot/bzImage %endif
%ifarch x86_64 %define asmarch x86 -%define all_arch_configs %{name}-%{version}-x86_64*.config +%define all_arch_configs %{name}-%{specrpmversion}-x86_64*.config %define kernel_image arch/x86/boot/bzImage %endif
@@ -467,19 +468,19 @@ Summary: The Linux kernel %define kernel_image vmlinux %define kernel_image_elf 1 %define use_vdso 0 -%define all_arch_configs %{name}-%{version}-ppc64le*.config +%define all_arch_configs %{name}-%{specrpmversion}-ppc64le*.config %endif
%ifarch s390x %define asmarch s390 %define hdrarch s390 -%define all_arch_configs %{name}-%{version}-s390x.config +%define all_arch_configs %{name}-%{specrpmversion}-s390x.config %define kernel_image arch/s390/boot/bzImage %define vmlinux_decompressor arch/s390/boot/vmlinux %endif
%ifarch %{arm} -%define all_arch_configs %{name}-%{version}-arm*.config +%define all_arch_configs %{name}-%{specrpmversion}-arm*.config %define skip_nonpae_vdso 1 %define asmarch arm %define hdrarch arm @@ -498,7 +499,7 @@ Summary: The Linux kernel %endif
%ifarch aarch64 -%define all_arch_configs %{name}-%{version}-aarch64*.config +%define all_arch_configs %{name}-%{specrpmversion}-aarch64*.config %define asmarch arm64 %define hdrarch arm64 %define make_target vmlinuz.efi @@ -581,7 +582,7 @@ Summary: The Linux kernel Name: %{package_name} License: GPLv2 and Redistributable, no modification permitted URL: https://www.kernel.org/ -Version: %{specversion} +Version: %{specrpmversion} Release: %{pkg_release} # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD @@ -924,7 +925,7 @@ The kernel meta package %if %{-o:0}%{!-o:1}\ Provides: kernel = %{specversion}-%{pkg_release}\ %endif\ -Provides: kernel-%{_target_cpu} = %{specversion}-%{pkg_release}%{?1:+%{1}}\ +Provides: kernel-%{_target_cpu} = %{specrpmversion}-%{pkg_release}%{?1:+%{1}}\ Provides: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires(pre): %{kernel_prereq}\ @@ -996,7 +997,7 @@ of the Linux kernel.
%package -n perf-debuginfo Summary: Debug information for package perf -Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release} +Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specrpmversion}-%{release} AutoReqProv: no %description -n perf-debuginfo This package provides debug information for the perf package. @@ -1016,7 +1017,7 @@ to manipulate perf events.
%package -n python3-perf-debuginfo Summary: Debug information for package perf python bindings -Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release} +Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specrpmversion}-%{release} AutoReqProv: no %description -n python3-perf-debuginfo This package provides debug information for the perf python bindings. @@ -1039,7 +1040,7 @@ Provides: cpufrequtils = 1:009-0.6.p1 Obsoletes: cpufreq-utils < 1:009-0.6.p1 Obsoletes: cpufrequtils < 1:009-0.6.p1 Obsoletes: cpuspeed < 1:1.5-16 -Requires: %{package_name}-tools-libs = %{version}-%{release} +Requires: %{package_name}-tools-libs = %{specrpmversion}-%{release} %endif %define __requires_exclude ^%{_bindir}/python %description -n %{package_name}-tools @@ -1108,7 +1109,7 @@ manipulation of eBPF programs and maps. Summary: Debug information for package bpftool Version: %{bpftoolversion} Group: Development/Debug -Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specversion}-%{release} +Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specrpmversion}-%{release} AutoReqProv: no %description -n bpftool-debuginfo This package provides debug information for the bpftool package. @@ -1117,7 +1118,7 @@ This package provides debug information for the bpftool package.
# Setting "Version:" above overrides the internal {version} macro, # need to restore it here -%define version %{specversion} +%define version %{specrpmversion}
# with_bpftool %endif @@ -1177,8 +1178,8 @@ Linux kernel, suitable for the kabi-dw tool. %define kernel_debuginfo_package() \ %package %{?1:%{1}-}debuginfo\ Summary: Debug information for package %{name}%{?1:-%{1}}\ -Requires: %{name}-debuginfo-common-%{_target_cpu} = %{version}-%{release}\ -Provides: %{name}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{version}-%{release}\ +Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: %{name}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{specrpmversion}-%{release}\ Provides: installonlypkg(kernel)\ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ @@ -1194,8 +1195,8 @@ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ %define kernel_devel_package(m) \ %package %{?1:%{1}-}devel\ Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\ -Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel-devel-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: kernel-devel-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\ Provides: kernel-devel-uname-r = %{KVERREL}%{?1:+%{1}}\ Provides: installonlypkg(kernel)\ AutoReqProv: no\ @@ -1224,8 +1225,8 @@ against the %{?2:%{2} }kernel package.\ %define kernel_devel_matched_package(m) \ %package %{?1:%{1}-}devel-matched\ Summary: Meta package to install matching core and devel packages for a given %{?2:%{2} }kernel\ -Requires: %{package_name}%{?1:-%{1}}-devel = %{version}-%{release}\ -Requires: %{package_name}%{?1:-%{1}}-core = %{version}-%{release}\ +Requires: %{package_name}%{?1:-%{1}}-devel = %{specrpmversion}-%{release}\ +Requires: %{package_name}%{?1:-%{1}}-core = %{specrpmversion}-%{release}\ %description %{?1:%{1}-}devel-matched\ This meta package is used to install matching core and devel packages for a given %{?2:%{2} }kernel.\ %{nil} @@ -1250,9 +1251,9 @@ This package provides *.ipa-clones files.\ %package %{?1:%{1}-}modules-internal\ Summary: Extra kernel modules to match the %{?2:%{2} }kernel\ Group: System Environment/Kernel\ -Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ -Provides: kernel%{?1:-%{1}}-modules-internal = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: kernel%{?1:-%{1}}-modules-internal-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-internal = %{specrpmversion}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ Provides: kernel%{?1:-%{1}}-modules-internal-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ @@ -1271,9 +1272,9 @@ This package provides kernel modules for the %{?2:%{2} }kernel package for Red H %define kernel_modules_extra_package(m) \ %package %{?1:%{1}-}modules-extra\ Summary: Extra kernel modules to match the %{?2:%{2} }kernel\ -Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ -Provides: kernel%{?1:-%{1}}-modules-extra = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: kernel%{?1:-%{1}}-modules-extra-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-extra = %{specrpmversion}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ Provides: kernel%{?1:-%{1}}-modules-extra-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ @@ -1295,9 +1296,9 @@ This package provides less commonly used kernel modules for the %{?2:%{2} }kerne %define kernel_modules_package(m) \ %package %{?1:%{1}-}modules\ Summary: kernel modules to match the %{?2:%{2}-}core kernel\ -Provides: kernel%{?1:-%{1}}-modules-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel-modules-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ -Provides: kernel-modules = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: kernel-modules-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\ +Provides: kernel-modules = %{specrpmversion}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ Provides: kernel%{?1:-%{1}}-modules-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ @@ -1318,9 +1319,9 @@ This package provides commonly used kernel modules for the %{?2:%{2}-}core kerne %define kernel_modules_core_package(m) \ %package %{?1:%{1}-}modules-core\ Summary: Core kernel modules to match the %{?2:%{2}-}core kernel\ -Provides: kernel%{?1:-%{1}}-modules-core-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel-modules-core-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ -Provides: kernel-modules-core = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-core-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: kernel-modules-core-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\ +Provides: kernel-modules-core = %{specrpmversion}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ Provides: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ @@ -1395,9 +1396,9 @@ Requires: kernel%{?1:-%{1}}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\ %package %{?1:%{1}-}modules-partner\ Summary: Extra kernel modules to match the %{?2:%{2} }kernel\ Group: System Environment/Kernel\ -Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{version}-%{release}\ -Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{version}-%{release}%{?1:+%{1}}\ -Provides: kernel%{?1:-%{1}}-modules-partner = %{version}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{specrpmversion}-%{release}\ +Provides: kernel%{?1:-%{1}}-modules-partner-%{_target_cpu} = %{specrpmversion}-%{release}%{?1:+%{1}}\ +Provides: kernel%{?1:-%{1}}-modules-partner = %{specrpmversion}-%{release}%{?1:+%{1}}\ Provides: installonlypkg(kernel-module)\ Provides: kernel%{?1:-%{1}}-modules-partner-uname-r = %{KVERREL}%{?1:+%{1}}\ Requires: kernel-uname-r = %{KVERREL}%{?1:+%{1}}\ @@ -1539,7 +1540,7 @@ ApplyOptionalPatch linux-kernel-test.patch # Any further pre-build tree manipulations happen here.
chmod +x scripts/checkpatch.pl -mv COPYING COPYING-%{version}-%{release} +mv COPYING COPYING-%{specrpmversion}-%{release}
# Mangle /usr/bin/python shebangs to /usr/bin/python3 # Mangle all Python shebangs to be Python 3 explicitly @@ -1576,7 +1577,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -FLAVOR=%{primary_target} SPECPACKAGE_NAME=%{name} SPECVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled} +FLAVOR=%{primary_target} SPECPACKAGE_NAME=%{name} SPECVERSION=%{specversion} SPECRPMVERSION=%{specrpmversion} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches @@ -1634,7 +1635,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -RHJOBS=$RPM_BUILD_NCPUS SPECPACKAGE_NAME=%{name} ./process_configs.sh $OPTS %{specversion} +RHJOBS=$RPM_BUILD_NCPUS SPECPACKAGE_NAME=%{name} ./process_configs.sh $OPTS %{specrpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} @@ -1699,10 +1700,10 @@ InitBuildVars() { Variant=$1
# Pick the right kernel config file - Config=%{name}-%{version}-%{_target_cpu}${Variant:+-${Variant}}.config + Config=%{name}-%{specrpmversion}-%{_target_cpu}${Variant:+-${Variant}}.config DevelDir=/usr/src/kernels/%{KVERREL}${Variant:++${Variant}}
- KernelVer=%{version}-%{release}.%{_target_cpu}${Variant:++${Variant}} + KernelVer=%{specversion}-%{release}.%{_target_cpu}${Variant:++${Variant}}
# make sure EXTRAVERSION says what we want it to say # Trim the release if this is a CI build, since KERNELVERSION is limited to 64 characters diff --git a/redhat/scripts/genspec/genspec.sh b/redhat/scripts/genspec/genspec.sh index blahblah..blahblah 100755 --- a/redhat/scripts/genspec/genspec.sh +++ b/redhat/scripts/genspec/genspec.sh @@ -54,6 +54,7 @@ test -f "$SOURCES/$SPECFILE" && s/%%SPECINCLUDE_RHEL_FILES%%/$SPECINCLUDE_RHEL_FILES/ s/%%SPECPATCHLIST_CHANGELOG%%/$SPECPATCHLIST_CHANGELOG/ s/%%SPECVERSION%%/$SPECVERSION/ + s/%%SPECRPMVERSION%%/$SPECRPMVERSION/ s/%%SPECKABIVERSION%%/$SPECKABIVERSION/ s/%%SPECBPFTOOLVERSION%%/$SPECBPFTOOLVERSION/ s/%%SPECTARFILE_RELEASE%%/$SPECTARFILE_RELEASE/ diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.16.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test.el7 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.16.0 %define specversion 5.16.0 %define patchversion 5.16 %define pkgrelease 0.rc5.6.test diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.16.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test.fc25 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.16.0 %define specversion 5.16.0 %define patchversion 5.16 %define pkgrelease 0.rc5.6.test diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7 b/redhat/self-test/data/centos-78e36f3b0dae.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.el7 +++ b/redhat/self-test/data/centos-78e36f3b0dae.el7 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.17.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.17.0-0.rc0.78e36f3b0dae.6.test.el7 SPECVERSION=5.17.0 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec +++ b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.17.0 %define specversion 5.17.0 %define patchversion 5.17 %define pkgrelease 0.rc0.78e36f3b0dae.6.test diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25 b/redhat/self-test/data/centos-78e36f3b0dae.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.fc25 +++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.17.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.17.0-0.rc0.78e36f3b0dae.6.test.fc25 SPECVERSION=5.17.0 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec +++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.17.0 %define specversion 5.17.0 %define patchversion 5.17 %define pkgrelease 0.rc0.78e36f3b0dae.6.test diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7 b/redhat/self-test/data/centos-df0cc57e057f.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-df0cc57e057f.el7 +++ b/redhat/self-test/data/centos-df0cc57e057f.el7 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.16.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-6.test.el7 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7.spec b/redhat/self-test/data/centos-df0cc57e057f.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-df0cc57e057f.el7.spec +++ b/redhat/self-test/data/centos-df0cc57e057f.el7.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.16.0 %define specversion 5.16.0 %define patchversion 5.16 %define pkgrelease 6.test diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25 b/redhat/self-test/data/centos-df0cc57e057f.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-df0cc57e057f.fc25 +++ b/redhat/self-test/data/centos-df0cc57e057f.fc25 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.16.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-6.test.fc25 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25.spec b/redhat/self-test/data/centos-df0cc57e057f.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-df0cc57e057f.fc25.spec +++ b/redhat/self-test/data/centos-df0cc57e057f.fc25.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.16.0 %define specversion 5.16.0 %define patchversion 5.16 %define pkgrelease 6.test diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7 b/redhat/self-test/data/centos-fce15c45d3fb.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-fce15c45d3fb.el7 +++ b/redhat/self-test/data/centos-fce15c45d3fb.el7 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.16.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.fce15c45d3fb.6.test.el7 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7.spec b/redhat/self-test/data/centos-fce15c45d3fb.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-fce15c45d3fb.el7.spec +++ b/redhat/self-test/data/centos-fce15c45d3fb.el7.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.16.0 %define specversion 5.16.0 %define patchversion 5.16 %define pkgrelease 0.rc5.fce15c45d3fb.6.test diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25 b/redhat/self-test/data/centos-fce15c45d3fb.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-fce15c45d3fb.fc25 +++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25 @@ -82,6 +82,7 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPMVERSION=5.16.0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.fce15c45d3fb.6.test.fc25 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec b/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec +++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec @@ -4,6 +4,7 @@ %global patchlist_changelog 0 %global released_kernel 0 %define buildid .test +%define specrpmversion 5.16.0 %define specversion 5.16.0 %define patchversion 5.16 %define pkgrelease 0.rc5.fce15c45d3fb.6.test
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386
From: Jan Stancek jstancek@redhat.com
redhat: introduce Gemini versioning
Gemini kernels won't use uname in RPM version-release, instead they'll use RHEL_MAJOR and RHEL_REBASE_NUM.
The RPM NVR will be $PACKAGE_NAME-A.B-C.$disttag, with A and B reflecting two RHEL variables mentioned above, and C being a monotonic counter.
Signed-off-by: Jan Stancek jstancek@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -46,6 +46,14 @@ SPECKVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^VERSION\ =\ /{s/ SPECKPATCHLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^PATCHLEVEL\ =\ /{s///;p;q}') SPECKSUBLEVEL:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^SUBLEVEL\ =\ /{s///;p;q}') SPECKEXTRAVERSION:=$(shell $(GIT) show $(HEAD):Makefile | sed -ne '/^EXTRAVERSION\ =\ /{s///;p;q}') + +SPECRVERSION:=$(shell echo $$(( $(RHEL_MAJOR) - 9 ))) +SPECRPATCHLEVEL:=$(RHEL_REBASE_NUM) + +ifneq ($(SPECGEMINI),0) + SPECKEXTRAVERSION:= +endif + GITID:= $(shell $(GIT) log --max-count=1 --pretty=format:%H $(HEAD)) ifndef RHSELFTESTDATA BUILD:=$(RHEL_RELEASE) @@ -222,9 +230,16 @@ endif # $(SPECPACKAGE_NAME)-$(BASEVERSION) $(DIST) # $(RELEASETAG) $(DIST) # +# Gemini kernels override RPM NVR to: +# $(SPECPACKAGE_NAME)-$(SPECRVERSION).$(SPECRPATCHLEVEL)-$(SPECBUILD) $(DIST) +# SPECBUILD:=$(UPSTREAMBUILD)$(BUILD)$(DISTLOCALVERSION) SPECVERSION:=$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL) -SPECRPMVERSION:=$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL) +ifeq ($(SPECGEMINI),0) + SPECRPMVERSION:=$(SPECKVERSION).$(SPECKPATCHLEVEL).$(SPECKSUBLEVEL) +else + SPECRPMVERSION:=$(SPECRVERSION).$(SPECRPATCHLEVEL) +endif BASEVERSION:=$(SPECRPMVERSION)-$(SPECBUILD) RELEASETAG:=$(SPECPACKAGE_NAME)-$(BASEVERSION) SRPM:=$(SRPMS)/$(RELEASETAG)$(DIST).src.rpm diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables index blahblah..blahblah 100644 --- a/redhat/Makefile.variables +++ b/redhat/Makefile.variables @@ -149,7 +149,11 @@ UPSTREAM_BRANCH ?= master # If VERSION_ON_UPSTREAM is set, the versioning of the rpm package is based # on a branch tracking upstream. This allows for generating rpms # based on untagged releases. -VERSION_ON_UPSTREAM:=1 +ifeq ($(SPECGEMINI),0) + VERSION_ON_UPSTREAM:=1 +else + VERSION_ON_UPSTREAM:=0 +endif
# Builds may include a s390x+zfcpdump arch build, which results in the build # failing because the UTS_RELEASE field exceeded 64 chars. This variable can diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -122,6 +122,7 @@ Summary: The Linux kernel
# kernel package name %global package_name %%SPECPACKAGE_NAME%% +%global gemini %%SPECGEMINI%% # Include Fedora files %global include_fedora %%SPECINCLUDE_FEDORA_FILES%% # Include RHEL files diff --git a/redhat/scripts/genspec/genspec.sh b/redhat/scripts/genspec/genspec.sh index blahblah..blahblah 100755 --- a/redhat/scripts/genspec/genspec.sh +++ b/redhat/scripts/genspec/genspec.sh @@ -59,6 +59,7 @@ test -f "$SOURCES/$SPECFILE" && s/%%SPECBPFTOOLVERSION%%/$SPECBPFTOOLVERSION/ s/%%SPECTARFILE_RELEASE%%/$SPECTARFILE_RELEASE/ s/%%SPECPACKAGE_NAME%%/$SPECPACKAGE_NAME/ + s/%%SPECGEMINI%%/$SPECGEMINI/ s/%%SPECSELFTESTS_MUST_BUILD%%/$SPECSELFTESTS_MUST_BUILD/" "$SOURCES/$SPECFILE" test -n "$RHSELFTESTDATA" && test -f "$SOURCES/$SPECFILE" && sed -i -e " /%%SPECCHANGELOG%%/r $SOURCES/$SPECCHANGELOG diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7 b/redhat/self-test/data/centos-2585cf9dfaad.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7 +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.16.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test.el7 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/centos-2585cf9dfaad.el7.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25 b/redhat/self-test/data/centos-2585cf9dfaad.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25 +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.16.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test.fc25 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec +++ b/redhat/self-test/data/centos-2585cf9dfaad.fc25.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7 b/redhat/self-test/data/centos-78e36f3b0dae.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.el7 +++ b/redhat/self-test/data/centos-78e36f3b0dae.el7 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.17.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.17.0-0.rc0.78e36f3b0dae.6.test.el7 SPECVERSION=5.17.0 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-78e36f3b0dae.el7.spec +++ b/redhat/self-test/data/centos-78e36f3b0dae.el7.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25 b/redhat/self-test/data/centos-78e36f3b0dae.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-78e36f3b0dae.fc25 +++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.17.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.17.0-0.rc0.78e36f3b0dae.6.test.fc25 SPECVERSION=5.17.0 diff --git a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec +++ b/redhat/self-test/data/centos-78e36f3b0dae.fc25.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7 b/redhat/self-test/data/centos-df0cc57e057f.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-df0cc57e057f.el7 +++ b/redhat/self-test/data/centos-df0cc57e057f.el7 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.16.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-6.test.el7 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-df0cc57e057f.el7.spec b/redhat/self-test/data/centos-df0cc57e057f.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-df0cc57e057f.el7.spec +++ b/redhat/self-test/data/centos-df0cc57e057f.el7.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25 b/redhat/self-test/data/centos-df0cc57e057f.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-df0cc57e057f.fc25 +++ b/redhat/self-test/data/centos-df0cc57e057f.fc25 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.16.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-6.test.fc25 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-df0cc57e057f.fc25.spec b/redhat/self-test/data/centos-df0cc57e057f.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-df0cc57e057f.fc25.spec +++ b/redhat/self-test/data/centos-df0cc57e057f.fc25.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7 b/redhat/self-test/data/centos-fce15c45d3fb.el7 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-fce15c45d3fb.el7 +++ b/redhat/self-test/data/centos-fce15c45d3fb.el7 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.16.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.fce15c45d3fb.6.test.el7 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.el7.spec b/redhat/self-test/data/centos-fce15c45d3fb.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-fce15c45d3fb.el7.spec +++ b/redhat/self-test/data/centos-fce15c45d3fb.el7.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25 b/redhat/self-test/data/centos-fce15c45d3fb.fc25 index blahblah..blahblah 100644 --- a/redhat/self-test/data/centos-fce15c45d3fb.fc25 +++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25 @@ -82,7 +82,9 @@ SPECKSUBLEVEL=0 SPECKVERSION=5 SPECPACKAGE_NAME=kernel SPECRELEASED_KERNEL=0 +SPECRPATCHLEVEL=1 SPECRPMVERSION=5.16.0 +SPECRVERSION=0 SPECSELFTESTS_MUST_BUILD=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.fce15c45d3fb.6.test.fc25 SPECVERSION=5.16.0 diff --git a/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec b/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec +++ b/redhat/self-test/data/centos-fce15c45d3fb.fc25.spec @@ -1,4 +1,5 @@ %global package_name kernel +%global gemini 0 %global include_fedora 1 %global include_rhel 1 %global patchlist_changelog 0
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386
From: Jan Stancek jstancek@redhat.com
kernel.spec: Gemini: fix header provides for upgrade path
There are 2 issues related to headers built with non-default SPECPACKAGE_NAME: 1. kernel headers are needed by glibc and few other packages 2. there's a conflict in upgrade path of kernel-headers package
To address these, make Gemini headers also provide 'kernel-headers', and obsolete any previous kernel-headers.
Signed-off-by: Jan Stancek jstancek@redhat.com
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -963,6 +963,10 @@ options that can be passed to Linux kernel modules at load time. Summary: Header files for the Linux kernel for use by glibc Obsoletes: glibc-kernheaders < 3.0-46 Provides: glibc-kernheaders = 3.0-46 +%if 0%{?gemini} +Provides: kernel-headers = %{specversion}-%{release} +Obsoletes: kernel-headers < %{specversion} +%endif %description headers Kernel-headers includes the C header files that specify the interface between the Linux kernel and userspace libraries and programs. The @@ -972,6 +976,10 @@ glibc package.
%package cross-headers Summary: Header files for the Linux kernel for use by cross-glibc +%if 0%{?gemini} +Provides: kernel-cross-headers = %{specversion}-%{release} +Obsoletes: kernel-cross-headers < %{specversion} +%endif %description cross-headers Kernel-cross-headers includes the C header files that specify the interface between the Linux kernel and userspace libraries and programs. The @@ -979,7 +987,6 @@ header files define structures and constants that are needed for building most standard programs and are also needed for rebuilding the cross-glibc package.
- %package debuginfo-common-%{_target_cpu} Summary: Kernel source files used by %{name}-debuginfo packages Provides: installonlypkg(kernel)
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386
From: Jan Stancek jstancek@redhat.com
kernel.spec: Gemini: add Epoch to perf and rtla subpackages
To provide an upgrade path for Gemini kernels (where RPM version and release can now be 'lower' than previously used uname version), add epoch to version of these packages.
Signed-off-by: Jan Stancek jstancek@redhat.com
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -996,6 +996,9 @@ It provides the kernel source files common to all builds.
%if %{with_perf} %package -n perf +%if 0%{gemini} +Epoch: %{gemini} +%endif Summary: Performance monitoring for the Linux kernel Requires: bzip2 License: GPLv2 @@ -1004,6 +1007,9 @@ This package contains the perf tool, which enables performance monitoring of the Linux kernel.
%package -n perf-debuginfo +%if 0%{gemini} +Epoch: %{gemini} +%endif Summary: Debug information for package perf Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specrpmversion}-%{release} AutoReqProv: no @@ -1017,6 +1023,9 @@ This package provides debug information for the perf package. %{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/perf(.debug)?|.*%%{_libexecdir}/perf-core/.*|.*%%{_libdir}/libperf-jvmti.so(.debug)?|XXX' -o perf-debuginfo.list}
%package -n python3-perf +%if 0%{gemini} +Epoch: %{gemini} +%endif Summary: Python bindings for apps which will manipulate perf events %description -n python3-perf The python3-perf package contains a module that permits applications @@ -1024,6 +1033,9 @@ written in the Python programming language to use the interface to manipulate perf events.
%package -n python3-perf-debuginfo +%if 0%{gemini} +Epoch: %{gemini} +%endif Summary: Debug information for package perf python bindings Requires: %{name}-debuginfo-common-%{_target_cpu} = %{specrpmversion}-%{release} AutoReqProv: no @@ -1090,6 +1102,9 @@ This package provides debug information for package %{package_name}-tools. %{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} -p '.*%%{_bindir}/centrino-decode(.debug)?|.*%%{_bindir}/powernow-k8-decode(.debug)?|.*%%{_bindir}/cpupower(.debug)?|.*%%{_libdir}/libcpupower.*|.*%%{_bindir}/turbostat(.debug)?|.*%%{_bindir}/x86_energy_perf_policy(.debug)?|.*%%{_bindir}/tmon(.debug)?|.*%%{_bindir}/lsgpio(.debug)?|.*%%{_bindir}/gpio-hammer(.debug)?|.*%%{_bindir}/gpio-event-mon(.debug)?|.*%%{_bindir}/gpio-watch(.debug)?|.*%%{_bindir}/iio_event_monitor(.debug)?|.*%%{_bindir}/iio_generic_buffer(.debug)?|.*%%{_bindir}/lsiio(.debug)?|.*%%{_bindir}/intel-speed-select(.debug)?|.*%%{_bindir}/page_owner_sort(.debug)?|.*%%{_bindir}/slabinfo(.debug)?|.*%%{_sbindir}/intel_sdsi(.debug)?|XXX' -o %{package_name}-tools-debuginfo.list}
%package -n rtla +%if 0%{gemini} +Epoch: %{gemini} +%endif Summary: RTLA: Real-Time Linux Analysis tools %description -n rtla The rtla tool is a meta-tool that includes a set of commands that
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1340687...
Note: There is a fedoraproject.org article in works to provide more info about Gemini kernels. We are hoping to have it out at the end of week or early next week.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341161...
@jstancek, can you provide an example command line that you used to build the new RPMs?
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341172...
@jstancek - so for rhel-9.6 we can expect a kernel package name to be 'kernel- redhat-0.1.x.el9'? Does anyone intuitively trust a version of 0.X? Should we start at 1? Just a nitpick. Or is that a later adjustment?
Second, I would propose ELN set GEMINI to 1. That is kinda the spirit of ELN and RHEL-10 I think. Rawhide would stay with traditional uname. Unless you want to avoid that until the infra is ready?
Then if the second point makes sense, the idea of of separate GEMINI variable is unnecessary and the spec variable 'rhel' can be used I believe. A little aggressive, but.. simplifies that patch set a bit.
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341177...
Also by using RHEL_MAJOR you have packages kernel-redhat-0.1.x.el9 and kenrel- redhat-1.1.x.el10 which are basically identical other than configs. What are the customer expectations here? Will they think a 1.1.x kernel has more features than a 0.1.x kernel even though the source-git is the same? I know it helps with rhel-10.5/6 rebase. Just curious if the version scheme was approved internally.
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341181...
What are the customer expectations here? Will they think a 1.1.x kernel has
more features than a 0.1.x kernel even though the source-git is the same?
Certainly RHEL and Fedora are different, but I would expect a lot of RHEL administrators are also Fedora users. We have been doing this for years due to upgrade issues. Right now F36 kernels are 100.fc36 F37 are 200.fc37 and F38 are 300.f38. When F36 is EOL and we rebase stable Fedora to 6.3 kernels, F37 will become 100.fc37.
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341204...
``` make DISTRO=rhel DIST=.el9 DISTLOCALVERSION='' SPECGEMINI=1 SPECPACKAGE_NAME=kernel-redhat dist-srpm ```
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341214...
When we come to RHEL10, RHEL_MAJOR will be set to 10, so the version will be 1.X. That will apply for both 9.6 and 10.1, with one difference: dist-tag. So yes, that would fall to later (auto)adjustment, when we fork RHEL10.
I'd wait a bit with changing ELN, until we have other components ready for this change (at least anaconda, so composes are installable/usable).
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341216...
kernel-redhat-0.1.x.el9 and kenrel-redhat-1.1.x.el10
No, that's not correct. There will be a kernel-redhat-1.1.x.el9 and kenrel- redhat-1.1.x.el10. The name and version will be identical between the two. There will be a difference in the release with el9 and el10.
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341223...
I don't know exactly what upgrade methods RHEL supports, but there is a possible problem in that dnf doesn't consider kernel-redhat-1.1.x.el9 to be a different version than kernel-redhat-1.1.x.el10, meaning an upgrade using dnf would likely leave the el9 kernel on the system and not install the el10 version at all. Of course once 1.2 kernels are available, it would switch the the el10 version. This was the reasoning for the versioning split in Fedora at least.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341229...
You cannot mix and match kernels from different OSes in RHEL. We're very clear about that and have a 'cherry pick' policy stated here https://access.redhat.com/articles/54483
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341230...
:thumbsup_tone3:
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341240...
This has nothing to do with support, and everything to do with what dnf automatically does when presented with 2 version strings. At least it used to be, the dist wasn't part of the comparison, so to dnf kernel-redhat-1.1.x.el9 *is* kernel-redhat-1.1.x.el10. If that is no longer the case, or if RHEL has some other mechanism to force package upgrades on dist upgrade, that is fine.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341264...
I don't understand then. How is someone going to end up with both a .el9 and .el10 kernel in the same repository?
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341279...
It only happens when I user is running el9 and decides to upgrade to el10. The upgrade would skip installing the el10 kernel as that version is already installed. When the next kernel upgrade happens, the system would move to an el10 kernel because it is a newer version.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341291...
Hrm. I could swear we looked into that scenario and came away with that upgrades would continue to work. We could be wrong though. I'll reach out to the rpm & dnf teams for clarification but that shouldn't block this MR.
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341362...
This is also something LEAP tests for and would catch if it is a problem. I am curious too. Though I thought fedora upgrades would have the same problem though? You update to latest f3x packages, then upgrade to f3x+1 package (many would have same NVR I think).
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341364...
@prarit - ah ok. I misunderstood how the version worked. maximum rhel version wasn't obvious to me what that meant. It makes sense.
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341370...
It is a problem for Fedora upgrades, which is why we have kernel-6.2.9-100.fc36, kernel-6.2.9-200.fc37, and kernel-6.2.9-300.fc38
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341639...
@prarit I think Justin raised a good point. It's not only when version is the same. Consider when someone goes from 9.8 to 10.1, isn't the version in 10.1 going to be lower than the one in 9.8? Or do we require for upgrades to use latest minor of RHEL you are upgrading to?
From: Thorsten Leemhuis on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1341653...
the dist wasn't part of the comparison
@jmflinuxtx are you sure you remember this right? I thought the whole point of the dist tag is to make it the evr higher for rpm/dnf on upgrades. Wasn't the real problem that we sometimes had situation where we had to ship a fixup release in an older distro, but not in the newer one and thus ended with something kernel-6.2.9-2.fc36 and kernel-6.2.9-1.fc37, which then (obviously) resulted in problems on updates?
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342252...
@jstancek, it may be that we do have to add a RHEL_MAJOR value into the new VR. But based on @knurd42 comment above I'd like to have a definitive statement about whether or not the DIST tag does impact 'yum update' from, for example, .el9 -> .el10. If DIST has no impact, then yes, we will have to add RHEL_MAJOR into the string. If it does then I think we're still okay.
This is what I'm going to do: I'm going to build two kernel-ark RPMS. The first will be kernel-redhat-0.1-42.el9 and the second will be kernel- redhat-0.1-42.el10. Let me see what happens if I dnf upgrade between the two. I'm hoping that the .el10 kernel does get installed. If that doesn't work, we will need to revisit the versioning scheme to insert the RHEL_MAJOR value into it, similar to what they've done for Fedora.
I will also reach out to the rpm & dnf team for clarification.
From: Justin M. Forbes on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342277...
I just did a quick test rebuilding the F37 kernel-test against F38 and dnf will consider it an upgrade. This was originally an issue in Fedora a bit over 10 years ago, so there has been a lot of change in that time, dnf wasn't even a thing yet, still yum.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342289...
@jmflinuxtx please don't feel bad about raising this issue. This is EXACTLY why we do reviews and it's worth checking in with the rpm and dnf teams. I'm also going to do the test I mentioned above because it will be good for my own sanity :smile: :smile:
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342374...
From Jaroslav Mracek in private email: "Our solver transforms `kernel- redhat-0.1-42.el9` into name ('kernel-redhat'), epoch (not mentioned but present in metadata -> `0`), version (`0.1`), and release ('42.el9'). The version comparison is not a string comparison - it is more complex and it only uses numbers from the string. Therefore from your example version in RHEL10 is higher than the version in RHEL9. Therefore the upgrade will work."
I'm doing a test to double check right now :smile:
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342829...
Okay, testing of `kernel-redhat-0.1-42.el9` -> `kernel-redhat-0.1-42.el10` was successful, and we've answered the issue of upgrading to an older kernel version. So I think this thread can be closed?
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342830...
@dzickus? Can this thread be closed?
From: Don Zickus on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1342932...
I am ok with the thread being closed.
From: Jarod Wilson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1346751...
I believe the problem ages ago in Fedora that necessitated the 100/200/300 was when we were moving from Fedora 9 to Fedora 10. '.fc9' was rpm-version-compare newer than '.fc10' -- because it's not a pure numeric field, it was evaluated character by character, and the 9 was newer than the 1.
From: Jarod Wilson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1346758...
But also, if the kernel builds aren't 100% in lock-step, you could have a technically "newer" kernel in the latest release with a lower NVR than the prior release, because you merged several fixes in one build, and went from -1.releaseX+1 to -2.releaseX+1, while in releaseX, you did multiple builds to get the same fixes in, and went from -1.releaseX to -5.releaseX. Or something. So the 100/200/300 still has some merit w/current Fedora versions and will protect us from the fc99 to fc100 bump. :) (But does have the caveat of making it possible that -301.fc38 can be upgraded to from -299.fc37, which might actually be an overall kernel version downgrade, looking strictly at upstream and fixes, wheeeeeee -- however, that's a pretty slim chance I think, given the development model).
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1346810...
But also, if the kernel builds aren't 100% in lock-step,
With this model the builds *have* to be in lock-step with one another.
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1346813...
.fc9' was rpm-version-compare newer than '.fc10
A test with upgrading from `kernel-redhat-0.1-42.el9` -> `kernel- redhat-0.1-42.el10` was successful. ie) .el10 is recognized as being greater than .el9.
From: Jarod Wilson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1347121...
Oh, hrm. It's possible rpm grew some additional intelligence since then, or I'm having a senior moment. Either way, hysterical raisins. :)
From: Jarod Wilson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1347157...
Interesting that @prarit talked about NOT wanting to use EPOCH, but... this change already does use 'em. :smile: (For sub-packages that share names w/packages from non-gemini kernel builds).
From: Jarod Wilson on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1347159...
Some of the var names are a bit long and difficult to read (SPECKVERSION ready "speck version", but is meant to be "spec kay version", etc), but ... yeah, this gets a little complicated applying completely different versioning schemes to builds from the same spec.
I wonder... is it really worth the complexity to keep building all variants from the same spec, or should we maybe be looking at generating independent spec files from shared template files?
From: Prarit Bhargava on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1347168...
Yeah, I completely agree with you and it is an ongoing discussion as to what we can do to simplify the spec file. One thought, as you also suggest, is to split out the spec file into separate spec files. There are a few other ideas but nothing concrete yet as a plan of action.
That doesn't mean anyone has done anything wrong with the spec file, and I really want to stress that. All the changes we made were valid and made with the best of intentions and continue to be so. It's just that the spec file is extraordinarily complicated at this point, and we're not doing ourselves any favors by piling on to it with more code.
My gut is telling me that we should strip these down to separate sub-package spec files without any macros to see what we end up with, and then rebuild from there. I'm worried that the complexity added by the macros have made us blind to cleanups that could be made. We could also end up with what we have today and that simply means that the kernel is difficult to build.
IMO anything is worth a shot. I have been very open about having to use the rpm.org site as a reference guide when looking at the spec file. It shouldn't be so complicated that someone like me who has familiarity with the spec also needs to open up a reference doc to change it.
Sorry for the polite but mini-rant.
From: Jan Stancek on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2386#note_1347759...
Blocking merge a bit - Clark wanted to have a look too.
kernel@lists.fedoraproject.org