sys-apps/dbus: sync with upstream

The only CoreOS changes are to drop the SELinux policy dependency
and machine-id generation.  (Is that last one still needed?)
This commit is contained in:
David Michael 2017-06-16 12:00:31 -07:00
parent c86ff7a096
commit 07809cf236
5 changed files with 85 additions and 6 deletions

View File

@ -1 +1 @@
DIST dbus-1.10.12.tar.gz 1984805 SHA256 210a79430b276eafc6406c71705e9140d25b9956d18068df98a70156dc0e475d SHA512 6616c7b2926a6fb6158d0a0a24d1b887173ca215a2f3185b95cc5f08df64fed1977e16c86c6ae530960453b6c585ae24ea4c9976e7537a45f9c6366c43baa52d WHIRLPOOL 9bd9ed70c4d9890dad09b2bcd07ee40ef472f1436cefe3bc89aaddbb183532939d6ce19da721a673a39f2e6b07e634b179190cec00e1a48fa2d9be6c830cc696 DIST dbus-1.10.18.tar.gz 1986589 SHA256 6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a SHA512 726f97d0a2016f4f0625ba332e93e2d33bb16857cd35cb6c79da0f44fff297df948c3df62c31ffbec34713a7b85b3ff5b65f31517fe3511ddbd3bf18bd4748ed WHIRLPOOL ee164e1f6de80595fbfbcbad65d78dab4b91b5ec4e1ce88e1c4015f1c1b531f09796d54db163b2c2eceb3b92261f8a57852d2e0b29f71d9c65f9b91684433d9e

View File

@ -1,6 +1,5 @@
# Copyright 1999-2016 Gentoo Foundation # Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6 EAPI=6
PYTHON_COMPAT=( python2_7 ) PYTHON_COMPAT=( python2_7 )
@ -13,16 +12,19 @@ SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
LICENSE="|| ( AFL-2.1 GPL-2 )" LICENSE="|| ( AFL-2.1 GPL-2 )"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE="debug doc selinux static-libs systemd test user-session X" IUSE="debug doc elogind selinux static-libs systemd test user-session X"
RESTRICT="test" RESTRICT="test"
REQUIRED_USE="?? ( elogind systemd )"
CDEPEND=" CDEPEND="
>=dev-libs/expat-2 >=dev-libs/expat-2
selinux? ( selinux? (
sys-libs/libselinux sys-libs/libselinux
) )
elogind? ( sys-auth/elogind )
systemd? ( sys-apps/systemd:0= ) systemd? ( sys-apps/systemd:0= )
X? ( X? (
x11-libs/libX11 x11-libs/libX11
@ -72,6 +74,8 @@ src_prepare() {
-e '/"dispatch"/d' \ -e '/"dispatch"/d' \
bus/test-main.c || die bus/test-main.c || die
eapply "${FILESDIR}/${PN}-enable-elogind.patch"
eapply_user eapply_user
# required for asneeded patch but also for bug 263909, cross-compile so # required for asneeded patch but also for bug 263909, cross-compile so
@ -107,6 +111,7 @@ multilib_src_configure() {
--disable-apparmor --disable-apparmor
$(use_enable kernel_linux inotify) $(use_enable kernel_linux inotify)
$(use_enable kernel_FreeBSD kqueue) $(use_enable kernel_FreeBSD kqueue)
$(use_enable elogind)
$(use_enable systemd) $(use_enable systemd)
$(use_enable user-session) $(use_enable user-session)
--disable-embedded-tests --disable-embedded-tests
@ -140,6 +145,7 @@ multilib_src_configure() {
myconf+=( myconf+=(
--disable-selinux --disable-selinux
--disable-libaudit --disable-libaudit
--disable-elogind
--disable-systemd --disable-systemd
--without-x --without-x

View File

@ -0,0 +1,73 @@
--- a/dbus/dbus-userdb-util.c 2015-09-30 16:48:40.000000000 +0200
+++ b/dbus/dbus-userdb-util.c 2016-11-03 11:09:42.550520587 +0100
@@ -32,6 +32,9 @@
#if HAVE_SYSTEMD
#include <systemd/sd-login.h>
#endif
+#if HAVE_ELOGIND
+#include <elogind/sd-login.h>
+#endif
/**
* @addtogroup DBusInternalsUtils
@@ -54,7 +57,7 @@
const DBusUserInfo *info;
dbus_bool_t result = FALSE;
-#ifdef HAVE_SYSTEMD
+#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND)
/* check if we have logind */
if (access ("/run/systemd/seats/", F_OK) >= 0)
{
--- a/configure.ac 2016-11-03 11:13:58.286528265 +0100
+++ b/configure.ac 2016-11-03 11:22:11.210543063 +0100
@@ -185,6 +185,7 @@
AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
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(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto)
+AC_ARG_ENABLE(elogind, AS_HELP_STRING([--enable-elogind],[build with elogind user seat support]),enable_elogind=$enableval,enable_elogind=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(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
@@ -1184,6 +1185,24 @@
AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
+dnl elogind detection
+if test x$enable_elogind = xno ; then
+ have_elogind=no;
+else
+ PKG_CHECK_MODULES([ELOGIND],
+ [libelogind >= 209],
+ [have_elogind=yes],
+ [have_elogind=no])
+fi
+
+if test x$have_elogind = xyes; then
+ AC_DEFINE(HAVE_ELOGIND,1,[Have elogind])
+fi
+
+if test x$enable_elogind = xyes -a x$have_elogind != xyes ; then
+ AC_MSG_ERROR([Explicitly requested elogind support, but libelogind not found])
+fi
+
dnl systemd detection
if test x$enable_systemd = xno ; then
have_systemd=no;
@@ -1290,7 +1309,7 @@
fi
#### Set up final flags
-LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $SYSTEMD_LIBS"
+LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $SYSTEMD_LIBS $ELOGIND_LIBS"
AC_SUBST([LIBDBUS_LIBS])
### X11 detection
@@ -1949,6 +1968,7 @@
Building AppArmor support: ${have_apparmor}
Building inotify support: ${have_inotify}
Building kqueue support: ${have_kqueue}
+ Building elogind support: ${have_elogind}
Building systemd support: ${have_systemd}
Building X11 code: ${have_x11}
Building Doxygen docs: ${enable_doxygen_docs}

View File

@ -1,7 +1,6 @@
#!/sbin/openrc-run #!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation # Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later # Distributed under the terms of the GNU General Public License, v2 or later
# $Id$
extra_started_commands="reload" extra_started_commands="reload"

View File

@ -5,6 +5,7 @@
<email>freedesktop-bugs@gentoo.org</email> <email>freedesktop-bugs@gentoo.org</email>
</maintainer> </maintainer>
<use> <use>
<flag name="elogind">Use <pkg>sys-auth/elogind</pkg> for session tracking.</flag>
<flag name="systemd">Build with <pkg>sys-apps/systemd</pkg> at_console support</flag> <flag name="systemd">Build with <pkg>sys-apps/systemd</pkg> at_console support</flag>
<flag name="user-session">Enable user-session semantics for session bus under systemd</flag> <flag name="user-session">Enable user-session semantics for session bus under systemd</flag>
</use> </use>