diff options
Diffstat (limited to 'sys-apps/dbus/files')
-rw-r--r-- | sys-apps/dbus/files/80-dbus-r1 (renamed from sys-apps/dbus/files/80-dbus) | 6 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.15.0-daemon-optional.patch (renamed from sys-apps/dbus/files/dbus-daemon-optional.patch) | 38 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.15.0-enable-elogind.patch (renamed from sys-apps/dbus/files/dbus-enable-elogind.patch) | 60 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.15.8-enable-elogind.patch | 65 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus.initd-r1 | 36 |
5 files changed, 113 insertions, 92 deletions
diff --git a/sys-apps/dbus/files/80-dbus b/sys-apps/dbus/files/80-dbus-r1 index 5593e2cd7390..3499a6a12eca 100644 --- a/sys-apps/dbus/files/80-dbus +++ b/sys-apps/dbus/files/80-dbus-r1 @@ -1,13 +1,13 @@ -#!/bin/bash +#!/bin/sh # launches a session dbus instance -dbuslaunch="`which dbus-launch 2>/dev/null`" +dbuslaunch=$(command -v dbus-launch 2>/dev/null) if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then if [ -n "$command" ]; then command="$dbuslaunch --exit-with-session $command" else - eval `$dbuslaunch --sh-syntax --exit-with-session` + eval "$($dbuslaunch --sh-syntax --exit-with-session)" fi fi diff --git a/sys-apps/dbus/files/dbus-daemon-optional.patch b/sys-apps/dbus/files/dbus-1.15.0-daemon-optional.patch index 353dcb5761be..2b9cd03472d8 100644 --- a/sys-apps/dbus/files/dbus-daemon-optional.patch +++ b/sys-apps/dbus/files/dbus-1.15.0-daemon-optional.patch @@ -1,18 +1,13 @@ +https://bugs.gentoo.org/653136 + From 3c08d28fbae8b0ef3839ef26f8d2a713a9a684f9 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner <asturm@gentoo.org> Date: Thu, 21 Feb 2019 23:53:19 +0100 Subject: [PATCH] Make dbus daemon build optional ---- - bus/Makefile.am | 2 ++ - configure.ac | 17 ++++++++++++++++- - 2 files changed, 18 insertions(+), 1 deletion(-) - -diff --git a/bus/Makefile.am b/bus/Makefile.am -index 9ae3071..26a770c 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am -@@ -70,6 +70,7 @@ agentdir=$(LAUNCHD_AGENT_DIR) +@@ -76,6 +76,7 @@ agentdir=$(LAUNCHD_AGENT_DIR) agent_DATA=org.freedesktop.dbus-session.plist endif @@ -20,19 +15,17 @@ index 9ae3071..26a770c 100644 if DBUS_BUS_ENABLE_KQUEUE DIR_WATCH_SOURCE=dir-watch-kqueue.c else -@@ -241,6 +242,7 @@ test_bus_LDADD = \ - $(top_builddir)/dbus/libdbus-internal.la \ - $(DBUS_BUS_LIBS) \ +@@ -230,6 +231,7 @@ EXTRA_DIST += \ + tmpfiles.d/dbus.conf.in \ + tmpfiles.d/meson.build \ $(NULL) +endif DBUS_DAEMON - install-data-hook: - $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/session.d -diff --git a/configure.ac b/configure.ac -index be6b065..854e846 100644 + if HAVE_SYSTEMD + systemdsystemunit_DATA = \ --- a/configure.ac +++ b/configure.ac -@@ -202,6 +202,7 @@ AC_ARG_ENABLE([apparmor], +@@ -211,6 +211,7 @@ AC_ARG_ENABLE([apparmor], [enable_apparmor=$enableval], [enable_apparmor=auto]) AC_ARG_ENABLE(libaudit,AS_HELP_STRING([--enable-libaudit],[build audit daemon support for SELinux]),enable_libaudit=$enableval,enable_libaudit=auto) @@ -40,9 +33,9 @@ index be6b065..854e846 100644 AC_ARG_ENABLE(inotify, AS_HELP_STRING([--enable-inotify],[build with inotify support (linux only)]),enable_inotify=$enableval,enable_inotify=auto) 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) -@@ -830,7 +831,20 @@ AC_CHECK_FUNCS(getpeerucred getpeereid) - - AC_CHECK_FUNCS(pipe2 accept4) +@@ -658,7 +659,20 @@ AC_CHECK_MEMBER([struct unpcbid.unp_pid], + [], + [[#include <sys/un.h>]]) -PKG_CHECK_MODULES([EXPAT], [expat]) +# dbusdaemon checks @@ -62,14 +55,11 @@ index be6b065..854e846 100644 save_cflags="$CFLAGS" save_libs="$LIBS" -@@ -1824,6 +1838,7 @@ echo " +@@ -1748,6 +1762,7 @@ echo " Building bus stats API: ${enable_stats} Building SELinux support: ${have_selinux} Building AppArmor support: ${have_apparmor} + Building daemon: ${have_daemon} Building inotify support: ${have_inotify} Building kqueue support: ${have_kqueue} - Building systemd support: ${have_systemd} --- -2.20.1 - + Building elogind support: ${have_elogind} diff --git a/sys-apps/dbus/files/dbus-enable-elogind.patch b/sys-apps/dbus/files/dbus-1.15.0-enable-elogind.patch index 5cb5d649cd91..a6c0e1bd2153 100644 --- a/sys-apps/dbus/files/dbus-enable-elogind.patch +++ b/sys-apps/dbus/files/dbus-1.15.0-enable-elogind.patch @@ -1,35 +1,16 @@ ---- 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 @@ +https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/53 +https://bugs.gentoo.org/599494 +--- a/configure.ac ++++ b/configure.ac +@@ -215,6 +215,7 @@ AC_ARG_ENABLE(inotify, AS_HELP_STRING([--enable-inotify],[build with inotify sup 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_ENABLE(traditional-activation, AS_HELP_STRING([--disable-traditional-activation], [Do not build support for service activation without using SystemdService]), enable_traditional_activation="$enableval", enable_traditional_activation=yes) - AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install])) -@@ -1184,6 +1185,24 @@ +@@ -904,6 +905,24 @@ fi AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes) @@ -54,7 +35,7 @@ dnl systemd detection if test x$enable_systemd = xno ; then have_systemd=no; -@@ -1290,7 +1309,7 @@ +@@ -1024,7 +1043,7 @@ if test x$with_valgrind != xno; then fi #### Set up final flags @@ -63,11 +44,32 @@ AC_SUBST([LIBDBUS_LIBS]) ### X11 detection -@@ -1949,6 +1968,7 @@ +@@ -1731,6 +1750,7 @@ echo " 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} + Traditional activation: ${enable_traditional_activation} Building X11 code: ${have_x11} - Building Doxygen docs: ${enable_doxygen_docs} +--- a/dbus/dbus-userdb-util.c ++++ b/dbus/dbus-userdb-util.c +@@ -39,6 +39,9 @@ + #ifdef HAVE_SYSTEMD + #include <systemd/sd-login.h> + #endif ++#if HAVE_ELOGIND ++#include <elogind/sd-login.h> ++#endif + + /** + * @addtogroup DBusInternalsUtils +@@ -65,7 +68,7 @@ dbus_bool_t + _dbus_is_console_user (dbus_uid_t uid, + DBusError *error) + { +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + /* check if we have logind */ + if (access ("/run/systemd/seats/", F_OK) >= 0) + { diff --git a/sys-apps/dbus/files/dbus-1.15.8-enable-elogind.patch b/sys-apps/dbus/files/dbus-1.15.8-enable-elogind.patch new file mode 100644 index 000000000000..543eac5b30f2 --- /dev/null +++ b/sys-apps/dbus/files/dbus-1.15.8-enable-elogind.patch @@ -0,0 +1,65 @@ +https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/53 +https://bugs.gentoo.org/599494 + +Especially see https://bugs.gentoo.org/599494#c21 - this functionality isn't +particularly required. The only known consumer at the moment is hplip. +--- a/dbus/dbus-userdb-util.c ++++ b/dbus/dbus-userdb-util.c +@@ -41,6 +41,9 @@ + #ifdef HAVE_SYSTEMD + #include <systemd/sd-login.h> + #endif ++#ifdef HAVE_ELOGIND ++#include <elogind/sd-login.h> ++#endif + + /** + * @addtogroup DBusInternalsUtils +@@ -67,7 +70,7 @@ dbus_bool_t + _dbus_is_console_user (dbus_uid_t uid, + DBusError *error) + { +-#ifdef HAVE_SYSTEMD ++#if defined(HAVE_SYSTEMD) || defined(HAVE_ELOGIND) + /* check if we have logind */ + if (access ("/run/systemd/seats/", F_OK) >= 0) + { +--- a/dbus/meson.build ++++ b/dbus/meson.build +@@ -23,6 +23,7 @@ dbus_dependencies = [ + threads, + network_libs, + systemd, ++ elogind, + valgrind.partial_dependency(compile_args: true), + ] + +--- a/meson.build ++++ b/meson.build +@@ -478,6 +478,10 @@ if use_launchd + endif + endif + ++elogind = dependency('libelogind', version: '>=209', required: get_option('elogind')) ++use_elogind = elogind.found() ++config.set('HAVE_ELOGIND', use_elogind) ++ + systemd = dependency('libsystemd', version: '>=209', required: get_option('systemd')) + use_systemd = systemd.found() + config.set('HAVE_SYSTEMD', use_systemd) +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -244,6 +244,13 @@ option( + description: 'Systemd at_console support' + ) + ++option( ++ 'elogind', ++ type: 'feature', ++ value: 'auto', ++ description: 'elogind at_console support' ++) ++ + option( + 'test_socket_dir', + type: 'string', diff --git a/sys-apps/dbus/files/dbus.initd-r1 b/sys-apps/dbus/files/dbus.initd-r1 deleted file mode 100644 index bd3542381a7a..000000000000 --- a/sys-apps/dbus/files/dbus.initd-r1 +++ /dev/null @@ -1,36 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License, v2 or later - -extra_started_commands="reload" - -description="An IPC message bus daemon" -pidfile="/var/run/dbus.pid" -command="/usr/bin/dbus-daemon" -command_args="--system" - -dbus_socket="/var/run/dbus/system_bus_socket" - -depend() { - need localmount - after bootmisc -} - -start_pre() { - /usr/bin/dbus-uuidgen --ensure=/etc/machine-id - - # We need to test if /var/run/dbus exists, since script will fail if it does not - checkpath -q -d /var/run/dbus -} - -stop_post() { - [ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}" -} - -reload() { - ebegin "Reloading D-BUS messagebus config" - /usr/bin/dbus-send --print-reply --system --type=method_call \ - --dest=org.freedesktop.DBus \ - / org.freedesktop.DBus.ReloadConfig > /dev/null - eend $? -} |