Skip to contentSkip to conversation

postgresql: adapt to systemd-systemctl-native merge into systemd-tools-native

PATCH New Khem Raj 1 participant 2 messages Jul 13

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 postgresql: adapt to systemd-systemctl-native merge into systemd-tools-native

oe-core merged systemd-systemctl-native into systemd-tools-native and moved the PACKAGE_WRITE_DEPS on the native systemctl out of systemd.bbclass into systemd itself. As a result:

- The PACKAGECONFIG[systemd] dependency on systemd-systemctl-native no longer resolves ("Nothing PROVIDES systemd-systemctl-native"). systemctl is a rootfs-time tool and was never needed to build postgresql, so drop it from the build dependencies.
- The pkg_postinst runs systemctl at rootfs time when both systemd and sysvinit are enabled. Since systemd.bbclass no longer adds the native tool to PACKAGE_WRITE_DEPS, declare it explicitly (as systemd-tools-native), guarded by the same DISTRO_FEATURES condition, mirroring how oe-core's keymaps/initscripts recipes handle it.

---
 meta-oe/recipes-dbs/postgresql/postgresql.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
meta-oe/recipes-dbs/postgresql/postgresql.inc +6 -1
index 07cd121511..e687399493 100644
@@ -45,6 +45,11 @@ CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}"
 SYSTEMD_SERVICE:${PN} = "postgresql.service"
 SYSTEMD_AUTO_ENABLE:${PN} = "disable"
 
+# The postinst below calls systemctl at rootfs time when both systemd and
+# sysvinit are enabled. systemd-systemctl-native was merged into
+# systemd-tools-native in oe-core, and systemd.bbclass no longer adds it to
+# PACKAGE_WRITE_DEPS, so depend on it explicitly here.
+PACKAGE_WRITE_DEPS:append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','systemd-tools-native','',d)}"
 pkg_postinst:${PN} () {
     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then
         if [ -n "$D" ]; then
@@ -64,7 +69,7 @@ PACKAGECONFIG[python] = "--with-python,--without-python,python3,python3"
 PACKAGECONFIG[gssapi] = "--with-gssapi,--without-gssapi,krb5"
 PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
 PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd systemd-systemctl-native"
+PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd"
 PACKAGECONFIG[uuid] = "--with-uuid=e2fs,--without-uuid,util-linux"
 PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2"
 PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt"
author
#1 lore raw

PATCH 2/2 meta-webserver: Depend upon networking layer

Cockpit needs networkmanager from networking layer Fixes

stdio: ERROR: Nothing RPROVIDES 'networkmanager' (but /srv/pokybuild/yocto-worker/meta-oe/build/meta-openembedded/meta-webserver/recipes-webadmin/cockpit/cockpit_352.bb RDEPENDS on or otherwise requires it)
stdio: ERROR: Required build target 'meta-world-pkgdata' has no buildable providers.

---
 meta-webserver/conf/layer.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-webserver/conf/layer.conf +1 -1
index 0c48efc465..b1fd9e4bd6 100644
@@ -15,7 +15,7 @@ BBFILE_PRIORITY_webserver = "5"
 # cause compatibility issues with other layers
 LAYERVERSION_webserver = "1"
 
-LAYERDEPENDS_webserver = "core openembedded-layer"
+LAYERDEPENDS_webserver = "core openembedded-layer networking-layer"
 
 LAYERSERIES_COMPAT_webserver = "whinlatter wrynose"