From: Don Zickus <dzickus(a)redhat.com>
Add wildcard macros -baseonly -gcov
There are multiple usecases for -baseonly and -gcov on various
targets in the Makefile. Instead of calling those targets out
repeatedly, lets generalize them a bit.
Allow adding -baseonly and -gcov to:
dist-rpm
dist-srpm
dist-brew
dist-koji
distg-brew
distg-koji
Gcov is useful for adding code coverage. Baseonly is useful to only
build the kernel for debugging purposes without userspace tools.
Signed-off-by: Don Zickus <dzickus(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -297,6 +297,12 @@ dist-sources: dist-kabi dist-kabi-dup sources-rh
dist-test-patch: generate-testpatch-tmp
@mv $(TESTPATCH).tmp $(TESTPATCH);
+%-baseonly: RPMBUILDOPTS=--target $(MACH) --without debug --without debuginfo --without vdso_install --without bpftool --without perf --without tools --without selftests -bb
+%-baseonly: BUILDOPTS+=-debug -debuginfo -vdso_install -bpftool -perf -tools -selftests
+
+%-gcov: BUILDID=".gcov"
+%-gcov: BUILDOPTS+="+gcov"
+
do-rpmbuild: dist-sources
$(RPMBUILD) --define "_sourcedir $(SOURCES)" --define "_builddir $(RPM)/BUILD" --define "_srcrpmdir $(RPM)/SRPMS" --define "_rpmdir $(RPM)/RPMS" --define "_specdir $(RPM)/SPECS" --define "dist $(DIST)" $(RPMBUILDOPTS) $(RPM)/SOURCES/$(PACKAGE_NAME).spec
@@ -306,9 +312,9 @@ dist-all-rpms: dist-sources do-rpmbuild
dist-srpm: RPMBUILDOPTS=--nodeps -bs
dist-srpm: dist-sources do-rpmbuild
-dist-srpm-gcov: BUILDID=".gcov"
-dist-srpm-gcov: BUILDOPTS+="+gcov"
-dist-srpm-gcov: dist-srpm
+dist-srpm-%: dist-srpm
+ @# phony command to force this to be a target and not variable
+ @FOO=BAR
dist-rpms: RPMBUILDOPTS=--target $(MACH) -bb
dist-rpms: dist-sources do-rpmbuild
@@ -322,8 +328,7 @@ dist-prep: dist-sources do-rpmbuild
dist-perf: RPMBUILDOPTS=--without up --without smp --without zfcpdump --without debug --without doc --without headers --without --without doc --without debuginfo --target $(MACH) -bb
dist-perf: dist-sources do-rpmbuild
-dist-rpm-baseonly: RPMBUILDOPTS=--target $(MACH) --without debug --without debuginfo --without vdso_install --without bpftool --without perf --without tools -bb
-dist-rpm-baseonly: dist-sources do-rpmbuild
+dist-rpm-%: dist-sources do-rpmbuild
# unless you know what you're doing, you don't want to use the next four ones
dist-release-finish: setup-source
@@ -388,9 +393,25 @@ distg-koji: BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
dist-brew dist-koji: dist-%: dist-srpm
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) $(SRPMS)/$(PACKAGE_NAME)-$(KVERSION)-$(PKGRELEASE)$(DIST).src.rpm $(OUTPUT_FILE)
+dist-brew-%: dist-brew
+ @# phony command to force this to be a target and not variable
+ @FOO=BAR
+
+dist-koji-%: dist-koji
+ @# phony command to force this to be a target and not variable
+ @FOO=BAR
+
distg-brew distg-koji: distg-%:
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
+distg-brew-%: dist-brew
+ @# phony command to force this to be a target and not variable
+ @FOO=BAR
+
+distg-koji-%: dist-koji
+ @# phony command to force this to be a target and not variable
+ @FOO=BAR
+
.PHONY: $(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec
$(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec:
@echo "dist-sources"
@@ -469,34 +490,30 @@ dist-full-help:
@echo 'Building targets:'
@echo ' All RPM/SRPM files will be put under the redhat/rpm/ directory.'
@echo ''
- @echo ' dist-srpm - Create a source RPM and put it into the redhat/rpm/SRPMS/'
+ @echo ' dist-srpm@ - Create a source RPM and put it into the redhat/rpm/SRPMS/'
@echo ' directory. See the dist-brew target for available options.'
- @echo ' dist-srpm-gcov - Create a source RPM with gcov enabled and put it into the'
- @echo ' redhat/rpm/SRPMS/ directory.'
- @echo ' dist-brew - Create a kernel SRPM and then call brew to build the'
+ @echo ' dist-brew@ - Create a kernel SRPM and then call brew to build the'
@echo ' created SRPM. Add BUILDOPTS="+<opt> -<opt> [...]" to'
@echo ' enable/disable build options.'
@echo ' Available <opt>s and their default values:' \
$$(sed -n -e 's/^%define with_\([^ \t]*\).*\?_without_.*/+\1/p' \
-e 's/^%define with_\([^ \t]*\).*\?_with_.*/-\1/p' kernel.spec.template | \
grep -v 'only$$') | fmt -80
- @echo ' dist-koji - Create a kernel SRPM and then call koji to build the'
+ @echo ' dist-koji@ - Create a kernel SRPM and then call koji to build the'
@echo ' created SRPM. See the dist-brew target for available'
@echo ' options.'
- @echo ' distg-brew - Pass HEAD of the current git branch to brew to build an'
+ @echo ' distg-brew@ - Pass HEAD of the current git branch to brew to build an'
@echo ' RPM set. Do not forget to push to the remote repository'
@echo ' first. Preceed make command by RHGITCOMMIT=<commitID>'
@echo ' specify commit ID to use.'
@echo ' To set the remote repo, invoke:'
@echo ' git config rhg.url git://<repo_path>'
- @echo ' distg-koji - Pass HEAD of the current git branch to koji to build an'
+ @echo ' distg-koji@ - Pass HEAD of the current git branch to koji to build an'
@echo ' RPM set. Do not forget to push to the remote repository'
@echo ' first. See the distg-brew target for options and'
@echo ' configuration.'
- @echo ' dist-rpms - Create the binary RPMS for the kernel.'
+ @echo ' dist-rpms@ - Create the binary RPMS for the kernel.'
@echo ' See the dist-brew target for available options.'
- @echo ' dist-rpm-baseonly - Create the binary RPMS for the kernel and modules'
- @echo ' (no userspace tools or debuginfo).'
@echo ' dist-kernel-<type> - Create binary RPMS for a particular kernel type.'
@echo ' Available <type>s:'\
$$(sed -n 's/^%define with_\([^ ]*only\).*/\1/p' kernel.spec.template)
@@ -524,6 +541,12 @@ dist-full-help:
@echo ' dist-rhel-configs - build ELN configs'
@echo ' dist-fedora-configs - build Fedora configs'
+ @echo ''
+ @echo 'Wildcard targets: [indicated by '@' above]'
+ @echo ' *-baseonly - builds only the kernel (disables userspace and debuginfo)'
+ @echo ' - Examples: dist-srpm-baseonly, dist-brew-baseonly'
+ @echo ' *-gcov - builds a kernel with gcov enabled'
+ @echo ' - Examples: dist-srpm-gcov, dist-brew-gcov'
@echo ''
@echo 'kABI targets:'
@echo ' dist-kabi - Create kABI stablelist files in redhat/kabi/kabi-rhel*/'
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1444
From: Sabrina Dubroca on gitlab.com
Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1619
This MR introduces a new kABI macro, RH_KABI_EXCLUDE_WITH_SIZE. The
implementation is identical to RH_KABI_EXTEND_WITH_SIZE, but the meaning is
more in line with RH_KABI_EXCLUDE. The size check and reserved space allows us
to exclude an element embedded inside a kABI-protected structure while
reserving space for it to grow in the future.
The size checks that are part of multiple kABI macros are currently not
enabled because the config option to turn them on is missing. Those size
checks only make sense on regular builds, so they're disabled on debug
kernels.
Signed-off-by: Sabrina Dubroca <sdubroca(a)redhat.com>
---
include/linux/rh_kabi.h | 26 ++++++++++
redhat/configs/ark/debug/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 +
redhat/configs/ark/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 +
redhat/configs/ark/kgcov/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 +
redhat/configs/common/generic/CONFIG_RH_KABI_SIZE_ALIGN_CHECKS | 1 +
Kconfig.redhat | 9 +++
6 files changed, 39 insertions(+), 0 deletions(-)
From: Mark Langsdorf <mlangsdo(a)redhat.com>
redhat/configs: enable ChromeOS ACPI driver
Provide a device interface for exporting ACPI data on x86 Chromebooks.
Signed-off-by: Mark Langsdorf <mlangsdo(a)redhat.com>
diff --git a/redhat/configs/ark/generic/arm/aarch64/CONFIG_CHROMEOS_ACPI b/redhat/configs/ark/generic/arm/aarch64/CONFIG_CHROMEOS_ACPI
new file mode 100644
index blahblah..blahblah 100644
--- /dev/null
+++ b/redhat/configs/ark/generic/arm/aarch64/CONFIG_CHROMEOS_ACPI
@@ -0,0 +1 @@
+CONFIG_CHROMEOS_ACPI=y
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2153
From: Prarit Bhargava <prarit(a)redhat.com>
redhat/kernel.spec.template: Fix RHEL systemd-boot-unsigned dependency for
RHEL
systemd-boot-unsigned should also only be included in .eln.
Signed-off-by: Prarit Bhargava <prarit(a)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
@@ -726,9 +726,9 @@ BuildRequires: dracut
BuildRequires: binutils
# For the initrd
BuildRequires: lvm2
-%if 0%{?fedora} > 37
-# The UKI code was introduced in Fedora 38 and is not needed by
-# earlier versions. This wrapper can be removed in Fedora 41.
+%if 0%{?fedora} > 37 || 0%{?rhel} > 9
+# The UKI code was introduced in Fedora 38 and is not needed by earlier
+# versions. This wrapper can be removed for fedora in Fedora 41.
BuildRequires: systemd-boot-unsigned
%endif
# For systemd-stub and systemd-pcrphase
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2341
From: Íñigo Huguet <ihuguet(a)redhat.com>
redhat/Makefile: fix default values for dist-brew's DISTRO and DIST
In dist-brew target, target-specific variables to change the default
value of DISTRO and DIST to 'rhel' and '.el9', but they're not useful
because the rest of variables that depends on them, such us BUILD_TARGET,
has been calculated yet.
The most visible error is that `make dist-brew` fails with 'brew: error:
No such build target: rawhide'. Rawhide is the default BUILD_TARGET for
Fedora, not for RHEL.
Fix it by recursively calling `make` so the sub-make has the correct DISTRO
and DIST values since the beginning, thus calculating the rest of values
correctly.
To make this work, get rid of the `ifdef BUILD_TARGET` checks, or the
sub-make will see it as already defined (inherited) and won't change it.
Since variables defined as commandline arguments always override
variables defined inside the Makefile, users still can select a
different one: `make dist-brew BUILD_TARGET=whatever`.
Also, fix a missing closing quote in `ifeq ("$(DIST)", ".eln)`.
Signed-off-by: Íñigo Huguet <ihuguet(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -223,9 +223,7 @@ SRPM:=$(SRPMS)/$(RELEASETAG)$(DIST).src.rpm
#
ifeq ("$(DISTRO)", "fedora")
RHDISTGIT_BRANCH:=rawhide
- ifndef BUILD_TARGET
- BUILD_TARGET:=rawhide
- endif
+ BUILD_TARGET:=rawhide
# The Fedora tarfile name is based on an upstream tag as users may
# replace the tarball from one with upstream, rebuild, and then deploy
# without changing anything else in the specfile.
@@ -236,12 +234,8 @@ ifeq ("$(DISTRO)", "fedora")
RHPKG_BIN:=fedpkg
else ifeq ("$(DISTRO)", "centos")
RHDISTGIT_BRANCH:=c$(RHEL_MAJOR)s
- ifndef BUILD_PROFILE
- BUILD_PROFILE:= -p stream
- endif
- ifndef BUILD_TARGET
- BUILD_TARGET:=c$(RHEL_MAJOR)s-candidate
- endif
+ BUILD_PROFILE:= -p stream
+ BUILD_TARGET:=c$(RHEL_MAJOR)s-candidate
SPECTARFILE_RELEASE:=$(BASEVERSION)$(DIST)
SPECKABIVERSION:=$(BASEVERSION)$(DIST)
DISTRELEASETAG:=$(RELEASETAG)$(DIST)
@@ -250,21 +244,16 @@ else ifeq ("$(DISTRO)", "centos")
RHPKG_BIN:=centpkg
else
RHDISTGIT_BRANCH:=rhel-$(RHEL_MAJOR).$(RHEL_MINOR).0
- ifndef BUILD_TARGET
- ifeq ("$(DIST)", ".eln")
- BUILD_TARGET:=eln
- else
- # This value is used by the dist[g]-targets. Changing this value has significant
- # consequences for all of RHEL kernel engineering.
- BUILD_TARGET:=rhel-$(RHEL_MAJOR)-newest-test-pesign
- endif
- endif
- ifeq ("$(DIST)", ".eln)
+ ifeq ("$(DIST)", ".eln")
+ BUILD_TARGET:=eln
DISTRELEASETAG:=$(RELEASETAG)
DISTBASEVERSION:=$(BASEVERSION)
SPECTARFILE_RELEASE:=$(BASEVERSION)
SPECKABIVERSION:=$(BASEVERSION)
else
+ # This value is used by the dist[g]-targets. Changing this value has significant
+ # consequences for all of RHEL kernel engineering.
+ BUILD_TARGET:=rhel-$(RHEL_MAJOR)-newest-test-pesign
DISTRELEASETAG:=$(RELEASETAG)$(DIST)
DISTBASEVERSION:=$(BASEVERSION)$(DIST)
SPECTARFILE_RELEASE:=$(BASEVERSION)$(DIST)
@@ -753,14 +742,18 @@ dist-vr-check:
exit 1; \
fi
-dist-brew: DIST=.el9
-dist-brew: DISTRO=rhel
-dist-brew dist-koji: dist-%: dist-vr-check dist-srpm
+# Call as sub-make to select different default DISTRO and DIST for dist-brew.
+# This is because target-specific variables only apply inside the recipe, but we
+# need to recalculate some values such as BUILD_TARGET that depends on them.
+dist-brew distg-brew: DISTRO=rhel
+dist-brew distg-brew: DIST=.el9
+dist-brew distg-brew dist-koji distg_koji:
+ $(MAKE) _$@
+
+_dist-brew _dist-koji: _dist-%: dist-vr-check dist-srpm
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) --scratch $(BUILD_TARGET) $(SRPMS)/$(RELEASETAG)$(DIST).src.rpm $(OUTPUT_FILE)
-distg-brew: DIST=.el9
-distg-brew: DISTRO=rhel
-distg-brew distg-koji: distg-%: dist-vr-check
+_distg-brew _distg-koji: _distg-%: dist-vr-check
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) --scratch $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
.PHONY: $(REDHAT)/rpm/SOURCES/$(SPECFILE)
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2339
From: Don Zickus <dzickus(a)redhat.com>
Remove cc lines from automatic configs
The kernel-webhook is smarter and knows who the right reviewers are.
The webhooks can also dynamically update them. Just remove the static
cc assisgnment in the nightly automated config generation.
Signed-off-by: Don Zickus <dzickus(a)redhat.com>
diff --git a/redhat/scripts/genspec/gen_config_patches.sh b/redhat/scripts/genspec/gen_config_patches.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/genspec/gen_config_patches.sh
+++ b/redhat/scripts/genspec/gen_config_patches.sh
@@ -115,10 +115,6 @@ for f in "$config_bundles_dir"/*; do
# remove the pending option
rm redhat/configs/pending-rhel/generic/"$line"
done < "$f"
- if [ -n "$RHMAINTAINERS" ] && [ -f ./scripts/get_maintainer.pl ] && [ -f "$RHMAINTAINERS" ]; then
- echo "" >> "$tmpdir"/commit
- ./scripts/get_maintainer.pl --no-rolestats --mpath "$RHMAINTAINERS" --no-git --no-git-fallback -f "$_f" | sed "s/^/Cc: /" >> "$tmpdir"/commit
- fi
# We do a separate branch per config commit
if ! git checkout -b "configs/$(date +%F)/$_f"; then
printf "Unable to check out configs/%s/%s branch!\n" "$(date +%F)" "$_f"
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2342