From: Ondrej Mosnáček on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2892
The recipes for $(KABI_TARBALL) and sources-rh reference the kabi/kabi-current file, but they don't depend on the target that creates it (dist-kabi), leading to occasional build failures under parallel build (make -j). Fix it by adding the missing dependencies.
Signed-off-by: Ondrej Mosnacek omosnace@redhat.com
--- redhat/Makefile | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-)
From: Ondrej Mosnacek omosnace@redhat.com
redhat/Makefile: deduplicate code for KABI tarball creation
The `sources-rh` target duplicates the code to create $(KABI_TARBALL) and $(KABIDW_TARBALL). Replace the duplicate code by simply depending on the corresponding tarball targets.
Signed-off-by: Ondrej Mosnacek omosnace@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -668,7 +668,7 @@ generate-testpatch-tmp: ":(exclude,top)Makefile.rhelver" \ ":(exclude,top)redhat" > $(TESTPATCH).tmp
-sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check +sources-rh: $(TARBALL) $(KABI_TARBALL) $(KABIDW_TARBALL) generate-testpatch-tmp setup-source dist-configs-check @cp -l $(TARBALL) $(SOURCES)/ || cp $(TARBALL) $(SOURCES)/ @touch $(TESTPATCH) @diff $(TESTPATCH).tmp $(TESTPATCH) > /dev/null || \ @@ -711,11 +711,6 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source dist-configs-check cp kabi/Module.kabi_$$KABIARCH $(SOURCES)/; \ cp kabi/Module.kabi_dup_$$KABIARCH $(SOURCES)/; \ done - @(cd kabi && tar -cJf $(KABI_TARBALL) kabi-rhel$(RHEL_MAJOR)* kabi-current) - @if [ ! -d $(KABIDW)/base ]; then \ - mkdir -p $(KABIDW)/base; \ - fi - @(cd kabi-dwarf && tar -cJf $(KABIDW_TARBALL) base run_kabi-dw.sh)
dist-sources: dist-kabi dist-kabi-dup sources-rh
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2892
From: Ondrej Mosnacek omosnace@redhat.com
redhat/Makefile: fix race condition when making the KABI tarball
The recipe for $(KABI_TARBALL) references the kabi/kabi-current file, but it doesn't depend on the target that creates it (dist-kabi), leading to occasional build failures under parallel build (make -j). Fix it by making $(KABI_TARBALL) depend on dist-kabi.
Signed-off-by: Ondrej Mosnacek omosnace@redhat.com
diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -601,7 +601,7 @@ $(TARBALL): @scripts/create-tarball.sh
.PHONY: $(KABI_TARBALL) -$(KABI_TARBALL): +$(KABI_TARBALL): dist-kabi @(cd kabi && tar -cJf $(KABI_TARBALL) kabi-rhel$(RHEL_MAJOR)* kabi-current)
.PHONY: $(KABIDW_TARBALL)
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2892
kernel@lists.fedoraproject.org