[OS-BUILD PATCH 0/5] [redhat] enable CONFIG_CMA on aarch64 in ARK as
tech-preview
by David Hildenbrand (via Email Bridge)
From: David Hildenbrand on gitlab.com
Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1592
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2043141
Upstream: RHEL only
The above bugzilla is for RHEL9/CS9 and I'll send a MR soon that performs
the same changes to CS9.
Enable CONFIG_CMA on aarch64 in ARK as we already have in fedora. We did
the same change for x86-64 just recently. Move the relevant configs from
redhat/configs/fedora to redhat/configs/common.
While in tech-preview, we'll require a manual configuration of cma on
the kernel command line -- we will default to "cma=0". Once e.g., "cma=64M"
has been specified, cma_activate_area() will call mark_tech_preview("CMA"),
essentially tainting the kernel. Once no longer in tech-preview, we can
enable CMA as default by e.g., similarly defaulting to "cma=64M".
The real change is preceded by some cleanups around CMA configs.
Signed-off-by: David Hildenbrand <david(a)redhat.com>
---
redhat/configs/ark/generic/arm/CONFIG_CMA_SIZE_MBYTES | 1 +
redhat/configs/fedora/generic/arm/CONFIG_CMA => redhat/configs/common/generic/arm/CONFIG_CMA | 0
redhat/configs/fedora/generic/arm/CONFIG_CMA_ALIGNMENT => redhat/configs/common/generic/arm/CONFIG_CMA_ALIGNMENT | 0
redhat/configs/fedora/generic/arm/CONFIG_CMA_SIZE_SEL_MAX => redhat/configs/common/generic/arm/CONFIG_CMA_SIZE_SEL_MAX | 0
redhat/configs/fedora/generic/arm/CONFIG_CMA_SIZE_SEL_MBYTES => redhat/configs/common/generic/arm/CONFIG_CMA_SIZE_SEL_MBYTES | 0
redhat/configs/fedora/generic/arm/CONFIG_CMA_SIZE_SEL_MIN => redhat/configs/common/generic/arm/CONFIG_CMA_SIZE_SEL_MIN | 0
redhat/configs/fedora/generic/arm/CONFIG_CMA_SIZE_SEL_PERCENTAGE => redhat/configs/common/generic/arm/CONFIG_CMA_SIZE_SEL_PERCENTAGE | 0
redhat/configs/fedora/generic/arm/CONFIG_DMA_CMA => redhat/configs/common/generic/arm/CONFIG_DMA_CMA | 0
redhat/configs/common/generic/powerpc/CONFIG_CMA_AREAS | 1 -
redhat/configs/common/generic/powerpc/CONFIG_CMA_DEBUG | 1 -
redhat/configs/common/generic/powerpc/CONFIG_CMA_DEBUGFS | 1 -
redhat/configs/common/generic/s390x/CONFIG_CMA_AREAS | 1 -
redhat/configs/common/generic/s390x/CONFIG_CMA_DEBUG | 1 -
redhat/configs/common/generic/s390x/CONFIG_CMA_DEBUGFS | 1 -
redhat/configs/common/generic/x86/x86_64/CONFIG_CMA_AREAS | 1 -
redhat/configs/common/generic/x86/x86_64/CONFIG_CMA_DEBUG | 1 -
redhat/configs/common/generic/x86/x86_64/CONFIG_CMA_DEBUGFS | 1 -
redhat/configs/ark/generic/CONFIG_CMA_AREAS => redhat/configs/common/generic/CONFIG_CMA_AREAS | 0
redhat/configs/ark/generic/CONFIG_CMA_DEBUG => redhat/configs/common/generic/CONFIG_CMA_DEBUG | 0
redhat/configs/ark/generic/CONFIG_CMA_DEBUGFS => redhat/configs/common/generic/CONFIG_CMA_DEBUGFS | 0
redhat/configs/fedora/generic/arm/CONFIG_CMA_AREAS | 1 -
redhat/configs/fedora/generic/arm/CONFIG_CMA_DEBUG | 1 -
redhat/configs/fedora/generic/CONFIG_CMA_SYSFS | 1 -
23 files changed, 1 insertions(+), 12 deletions(-)
2 years, 3 months
[OS-BUILD PATCHv6] Makefile: Check PKGRELEASE size on dist-brew
targets
by Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava <prarit(a)redhat.com>
Makefile: Check PKGRELEASE size on dist-brew targets
The Red Hat brew system is a build system used internally within Red Hat
which is similar to the externally available koji build system. One of
the architectures of a brew build is 's390x+zfcpdump'. This arch using
the default of localversion 'test' always causes the rpm build error:
"5.17.0-0.rc0.20220114gitfb3b0673b7d5.65.test.el9_b.s390x+zfcpdump" exceeds 64 characters
make: *** [Makefile:1257: include/generated/utsrelease.h] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.tMkhuG (%build)
The 64 character limit is a size limit on UTSRELEASE and cannot be dynamically
changed so the only other option is to reduce the package release
(PKGRELEASE) string in length. Removing the date field and the string
'git' results in a string that is shorter by 11 characters, with a minimal
loss in information.
This option should not be set for the dist-git target so explicitly set
PREBUILD_GIT_ONLY to zero on the dist-git and dist-git-test targets.
Add an option, PREBUILD_GIT_ONLY, to shorten the PREBUILD variable which
is used in the PKGRELEASE string. Add a check for the size of PKGRELEASE
and return a pre-build error if PKGRELEASE is greater than 35 characters.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -390,10 +390,19 @@ dist-koji : BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
distg-brew: BUILD_FLAGS ?= $(BREW_FLAGS) $(TEST_FLAGS)
distg-koji: BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
-dist-brew dist-koji: dist-%: dist-srpm
+dist-vr-check:
+ @# builds may include a s390x+zfcpdump arch build. UTS_RELEASE can only have a
+ @# version-release string with max 64 chars. The version-release for s390x+zfcpdump
+ @# is 29 characters, leaving a maximum of 35 characters for PKGRELEASE.
+ @if [ $$(echo "$(PKGRELEASE)" | wc -c) -gt 35 ]; then \
+ echo "PKGRELEASE ($(PKGRELEASE)) is too long. Use a shorter localversion (currently $(BUILDID))"; \
+ exit 1; \
+ 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)
-distg-brew distg-koji: distg-%:
+distg-brew distg-koji: distg-%: dist-vr-check
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
.PHONY: $(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -75,9 +75,20 @@ ifeq ($(SNAPSHOT),1)
PREBUILD:=0$(KEXTRAVERSION).
RPMKPATCHLEVEL:=$(shell expr $(RPMKPATCHLEVEL) + 1)
endif
- # Obtain the date that HEAD was committed (not the snapshot commit).
- HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
- PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ ifeq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS),dist-git-test dist-git))
+ ifneq ($(PREBUILD_GIT_ONLY),1)
+ PREBUILD_GIT_ONLY:=0
+ endif
+ else
+ PREBUILD_GIT_ONLY:=1
+ endif
+ ifeq ($(PREBUILD_GIT_ONLY),1)
+ PREBUILD:=$(PREBUILD)$(MARKER).
+ else
+ # Obtain the date that HEAD was committed (not the snapshot commit).
+ HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
+ PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ endif
UPSTREAM_TARBALL_NAME:=$(patsubst v%,%,$(_TAG))
endif
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1579
2 years, 3 months
✅ PASS: Test report for kernel 5.16.5-200.fc35 (fedora-35)
by CKI Project
Hello,
We ran automated tests on the following kernel build:
Kernel package: kernel-5.16.5-200.fc35
Task URL: https://koji.fedoraproject.org/koji/taskinfo?taskID=82256154
The results of these automated tests are provided below.
Overall result: PASSED
Tests: OK
All kernel binaries, config files, and logs are available for download here:
https://arr-cki-prod-datawarehouse-public.s3.amazonaws.com/index.html?pre...
Please reply to this email if you have any questions about the tests that we
ran or if you have any suggestions on how to make future tests more effective.
For the full detail on our testing procedures, please scroll to the bottom of
this message.
,-. ,-.
( C ) ( K ) Continuous
`-',-.`-' Kernel
( I ) Integration
`-'
______________________________________________________________________________
Hardware testing
----------------
We booted each kernel and ran the following tests:
aarch64:
Host 1:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 ❌ Storage blktests - nvmeof-mp
Host 2:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ ACPI table test
✅ LTP - cve
✅ LTP - sched
✅ LTP - syscalls
✅ LTP - can
✅ LTP - commands
✅ LTP - containers
✅ LTP - dio
✅ LTP - fs
✅ LTP - fsx
✅ LTP - math
✅ LTP - hugetlb
✅ LTP - mm
✅ LTP - nptl
✅ LTP - pty
✅ LTP - ipc
✅ LTP - tracing
✅ LTP: openposix test suite
✅ CIFS Connectathon
✅ Loopdev Sanity
✅ Memory: fork_mem
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Ethernet drivers sanity
🚧 ✅ NFS Connectathon
Host 3:
⚡ Internal infrastructure issues prevented one or more tests (marked
with ⚡⚡⚡) from running on this architecture.
This is not the fault of the kernel that was tested.
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ xfstests - ext4
✅ xfstests - xfs
✅ Storage: swraid mdadm raid_module test
🚧 ✅ xfstests - btrfs
🚧 ✅ Storage blktests - blk
🚧 ⚡⚡⚡ Storage blktests - nvme-tcp
🚧 ⚡⚡⚡ Storage block - filesystem fio test
🚧 ⚡⚡⚡ Storage block - queue scheduler test
🚧 ⚡⚡⚡ Storage block - storage fio numa
🚧 ⚡⚡⚡ storage: software RAID testing
🚧 ⚡⚡⚡ stress: stress-ng - interrupt
🚧 ⚡⚡⚡ stress: stress-ng - cpu
🚧 ⚡⚡⚡ stress: stress-ng - cpu-cache
🚧 ⚡⚡⚡ stress: stress-ng - memory
🚧 ⚡⚡⚡ stress: stress-ng - os
Host 4:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 ❌ Storage blktests - srp
Host 5:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ Ethernet drivers sanity - mlx5
ppc64le:
Host 1:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 ✅ Storage blktests - nvmeof-mp
Host 2:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ LTP - cve
✅ LTP - sched
✅ LTP - syscalls
✅ LTP - can
✅ LTP - commands
✅ LTP - containers
✅ LTP - dio
✅ LTP - fs
✅ LTP - fsx
✅ LTP - math
✅ LTP - hugetlb
✅ LTP - mm
✅ LTP - nptl
✅ LTP - pty
✅ LTP - ipc
✅ LTP - tracing
✅ LTP: openposix test suite
✅ CIFS Connectathon
✅ Loopdev Sanity
✅ Memory: fork_mem
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Ethernet drivers sanity
🚧 ✅ xarray-idr-radixtree-test
🚧 ✅ NFS Connectathon
Host 3:
⚡ Internal infrastructure issues prevented one or more tests (marked
with ⚡⚡⚡) from running on this architecture.
This is not the fault of the kernel that was tested.
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 ⚡⚡⚡ Storage blktests - srp
Host 4:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ xfstests - ext4
✅ xfstests - xfs
✅ Storage: swraid mdadm raid_module test
🚧 ✅ xfstests - btrfs
🚧 ✅ Storage blktests - blk
🚧 ✅ Storage blktests - nvme-tcp
🚧 ✅ Storage block - filesystem fio test
🚧 ✅ Storage block - queue scheduler test
🚧 ❌ Storage block - storage fio numa
🚧 ✅ Storage: lvm device-mapper test - upstream
🚧 ✅ storage: software RAID testing
s390x:
Host 1:
⚡ Internal infrastructure issues prevented one or more tests (marked
with ⚡⚡⚡) from running on this architecture.
This is not the fault of the kernel that was tested.
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ Storage: swraid mdadm raid_module test
🚧 ✅ Storage blktests - blk
🚧 ✅ Storage blktests - nvme-tcp
🚧 ✅ stress: stress-ng - interrupt
🚧 ✅ stress: stress-ng - cpu
🚧 ✅ stress: stress-ng - cpu-cache
🚧 ✅ stress: stress-ng - memory
🚧 ⚡⚡⚡ stress: stress-ng - os
Host 2:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 ✅ Storage blktests - nvmeof-mp
Host 3:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ LTP - cve
✅ LTP - sched
✅ LTP - syscalls
✅ LTP - can
✅ LTP - commands
✅ LTP - containers
✅ LTP - dio
✅ LTP - fs
✅ LTP - fsx
✅ LTP - math
✅ LTP - hugetlb
✅ LTP - mm
✅ LTP - nptl
✅ LTP - pty
✅ LTP - ipc
✅ LTP - tracing
✅ LTP: openposix test suite
✅ CIFS Connectathon
✅ Loopdev Sanity
✅ Memory: fork_mem
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Ethernet drivers sanity
🚧 ✅ NFS Connectathon
x86_64:
Host 1:
⚡ Internal infrastructure issues prevented one or more tests (marked
with ⚡⚡⚡) from running on this architecture.
This is not the fault of the kernel that was tested.
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 ⚡⚡⚡ Storage blktests - srp
Host 2:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ xfstests - ext4
✅ xfstests - xfs
✅ xfstests - nfsv4.2
✅ Storage: swraid mdadm raid_module test
🚧 ✅ xfstests - btrfs
🚧 ✅ xfstests - cifsv3.11
🚧 ✅ Storage blktests - blk
🚧 ✅ Storage blktests - nvme-tcp
🚧 ✅ Storage block - filesystem fio test
🚧 ✅ Storage block - queue scheduler test
🚧 ❌ Storage block - storage fio numa
🚧 ✅ Storage: lvm device-mapper test - upstream
🚧 ✅ storage: software RAID testing
🚧 ✅ stress: stress-ng - interrupt
🚧 ✅ stress: stress-ng - cpu
🚧 ✅ stress: stress-ng - cpu-cache
🚧 ✅ stress: stress-ng - memory
🚧 ✅ stress: stress-ng - os
Host 3:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
🚧 💥 Storage blktests - nvmeof-mp
Host 4:
🚧 ✅ SELinux Custom Module Setup
✅ Boot test
✅ Reboot test
✅ ACPI table test
✅ LTP - cve
✅ LTP - sched
✅ LTP - syscalls
✅ LTP - can
✅ LTP - commands
✅ LTP - containers
✅ LTP - dio
✅ LTP - fs
✅ LTP - fsx
✅ LTP - math
✅ LTP - hugetlb
✅ LTP - mm
✅ LTP - nptl
✅ LTP - pty
✅ LTP - ipc
✅ LTP - tracing
✅ LTP: openposix test suite
✅ CIFS Connectathon
✅ Loopdev Sanity
✅ Memory: fork_mem
✅ Memory function: memfd_create
✅ AMTU (Abstract Machine Test Utility)
✅ Ethernet drivers sanity
🚧 ✅ xarray-idr-radixtree-test
🚧 ✅ NFS Connectathon
Test sources: https://gitlab.com/cki-project/kernel-tests
💚 Pull requests are welcome for new tests or improvements to existing tests!
Aborted tests
-------------
Tests that didn't complete running successfully are marked with ⚡⚡⚡.
If this was caused by an infrastructure issue, we try to mark that
explicitly in the report.
Waived tests
------------
If the test run included waived tests, they are marked with 🚧. Such tests are
executed but their results are not taken into account. Tests are waived when
their results are not reliable enough, e.g. when they're just introduced or are
being fixed.
Testing timeout
---------------
We aim to provide a report within reasonable timeframe. Tests that haven't
finished running yet are marked with ⏱.
2 years, 3 months
[OS-BUILD PATCHv2] mm/sparsemem: Fix 'mem_section' will never be NULL
gcc 12
warning
by Justin M. Forbes (via Email Bridge)
From: Waiman Long <longman(a)redhat.com>
mm/sparsemem: Fix 'mem_section' will never be NULL gcc 12 warning
The gcc 12 compiler reports a warning on the following code:
static inline struct mem_section *__nr_to_section(unsigned long nr)
{
#ifdef CONFIG_SPARSEMEM_EXTREME
if (!mem_section)
return NULL;
#endif
:
With CONFIG_SPARSEMEM_EXTREME on, the mem_section definition is
extern struct mem_section **mem_section;
Obviously, mem_section cannot be NULL, but *mem_section can be if memory
hasn't been allocated for the dynamic mem_section[] array yet. Fix this
warning by checking for "!*mem_section" instead.
Fixes: 83e3c48729d9 ("mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y")
Signed-off-by: Waiman Long <longman(a)redhat.com>
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index blahblah..blahblah 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -1390,7 +1390,7 @@ static inline unsigned long *section_to_usemap(struct mem_section *ms)
static inline struct mem_section *__nr_to_section(unsigned long nr)
{
#ifdef CONFIG_SPARSEMEM_EXTREME
- if (!mem_section)
+ if (!*mem_section)
return NULL;
#endif
if (!mem_section[SECTION_NR_TO_ROOT(nr)])
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1598
2 years, 3 months
[OS-BUILD PATCHv5] Makefile: Check PKGRELEASE size on dist-brew
targets
by Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava <prarit(a)redhat.com>
Makefile: Check PKGRELEASE size on dist-brew targets
The Red Hat brew system is a build system used internally within Red Hat
which is similar to the externally available koji build system. One of
the architectures of a brew build is 's390x+zfcpdump'. This arch using
the default of localversion 'test' always causes the rpm build error:
"5.17.0-0.rc0.20220114gitfb3b0673b7d5.65.test.el9_b.s390x+zfcpdump" exceeds 64 characters
make: *** [Makefile:1257: include/generated/utsrelease.h] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.tMkhuG (%build)
The 64 character limit is a size limit on UTSRELEASE and cannot be dynamically
changed so the only other option is to reduce the package release
(PKGRELEASE) string in length. Removing the date field and the string
'git' results in a string that is shorter by 11 characters, with a minimal
loss in information.
This option should not be set for the dist-git target so explicitly set
PREBUILD_GIT_ONLY to zero on the dist-git and dist-git-test targets.
Add an option, PREBUILD_GIT_ONLY, to shorten the PREBUILD variable which
is used in the PKGRELEASE string. Add a check for the size of PKGRELEASE
and return a pre-build error if PKGRELEASE is greater than 35 characters.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -391,10 +391,19 @@ dist-koji : BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
distg-brew: BUILD_FLAGS ?= $(BREW_FLAGS) $(TEST_FLAGS)
distg-koji: BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
-dist-brew dist-koji: dist-%: dist-srpm
+dist-vr-check:
+ @# builds may include a s390x+zfcpdump arch build. UTS_RELEASE can only have a
+ @# version-release string with max 64 chars. The version-release for s390x+zfcpdump
+ @# is 29 characters, leaving a maximum of 35 characters for PKGRELEASE.
+ @if [ $$(echo "$(PKGRELEASE)" | wc -c) -gt 35 ]; then \
+ echo "PKGRELEASE ($(PKGRELEASE)) is too long. Use a shorter localversion (currently $(BUILDID))"; \
+ exit 1; \
+ 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)
-distg-brew distg-koji: distg-%:
+distg-brew distg-koji: distg-%: dist-vr-check
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
.PHONY: $(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -75,9 +75,20 @@ ifeq ($(SNAPSHOT),1)
PREBUILD:=0$(KEXTRAVERSION).
RPMKPATCHLEVEL:=$(shell expr $(RPMKPATCHLEVEL) + 1)
endif
- # Obtain the date that HEAD was committed (not the snapshot commit).
- HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
- PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ ifeq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS),dist-git-test dist-git))
+ ifneq ($(PREBUILD_GIT_ONLY),1)
+ PREBUILD_GIT_ONLY:=0
+ endif
+ else
+ PREBUILD_GIT_ONLY:=1
+ endif
+ ifeq ($(PREBUILD_GIT_ONLY),1)
+ PREBUILD:=$(PREBUILD)$(MARKER).
+ else
+ # Obtain the date that HEAD was committed (not the snapshot commit).
+ HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
+ PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ endif
UPSTREAM_TARBALL_NAME:=$(patsubst v%,%,$(_TAG))
endif
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1579
2 years, 3 months
[OS-BUILD PATCHv4] Makefile: Check PKGRELEASE size on dist-brew
targets
by Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava <prarit(a)redhat.com>
Makefile: Check PKGRELEASE size on dist-brew targets
The Red Hat brew system is a build system used internally within Red Hat
which is similar to the externally available koji build system. One of
the architectures of a brew build is 's390x+zfcpdump'. This arch using
the default of localversion 'test' always causes the rpm build error:
"5.17.0-0.rc0.20220114gitfb3b0673b7d5.65.test.el9_b.s390x+zfcpdump" exceeds 64 characters
make: *** [Makefile:1257: include/generated/utsrelease.h] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.tMkhuG (%build)
The 64 character limit is a size limit on UTSRELEASE and cannot be dynamically
changed so the only other option is to reduce the package release
(PKGRELEASE) string in length. Removing the date field and the string
'git' results in a string that is shorter by 11 characters, with a minimal
loss in information.
This option should not be set for the dist-git target so explicitly set
PREBUILD_GIT_ONLY to zero on the dist-git and dist-git-test targets.
Add an option, PREBUILD_GIT_ONLY, to shorten the PREBUILD variable which
is used in the PKGRELEASE string. Add a check for the size of PKGRELEASE
and return a pre-build error if PKGRELEASE is greater than 35 characters.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -391,10 +391,24 @@ dist-koji : BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
distg-brew: BUILD_FLAGS ?= $(BREW_FLAGS) $(TEST_FLAGS)
distg-koji: BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
-dist-brew dist-koji: dist-%: dist-srpm
+dist-vr-check:
+ @# builds may include a s390x+zfcpdump arch build. UTS_RELEASE can only have a
+ @# version-release string with max 64 chars. The version-release for s390x+zfcpdump
+ @# is 29 characters, leaving a maximum of 35 characters for PKGRELEASE.
+ @if [ $$(echo "$(PKGRELEASE)" | wc -c) -gt 35 ]; then \
+ echo -n "PKGRELEASE ($(PKGRELEASE)) is too long. Use a shorter localversion (currently $(BUILDID))"; \
+ if [ $(PREBUILD_GIT_ONLY) -eq 0 ]; then \
+ echo "or set PREBUILD_GIT_ONLY to 1" \
+ else \
+ echo " "
+ fi \
+ exit 1; \
+ 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)
-distg-brew distg-koji: distg-%:
+distg-brew distg-koji: distg-%: dist-vr-check
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
.PHONY: $(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -75,9 +75,20 @@ ifeq ($(SNAPSHOT),1)
PREBUILD:=0$(KEXTRAVERSION).
RPMKPATCHLEVEL:=$(shell expr $(RPMKPATCHLEVEL) + 1)
endif
- # Obtain the date that HEAD was committed (not the snapshot commit).
- HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
- PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ ifeq ($(MAKECMDGOALS), $(filter $(MAKECMDGOALS),dist-git-test dist-git))
+ ifneq ($(PREBUILD_GIT_ONLY),1)
+ PREBUILD_GIT_ONLY:=0
+ endif
+ else
+ PREBUILD_GIT_ONLY:=1
+ endif
+ ifeq ($(PREBUILD_GIT_ONLY),1)
+ PREBUILD:=$(PREBUILD)$(MARKER).
+ else
+ # Obtain the date that HEAD was committed (not the snapshot commit).
+ HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
+ PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ endif
UPSTREAM_TARBALL_NAME:=$(patsubst v%,%,$(_TAG))
endif
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1579
2 years, 3 months
[OS-BUILD PATCHv3] Makefile: Check PKGRELEASE size on dist-brew
targets
by Prarit Bhargava (via Email Bridge)
From: Prarit Bhargava <prarit(a)redhat.com>
Makefile: Check PKGRELEASE size on dist-brew targets
The Red Hat brew system is a build system used internally within Red Hat
which is similar to the externally available koji build system. One of
the architectures of a brew build is 's390x+zfcpdump'. This arch using
the default of localversion 'test' always causes the rpm build error:
"5.17.0-0.rc0.20220114gitfb3b0673b7d5.65.test.el9_b.s390x+zfcpdump" exceeds 64 characters
make: *** [Makefile:1257: include/generated/utsrelease.h] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.tMkhuG (%build)
The 64 character limit is a size limit on UTSRELEASE and cannot be dynamically
changed so the only other option is to reduce the package release
(PKGRELEASE) string in length. Removing the date field and the string
'git' results in a string that is shorter by 11 characters, with a minimal
loss in information.
This option should not be set for the dist-git target so explicitly set
PREBUILD_GIT_ONLY to zero on the dist-git and dist-git-test targets.
Add an option, PREBUILD_GIT_ONLY, to shorten the PREBUILD variable which
is used in the PKGRELEASE string. Add a check for the size of PKGRELEASE
and return a pre-build error if PKGRELEASE is greater than 35 characters.
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -391,10 +391,19 @@ dist-koji : BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
distg-brew: BUILD_FLAGS ?= $(BREW_FLAGS) $(TEST_FLAGS)
distg-koji: BUILD_FLAGS ?= $(KOJI_FLAGS) $(TEST_FLAGS)
-dist-brew dist-koji: dist-%: dist-srpm
+dist-vr-check:
+ @# builds may include a s390x+zfcpdump arch build. UTS_RELEASE can only have a
+ @# version-release string with max 64 chars. The version-release for s390x+zfcpdump
+ @# is 29 characters, leaving a maximum of 35 characters for PKGRELEASE.
+ @if [ $$(echo "$(PKGRELEASE)" | wc -c) -gt 35 ]; then \
+ echo "PKGRELEASE ($(PKGRELEASE)) is too long. Use a shorter localversion (currently $(BUILDID)) and/or set PREBUILD_GIT_ONLY=1"; \
+ exit 1; \
+ 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)
-distg-brew distg-koji: distg-%:
+distg-brew distg-koji: distg-%: dist-vr-check
$* $(BUILD_PROFILE) build $(BUILD_FLAGS) $(BUILD_TARGET) "$(RHGITURL)?redhat/koji#$(RHGITCOMMIT)"
.PHONY: $(REDHAT)/rpm/SOURCES/$(PACKAGE_NAME).spec
diff --git a/redhat/Makefile.common b/redhat/Makefile.common
index blahblah..blahblah 100644
--- a/redhat/Makefile.common
+++ b/redhat/Makefile.common
@@ -75,9 +75,18 @@ ifeq ($(SNAPSHOT),1)
PREBUILD:=0$(KEXTRAVERSION).
RPMKPATCHLEVEL:=$(shell expr $(RPMKPATCHLEVEL) + 1)
endif
- # Obtain the date that HEAD was committed (not the snapshot commit).
- HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
- PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ ifeq ($(MAKECMDGOALS), $(MAKECMDGOALS),dist-git-test dist-git)
+ PREBUILD_GIT_ONLY:=0
+ else ifeq ($(PREBUILD_GIT_ONLY), 1)
+ PREBUILD_GIT_ONLY:=1
+ endif
+ ifneq ($(PREBUILD_GIT_ONLY),1)
+ # Obtain the date that HEAD was committed (not the snapshot commit).
+ HEAD_DATE:=$(shell $(GIT) show -s --format=%cd --date=format:%Y%m%d $(HEAD))
+ PREBUILD:=$(PREBUILD)$(HEAD_DATE)git$(MARKER).
+ else
+ PREBUILD:=$(PREBUILD)$(MARKER).
+ endif
UPSTREAM_TARBALL_NAME:=$(patsubst v%,%,$(_TAG))
endif
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1579
2 years, 3 months