From 07809cf23686b5aef8f05b31baf14089b5ad474d Mon Sep 17 00:00:00 2001 From: David Michael Date: Fri, 16 Jun 2017 12:00:31 -0700 Subject: [PATCH] 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?) --- .../coreos-overlay/sys-apps/dbus/Manifest | 2 +- ...bus-1.10.12.ebuild => dbus-1.10.18.ebuild} | 14 +++- .../dbus/files/dbus-enable-elogind.patch | 73 +++++++++++++++++++ .../sys-apps/dbus/files/dbus.initd-r1 | 1 - .../coreos-overlay/sys-apps/dbus/metadata.xml | 1 + 5 files changed, 85 insertions(+), 6 deletions(-) rename sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/{dbus-1.10.12.ebuild => dbus-1.10.18.ebuild} (94%) create mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus-enable-elogind.patch diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/Manifest index 8f2ee0be3c..f6df01184c 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/Manifest @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.10.12.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.10.18.ebuild similarity index 94% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.10.12.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.10.18.ebuild index a1770d88fa..267008a43e 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.10.12.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/dbus-1.10.18.ebuild @@ -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 -# $Id$ EAPI=6 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 )" 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" -IUSE="debug doc selinux static-libs systemd test user-session X" +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 elogind selinux static-libs systemd test user-session X" RESTRICT="test" +REQUIRED_USE="?? ( elogind systemd )" + CDEPEND=" >=dev-libs/expat-2 selinux? ( sys-libs/libselinux ) + elogind? ( sys-auth/elogind ) systemd? ( sys-apps/systemd:0= ) X? ( x11-libs/libX11 @@ -72,6 +74,8 @@ src_prepare() { -e '/"dispatch"/d' \ bus/test-main.c || die + eapply "${FILESDIR}/${PN}-enable-elogind.patch" + eapply_user # required for asneeded patch but also for bug 263909, cross-compile so @@ -107,6 +111,7 @@ multilib_src_configure() { --disable-apparmor $(use_enable kernel_linux inotify) $(use_enable kernel_FreeBSD kqueue) + $(use_enable elogind) $(use_enable systemd) $(use_enable user-session) --disable-embedded-tests @@ -140,6 +145,7 @@ multilib_src_configure() { myconf+=( --disable-selinux --disable-libaudit + --disable-elogind --disable-systemd --without-x diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus-enable-elogind.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus-enable-elogind.patch new file mode 100644 index 0000000000..5cb5d649cd --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus-enable-elogind.patch @@ -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 + #endif ++#if HAVE_ELOGIND ++#include ++#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} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus.initd-r1 b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus.initd-r1 index 977dfffba3..bd3542381a 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus.initd-r1 +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/files/dbus.initd-r1 @@ -1,7 +1,6 @@ #!/sbin/openrc-run # Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Id$ extra_started_commands="reload" diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/metadata.xml index 169ff1a1a2..a8736a7781 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/dbus/metadata.xml @@ -5,6 +5,7 @@ freedesktop-bugs@gentoo.org + Use sys-auth/elogind for session tracking. Build with sys-apps/systemd at_console support Enable user-session semantics for session bus under systemd