diff mbox series

[meta-webserver,scarthgap,1/2] cockpit: fix build error

Message ID 20251110103442.3179795-1-l.anderweit@phytec.de
State New
Headers show
Series [meta-webserver,scarthgap,1/2] cockpit: fix build error | expand

Commit Message

Leonard Anderweit Nov. 10, 2025, 10:34 a.m. UTC
Fix a build error caused by a missing build directory. This is already
fixed in cockpit 344 and newer so backport the fix.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
---
 .../recipes-webadmin/cockpit/cockpit_304.bb   |  1 +
 ...sing-src-common-directory-in-build-t.patch | 32 +++++++++++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 meta-webserver/recipes-webadmin/cockpit/files/0001-build-Create-missing-src-common-directory-in-build-t.patch
diff mbox series

Patch

diff --git a/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb b/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb
index df7f47a1182a..f8b8b52608bd 100644
--- a/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb
+++ b/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb
@@ -7,6 +7,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 SRC_URI += " \
     https://github.com/cockpit-project/cockpit/releases/download/${PV}/cockpit-${PV}.tar.xz \
     file://0001-Warn-not-error-if-xsltproc-is-not-found.patch \
+    file://0001-build-Create-missing-src-common-directory-in-build-t.patch \
     file://cockpit.pam \
     "
 SRC_URI[sha256sum] = "a87d090c930e2058bb3e970ca7f2bafe678687966b5c0b8b42a802977e391ce9"
diff --git a/meta-webserver/recipes-webadmin/cockpit/files/0001-build-Create-missing-src-common-directory-in-build-t.patch b/meta-webserver/recipes-webadmin/cockpit/files/0001-build-Create-missing-src-common-directory-in-build-t.patch
new file mode 100644
index 000000000000..2b2c1ca6b0f1
--- /dev/null
+++ b/meta-webserver/recipes-webadmin/cockpit/files/0001-build-Create-missing-src-common-directory-in-build-t.patch
@@ -0,0 +1,32 @@ 
+From e0e5959d91f53bdc7825f8bf07b2d8c74e0f56cf Mon Sep 17 00:00:00 2001
+From: Martin Pitt <mpitt@redhat.com>
+Date: Fri, 25 Jul 2025 07:00:52 +0200
+Subject: [PATCH] build: Create missing src/common/ directory in build tree
+
+This caused a build failure with parallel builds when using a separate
+build tree. Thanks to Nicolas LANTZ for the fix!
+
+Fixes #21918
+
+Upstream-Status: Backport [https://github.com/cockpit-project/cockpit/commit/2038da3237abf8ae181ada05db1cde834876b03d]
+
+Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
+---
+ src/common/Makefile-common.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/common/Makefile-common.am b/src/common/Makefile-common.am
+index e7d1ca04f3f7..0da5b74e9f25 100644
+--- a/src/common/Makefile-common.am
++++ b/src/common/Makefile-common.am
+@@ -102,6 +102,7 @@ libcockpit_common_a_SOURCES = \
+ # libcockpit-common.a static-links an HTML template to use on failures
+ nodist_libcockpit_common_a_SOURCES = src/common/fail.html.c
+ src/common/fail.html.c: src/common/fail.html
++	@mkdir -p '$(dir $@)'
+ 	$(AM_V_GEN) $(top_srcdir)/tools/escape-to-c cockpit_webresponse_fail_html_text < $< > $@.tmp && mv $@.tmp $@
+ CLEANFILES += src/common/fail.html.c
+ EXTRA_DIST += src/common/fail.html
+-- 
+2.25.1
+