From: Prarit Bhargava on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
Use Makefile variables in scripts that are called from the Makefile.
Signed-off-by: Prarit Bhargava prarit@redhat.com
--- redhat/configs/build_configs.sh | 18 ++--- redhat/configs/generate_all_configs.sh | 20 ++---- redhat/configs/process_configs.sh | 11 +-- redhat/scripts/create-tarball.sh | 8 +- redhat/scripts/rh-dist-git.sh | 62 ++++++-------------- redhat/self-test/data/centos-2585cf9dfaad.el7 | 4 +- redhat/self-test/data/centos-2585cf9dfaad.el7.spec | 47 ++++++++------- redhat/self-test/data/centos-2585cf9dfaad.fc25 | 4 +- redhat/self-test/data/centos-2585cf9dfaad.fc25.spec | 47 ++++++++------- redhat/self-test/data/centos-78e36f3b0dae.el7 | 4 +- redhat/self-test/data/centos-78e36f3b0dae.el7.spec | 47 ++++++++------- redhat/self-test/data/centos-78e36f3b0dae.fc25 | 4 +- redhat/self-test/data/centos-78e36f3b0dae.fc25.spec | 47 ++++++++------- redhat/self-test/data/centos-df0cc57e057f.el7 | 4 +- redhat/self-test/data/centos-df0cc57e057f.el7.spec | 47 ++++++++------- redhat/self-test/data/centos-df0cc57e057f.fc25 | 4 +- redhat/self-test/data/centos-df0cc57e057f.fc25.spec | 47 ++++++++------- redhat/self-test/data/centos-fce15c45d3fb.el7 | 4 +- redhat/self-test/data/centos-fce15c45d3fb.el7.spec | 47 ++++++++------- redhat/self-test/data/centos-fce15c45d3fb.fc25 | 4 +- redhat/self-test/data/centos-fce15c45d3fb.fc25.spec | 47 ++++++++------- redhat/self-test/data/create-data.sh | 4 +- redhat/self-test/data/fedora-2585cf9dfaad.el7 | 6 +- redhat/self-test/data/fedora-2585cf9dfaad.el7.spec | 47 ++++++++------- redhat/self-test/data/fedora-2585cf9dfaad.fc25 | 6 +- redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec | 47 ++++++++------- redhat/self-test/data/fedora-78e36f3b0dae.el7 | 6 +- redhat/self-test/data/fedora-78e36f3b0dae.el7.spec | 47 ++++++++------- redhat/self-test/data/fedora-78e36f3b0dae.fc25 | 6 +- redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec | 47 ++++++++------- redhat/self-test/data/fedora-df0cc57e057f.el7 | 6 +- redhat/self-test/data/fedora-df0cc57e057f.el7.spec | 47 ++++++++------- redhat/self-test/data/fedora-df0cc57e057f.fc25 | 6 +- redhat/self-test/data/fedora-df0cc57e057f.fc25.spec | 47 ++++++++------- redhat/self-test/data/fedora-fce15c45d3fb.el7 | 6 +- redhat/self-test/data/fedora-fce15c45d3fb.el7.spec | 47 ++++++++------- redhat/self-test/data/fedora-fce15c45d3fb.fc25 | 6 +- redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec | 47 ++++++++------- redhat/self-test/data/rhel-2585cf9dfaad.el7 | 6 +- redhat/self-test/data/rhel-2585cf9dfaad.el7.spec | 47 ++++++++------- redhat/self-test/data/rhel-2585cf9dfaad.fc25 | 6 +- redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec | 47 ++++++++------- redhat/self-test/data/rhel-78e36f3b0dae.el7 | 6 +- redhat/self-test/data/rhel-78e36f3b0dae.el7.spec | 47 ++++++++------- redhat/self-test/data/rhel-78e36f3b0dae.fc25 | 6 +- redhat/self-test/data/rhel-78e36f3b0dae.fc25.spec | 47 ++++++++------- redhat/self-test/data/rhel-df0cc57e057f.el7 | 6 +- redhat/self-test/data/rhel-df0cc57e057f.el7.spec | 47 ++++++++------- redhat/self-test/data/rhel-df0cc57e057f.fc25 | 6 +- redhat/self-test/data/rhel-df0cc57e057f.fc25.spec | 47 ++++++++------- redhat/self-test/data/rhel-fce15c45d3fb.el7 | 6 +- redhat/self-test/data/rhel-fce15c45d3fb.el7.spec | 47 ++++++++------- redhat/self-test/data/rhel-fce15c45d3fb.fc25 | 6 +- redhat/self-test/data/rhel-fce15c45d3fb.fc25.spec | 47 ++++++++------- redhat/Makefile | 53 +++++++++-------- redhat/Makefile.rhpkg | 4 +- redhat/Makefile.variables | 5 + redhat/genspec.sh | 6 +- redhat/kernel.spec.template | 7 +- 59 files changed, 774 insertions(+), 680 deletions(-)
From: Prarit Bhargava prarit@redhat.com
redhat/configs/generate_all_configs.sh: Use Makefile variables
Use Makefile variables in generate_all_configs.sh.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -344,11 +344,11 @@ dist-kabi-dw-check: dist-kabi @rm -rf $(KABIDW)/base/$(CURARCH).tmp
dist-configs-commit: dist-configs-prep - +@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \ + +@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\ ./process_configs.sh -z "$(PACKAGE_NAME)" "$(KVERSION)" "" "$(FLAVOR)" "$(RHJOBS)"
dist-configs: dist-configs-prep - +@cd $(REDHAT)/configs; VERSION=$(KVERSION) ./generate_all_configs.sh "$(FLAVOR)" 1; \ + +@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\ ./process_configs.sh $(PROCESS_CONFIGS_OPTS) "$(PACKAGE_NAME)" "$(KVERSION)" "" "" "$(RHJOBS)"
dist-fedora-configs: FLAVOR = fedora 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 @@ -1,30 +1,24 @@ #!/bin/sh
# Adjusts the configuration options to build the variants correctly -# -# arg1: configuration to go in the primary variant -# arg2: are we only generating debug configs
- -PRIMARY=$1 -DEBUGBUILDSENABLED=$2 - -if [ -z "$2" ]; then +DEBUGBUILDSENABLED=$1 +if [ -z "$DEBUGBUILDSENABLED" ]; then exit 1 fi
-if [ -z "$PRIMARY" ]; then - PRIMARY=rhel +if [ -z "$FLAVOR" ]; then + FLAVOR=rhel fi
-if [ "$PRIMARY" = "fedora" ]; then +if [ "$FLAVOR" = "fedora" ]; then SECONDARY=rhel else SECONDARY=fedora fi
-for i in kernel-*-"$PRIMARY".config; do - NEW=kernel-"$VERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$PRIMARY"//) +for i in kernel-*-"$FLAVOR".config; do + NEW=kernel-"$KVERSION"-$(echo "$i" | cut -d - -f2- | sed s/-"$FLAVOR"//) #echo $NEW mv "$i" "$NEW" done 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 @@ -1442,7 +1442,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches 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 @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec +++ b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec +++ b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec +++ b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec +++ b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec +++ b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec +++ b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec @@ -1451,7 +1451,7 @@ cp %{SOURCE80} . cp %{SOURCE3000} . # kernel-local cp %{SOURCE3001} . -VERSION=%{version} ./generate_all_configs.sh %{primary_target} %{debugbuildsenabled} +FLAVOR=%{primary_target} KVERSION=%{version} ./generate_all_configs.sh %{debugbuildsenabled}
# Merge in any user-provided local config option changes %ifnarch %nobuildarches
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/kernel.spec.template: Use RPM_BUILD_NCPUS
RPM_BUILD_NCPUS allows users to modify the max number of cpus used by the RPM build.
Use the RPM_BUILD_NCPUS variable in the spec file.
Signed-off-by: Prarit Bhargava prarit@redhat.com
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%%BUILDID%% @@ -2351,7 +2350,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
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 @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec +++ b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec +++ b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec +++ b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec +++ b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec +++ b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec +++ b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec b/redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec +++ b/redhat/self-test/data/rhel-2585cf9dfaad.fc25.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
diff --git a/redhat/self-test/data/rhel-78e36f3b0dae.el7.spec b/redhat/self-test/data/rhel-78e36f3b0dae.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/rhel-78e36f3b0dae.el7.spec +++ b/redhat/self-test/data/rhel-78e36f3b0dae.el7.spec @@ -115,7 +115,6 @@ Summary: The Linux kernel %if %{zipmodules} %global zipsed -e 's/.ko$/.ko.xz/' # for parallel xz processes, replace with 1 to go back to single process -%global zcpu `nproc --all` %endif
%define buildid .test @@ -2349,7 +2348,7 @@ find Documentation -type d | xargs chmod u+w fi \ fi \ if [ "%{zipmodules}" -eq "1" ]; then \ - find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P%{zcpu} xz; \ + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs -P${RPM_BUILD_NCPUS} xz; \ fi \ %{nil}
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/configs/process_configs.sh: Use Makefile variables
Cleanup up parameters and use Makefile variables in process_config.sh.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -345,11 +345,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 "$(PACKAGE_NAME)" "$(KVERSION)" "" "$(FLAVOR)" "$(RHJOBS)" + ./process_configs.sh -z "$(KVERSION)" "$(FLAVOR)"
dist-configs: dist-configs-prep +@cd $(REDHAT)/configs; ./generate_all_configs.sh 1;\ - ./process_configs.sh $(PROCESS_CONFIGS_OPTS) "$(PACKAGE_NAME)" "$(KVERSION)" "" "" "$(RHJOBS)" + ./process_configs.sh $(PROCESS_CONFIGS_OPTS) "$(KVERSION)" ""
dist-fedora-configs: FLAVOR = fedora dist-fedora-configs: dist-configs @@ -360,7 +360,7 @@ dist-rhel-configs: dist-configs rh-configs: dist-rhel-configs
dist-configs-check: dist-configs-prep - +cd $(REDHAT)/configs; ./process_configs.sh $(PROCESS_CONFIGS_CHECK_OPTS) $(PACKAGE_NAME) "" "" "" "$(RHJOBS)" + +cd $(REDHAT)/configs; ./process_configs.sh $(PROCESS_CONFIGS_CHECK_OPTS) "" ""
dist-configs-prep: dist-clean-configs dist-buildreq-check +cd $(REDHAT)/configs; ./build_configs.sh "partial" "$(ARCH_MACH)" "snip" "$(RHJOBS)" diff --git a/redhat/configs/process_configs.sh b/redhat/configs/process_configs.sh index blahblah..blahblah 100755 --- a/redhat/configs/process_configs.sh +++ b/redhat/configs/process_configs.sh @@ -191,7 +191,7 @@ function commit_new_configs() # assume we are in $source_tree/configs, need to get to top level pushd "$(switch_to_toplevel)" &>/dev/null
- for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config + for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}"*.config do arch=$(head -1 "$cfg" | cut -b 3-) cfgtmp="${cfg}.tmp" @@ -303,7 +303,7 @@ function process_configs() [ -f .mismatches ] && rm -f .mismatches
count=0 - for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}${SUBARCH}"*.config + for cfg in "$SCRIPT_DIR/${PACKAGE_NAME}${KVERREL}"*.config do if [ "$count" -eq 0 ]; then # do the first one by itself so that tools are built @@ -385,12 +385,9 @@ do shift done
-PACKAGE_NAME="${1:-kernel}" # defines the package name used -KVERREL="$(test -n "$2" && echo "-$2" || echo "")" -SUBARCH="$(test -n "$3" && echo "-$3" || echo "")" -FLAVOR="$(test -n "$4" && echo "-$4" || echo "-ark")" +KVERREL="$(test -n "$1" && echo "-$1" || echo "")" +FLAVOR="$(test -n "$2" && echo "-$2" || echo "-ark")" # shellcheck disable=SC2015 -RHJOBS="$(test -n "$5" && echo "$5" || nproc --all)" SCRIPT=$(readlink -f "$0") SCRIPT_DIR=$(dirname "$SCRIPT")
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 @@ -1492,7 +1492,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} 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 @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.fc25.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec +++ b/redhat/self-test/data/fedora-78e36f3b0dae.el7.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec +++ b/redhat/self-test/data/fedora-78e36f3b0dae.fc25.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-df0cc57e057f.el7.spec +++ b/redhat/self-test/data/fedora-df0cc57e057f.el7.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec +++ b/redhat/self-test/data/fedora-df0cc57e057f.fc25.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec +++ b/redhat/self-test/data/fedora-fce15c45d3fb.el7.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec +++ b/redhat/self-test/data/fedora-fce15c45d3fb.fc25.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target} diff --git a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/rhel-2585cf9dfaad.el7.spec @@ -1501,7 +1501,7 @@ for opt in %{clang_make_opts}; do OPTS="$OPTS -m $opt" done %endif -./process_configs.sh $OPTS kernel %{rpmversion} +RHJOBS=$RPM_BUILD_NCPUS PACKAGE_NAME=kernel ./process_configs.sh $OPTS ${rpmversion}
cp %{SOURCE82} . RPM_SOURCE_DIR=$RPM_SOURCE_DIR ./update_scripts.sh %{primary_target}
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/configs/build_configs.sh: Use Makefile variables
Use Makefile variables in build_configs.sh.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -363,8 +363,8 @@ dist-configs-check: dist-configs-prep +cd $(REDHAT)/configs; ./process_configs.sh $(PROCESS_CONFIGS_CHECK_OPTS) "" ""
dist-configs-prep: dist-clean-configs dist-buildreq-check - +cd $(REDHAT)/configs; ./build_configs.sh "partial" "$(ARCH_MACH)" "snip" "$(RHJOBS)" - +cd $(REDHAT)/configs; ./build_configs.sh "$(PACKAGE_NAME)" "$(ARCH_MACH)" "$(FLAVOR)" "$(RHJOBS)" + +cd $(REDHAT)/configs; ./build_configs.sh "partial" "snip" + +cd $(REDHAT)/configs; ./build_configs.sh "$(PACKAGE_NAME)" "$(FLAVOR)"
dist-configs-arch: ARCH_MACH = $(MACH) dist-configs-arch: dist-configs diff --git a/redhat/configs/build_configs.sh b/redhat/configs/build_configs.sh index blahblah..blahblah 100755 --- a/redhat/configs/build_configs.sh +++ b/redhat/configs/build_configs.sh @@ -5,19 +5,15 @@ # files for building RHEL kernels, based on the contents of a control file
PACKAGE_NAME="${1:-kernel}" # defines the package name used -SUBARCH="${2:-}" # defines a specific arch -SCRIPT=$(readlink -f "$0") -OUTPUT_DIR="$PWD" -SCRIPT_DIR=$(dirname "$SCRIPT") - -if [ -z "$3" ]; then +if [ -z "$2" ]; then cat flavors > .flavors else - echo "$3" > .flavors + echo "$2" > .flavors fi
-# shellcheck disable=SC2015 -RHJOBS="$(test -n "$4" && echo "$4" || nproc --all)" +SCRIPT=$(readlink -f "$0") +OUTPUT_DIR="$PWD" +SCRIPT_DIR=$(dirname "$SCRIPT")
LANG=en_US.UTF-8
@@ -146,9 +142,9 @@ function build_flavor() arch=$(echo "$line" | cut -f1 -d"=") configs=$(echo "$line" | cut -f2 -d"=")
- if [ -n "$SUBARCH" ]; then + if [ -n "$ARCH_MACH" ]; then case $arch in - $SUBARCH*) + $ARCH_MACH*) ;; *) continue
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/scripts/rh-dist-git.sh: Use Makefile variables
Use Makefile variables in rh-dist-git.sh.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -637,7 +637,7 @@ endif exit 1; \ fi; \ fi - $(REDHAT)/scripts/rh-dist-git.sh "$(RHDISTGIT_BRANCH)" "$(RHDISTGIT_CACHE)" "$(RHDISTGIT_TMP)" "$(RHDISTGIT)" "$(TARBALL)" "$(KABI_TARBALL)" "$(KABIDW_TARBALL)" "$(__ZSTREAM)" "$(PACKAGE_NAME)" "$(RHEL_MAJOR)" "$(RHPKG_BIN)" "$(SRPMS)/$(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE)$(DIST).src.rpm" + $(REDHAT)/scripts/rh-dist-git.sh
dist-rtg: dist-release @$(MAKE) dist-release-tag diff --git a/redhat/scripts/rh-dist-git.sh b/redhat/scripts/rh-dist-git.sh index blahblah..blahblah 100755 --- a/redhat/scripts/rh-dist-git.sh +++ b/redhat/scripts/rh-dist-git.sh @@ -1,32 +1,8 @@ #!/bin/bash
# clones and updates a dist-git repo -# $1: branch to be used -# $2: local pristine clone of dist-git -# $3: alternate tmp directory (if you have faster storage) -# $4: alternate dist-git server -# $5: kernel source tarball -# $6: kabi stablelists tarball -# $7: dwarf-bases kabi tarball -# $8: zstream build -# $9: package name -# shellcheck disable=SC2164 - -rhdistgit_branch=$1; -rhdistgit_cache=$2; -rhdistgit_tmp=$3; -rhdistgit_server=$4; -rhdistgit_tarball=$5; -rhdistgit_kabi_tarball=$6; -rhdistgit_kabidw_tarball=$7; -rhdistgit_zstream_flag=$8; -package_name=$9; -rhel_major=${10}; -rhpkg_bin=${11}; -srpm_name=${12};
-redhat=$(dirname "$0")/..; -topdir="$redhat"/..; +# shellcheck disable=SC2164
function die { @@ -37,41 +13,41 @@ function die function upload() { [ -n "$RH_DIST_GIT_TEST" ] && return - $rhpkg_bin upload "$@" >/dev/null || die "uploading $*"; + $RHPKG_BIN upload "$@" >/dev/null || die "uploading $*"; }
-if [ -z "$rhdistgit_branch" ]; then +if [ -z "$RHDISTGIT_BRANCH" ]; then echo "$0 <branch> [local clone] [alternate tmp] [alternate dist-git server]" >&2; exit 1; fi
echo "Cloning the repository" # clone the dist-git, considering cache -tmpdir=$("$redhat"/scripts/clone_tree.sh "$rhdistgit_server" "$rhdistgit_cache" "$rhdistgit_tmp" "$package_name" "$rhel_major" "$rhpkg_bin"); +tmpdir=$("$REDHAT"/scripts/clone_tree.sh "$RHDISTGIT" "$RHDISTGIT_CACHE" "$RHDISTGIT_TMP" "$PACKAGE_NAME" "$RHEL_MAJOR" "$RHPKG_BIN");
echo "Switching the branch" # change in the correct branch -cd "$tmpdir/$package_name"; -$rhpkg_bin switch-branch "$rhdistgit_branch" || die "switching to branch $rhdistgit_branch"; +cd "$tmpdir/$PACKAGE_NAME"; +$RHPKG_BIN switch-branch "$RHDISTGIT_BRANCH" || die "switching to branch $RHDISTGIT_BRANCH";
echo "Copying updated files" # copy the required files (redhat/git/files) -"$redhat"/scripts/expand_srpm.sh "$topdir" "$tmpdir" "$package_name" "$srpm_name"; +"$REDHAT"/scripts/expand_srpm.sh "$TOPDIR" "$tmpdir" "$PACKAGE_NAME" "$SRPM";
echo "Uploading new tarballs" # upload tarballs -sed -i "/linux-.*.tar.xz/d" "$tmpdir/$package_name"/{sources,.gitignore}; -upload_list="$rhdistgit_tarball" +sed -i "/linux-.*.tar.xz/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; +upload_list="$TARBALL"
# Only upload kernel-abi-stablelists tarball if its release counter changed. -if [ "$rhdistgit_zstream_flag" == "no" ]; then - if ! grep -q "$rhdistgit_kabi_tarball" "$tmpdir/$package_name"/sources; then - sed -i "/kernel-abi-stablelists.*.tar.bz2/d" "$tmpdir/$package_name"/{sources,.gitignore}; - upload_list="$upload_list $rhdistgit_kabi_tarball" +if [ "$__ZSTREAM" == "no" ]; then + if ! grep -q "$KABI_TARBALL" "$tmpdir/$PACKAGE_NAME"/sources; then + sed -i "/kernel-abi-stablelists.*.tar.bz2/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; + upload_list="$upload_list $KABI_TARBALL" fi - if ! grep -q "$rhdistgit_kabidw_tarball" "$tmpdir/$package_name"/sources; then - sed -i "/kernel-kabi-dw-.*.tar.bz2/d" "$tmpdir/$package_name"/{sources,.gitignore}; - upload_list="$upload_list $rhdistgit_kabidw_tarball" + if ! grep -q "$KABIDW_TARBALL" "$tmpdir/$PACKAGE_NAME"/sources; then + sed -i "/kernel-kabi-dw-.*.tar.bz2/d" "$tmpdir/$PACKAGE_NAME"/{sources,.gitignore}; + upload_list="$upload_list $KABIDW_TARBALL" fi fi
@@ -82,10 +58,10 @@ upload $upload_list echo "Creating diff for review ($tmpdir/diff) and changelog" # diff the result (redhat/cvs/dontdiff). note: diff reuturns 1 if # differences were found -diff -X "$redhat"/git/dontdiff -upr "$tmpdir/$package_name" "$redhat"/rpm/SOURCES/ > "$tmpdir"/diff; +diff -X "$REDHAT"/git/dontdiff -upr "$tmpdir/$PACKAGE_NAME" "$REDHAT"/rpm/SOURCES/ > "$tmpdir"/diff; # creating the changelog file -"$redhat"/scripts/create_distgit_changelog.sh "$redhat/rpm/SOURCES/$package_name".spec \ - "$rhdistgit_zstream_flag" "$package_name" >"$tmpdir"/changelog +"$REDHAT"/scripts/create_distgit_changelog.sh "$REDHAT/rpm/SOURCES/$PACKAGE_NAME".spec \ + "$__ZSTREAM" "$PACKAGE_NAME" >"$tmpdir"/changelog
# all done echo "$tmpdir"
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/Makefile: Use RPMVERSION
Use RPMVERSION where appropriate in the Makefile.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -199,7 +199,7 @@ KABIDW_TARBALL:=$(SOURCES)/kernel-kabi-dw-$(KVERSION)-$(DISTRO_BUILD).tar.bz2 PKGRELEASE:=$(PREBUILD)$(BUILD)$(BUILDID) RPMVERSION:=$(RPMKVERSION).$(RPMKPATCHLEVEL).$(RPMKSUBLEVEL)-$(PKGRELEASE) SPECRELEASE:=$(PREBUILD)$(BUILD)%{?buildid}%{?dist} -SRPM:=$(SRPMS)/$(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE)$(DIST).src.rpm +SRPM:=$(SRPMS)/$(PACKAGE_NAME)-$(RPMVERSION)$(DIST).src.rpm
# # This conditional statement is where fedora, centos, and other (aka RHEL) @@ -225,7 +225,7 @@ else ifeq ("$(DISTRO)", "centos") ifndef BUILD_SCRATCH_TARGET BUILD_SCRATCH_TARGET:=c$(RHEL_MAJOR)s-candidate endif - TARFILE_RELEASE:=$(KVERSION)-$(PKGRELEASE) + TARFILE_RELEASE:=$(RPMVERSION) else # A unified tarball means that the tarball in the srpm contains both the # upstream sources and RHEL specific patches. @@ -234,7 +234,7 @@ else ifndef BUILD_SCRATCH_TARGET BUILD_SCRATCH_TARGET:=rhel-$(RHEL_MAJOR).$(RHEL_MINOR).0-test-pesign endif - TARFILE_RELEASE:=$(KVERSION)-$(PKGRELEASE) + TARFILE_RELEASE:=$(RPMVERSION) endif
ifndef BUILD_TARGET @@ -397,7 +397,7 @@ dist-stub-key: .PHONY: $(TARBALL) $(TARBALL): @if [ $(SINGLE_TARBALL) -eq 1 ]; then \ - scripts/create-tarball.sh $(GITID) linux-$(KVERSION)-$(PKGRELEASE); \ + scripts/create-tarball.sh $(GITID) linux-$(RPMVERSION); \ else \ scripts/create-tarball.sh $(MARKER) linux-$(TARFILE_RELEASE); \ fi @@ -556,7 +556,7 @@ dist-release-finish: setup-source @cp $(SOURCES)/$(CHANGELOG) $(REDHAT)/$(CHANGELOG) @$(GIT) add $(REDHAT)/$(CHANGELOG) @$(GIT) add $(REDHAT)/marker - @$(GIT) commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE)" + @$(GIT) commit -s ../Makefile.rhelver $(REDHAT)/marker $(REDHAT)/$(CHANGELOG) $(PACKAGE_NAME).spec.template -m "[redhat] $(PACKAGE_NAME)-$(RPMVERSION)" dist-release-changed: setup-source @cp $(SOURCES)/$(CHANGELOG) $(REDHAT)/$(CHANGELOG) @echo $(MARKER) > $(REDHAT)/marker @@ -572,7 +572,7 @@ dist-release-changed: setup-source dist-release: dist-clean-sources @$(MAKE) dist-release-changed dist-release-tag: - @$(GIT) tag -a -m "$(PACKAGE_NAME)-$(RPMVERSION)" $(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE) + @$(GIT) tag -a -m "$(PACKAGE_NAME)-$(RPMVERSION)" $(PACKAGE_NAME)-$(RPMVERSION)
git-tree-check: @if test -n "$(DIST_PUSH)" && test -z "$(shell $(GIT) remote get-url gitlab 2>/dev/null)"; then \ @@ -614,7 +614,7 @@ dist-vr-check: fi
dist-brew dist-koji: dist-%: dist-vr-check dist-srpm - $* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) $(SRPMS)/$(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE)$(DIST).src.rpm $(OUTPUT_FILE) + $* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) $(SRPMS)/$(PACKAGE_NAME)-$(RPMVERSION)$(DIST).src.rpm $(OUTPUT_FILE)
distg-brew distg-koji: distg-%: dist-vr-check $* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/Makefile: Move SINGLE_TARBALL to Makefile.variables
Move the SINGLE_TARBALL variable to Makefile.variables, and clean up comments.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -206,8 +206,6 @@ SRPM:=$(SRPMS)/$(PACKAGE_NAME)-$(RPMVERSION)$(DIST).src.rpm # specific values should be set. # ifeq ("$(DISTRO)", "fedora") - # A non-unified tarball means that the tarball is only upstream sources - # and the patches get applied as a diff in the spec file SINGLE_TARBALL:=0 TARFILE_RELEASE:=$(UPSTREAM_TARBALL_NAME) RHDISTGIT_BRANCH:=rawhide @@ -215,8 +213,6 @@ ifeq ("$(DISTRO)", "fedora") BUILD_SCRATCH_TARGET:=temp-ark-rhel-8-test endif else ifeq ("$(DISTRO)", "centos") - # A unified tarball means that the tarball in the srpm contains both the - # upstream sources and RHEL specific patches. SINGLE_TARBALL:=1 RHDISTGIT_BRANCH:=c$(RHEL_MAJOR)s ifndef BUILD_PROFILE @@ -227,8 +223,6 @@ else ifeq ("$(DISTRO)", "centos") endif TARFILE_RELEASE:=$(RPMVERSION) else - # A unified tarball means that the tarball in the srpm contains both the - # upstream sources and RHEL specific patches. SINGLE_TARBALL:=1 RHDISTGIT_BRANCH:=rhel-$(RHEL_MAJOR).$(RHEL_MINOR).0 ifndef BUILD_SCRATCH_TARGET diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables index blahblah..blahblah 100644 --- a/redhat/Makefile.variables +++ b/redhat/Makefile.variables @@ -127,3 +127,8 @@ RHSELFTESTDATA ?= # This variable is used by the redhat/self-tests. It should not be # considered stable and my be changed or removed without warning. RHDISTDATADIR ?= + +# This variable is used in redhat/genspec.sh, and determines if all commits are +# rolled into a single tarball, or if the commits are individually broken out +# into separate patches and then included in the tarball. +SINGLE_TARBALL ?= diff --git a/redhat/genspec.sh b/redhat/genspec.sh index blahblah..blahblah 100755 --- a/redhat/genspec.sh +++ b/redhat/genspec.sh @@ -163,12 +163,16 @@ mv -f "$clogf.full" "$SOURCES/$CHANGELOG" echo "MARKER is $MARKER"
if [ "$SINGLE_TARBALL" = 0 ]; then + # The tarball in the SRPM contains only the upstream sources. + # May need to preserve word splitting in EXCLUDE_FILES # shellcheck disable=SC2086 git diff -p --no-renames --stat "$MARKER".. $EXCLUDE_FILES \ > ${SOURCES}/patch-${RPMKVERSION}.${RPMKPATCHLEVEL}-redhat.patch else - # Need an empty file for dist-git compatibility + # The tarball in the SRPM contains both upstream sources and OS-specifc + # commits. Even though this is the case, an empty file for dist-git + # compatibility is necessary. touch "${SOURCES}/patch-${RPMKVERSION}.${RPMKPATCHLEVEL}"-redhat.patch fi
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/Makefile: Deprecate SINGLE_TARBALL
We don't know if there are any users of the SINGLE_TARBALL variable. Mark it for deprection. This commit can be reverted if anyone complains.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -18,6 +18,13 @@ ifdef TEST_FLAGS $(warning WARNING: TEST_FLAGS will be deprecated in a later release, use BUILD_FLAGS instead.) endif
+ifdef SINGLE_TARBALL + # The commit that introduced this code can be reverted if there are users of + # this variable. + # deprecated in 5.18.0 + $(warning WARNING: SINGLE_TARBALL will be deprecated in a later release.) +endif + include Makefile.variables
LANG=C
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/scripts/create-tarball.sh: Use Makefile variables
Use Makefile variables in redhat/scripts/create-tarball.sh.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -397,11 +397,7 @@ dist-stub-key: # force tarball to be regenerated if HEAD changes .PHONY: $(TARBALL) $(TARBALL): - @if [ $(SINGLE_TARBALL) -eq 1 ]; then \ - scripts/create-tarball.sh $(GITID) linux-$(RPMVERSION); \ - else \ - scripts/create-tarball.sh $(MARKER) linux-$(TARFILE_RELEASE); \ - fi + @scripts/create-tarball.sh
.PHONY: $(KABI_TARBALL) $(KABI_TARBALL): diff --git a/redhat/scripts/create-tarball.sh b/redhat/scripts/create-tarball.sh index blahblah..blahblah 100755 --- a/redhat/scripts/create-tarball.sh +++ b/redhat/scripts/create-tarball.sh @@ -1,7 +1,6 @@ #!/bin/sh
-GITID=$1 -DIR=$2 +[ "$SINGLE_TARBALL" -eq 1 ] && _GITID="$GITID" || _GITID="$MARKER"
# shellcheck disable=SC1083 XZ_THREADS=$(rpm --eval %{_smp_mflags} | sed -e 's!^-j!--threads !') @@ -16,8 +15,7 @@ fi
if [ -f "$TARBALL" ]; then TARID=$(xzcat -qq "$TARBALL" | git get-tar-commit-id 2>/dev/null) - GITID_NORMALIZE=$(git log --max-count=1 --pretty=format:%H "$GITID") - if [ "${GITID_NORMALIZE}" = "${TARID}" ]; then + if [ "$_GITID" == "$TARID" ]; then echo "$(basename "$TARBALL") unchanged..." exit 0 fi @@ -29,4 +27,4 @@ trap 'rm -vf "$TARBALL"' INT # XZ_OPTIONS and XZ_THREADS DEPEND on word splitting, so don't disable it here: # shellcheck disable=SC2086 cd ../ && - git archive --prefix="$DIR"/ --format=tar "$GITID" | xz $XZ_OPTIONS $XZ_THREADS > "$TARBALL"; + git archive --prefix="linux-$TARFILE_RELEASE"/ --format=tar "$_GITID" | xz $XZ_OPTIONS $XZ_THREADS > "$TARBALL";
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/Makefile.rhpkg: Remove quotes for RHDISTGIT
Remove the quotes around RHDISTGIT. This causes problems with the bash scripts in the dist-git-test target.
Signed-off-by: Justin M. Forbes jforbes@fedoraproject.org Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile.rhpkg b/redhat/Makefile.rhpkg index blahblah..blahblah 100644 --- a/redhat/Makefile.rhpkg +++ b/redhat/Makefile.rhpkg @@ -32,7 +32,7 @@ ifeq ("$(RHDISTGIT_CACHE)", "") endif
ifeq ("$(DISTRO)", "fedora") - RHDISTGIT:="ssh://$(RHDISTGIT_USER)@pkgs.fedoraproject.org/rpms/$(PACKAGE_NAME)" + RHDISTGIT:=ssh://$(RHDISTGIT_USER)@pkgs.fedoraproject.org/rpms/$(PACKAGE_NAME) else ifeq ("$(DISTRO)", "centos") # CentOS uses a fork + merge request based workflow with dist-git to # handle changes, so you need to provide the gitlab username and we by @@ -41,5 +41,5 @@ else ifeq ("$(DISTRO)", "centos") GL_FORK_PATH?=$(PACKAGE_NAME).git RHDISTGIT:=git@gitlab.com:$(GL_DISTGIT_USER)/$(GL_FORK_PATH) else - RHDISTGIT:="ssh://$(RHDISTGIT_USER)@pkgs.devel.redhat.com/rpms/$(PACKAGE_NAME)" + RHDISTGIT:=ssh://$(RHDISTGIT_USER)@pkgs.devel.redhat.com/rpms/$(PACKAGE_NAME) endif
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
From: Prarit Bhargava prarit@redhat.com
redhat/self-test: Clean up data set
After running 'make dist-self-test-data' it was noticed that there have been changes made to the kernel.spec file since the self-test data was introduced and a few more variables need to be changed for testing purposes.
Additional fix: Remove RHEL_RELEASE as this changes build-to-build.
Clean up the self-test data set.
Signed-off-by: Prarit Bhargava prarit@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -28,11 +28,17 @@ endif include Makefile.variables
LANG=C + ifndef RHSELFTESTDATA TOPDIR:=$(shell $(GIT) rev-parse --show-toplevel) else + # change TOPDIR to be relative TOPDIR:=.. + # RHEL_RELEASE may be updated which will cause a difference with the BUILD variable + RHEL_RELEASE:=6 + BUILD:=$(RHEL_RELEASE) endif + REDHAT:=$(TOPDIR)/redhat include $(TOPDIR)/Makefile.rhelver
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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif 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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUILD_PROFILE=-p stream BUMP_RELEASE=yes @@ -46,7 +47,6 @@ RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=centpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -92,9 +92,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=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 @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif diff --git a/redhat/self-test/data/create-data.sh b/redhat/self-test/data/create-data.sh index blahblah..blahblah 100755 --- a/redhat/self-test/data/create-data.sh +++ b/redhat/self-test/data/create-data.sh @@ -28,7 +28,8 @@ do # CURDIR from the output. # UPSTREAM is the base merge commit and can change from day-to-day as # the tree is changed. Omit UPSTREAM from the output. - make RHSELFTESTDATA=1 DIST="${DIST}" DISTRO="${DISTRO}" HEAD=${commit} dist-dump-variables | grep "=" | grep -v CURDIR | grep -v -w UPSTREAM >& "${varfilename}" + # RHEL_RELEASE can change build-to-build. + make RHSELFTESTDATA=1 DIST="${DIST}" DISTRO="${DISTRO}" HEAD=${commit} dist-dump-variables | grep "=" | grep -v CURDIR | grep -v -w UPSTREAM | grep -v -w RHEL_RELEASE >& "${varfilename}"
# When executed from a script, the variables in Makefile.variables are # listed as having origin 'environment'. This is because the script @@ -41,6 +42,7 @@ do do [ "$VAR" == "RHDISTDATADIR" ] && continue [ "$VAR" == "RHGITURL" ] && continue + [ "$VAR" == "BUILD" ] && continue echo "$VAR=${!VAR}" done >> "${varfilename}"
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 @@ -2,6 +2,7 @@ .SHELLSTATUS=0 ARCHCONFIG=X86_64 ARCH_LIST=aarch64 ppc64le s390x x86_64 +BUILD=6 BUILD_FLAGS= BUMP_RELEASE=yes CHANGELOG=kernel.changelog-9.99 @@ -38,13 +39,12 @@ PROCESS_CONFIGS_CHECK_OPTS=-n -t -c PROCESS_CONFIGS_OPTS=-n -w -c REDHAT=../redhat RELEASED_KERNEL=0 -RHDISTGIT="ssh://"shadowman"@pkgs.fedoraproject.org/rpms/kernel" +RHDISTGIT=ssh://"shadowman"@pkgs.fedoraproject.org/rpms/kernel RHDISTGIT_BRANCH=rawhide RHDISTGIT_TMP=/tmp RHDISTGIT_USER="shadowman" RHEL_MAJOR=9 RHEL_MINOR=99 -RHEL_RELEASE=6 RHPKG_BIN=fedpkg RHSELFTESTDATA=1 RPM=../redhat/rpm @@ -90,9 +90,9 @@ BUILD_SCRATCH_TARGET=temp-ark-rhel-8-test BUILD_TARGET=--scratch temp-ark-rhel-8-test BUILD_PROFILE= BUILD_FLAGS= -BUILD=6 PREBUILD_GIT_ONLY=1 RHGITCOMMIT=HEAD RHJOBS=1 NO_CONFIGCHECKS= RHSELFTESTDATA= +SINGLE_TARBALL=0 diff --git a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec index blahblah..blahblah 100755 --- a/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec +++ b/redhat/self-test/data/fedora-2585cf9dfaad.el7.spec @@ -412,11 +412,6 @@ Summary: The Linux kernel %define with_zfcpdump 0 %endif
-# skip BTF in kernel modules for s390x -%ifnarch s390x -%define with_kmod_btf --keep-section '.BTF' -%endif - %if 0%{?fedora} # This is not for Fedora %define with_zfcpdump 0 @@ -777,7 +772,6 @@ Source33: kernel-x86_64-debug-rhel.config
Source34: filter-x86_64.sh.rhel Source35: filter-armv7hl.sh.rhel -Source36: filter-i686.sh.rhel Source37: filter-aarch64.sh.rhel Source38: filter-ppc64le.sh.rhel Source39: filter-s390x.sh.rhel @@ -796,8 +790,6 @@ Source54: kernel-armv7hl-fedora.config Source55: kernel-armv7hl-debug-fedora.config Source56: kernel-armv7hl-lpae-fedora.config Source57: kernel-armv7hl-lpae-debug-fedora.config -Source58: kernel-i686-fedora.config -Source59: kernel-i686-debug-fedora.config Source60: kernel-ppc64le-fedora.config Source61: kernel-ppc64le-debug-fedora.config Source62: kernel-s390x-fedora.config @@ -807,7 +799,6 @@ Source65: kernel-x86_64-debug-fedora.config
Source67: filter-x86_64.sh.fedora Source68: filter-armv7hl.sh.fedora -Source69: filter-i686.sh.fedora Source70: filter-aarch64.sh.fedora Source71: filter-ppc64le.sh.fedora Source72: filter-s390x.sh.fedora @@ -1035,7 +1026,7 @@ This package provides debug information for package kernel-tools. # symlinks because of the trailing nonmatching alternation and # the leading .*, because of find-debuginfo.sh's buggy handling # of matching the pattern against the symlinks file. -%{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)?|XXX' -o kernel-tools-debuginfo.list} +%{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 kernel-tools-debuginfo.list}
# with_tools %endif @@ -1124,7 +1115,7 @@ AutoReqProv: no\ %description %{?1:%{1}-}debuginfo\ This package provides debug information for package %{name}%{?1:-%{1}}.\ This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\ -%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} %{?with_kmod_btf} -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ +%{expand:%%global _find_debuginfo_opts %{?_find_debuginfo_opts} --keep-section '.BTF' -p '.*/usr/src/kernels/.*|XXX' -o ignored-debuginfo.list -p '/.*/%%{KVERREL_RE}%{?1:[+]%{1}}/.*|/.*%%{KVERREL_RE}%{?1:+%{1}}(.debug)?' -o debuginfo%{?1}.list}\ %{nil}
# @@ -1581,7 +1572,7 @@ InitBuildVars() { cp configs/$Config .config
%if %{signkernel}%{signmodules} - cp $RPM_SOURCE_DIR/x509.genkey certs/. + cp configs/x509.genkey certs/. %endif
Arch=`head -1 .config | cut -b 3-` @@ -1711,7 +1702,7 @@ BuildKernel() { # hmac sign the kernel for FIPS echo "Creating hmac file: $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac" ls -l $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer - sha512hmac $RPM_BUILD_ROOT/%{image_install_path}/$InstallName-$KernelVer | sed -e "s,$RPM_BUILD_ROOT,," > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; + (cd $RPM_BUILD_ROOT/%{image_install_path} && sha512hmac $InstallName-$KernelVer) > $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac; cp $RPM_BUILD_ROOT/%{image_install_path}/.vmlinuz-$KernelVer.hmac $RPM_BUILD_ROOT/lib/modules/$KernelVer/.vmlinuz.hmac
if [ $DoModules -eq 1 ]; then @@ -1860,6 +1851,14 @@ BuildKernel() { rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/tracing rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/spdxcheck.py
+%ifarch s390x + # CONFIG_EXPOLINE_EXTERN=y produces arch/s390/lib/expoline.o + # which is needed during external module build. + if [ -f arch/s390/lib/expoline.o ]; then + cp -a --parents arch/s390/lib/expoline.o $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + fi +%endif + # Files for 'make scripts' to succeed with kernel-devel. mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/security/selinux/include cp -a --parents security/selinux/include/classmap.h $RPM_BUILD_ROOT/lib/modules/$KernelVer/build @@ -2036,7 +2035,7 @@ BuildKernel() { remove_depmod_files
# Identify modules in the kernel-modules-extras package - %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $RPM_SOURCE_DIR/mod-extra.list + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer $(realpath configs/mod-extra.list) # Identify modules in the kernel-modules-extras package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE84} internal
@@ -2047,6 +2046,7 @@ BuildKernel() { # Copy the System.map file for depmod to use, and create a backup of the # full module tree so we can restore it after we're done filtering cp System.map $RPM_BUILD_ROOT/. + cp configs/filter-*.sh $RPM_BUILD_ROOT/. pushd $RPM_BUILD_ROOT mkdir restore cp -r lib/modules/$KernelVer/* restore/. @@ -2061,7 +2061,6 @@ BuildKernel() { # modules lists. This actually removes anything going into -modules # from the dir. find lib/modules/$KernelVer/kernel -name *.ko | sort -n > modules.list - cp $RPM_SOURCE_DIR/filter-*.sh . ./filter-modules.sh modules.list %{_target_cpu} rm filter-*.sh
@@ -2249,7 +2248,10 @@ chmod +x tools/power/cpupower/utils/version-gen.sh %{tools_make} popd pushd tools/power/x86/intel-speed-select - %{make} + %{make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} popd %endif %endif @@ -2514,7 +2516,10 @@ install -m644 %{SOURCE2001} %{buildroot}%{_sysconfdir}/sysconfig/cpupower %{tools_make} DESTDIR=%{buildroot} install popd pushd tools/power/x86/intel-speed-select - %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude" DESTDIR=%{buildroot} install + %{tools_make} CFLAGS+="-D_GNU_SOURCE -Iinclude -I/usr/include/libnl3" DESTDIR=%{buildroot} install + popd + pushd tools/arch/x86/intel_sdsi + %{tools_make} DESTDIR=%{buildroot} install popd %endif pushd tools/thermal/tmon @@ -2854,6 +2859,7 @@ fi %{_bindir}/turbostat %{_mandir}/man8/turbostat* %{_bindir}/intel-speed-select +%{_sbindir}/intel_sdsi %endif # cpupowerarchs %endif
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1647
kernel@lists.fedoraproject.org