Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Payton Fack <facksweng@gmail.com>
To: Bartosz Golaszewski <brgl@kernel.org>,
	 Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	 linux-gpio@vger.kernel.org
Cc: Vincent Fazio <vfazio@gmail.com>, Payton Fack <facksweng@gmail.com>
Subject: [PATCH libgpiod v3 1/2] meson: fail if systemd is enabled but D-Bus is not available
Date: Wed, 02 Dec 2026 15:06:29 -0600	[thread overview]
Message-ID: <20261202-master-v3-1-08bbf2ce59b0@gmail.com> (raw)
In-Reply-To: <20261202-master-v3-0-08bbf2ce59b0@gmail.com>

The systemd data files are installed from the dbus subdirectory, which
is only processed when the D-Bus dependencies were found. The check
that -Dsystemd=enabled requires D-Bus only verified that the dbus
option was not disabled, so with -Ddbus=auto and missing dependencies
the build silently skipped the systemd files.

Assert on dbus_enabled instead, now that it is computed before the
check.

Signed-off-by: Payton Fack <facksweng@gmail.com>
---
 meson.build | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meson.build b/meson.build
index c92179c..6eac41e 100644
--- a/meson.build
+++ b/meson.build
@@ -85,12 +85,6 @@ opt_introspection = opt_introspection.require(
   get_option('default_library') != 'static',
   error_message: 'introspection requires -Ddefault_library=shared or both')
 
-# systemd requires D-Bus.
-if opt_systemd.enabled()
-  assert(opt_dbus.allowed(),
-    'systemd support requires -Ddbus=enabled')
-endif
-
 libgpiod_inc = include_directories('include')
 
 libedit_dep = dependency('libedit', version: '>= 3.1', required: opt_gpioset_interactive)
@@ -151,6 +145,12 @@ else
   dbus_enabled = false
 endif
 
+# systemd requires D-Bus.
+if opt_systemd.enabled()
+  assert(dbus_enabled,
+    'systemd support requires D-Bus, which is disabled or was not found')
+endif
+
 if opt_introspection.allowed()
   gir_dep       = dependency('gobject-introspection-1.0', version: '>= 0.6.2',
                              required: opt_introspection)

-- 
2.56.1


  reply	other threads:[~2026-12-02 21:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 21:06 [PATCH libgpiod v3 0/2] dbus: add optional D-Bus activation for gpio-manager Payton Fack
2026-12-02 21:06 ` Payton Fack [this message]
2026-12-02 21:06 ` [PATCH libgpiod v3 2/2] dbus: add optional D-Bus activation file " Payton Fack

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261202-master-v3-1-08bbf2ce59b0@gmail.com \
    --to=facksweng@gmail.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=vfazio@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox