Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=openjava.git;a=commitdiff;h=40d22c40770115d130acae50d6d051ada68d7862

commit 40d22c40770115d130acae50d6d051ada68d7862
Author: James Buren <[email protected]>
Date:   Fri Jun 8 09:31:45 2012 -0500

dbus-1.4.20-1-x86_64
* version bump
* patch to enable systemd backend

diff --git a/source/base/dbus/FrugalBuild b/source/base/dbus/FrugalBuild
index ccf10d2..0de6bd2 100644
--- a/source/base/dbus/FrugalBuild
+++ b/source/base/dbus/FrugalBuild
@@ -2,8 +2,8 @@
# Maintainer: crazy <[email protected]>

pkgname=dbus
-pkgver=1.4.16
-pkgrel=2
+pkgver=1.4.20
+pkgrel=1
pkgdesc="A message bus system"
url="http://freedesktop.org/wiki/Software/dbus";
depends=('libxml2>=2.7.8' 'expat')
@@ -18,10 +18,12 @@ up2date="lynx -dump 
http://freedesktop.org/wiki/Software/dbus | \

source=(http://dbus.freedesktop.org/releases/dbus/$pkgname-$pkgver.tar.gz \
dbus-1-launch \
-       dbus-1-launch.desktop)
-sha1sums=('d6e6538cfc1ed71992f6786a6da55d815d995b5b' \
+       dbus-1-launch.desktop \
+       systemd.patch)
+sha1sums=('9761eca23c0e6ea4ad822d92748703f9a0f58858' \
'740af74eb43cadf1277346029577aadd3d10f2b5' \
-          '9009283707f5cdf0f883876f80596bc44cc8722c')
+          '9009283707f5cdf0f883876f80596bc44cc8722c' \
+          '5d41a3c2fba3b66803e76198b1898f4761f90aa2')

_F_systemd_scriptlet="$pkgname.install"
_F_systemd_units=(dbus=e)
@@ -40,7 +42,9 @@ suboptions=('force')
build()
{
Fcd
-       Fbuild  \
+       Fpatchall
+       Fautoreconf
+       Fmake  \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
@@ -62,7 +66,10 @@ build()
--disable-checks \
--disable-tests \
--disable-selinux \
-               --with-systemdsystemunitdir=/lib/systemd/system
+               --with-systemdsystemunitdir=/lib/systemd/system \
+               --enable-systemd
+
+       Fmakeinstall

## DO NOT change that without to ask the Maintainer! ##
## Install wrapper
diff --git a/source/base/dbus/systemd.patch b/source/base/dbus/systemd.patch
new file mode 100644
index 0000000..ea3505a
--- /dev/null
+++ b/source/base/dbus/systemd.patch
@@ -0,0 +1,138 @@
+diff -ur a/configure.ac b/configure.ac
+--- a/configure.ac     2012-06-08 09:10:36.022592065 -0500
++++ b/configure.ac     2012-06-08 09:19:24.564073461 -0500
+@@ -137,6 +137,7 @@
+ AC_ARG_ENABLE(console-owner-file, 
AS_HELP_STRING([--enable-console-owner-file],[enable console owner 
file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
+ AC_ARG_ENABLE(userdb-cache, AS_HELP_STRING([--enable-userdb-cache],[build 
with userdb-cache 
support]),enable_userdb_cache=$enableval,enable_userdb_cache=yes)
+ AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd 
auto-launch support]),enable_launchd=$enableval,enable_launchd=auto)
++AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd 
at_console support]),enable_systemd=$enableval,enable_systemd=auto)
+
+ AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to 
use (libxml may be named libxml2 on some systems)]))
+ AC_ARG_WITH(init-scripts, 
AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to 
install]))
+@@ -1072,6 +1073,26 @@
+
+ AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
+
++dnl systemd detection
++if test x$enable_systemd = xno ; then
++    have_systemd=no;
++else
++    PKG_CHECK_MODULES(SYSTEMD,
++        [ libsystemd-login libsystemd-daemon ],
++        have_systemd=yes,
++        have_systemd=no)
++    AC_SUBST(SYSTEMD_CFLAGS)
++    AC_SUBST(SYSTEMD_LIBS)
++fi
++
++if test x$have_systemd = xyes; then
++    AC_DEFINE(HAVE_SYSTEMD,1,[Have systemd])
++fi
++
++if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then
++    AC_MSG_ERROR([Explicitly requested systemd support, but systemd not 
found])
++fi
++
+ # libaudit detection
+ if test x$enable_libaudit = xno ; then
+     have_libaudit=no;
+@@ -1653,6 +1674,7 @@
+         Building inotify support: ${have_inotify}
+         Building dnotify support: ${have_dnotify}
+         Building kqueue support:  ${have_kqueue}
++        Building systemd support: ${have_systemd}
+         Building X11 code:        ${enable_x11}
+         Building Doxygen docs:    ${enable_doxygen_docs}
+         Building XML docs:        ${enable_xml_docs}
+diff -ur a/dbus/dbus-userdb-util.c b/dbus/dbus-userdb-util.c
+--- a/dbus/dbus-userdb-util.c  2012-06-08 09:10:36.018592160 -0500
++++ b/dbus/dbus-userdb-util.c  2012-06-08 09:19:24.567073392 -0500
+@@ -28,6 +28,11 @@
+ #include "dbus-protocol.h"
+ #include <string.h>
+
++#if HAVE_SYSTEMD
++#include <systemd/sd-daemon.h>
++#include <systemd/sd-login.h>
++#endif
++
+ /**
+  * @addtogroup DBusInternalsUtils
+  * @{
+@@ -47,7 +52,28 @@
+
+   DBusUserDatabase *db;
+   const DBusUserInfo *info;
+-  dbus_bool_t result = FALSE;
++  dbus_bool_t result = FALSE;
++
++#ifdef HAVE_SYSTEMD
++  if (sd_booted () > 0)
++    {
++      int r;
++
++      /* Check whether this user is logged in on at least one physical
++         seat */
++      r = sd_uid_get_seats (uid, 0, NULL);
++      if (r < 0)
++        {
++          dbus_set_error (error, _dbus_error_from_errno (-r),
++                          "Failed to determine seats of user \"" 
DBUS_UID_FORMAT "\": %s",
++                          uid,
++                          _dbus_strerror (-r));
++          return FALSE;
++        }
++
++      return (r > 0);
++    }
++#endif
+
+ #ifdef HAVE_CONSOLE_OWNER_FILE
+
+@@ -414,6 +440,7 @@
+   dbus_uid_t uid;
+   unsigned long *group_ids;
+   int n_group_ids, i;
++  DBusError error;
+
+   if (!_dbus_username_from_current_process (&username))
+     _dbus_assert_not_reached ("didn't get username");
+@@ -435,7 +462,17 @@
+       printf(" %ld", group_ids[i]);
+
+   printf ("\n");
+-
++
++  dbus_error_init (&error);
++  printf ("Is Console user: %i\n",
++          _dbus_is_console_user (uid, &error));
++  printf ("Invocation was OK: %s\n", error.message ? error.message : "yes");
++  dbus_error_free (&error);
++  printf ("Is Console user 4711: %i\n",
++          _dbus_is_console_user (4711, &error));
++  printf ("Invocation was OK: %s\n", error.message ? error.message : "yes");
++  dbus_error_free (&error);
++
+   dbus_free (group_ids);
+
+   return TRUE;
+diff -ur a/dbus/Makefile.am b/dbus/Makefile.am
+--- a/dbus/Makefile.am 2012-06-08 09:10:36.016592208 -0500
++++ b/dbus/Makefile.am 2012-06-08 09:20:33.798433633 -0500
+@@ -2,6 +2,7 @@
+ configdir=$(sysconfdir)/dbus-1
+
+ INCLUDES = -I$(top_builddir) -I$(top_srcdir) \
++      $(SYSTEMD_CFLAGS) \
+       $(DBUS_CLIENT_CFLAGS) \
+       -DDBUS_COMPILATION \
+       -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
+@@ -266,7 +267,7 @@
+ libdbus_1_la_LDFLAGS= $(export_symbols) -version-info 
$(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@
+
+ libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD
+-libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS)
++libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS) $(SYSTEMD_LIBS)
+ libdbus_internal_la_LDFLAGS=$(export_symbols_internal) @R_DYNAMIC_LDFLAG@
+
+ noinst_PROGRAMS =
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to