From 1bfc80fbd41931a511cd2fdd57d08e0e6309a6c3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 8 Aug 2026 22:30:56 -0700 Subject: [PATCH] networkmanager: Fix configure without systemd in DISTRO_FEATURES meson.build handles the systemd unit dir and the systemd generator dir with the same pattern: both options default to an empty string, and an empty string means "resolve this from systemd.pc", which is asserted: systemd_systemdsystemgeneratordir = get_option('systemdsystemgeneratordir') install_systemdgeneratordir = (systemd_systemdsystemgeneratordir != 'no') if install_systemdgeneratordir and systemd_systemdsystemgeneratordir == '' assert(systemd_dep.found(), 'systemd required but not found, ...') The systemd PACKAGECONFIG only turned off the unit dir, so the generator dir kept its empty default and configure failed for sysvinit builds: | ../sources/networkmanager-1.58.0/meson.build:420:2: ERROR: Assert failed: | systemd required but not found, please provide a valid systemd user | generator dir or disable it Pass -Dsystemdsystemgeneratordir=no alongside the existing -Dsystemdsystemunitdir=no. Signed-off-by: Khem Raj --- .../networkmanager/networkmanager_1.58.0.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.58.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.58.0.bb index 5099c02972..976f936b0d 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.58.0.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.58.0.bb @@ -80,9 +80,13 @@ PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli \ inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)} +# systemdsystemunitdir and systemdsystemgeneratordir both default to an empty +# string, which makes meson.build assert that systemd was found so it can +# resolve them from systemd.pc. Both have to be turned off explicitly, not just +# the unit dir, otherwise configure fails when systemd is not available. PACKAGECONFIG[systemd] = "\ -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\ - -Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\ + -Dsystemdsystemunitdir=no -Dsystemdsystemgeneratordir=no -Dsystemd_journal=false -Dsession_tracking=no\ " PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit" PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5"