diff mbox series

[meta-webserver,v1,2/2] cockpit: Bump to version 304

Message ID 20231109093151.101752-2-dse@thaumatec.com
State Under Review
Headers show
Series [meta-webserver,v1,1/2] cockpit: Fix cockpit-askpass path | expand

Commit Message

Daniel Semkowicz Nov. 9, 2023, 9:31 a.m. UTC
In version 301, the default bridge implementation was changed to Python.
Adjust recipe to build and install new Python bridge.

Old bridge implementation is still available and can be enabled using
'--enable-old-bridge' flag. Add PACKAGECONFIG option for old bridge.

New bridge shows minor regressions like networking graph not generated
correctly. Probably additional dependencies are missing.
For this reason, keep the old bridge enabled by default.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
---
 .../cockpit/{cockpit_298.bb => cockpit_304.bb}           | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
 rename meta-webserver/recipes-webadmin/cockpit/{cockpit_298.bb => cockpit_304.bb} (93%)
diff mbox series

Patch

diff --git a/meta-webserver/recipes-webadmin/cockpit/cockpit_298.bb b/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb
similarity index 93%
rename from meta-webserver/recipes-webadmin/cockpit/cockpit_298.bb
rename to meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb
index 39dbec54e..ab05fd377 100644
--- a/meta-webserver/recipes-webadmin/cockpit/cockpit_298.bb
+++ b/meta-webserver/recipes-webadmin/cockpit/cockpit_304.bb
@@ -9,11 +9,13 @@  SRC_URI += " \
     file://0001-Warn-not-error-if-xsltproc-is-not-found.patch \
     file://cockpit.pam \
     "
-SRC_URI[sha256sum] = "c7da91824f7a72c82c1a3aaff1a57dbe0ce1e29e05e95d92b5118a324a3f4b39"
+SRC_URI[sha256sum] = "a87d090c930e2058bb3e970ca7f2bafe678687966b5c0b8b42a802977e391ce9"
 
 inherit gettext pkgconfig autotools systemd features_check
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'old-bridge', '', 'python3targetconfig', d)}
 
 DEPENDS += "glib-2.0-native intltool-native gnutls virtual/gettext json-glib krb5 libpam systemd"
+DEPENDS += "${@bb.utils.contains('PACKAGECONFIG', 'old-bridge', '', 'python3-pip-native', d)}"
 
 COMPATIBLE_HOST:libc-musl = "null"
 
@@ -37,12 +39,14 @@  EXTRA_OECONF = " \
 
 PACKAGECONFIG ??= " \
     ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)} \
+    old-bridge \
 "
 
 PACKAGECONFIG[pcp] = "--enable-pcp,--disable-pcp,pcp"
 PACKAGECONFIG[dashboard] = "--enable-ssh,--disable-ssh,libssh"
 PACKAGECONFIG[storaged] = ",,,udisks2"
 PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit"
+PACKAGECONFIG[old-bridge] = "--enable-old-bridge"
 
 PACKAGES =+ " \
     ${PN}-pcp \
@@ -120,8 +124,9 @@  FILES:${PN}-apps = "${datadir}/cockpit/apps"
 FILES:${PN}-bridge = " \
     ${bindir}/cockpit-bridge \
     ${libexecdir}/cockpit-askpass \
+    ${PYTHON_SITEPACKAGES_DIR} \
 "
-RDEPENDS:${PN}-bridge = ""
+RDEPENDS:${PN}-bridge = "${@bb.utils.contains('PACKAGECONFIG', 'old-bridge', '', 'python3', d)}"
 
 FILES:${PN}-desktop = "${libexecdir}/cockpit-desktop"
 RDEPENDS:${PN}-desktop += "bash"