diff mbox series

[meta-oe,1/2] postgresql: adapt to systemd-systemctl-native merge into systemd-tools-native

Message ID 20260713003446.710143-1-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-oe,1/2] postgresql: adapt to systemd-systemctl-native merge into systemd-tools-native | expand

Commit Message

Khem Raj July 13, 2026, 12:34 a.m. UTC
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.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
---
 meta-oe/recipes-dbs/postgresql/postgresql.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc
index 07cd121511..e687399493 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -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"