[Rpm-maint] [PATCH] plugins/systemd_inhibit.c: Define DBUS_TYPE_UNIX_FD if undefined.

Mark Wielaard mjw at redhat.com
Tue Mar 5 19:38:52 UTC 2013


On Tue, Mar 05, 2013 at 07:15:30PM +0200, Panu Matilainen wrote:
> Hum... dbus 1.2.24 would be RHEL-6'ish, right? In which case the
> whole plugin makes no sense at all because it actually needs to have
> a fairly recent systemd running on the system to do anything at all.
> 
> Dunno, I can certainly apply that but then again it might make more
> sense to not even try compiling it with dbus that old, as anything
> with that old dbus version is highly unlikely to be running systemd
> in the first place (which however is something that cannot be tested
> for during build)

Yes, RHEL 6.4 to be precise. An alternative would be checking for
dbus 1.3+ which has DBUS_TYPE_UNIX_FD. See attached.

Cheers,

Mark
-------------- next part --------------
>From 5220c09a6a41e1b7cd9ec721409a7a069f9cc2b6 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mjw at redhat.com>
Date: Tue, 5 Mar 2013 20:35:19 +0100
Subject: [PATCH] Require dbus >= 1.3 for DBUS_TYPE_UNIX_FD usage.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 7fd7c5e..ba68d84 100644
--- a/configure.ac
+++ b/configure.ac
@@ -747,7 +747,7 @@ AM_CONDITIONAL(ENABLE_PLUGINS,[test "$enable_plugins" = yes])
 with_dbus=no
 AS_IF([test "$enable_plugins" != no],[
   PKG_CHECK_MODULES([DBUS],
-    [dbus-1 >= 1.0],
+    [dbus-1 >= 1.3],
     [AC_DEFINE(DBUS, 1, [Build with dbus support?]) with_dbus=yes],
     [with_dbus=no])
   AC_SUBST(DBUS_CFLAGS)
-- 
1.8.1.4



More information about the Rpm-maint mailing list