From: Prarit Bhargava <prarit@xxxxxxxxxx> redhat/Makefile: Add 'duplicate' SPEC entries for user set variables INCLUDE_FEDORA_FILES, INCLUDE_RHEL_FILES, and RELEASED_KERNEL are specified in Makefile.variables as they can be set in userspace. Create duplicate entries for these variables that begin with SPEC. This will make debugging easier and indicate that the variables are passed into the spec file. Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx> diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -26,6 +26,12 @@ ifdef SINGLE_TARBALL endif include Makefile.variables +# These entries are 'duplicates' of variables specified in Makefile.variables +# that are used in the SPEC file. Specifying these with a SPEC prefix indicates +# that the value is passed through to the spec file. +SPECRELEASED_KERNEL=$(RELEASED_KERNEL) +SPECINCLUDE_FEDORA_FILES=$(INCLUDE_FEDORA_FILES) +SPECINCLUDE_RHEL_FILES=$(INCLUDE_RHEL_FILES) LANG=C diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -63,10 +63,10 @@ test -f "$SOURCES/$SPECFILE" && s/%%SPECKPATCHLEVEL%%/$SPECKPATCHLEVEL/ s/%%SPECBUILD%%/$SPECBUILD/ s/%%SPECRELEASE%%/$SPECRELEASE/ - s/%%RELEASED_KERNEL%%/$RELEASED_KERNEL/ + s/%%SPECRELEASED_KERNEL%%/$SPECRELEASED_KERNEL/ s/%%SPECDEBUG_BUILDS_ENABLED%%/$SPECDEBUG_BUILDS_ENABLED/ - s/%%INCLUDE_FEDORA_FILES%%/$INCLUDE_FEDORA_FILES/ - s/%%INCLUDE_RHEL_FILES%%/$INCLUDE_RHEL_FILES/ + s/%%SPECINCLUDE_FEDORA_FILES%%/$SPECINCLUDE_FEDORA_FILES/ + s/%%SPECINCLUDE_RHEL_FILES%%/$SPECINCLUDE_RHEL_FILES/ s/%%SPECPATCHLIST_CHANGELOG%%/$SPECPATCHLIST_CHANGELOG/ s/%%SPECVERSION%%/$SPECVERSION/ s/%%SPECTARFILE_RELEASE%%/$SPECTARFILE_RELEASE/" "$SOURCES/$SPECFILE" diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100755 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -4,9 +4,9 @@ # here before the %%install macro is pre-built. # Include Fedora files -%global include_fedora %%INCLUDE_FEDORA_FILES%% +%global include_fedora %%SPECINCLUDE_FEDORA_FILES%% # Include RHEL files -%global include_rhel %%INCLUDE_RHEL_FILES%% +%global include_rhel %%SPECINCLUDE_RHEL_FILES%% # Provide Patchlist.changelog file %global patchlist_changelog %%SPECPATCHLIST_CHANGELOG%% @@ -77,7 +77,7 @@ Summary: The Linux kernel # kernel release. (This includes prepatch or "rc" releases.) # Set released_kernel to 0 when the upstream source tarball contains an # unreleased kernel development snapshot. -%global released_kernel %%RELEASED_KERNEL%% +%global released_kernel %%SPECRELEASED_KERNEL%% # Set debugbuildsenabled to 1 to build separate base and debug kernels # (on supported architectures). The kernel-debug-* subpackages will 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.6.test.el7.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.6.test.fc25.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc0.78e36f3b0dae586.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=17 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc0.78e36f3b0dae586.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.17.0-0.rc0.78e36f3b0dae586.6.test SPECVERSION=5.17.0 SRPM=../redhat/rpm/SRPMS/kernel-5.17.0-0.rc0.78e36f3b0dae586.6.test.el7.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc0.78e36f3b0dae586.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=17 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc0.78e36f3b0dae586.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.17.0-0.rc0.78e36f3b0dae586.6.test SPECVERSION=5.17.0 SRPM=../redhat/rpm/SRPMS/kernel-5.17.0-0.rc0.78e36f3b0dae586.6.test.fc25.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-6.test.el7.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-6.test.fc25.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.fce15c45d3fbd9f.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.fce15c45d3fbd9f.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.fce15c45d3fbd9f.6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.fce15c45d3fbd9f.6.test.el7.src.rpm 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 @@ -56,11 +56,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.fce15c45d3fbd9f.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.fce15c45d3fbd9f.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.fce15c45d3fbd9f.6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.fce15c45d3fbd9f.6.test.fc25.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16-rc5 SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.6.test.el7.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16-rc5 SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.6.test.fc25.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc0.78e36f3b0dae586.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=17 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc0.78e36f3b0dae586.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16-11523-g78e36f3b0dae586 SPECVERSION=5.17.0 SRPM=../redhat/rpm/SRPMS/kernel-5.17.0-0.rc0.78e36f3b0dae586.6.test.el7.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc0.78e36f3b0dae586.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=17 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc0.78e36f3b0dae586.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16-11523-g78e36f3b0dae586 SPECVERSION=5.17.0 SRPM=../redhat/rpm/SRPMS/kernel-5.17.0-0.rc0.78e36f3b0dae586.6.test.fc25.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16 SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-6.test.el7.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION= SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16 SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-6.test.fc25.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.fce15c45d3fbd9f.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.fce15c45d3fbd9f.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16-rc5-1-gfce15c45d3fbd9f SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.fce15c45d3fbd9f.6.test.el7.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.fce15c45d3fbd9f.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.fce15c45d3fbd9f.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16-rc5-1-gfce15c45d3fbd9f SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.fce15c45d3fbd9f.6.test.fc25.src.rpm 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 @@ -54,11 +54,14 @@ SOURCES=../redhat/rpm/SOURCES SPECBUILD=0.rc5.6.test SPECCHANGELOG=kernel.changelog-9.99 SPECFILE=kernel.spec +SPECINCLUDE_FEDORA_FILES=1 +SPECINCLUDE_RHEL_FILES=1 SPECKEXTRAVERSION=-rc5 SPECKPATCHLEVEL=16 SPECKSUBLEVEL=0 SPECKVERSION=5 SPECRELEASE=0.rc5.6%{?buildid}%{?dist} +SPECRELEASED_KERNEL=0 SPECTARFILE_RELEASE=5.16.0-0.rc5.6.test SPECVERSION=5.16.0 SRPM=../redhat/rpm/SRPMS/kernel-5.16.0-0.rc5.6.test.el7.src.rpm -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1727 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure