public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2015-12-06 17:40 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2015-12-06 17:40 UTC (permalink / raw
  To: gentoo-commits

commit:     86785cf34413a9de72c2f882888e4ff21a113c49
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  6 17:22:23 2015 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sun Dec  6 17:28:36 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86785cf3

sys-apps/dbus: Bump to 1.10.6

Enables systemd user sessions.

init script rewrite by Polynomial-C, tweaked by me.

Package-Manager: portage-2.2.26_p10

 sys-apps/dbus/Manifest            |   1 +
 sys-apps/dbus/dbus-1.10.6.ebuild  | 255 ++++++++++++++++++++++++++++++++++++++
 sys-apps/dbus/files/dbus.initd-r1 |  37 ++++++
 3 files changed, 293 insertions(+)

diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index 93b8c20..b371dba 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,3 +1,4 @@
+DIST dbus-1.10.6.tar.gz 1952608 SHA256 b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f SHA512 56108dde5097b063b25ef6e42e573b7e1affd5b5a6ce3c745e2de21b434d86542ac6b7c384572826f867a5c471692cc7468c74c4b0cf4a1f60a1a41b0394fb3c WHIRLPOOL 6b95e34e1c8f431c24bd95d09f2cf8fe7bbec68e273f3c31883fb46a638e24304f1f345064cece01693ba4cbff9de8cc668b4c8063a87bf0e71f1ba4a682f97f
 DIST dbus-1.8.16.tar.gz 1866436 SHA256 7f795268efd343ff0498786acb35097564390d40b1b6158daf1b4f742b522b07 SHA512 79e0fb21912fe5644e1babf96fc2a64595edef6524ef50d54f6beb8cd0f1224b8484a52a7815494b40bd00bf048176002ab35443c0bb6bd04abdc3c60599f1d5 WHIRLPOOL 5e992caf51c0fb24885099b957ce01205a249118c5db27c5161e6d45ae85a889d7f26d32dfa03a207025e87e233f74c6cffd09a5ccc44d4e598d3d535b8d4247
 DIST dbus-1.8.18.tar.gz 1868625 SHA256 36f2eb9c777a3c71562573da36a147e900a642afcd44d2b0470d992a4898c4f2 SHA512 4995246af3f940b939231a4af6ba743902e1260e1d1cca607d5b36c1cda4e5b1d586dd99e2b45c5058e04cf49e81217c68395fb1b22302438d9acb6a08e7d82e WHIRLPOOL 294ce01e260928388d2ac78e46bb00bc1305486ed11a19fa457d2581845ad15e64ae229ce8b778a3835722a1520ec234b0b8c7691cb3f98744181b652cf14a3c
 DIST dbus-1.8.20.tar.gz 1871722 SHA256 5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a SHA512 d63c29267e0445e329dc811e72d7858847fbae260920fd359b1fa889f08dead2a8b380e372718994daa92a262af970d1fcc58034fbcb8ffb3026ab5f30f63067 WHIRLPOOL 9eaf3ab12396159e119cfe3435fc5d160440dab4c4abce4d506450f6db59b72e6e4feba43b1ee9fd304a8e514983186a8e61f3a1f0c917c2c72891f72167201e

diff --git a/sys-apps/dbus/dbus-1.10.6.ebuild b/sys-apps/dbus/dbus-1.10.6.ebuild
new file mode 100644
index 0000000..c7e7c59
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.10.6.ebuild
@@ -0,0 +1,255 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="http://dbus.freedesktop.org/"
+SRC_URI="http://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 X"
+
+RESTRICT="test"
+
+CDEPEND="
+	>=dev-libs/expat-2
+	selinux? (
+		sys-libs/libselinux
+		)
+	systemd? ( sys-apps/systemd:0= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXt
+		)
+	abi_x86_32? (
+		!<=app-emulation/emul-linux-x86-baselibs-20131008-r4
+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+	)
+"
+DEPEND="${CDEPEND}
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+	test? (
+		>=dev-libs/glib-2.36:2
+		${PYTHON_DEPS}
+		)
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD=${WORKDIR}/${P}-tests-build
+
+pkg_setup() {
+	enewgroup messagebus
+	enewuser messagebus -1 -1 -1 messagebus
+
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Tests were restricted because of this
+	sed -i \
+		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+		-e '/"dispatch"/d' \
+		bus/test-main.c || die
+
+	epatch_user
+
+	# required for asneeded patch but also for bug 263909, cross-compile so
+	# don't remove eautoreconf
+	eautoreconf
+}
+
+multilib_src_configure() {
+	local docconf myconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic' wrt #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
+		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		$(use_enable kernel_linux inotify)
+		$(use_enable kernel_FreeBSD kqueue)
+		$(use_enable systemd)
+		$(use_enable systemd user-session)
+		--disable-embedded-tests
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+		--with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+		--with-dbus-user=messagebus
+		$(use_with X x)
+		"$(systemd_with_unitdir)"
+		)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-selinux
+			--disable-libaudit
+			--disable-systemd
+			--without-x
+
+			# expat is used for the daemon only
+			# fake the check for multilib library build
+			ac_cv_lib_expat_XML_ParserCreate_MM=yes
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" \
+			$(use_enable test asserts) \
+			$(use_enable test checks) \
+			$(use_enable test embedded-tests) \
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# after the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+	if use X; then
+		# dbus X session script (#77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		doexe "${FILESDIR}"/80-dbus
+	fi
+
+	# needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	prune_libtool_files --all
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+}

diff --git a/sys-apps/dbus/files/dbus.initd-r1 b/sys-apps/dbus/files/dbus.initd-r1
new file mode 100644
index 0000000..a7cf24d
--- /dev/null
+++ b/sys-apps/dbus/files/dbus.initd-r1
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+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 $?
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2016-03-08  8:04 Lars Wendler
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Wendler @ 2016-03-08  8:04 UTC (permalink / raw
  To: gentoo-commits

commit:     660c7e9fed81d32fc2d800513b6e9ac9e23049e1
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  8 07:53:05 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Mar  8 08:04:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=660c7e9f

sys-apps/dbus: Bump to version 1.10.8

Package-Manager: portage-2.2.27
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/dbus/Manifest            |   1 +
 sys-apps/dbus/dbus-1.10.8.ebuild  | 256 ++++++++++++++++++++++++++++++++++++++
 sys-apps/dbus/files/dbus.initd-r1 |   4 +-
 3 files changed, 259 insertions(+), 2 deletions(-)

diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index b371dba..7b51fdb 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,4 +1,5 @@
 DIST dbus-1.10.6.tar.gz 1952608 SHA256 b5fefa08a77edd76cd64d872db949eebc02cf6f3f8be82e4bbc641742af5d35f SHA512 56108dde5097b063b25ef6e42e573b7e1affd5b5a6ce3c745e2de21b434d86542ac6b7c384572826f867a5c471692cc7468c74c4b0cf4a1f60a1a41b0394fb3c WHIRLPOOL 6b95e34e1c8f431c24bd95d09f2cf8fe7bbec68e273f3c31883fb46a638e24304f1f345064cece01693ba4cbff9de8cc668b4c8063a87bf0e71f1ba4a682f97f
+DIST dbus-1.10.8.tar.gz 1976732 SHA256 baf3d22baa26d3bdd9edc587736cd5562196ce67996d65b82103bedbe1f0c014 SHA512 becc6c27b81a716ca498f3cdce2dae9fe5b39d7d334f66a9eae7ae8ce6448ea8c5fdfc500138371992828693a2f8f3a503efb147e163103aa64eac9b4bcf9906 WHIRLPOOL 3b2276bbc606a3997dd95d831271b8b102f45e8fc5696d88886f1e7b72fd134413cd3d3dd1a2608dcdfdf8d4caefc94e634c90b278fccd7d74cc4cce44696d92
 DIST dbus-1.8.16.tar.gz 1866436 SHA256 7f795268efd343ff0498786acb35097564390d40b1b6158daf1b4f742b522b07 SHA512 79e0fb21912fe5644e1babf96fc2a64595edef6524ef50d54f6beb8cd0f1224b8484a52a7815494b40bd00bf048176002ab35443c0bb6bd04abdc3c60599f1d5 WHIRLPOOL 5e992caf51c0fb24885099b957ce01205a249118c5db27c5161e6d45ae85a889d7f26d32dfa03a207025e87e233f74c6cffd09a5ccc44d4e598d3d535b8d4247
 DIST dbus-1.8.18.tar.gz 1868625 SHA256 36f2eb9c777a3c71562573da36a147e900a642afcd44d2b0470d992a4898c4f2 SHA512 4995246af3f940b939231a4af6ba743902e1260e1d1cca607d5b36c1cda4e5b1d586dd99e2b45c5058e04cf49e81217c68395fb1b22302438d9acb6a08e7d82e WHIRLPOOL 294ce01e260928388d2ac78e46bb00bc1305486ed11a19fa457d2581845ad15e64ae229ce8b778a3835722a1520ec234b0b8c7691cb3f98744181b652cf14a3c
 DIST dbus-1.8.20.tar.gz 1871722 SHA256 5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a SHA512 d63c29267e0445e329dc811e72d7858847fbae260920fd359b1fa889f08dead2a8b380e372718994daa92a262af970d1fcc58034fbcb8ffb3026ab5f30f63067 WHIRLPOOL 9eaf3ab12396159e119cfe3435fc5d160440dab4c4abce4d506450f6db59b72e6e4feba43b1ee9fd304a8e514983186a8e61f3a1f0c917c2c72891f72167201e

diff --git a/sys-apps/dbus/dbus-1.10.8.ebuild b/sys-apps/dbus/dbus-1.10.8.ebuild
new file mode 100644
index 0000000..e376c4a
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.10.8.ebuild
@@ -0,0 +1,256 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="http://dbus.freedesktop.org/"
+SRC_URI="http://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 X"
+
+RESTRICT="test"
+
+CDEPEND="
+	>=dev-libs/expat-2
+	selinux? (
+		sys-libs/libselinux
+		)
+	systemd? ( sys-apps/systemd:0= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXt
+		)
+	abi_x86_32? (
+		!<=app-emulation/emul-linux-x86-baselibs-20131008-r4
+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+	)
+"
+DEPEND="${CDEPEND}
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+	test? (
+		>=dev-libs/glib-2.36:2
+		${PYTHON_DEPS}
+		)
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD=${WORKDIR}/${P}-tests-build
+
+pkg_setup() {
+	enewgroup messagebus
+	enewuser messagebus -1 -1 -1 messagebus
+
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Tests were restricted because of this
+	sed -i \
+		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+		-e '/"dispatch"/d' \
+		bus/test-main.c || die
+
+	eapply_user
+
+	# required for asneeded patch but also for bug 263909, cross-compile so
+	# don't remove eautoreconf
+	eautoreconf
+}
+
+multilib_src_configure() {
+	local docconf myconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic' wrt #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
+		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		--disable-apparmor
+		$(use_enable kernel_linux inotify)
+		$(use_enable kernel_FreeBSD kqueue)
+		$(use_enable systemd)
+		$(use_enable systemd user-session)
+		--disable-embedded-tests
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+		--with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-dbus-user=messagebus
+		$(use_with X x)
+		)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-selinux
+			--disable-libaudit
+			--disable-systemd
+			--without-x
+
+			# expat is used for the daemon only
+			# fake the check for multilib library build
+			ac_cv_lib_expat_XML_ParserCreate_MM=yes
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" \
+			$(use_enable test asserts) \
+			$(use_enable test checks) \
+			$(use_enable test embedded-tests) \
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# after the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+	if use X; then
+		# dbus X session script (#77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		doexe "${FILESDIR}"/80-dbus
+	fi
+
+	# needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	prune_libtool_files --all
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+}

diff --git a/sys-apps/dbus/files/dbus.initd-r1 b/sys-apps/dbus/files/dbus.initd-r1
index a7cf24d..977dfff 100644
--- a/sys-apps/dbus/files/dbus.initd-r1
+++ b/sys-apps/dbus/files/dbus.initd-r1
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2015 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License, v2 or later
 # $Id$
 


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2017-03-25  3:27 Michael Palimaka
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Palimaka @ 2017-03-25  3:27 UTC (permalink / raw
  To: gentoo-commits

commit:     640fb067afa16c30817dd2dedd4081341a923ac4
Author:     Sven Eden <yamakuzure <AT> gmx <DOT> net>
AuthorDate: Sat Mar 25 03:26:27 2017 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Mar 25 03:26:51 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=640fb067

sys-apps/dbus: introduce elogind support

Gentoo-bug: 599494
Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sys-apps/dbus/dbus-1.10.16-r1.ebuild          | 274 ++++++++++++++++++++++++++
 sys-apps/dbus/files/dbus-enable-elogind.patch |  73 +++++++
 sys-apps/dbus/metadata.xml                    |   1 +
 3 files changed, 348 insertions(+)

diff --git a/sys-apps/dbus/dbus-1.10.16-r1.ebuild b/sys-apps/dbus/dbus-1.10.16-r1.ebuild
new file mode 100644
index 00000000000..850235a998a
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.10.16-r1.ebuild
@@ -0,0 +1,274 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://dbus.freedesktop.org/"
+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 ~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
+		x11-libs/libXt
+		)
+	abi_x86_32? (
+		!<=app-emulation/emul-linux-x86-baselibs-20131008-r4
+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+	)
+"
+DEPEND="${CDEPEND}
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+	test? (
+		>=dev-libs/glib-2.36:2
+		${PYTHON_DEPS}
+		)
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD=${WORKDIR}/${P}-tests-build
+
+pkg_setup() {
+	enewgroup messagebus
+	enewuser messagebus -1 -1 -1 messagebus
+
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Tests were restricted because of this
+	sed -i \
+		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+		-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
+	# don't remove eautoreconf
+	eautoreconf
+}
+
+multilib_src_configure() {
+	local docconf myconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic' wrt #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
+		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		--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
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+		--with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-dbus-user=messagebus
+		$(use_with X x)
+		)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-selinux
+			--disable-libaudit
+			--disable-elogind
+			--disable-systemd
+			--without-x
+
+			# expat is used for the daemon only
+			# fake the check for multilib library build
+			ac_cv_lib_expat_XML_ParserCreate_MM=yes
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" \
+			$(use_enable test asserts) \
+			$(use_enable test checks) \
+			$(use_enable test embedded-tests) \
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# after the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+	if use X; then
+		# dbus X session script (#77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		doexe "${FILESDIR}"/80-dbus
+	fi
+
+	# needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	prune_libtool_files --all
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+
+	if use user-session; then
+		ewarn "You have enabled user-session. Please note this can cause"
+		ewarn "bogus behaviors in several dbus consumers that are not prepared"
+		ewarn "for this dbus activation method yet."
+		ewarn
+		ewarn "See the following link for background on this change:"
+		ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
+		ewarn
+		ewarn "Known issues are tracked here:"
+		ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
+	fi
+}

diff --git a/sys-apps/dbus/files/dbus-enable-elogind.patch b/sys-apps/dbus/files/dbus-enable-elogind.patch
new file mode 100644
index 00000000000..5cb5d649cd9
--- /dev/null
+++ b/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 <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}

diff --git a/sys-apps/dbus/metadata.xml b/sys-apps/dbus/metadata.xml
index 169ff1a1a2b..a8736a77816 100644
--- a/sys-apps/dbus/metadata.xml
+++ b/sys-apps/dbus/metadata.xml
@@ -5,6 +5,7 @@
 		<email>freedesktop-bugs@gentoo.org</email>
 	</maintainer>
 	<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="user-session">Enable user-session semantics for session bus under systemd</flag>
 	</use>


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2017-04-06 13:08 Lars Wendler
  0 siblings, 0 replies; 10+ messages in thread
From: Lars Wendler @ 2017-04-06 13:08 UTC (permalink / raw
  To: gentoo-commits

commit:     49492acc49219ff052d9ab59345b185040e722cd
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  6 13:06:09 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Apr  6 13:08:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49492acc

sys-apps/dbus: Removed old.

Package-Manager: Portage-2.3.5, Repoman-2.3.2

 sys-apps/dbus/Manifest            |   1 -
 sys-apps/dbus/dbus-1.10.14.ebuild | 267 --------------------------------------
 sys-apps/dbus/dbus-1.10.16.ebuild | 267 --------------------------------------
 sys-apps/dbus/files/dbus.initd    |  49 -------
 4 files changed, 584 deletions(-)

diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index 3940984bfc4..58cb99bbd32 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,4 +1,3 @@
 DIST dbus-1.10.12.tar.gz 1984805 SHA256 210a79430b276eafc6406c71705e9140d25b9956d18068df98a70156dc0e475d SHA512 6616c7b2926a6fb6158d0a0a24d1b887173ca215a2f3185b95cc5f08df64fed1977e16c86c6ae530960453b6c585ae24ea4c9976e7537a45f9c6366c43baa52d WHIRLPOOL 9bd9ed70c4d9890dad09b2bcd07ee40ef472f1436cefe3bc89aaddbb183532939d6ce19da721a673a39f2e6b07e634b179190cec00e1a48fa2d9be6c830cc696
-DIST dbus-1.10.14.tar.gz 1985828 SHA256 23238f70353e38ce5ca183ebc9525c0d97ac00ef640ad29cf794782af6e6a083 SHA512 87eda0117ee5fd47952f37a227cc017acdaa174a28e59ecd0c9f2501ffd5d56d015865d472dd9a922d8a52184662bfebff86279eb7431d19583958dd9e4dae26 WHIRLPOOL 83ded40df7b005b9247c9f1c82befc3c989becea0702998df5d43a9fb73489b0d222142a0d32fd11523e839ba8729dc824ff547d13d4c68fe390c788d2c5c750
 DIST dbus-1.10.16.tar.gz 1986063 SHA256 a7b0ba6ea3e8d0e08afec5e3030d0245614268276620c536726f8fa6e5c43388 SHA512 1f3cbed3be80fe33b2a05774b17acd63132daa6b93102ac8b287443220ae27358457ddf4ecf2f4d974f881b0361136da785a52db45cd5da160c91b6674ba4a22 WHIRLPOOL 257cd83430dcfd8e9b83e13d0e5a54bbcd56885ba519d162fd1956dcef3d0f6ffa5058f2e43d993686055d26e830d570a260dcff28575fdd09cc860b41faafdc
 DIST dbus-1.10.18.tar.gz 1986589 SHA256 6049ddd5f3f3e2618f615f1faeda0a115104423a7996b7aa73e2f36e38cc514a SHA512 726f97d0a2016f4f0625ba332e93e2d33bb16857cd35cb6c79da0f44fff297df948c3df62c31ffbec34713a7b85b3ff5b65f31517fe3511ddbd3bf18bd4748ed WHIRLPOOL ee164e1f6de80595fbfbcbad65d78dab4b91b5ec4e1ce88e1c4015f1c1b531f09796d54db163b2c2eceb3b92261f8a57852d2e0b29f71d9c65f9b91684433d9e

diff --git a/sys-apps/dbus/dbus-1.10.14.ebuild b/sys-apps/dbus/dbus-1.10.14.ebuild
deleted file mode 100644
index a928ceaeb04..00000000000
--- a/sys-apps/dbus/dbus-1.10.14.ebuild
+++ /dev/null
@@ -1,267 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
-
-DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
-HOMEPAGE="https://dbus.freedesktop.org/"
-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 ~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"
-
-RESTRICT="test"
-
-CDEPEND="
-	>=dev-libs/expat-2
-	selinux? (
-		sys-libs/libselinux
-		)
-	systemd? ( sys-apps/systemd:0= )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXt
-		)
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20131008-r4
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)
-"
-DEPEND="${CDEPEND}
-	app-text/xmlto
-	app-text/docbook-xml-dtd:4.4
-	virtual/pkgconfig
-	doc? ( app-doc/doxygen )
-	test? (
-		>=dev-libs/glib-2.36:2
-		${PYTHON_DEPS}
-		)
-"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-dbus )
-"
-
-DOC_CONTENTS="
-	Some applications require a session bus in addition to the system
-	bus. Please see \`man dbus-launch\` for more information.
-"
-
-# out of sources build dir for make check
-TBD=${WORKDIR}/${P}-tests-build
-
-pkg_setup() {
-	enewgroup messagebus
-	enewuser messagebus -1 -1 -1 messagebus
-
-	use test && python-any-r1_pkg_setup
-
-	if use kernel_linux; then
-		CONFIG_CHECK="~EPOLL"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	# Tests were restricted because of this
-	sed -i \
-		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
-		-e '/"dispatch"/d' \
-		bus/test-main.c || die
-
-	eapply_user
-
-	# required for asneeded patch but also for bug 263909, cross-compile so
-	# don't remove eautoreconf
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local docconf myconf
-
-	# so we can get backtraces from apps
-	case ${CHOST} in
-		*-mingw*)
-			# error: unrecognized command line option '-rdynamic' wrt #488036
-			;;
-		*)
-			append-flags -rdynamic
-			;;
-	esac
-
-	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
-	# not on an SELinux profile.
-	myconf=(
-		--localstatedir="${EPREFIX}/var"
-		--docdir="${EPREFIX}/usr/share/doc/${PF}"
-		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
-		$(use_enable static-libs static)
-		$(use_enable debug verbose-mode)
-		--disable-asserts
-		--disable-checks
-		$(use_enable selinux)
-		$(use_enable selinux libaudit)
-		--disable-apparmor
-		$(use_enable kernel_linux inotify)
-		$(use_enable kernel_FreeBSD kqueue)
-		$(use_enable systemd)
-		$(use_enable user-session)
-		--disable-embedded-tests
-		--disable-modular-tests
-		$(use_enable debug stats)
-		--with-session-socket-dir="${EPREFIX}"/tmp
-		--with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
-		--with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-dbus-user=messagebus
-		$(use_with X x)
-		)
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		myconf+=(
-			--enable-launchd
-			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
-		)
-	fi
-
-	if multilib_is_native_abi; then
-		docconf=(
-			--enable-xml-docs
-			$(use_enable doc doxygen-docs)
-		)
-	else
-		docconf=(
-			--disable-xml-docs
-			--disable-doxygen-docs
-		)
-		myconf+=(
-			--disable-selinux
-			--disable-libaudit
-			--disable-systemd
-			--without-x
-
-			# expat is used for the daemon only
-			# fake the check for multilib library build
-			ac_cv_lib_expat_XML_ParserCreate_MM=yes
-		)
-	fi
-
-	einfo "Running configure in ${BUILD_DIR}"
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
-
-	if multilib_is_native_abi && use test; then
-		mkdir "${TBD}" || die
-		cd "${TBD}" || die
-		einfo "Running configure in ${TBD}"
-		ECONF_SOURCE="${S}" econf "${myconf[@]}" \
-			$(use_enable test asserts) \
-			$(use_enable test checks) \
-			$(use_enable test embedded-tests) \
-			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		# after the compile, it uses a selinuxfs interface to
-		# check if the SELinux policy has the right support
-		use selinux && addwrite /selinux/access
-
-		einfo "Running make in ${BUILD_DIR}"
-		emake
-
-		if use test; then
-			einfo "Running make in ${TBD}"
-			emake -C "${TBD}"
-		fi
-	else
-		emake -C dbus libdbus-1.la
-	fi
-}
-
-src_test() {
-	DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		emake DESTDIR="${D}" install
-	else
-		emake DESTDIR="${D}" install-pkgconfigDATA
-		emake DESTDIR="${D}" -C dbus \
-			install-libLTLIBRARIES install-dbusincludeHEADERS \
-			install-nodist_dbusarchincludeHEADERS
-	fi
-}
-
-multilib_src_install_all() {
-	newinitd "${FILESDIR}"/dbus.initd-r1 dbus
-
-	if use X; then
-		# dbus X session script (#77504)
-		# turns out to only work for GDM (and startx). has been merged into
-		# other desktop (kdm and such scripts)
-		exeinto /etc/X11/xinit/xinitrc.d
-		doexe "${FILESDIR}"/80-dbus
-	fi
-
-	# needs to exist for dbus sessions to launch
-	keepdir /usr/share/dbus-1/services
-	keepdir /etc/dbus-1/{session,system}.d
-	# machine-id symlink from pkg_postinst()
-	keepdir /var/lib/dbus
-	# let the init script create the /var/run/dbus directory
-	rm -rf "${ED}"/var/run
-
-	dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
-	readme.gentoo_create_doc
-
-	prune_libtool_files --all
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
-	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
-	# dependencies with hardcoded paths (although the known ones got fixed already)
-	dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
-	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		local plist="org.freedesktop.dbus-session.plist"
-		elog
-		elog
-		elog "For MacOS/Darwin we now ship launchd support for dbus."
-		elog "This enables autolaunch of dbus at session login and makes"
-		elog "dbus usable under MacOS/Darwin."
-		elog
-		elog "The launchd plist file ${plist} has been"
-		elog "installed in ${EPREFIX}/Library/LaunchAgents."
-		elog "For it to be used, you will have to do all of the following:"
-		elog " + cd ~/Library/LaunchAgents"
-		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
-		elog " + logout and log back in"
-		elog
-		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
-		elog "specified and refused to start otherwise, then export the"
-		elog "the following to your environment:"
-		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
-	fi
-
-	if use user-session; then
-		ewarn "You have enabled user-session. Please note this can cause"
-		ewarn "bogus behaviors in several dbus consumers that are not prepared"
-		ewarn "for this dbus activation method yet."
-		ewarn
-		ewarn "See the following link for background on this change:"
-		ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
-		ewarn
-		ewarn "Known issues are tracked here:"
-		ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
-	fi
-}

diff --git a/sys-apps/dbus/dbus-1.10.16.ebuild b/sys-apps/dbus/dbus-1.10.16.ebuild
deleted file mode 100644
index a928ceaeb04..00000000000
--- a/sys-apps/dbus/dbus-1.10.16.ebuild
+++ /dev/null
@@ -1,267 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
-
-DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
-HOMEPAGE="https://dbus.freedesktop.org/"
-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 ~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"
-
-RESTRICT="test"
-
-CDEPEND="
-	>=dev-libs/expat-2
-	selinux? (
-		sys-libs/libselinux
-		)
-	systemd? ( sys-apps/systemd:0= )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXt
-		)
-	abi_x86_32? (
-		!<=app-emulation/emul-linux-x86-baselibs-20131008-r4
-		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
-	)
-"
-DEPEND="${CDEPEND}
-	app-text/xmlto
-	app-text/docbook-xml-dtd:4.4
-	virtual/pkgconfig
-	doc? ( app-doc/doxygen )
-	test? (
-		>=dev-libs/glib-2.36:2
-		${PYTHON_DEPS}
-		)
-"
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-dbus )
-"
-
-DOC_CONTENTS="
-	Some applications require a session bus in addition to the system
-	bus. Please see \`man dbus-launch\` for more information.
-"
-
-# out of sources build dir for make check
-TBD=${WORKDIR}/${P}-tests-build
-
-pkg_setup() {
-	enewgroup messagebus
-	enewuser messagebus -1 -1 -1 messagebus
-
-	use test && python-any-r1_pkg_setup
-
-	if use kernel_linux; then
-		CONFIG_CHECK="~EPOLL"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	# Tests were restricted because of this
-	sed -i \
-		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
-		-e '/"dispatch"/d' \
-		bus/test-main.c || die
-
-	eapply_user
-
-	# required for asneeded patch but also for bug 263909, cross-compile so
-	# don't remove eautoreconf
-	eautoreconf
-}
-
-multilib_src_configure() {
-	local docconf myconf
-
-	# so we can get backtraces from apps
-	case ${CHOST} in
-		*-mingw*)
-			# error: unrecognized command line option '-rdynamic' wrt #488036
-			;;
-		*)
-			append-flags -rdynamic
-			;;
-	esac
-
-	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
-	# not on an SELinux profile.
-	myconf=(
-		--localstatedir="${EPREFIX}/var"
-		--docdir="${EPREFIX}/usr/share/doc/${PF}"
-		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
-		$(use_enable static-libs static)
-		$(use_enable debug verbose-mode)
-		--disable-asserts
-		--disable-checks
-		$(use_enable selinux)
-		$(use_enable selinux libaudit)
-		--disable-apparmor
-		$(use_enable kernel_linux inotify)
-		$(use_enable kernel_FreeBSD kqueue)
-		$(use_enable systemd)
-		$(use_enable user-session)
-		--disable-embedded-tests
-		--disable-modular-tests
-		$(use_enable debug stats)
-		--with-session-socket-dir="${EPREFIX}"/tmp
-		--with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
-		--with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-dbus-user=messagebus
-		$(use_with X x)
-		)
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		myconf+=(
-			--enable-launchd
-			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
-		)
-	fi
-
-	if multilib_is_native_abi; then
-		docconf=(
-			--enable-xml-docs
-			$(use_enable doc doxygen-docs)
-		)
-	else
-		docconf=(
-			--disable-xml-docs
-			--disable-doxygen-docs
-		)
-		myconf+=(
-			--disable-selinux
-			--disable-libaudit
-			--disable-systemd
-			--without-x
-
-			# expat is used for the daemon only
-			# fake the check for multilib library build
-			ac_cv_lib_expat_XML_ParserCreate_MM=yes
-		)
-	fi
-
-	einfo "Running configure in ${BUILD_DIR}"
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
-
-	if multilib_is_native_abi && use test; then
-		mkdir "${TBD}" || die
-		cd "${TBD}" || die
-		einfo "Running configure in ${TBD}"
-		ECONF_SOURCE="${S}" econf "${myconf[@]}" \
-			$(use_enable test asserts) \
-			$(use_enable test checks) \
-			$(use_enable test embedded-tests) \
-			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		# after the compile, it uses a selinuxfs interface to
-		# check if the SELinux policy has the right support
-		use selinux && addwrite /selinux/access
-
-		einfo "Running make in ${BUILD_DIR}"
-		emake
-
-		if use test; then
-			einfo "Running make in ${TBD}"
-			emake -C "${TBD}"
-		fi
-	else
-		emake -C dbus libdbus-1.la
-	fi
-}
-
-src_test() {
-	DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		emake DESTDIR="${D}" install
-	else
-		emake DESTDIR="${D}" install-pkgconfigDATA
-		emake DESTDIR="${D}" -C dbus \
-			install-libLTLIBRARIES install-dbusincludeHEADERS \
-			install-nodist_dbusarchincludeHEADERS
-	fi
-}
-
-multilib_src_install_all() {
-	newinitd "${FILESDIR}"/dbus.initd-r1 dbus
-
-	if use X; then
-		# dbus X session script (#77504)
-		# turns out to only work for GDM (and startx). has been merged into
-		# other desktop (kdm and such scripts)
-		exeinto /etc/X11/xinit/xinitrc.d
-		doexe "${FILESDIR}"/80-dbus
-	fi
-
-	# needs to exist for dbus sessions to launch
-	keepdir /usr/share/dbus-1/services
-	keepdir /etc/dbus-1/{session,system}.d
-	# machine-id symlink from pkg_postinst()
-	keepdir /var/lib/dbus
-	# let the init script create the /var/run/dbus directory
-	rm -rf "${ED}"/var/run
-
-	dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
-	readme.gentoo_create_doc
-
-	prune_libtool_files --all
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
-	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
-	# dependencies with hardcoded paths (although the known ones got fixed already)
-	dbus-uuidgen --ensure="${EROOT%/}"/etc/machine-id
-	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT%/}"/var/lib/dbus/machine-id
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		local plist="org.freedesktop.dbus-session.plist"
-		elog
-		elog
-		elog "For MacOS/Darwin we now ship launchd support for dbus."
-		elog "This enables autolaunch of dbus at session login and makes"
-		elog "dbus usable under MacOS/Darwin."
-		elog
-		elog "The launchd plist file ${plist} has been"
-		elog "installed in ${EPREFIX}/Library/LaunchAgents."
-		elog "For it to be used, you will have to do all of the following:"
-		elog " + cd ~/Library/LaunchAgents"
-		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
-		elog " + logout and log back in"
-		elog
-		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
-		elog "specified and refused to start otherwise, then export the"
-		elog "the following to your environment:"
-		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
-	fi
-
-	if use user-session; then
-		ewarn "You have enabled user-session. Please note this can cause"
-		ewarn "bogus behaviors in several dbus consumers that are not prepared"
-		ewarn "for this dbus activation method yet."
-		ewarn
-		ewarn "See the following link for background on this change:"
-		ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
-		ewarn
-		ewarn "Known issues are tracked here:"
-		ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
-	fi
-}

diff --git a/sys-apps/dbus/files/dbus.initd b/sys-apps/dbus/files/dbus.initd
deleted file mode 100644
index fc3f6138ca4..00000000000
--- a/sys-apps/dbus/files/dbus.initd
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License, v2 or later
-
-extra_started_commands="reload"
-
-depend() {
-	need localmount
-	after bootmisc
-}
-
-start() {
-	ebegin "Starting D-BUS system messagebus"
-	/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
-	[ ! -e /var/run/dbus ] && mkdir /var/run/dbus 
-
-	start-stop-daemon --start --pidfile /var/run/dbus.pid --exec /usr/bin/dbus-daemon -- --system
-	eend $?
-}
-
-stop() {
-	local retval
-
-	ebegin "Stopping D-BUS system messagebus"
-
-	start-stop-daemon --stop --pidfile /var/run/dbus.pid
-	retval=$?
-
-	eend ${retval}
-
-	[ -S /var/run/dbus/system_bus_socket ] && rm -f /var/run/dbus/system_bus_socket
-
-	return ${retval}
-}
-
-reload() {
-	local retval
-
-	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
-	retval=$?
-	eend ${retval}
-	return ${retval}
-}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2019-02-21 23:54 Andreas Sturmlechner
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2019-02-21 23:54 UTC (permalink / raw
  To: gentoo-commits

commit:     504ec9e306b7226f0fb0c709b429ebf16632a6c2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 21 23:02:53 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Thu Feb 21 23:53:33 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=504ec9e3

sys-apps/dbus: Fix build w/o dev-libs/expat (non-native ABI)

Closes: https://bugs.gentoo.org/653136
Closes: https://github.com/gentoo/gentoo/pull/11134
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-apps/dbus/dbus-1.12.12-r1.ebuild           | 281 +++++++++++++++++++++++++
 sys-apps/dbus/files/dbus-daemon-optional.patch |  75 +++++++
 2 files changed, 356 insertions(+)

diff --git a/sys-apps/dbus/dbus-1.12.12-r1.ebuild b/sys-apps/dbus/dbus-1.12.12-r1.ebuild
new file mode 100644
index 00000000000..59c8de33e33
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.12.12-r1.ebuild
@@ -0,0 +1,281 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6,7}} )
+inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://dbus.freedesktop.org/"
+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 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc elogind selinux static-libs systemd test user-session X"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+# autoconf-archive-2019.01.06 blocker added for bug #674830
+# Please check on bumps if the blocker is still necessary.
+BDEPEND="
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	<sys-devel/autoconf-archive-2019.01.06
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+"
+COMMON_DEPEND="
+	>=dev-libs/expat-2.1.0
+	elogind? ( sys-auth/elogind )
+	selinux? ( sys-libs/libselinux )
+	systemd? ( sys-apps/systemd:0= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/expat
+	test? (
+		${PYTHON_DEPS}
+		>=dev-libs/glib-2.40:2
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD="${WORKDIR}/${P}-tests-build"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-enable-elogind.patch"
+	"${FILESDIR}/${PN}-daemon-optional.patch"
+)
+
+pkg_setup() {
+	enewgroup messagebus
+	enewuser messagebus -1 -1 -1 messagebus
+
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Tests were restricted because of this
+	sed -i \
+		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+		-e '/"dispatch"/d' \
+		bus/test-main.c || die
+
+	default
+
+	if [[ ${CHOST} == *-solaris* ]]; then
+		# fix standards conflict, due to gcc being c99 by default nowadays
+		sed -i \
+			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
+			configure.ac || die
+	fi
+
+	# required for bug 263909, cross-compile so don't remove eautoreconf
+	eautoreconf
+}
+
+multilib_src_configure() {
+	local docconf myconf testconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic' wrt #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
+		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		--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
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}"/var/run/dbus.pid
+		--with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-dbus-user=messagebus
+		$(use_with X x)
+	)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-daemon
+			--disable-selinux
+			--disable-libaudit
+			--disable-elogind
+			--disable-systemd
+			--without-x
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		testconf=(
+			$(use_enable test asserts)
+			$(use_enable test checks)
+			$(use_enable test embedded-tests)
+			$(use_enable test stats)
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+		)
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# after the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${FILESDIR}"/dbus.initd-r1 dbus
+
+	if use X; then
+		# dbus X session script (#77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		doexe "${FILESDIR}"/80-dbus
+	fi
+
+	# needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	dodoc AUTHORS ChangeLog NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+
+	if use user-session; then
+		ewarn "You have enabled user-session. Please note this can cause"
+		ewarn "bogus behaviors in several dbus consumers that are not prepared"
+		ewarn "for this dbus activation method yet."
+		ewarn
+		ewarn "See the following link for background on this change:"
+		ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
+		ewarn
+		ewarn "Known issues are tracked here:"
+		ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
+	fi
+}

diff --git a/sys-apps/dbus/files/dbus-daemon-optional.patch b/sys-apps/dbus/files/dbus-daemon-optional.patch
new file mode 100644
index 00000000000..353dcb5761b
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-daemon-optional.patch
@@ -0,0 +1,75 @@
+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)
+ agent_DATA=org.freedesktop.dbus-session.plist
+ endif
+ 
++if DBUS_DAEMON
+ 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) \
+ 	$(NULL)
++endif DBUS_DAEMON
+ 
+ install-data-hook:
+ 	$(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/session.d
+diff --git a/configure.ac b/configure.ac
+index be6b065..854e846 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -202,6 +202,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)
++AC_ARG_ENABLE(daemon, AS_HELP_STRING([--enable-daemon],[build with the dbus daemon]),enable_daemon=$enableval,enable_daemon=yes)
+ 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)
+ 
+-PKG_CHECK_MODULES([EXPAT], [expat])
++# dbusdaemon checks
++if test x$enable_daemon = xno ; then
++    have_daemon=no
++else
++    have_daemon=yes
++fi
++
++dnl check if daemon shall be built
++if test x$have_daemon = xyes; then
++   AC_DEFINE(DBUS_DAEMON,1,[Use daemon])
++   PKG_CHECK_MODULES([EXPAT], [expat])
++fi
++
++AM_CONDITIONAL(DBUS_DAEMON, test x$have_daemon = xyes)
+ 
+ save_cflags="$CFLAGS"
+ save_libs="$LIBS"
+@@ -1824,6 +1838,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
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2019-04-04  1:58 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2019-04-04  1:58 UTC (permalink / raw
  To: gentoo-commits

commit:     c0dca773e47d3532401cea9be36da5f4c563159c
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Apr  4 01:54:06 2019 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Apr  4 01:54:06 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0dca773

sys-apps/dbus: move stuff under /run on linux

systemd-242 complains about sockets under /var/run. Let's avoid that.

Package-Manager: Portage-2.3.62_p4, Repoman-2.3.12_p87
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/dbus/dbus-1.12.12-r2.ebuild | 287 +++++++++++++++++++++++++++++++++++
 sys-apps/dbus/files/dbus.initd.in    |  36 +++++
 2 files changed, 323 insertions(+)

diff --git a/sys-apps/dbus/dbus-1.12.12-r2.ebuild b/sys-apps/dbus/dbus-1.12.12-r2.ebuild
new file mode 100644
index 00000000000..44d36d8040b
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.12.12-r2.ebuild
@@ -0,0 +1,287 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_{4,5,6,7}} )
+inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd virtualx user multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://dbus.freedesktop.org/"
+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 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc elogind kernel_linux selinux static-libs systemd test user-session X"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+# autoconf-archive-2019.01.06 blocker added for bug #674830
+# Please check on bumps if the blocker is still necessary.
+BDEPEND="
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	<sys-devel/autoconf-archive-2019.01.06
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+"
+COMMON_DEPEND="
+	>=dev-libs/expat-2.1.0
+	elogind? ( sys-auth/elogind )
+	selinux? ( sys-libs/libselinux )
+	systemd? ( sys-apps/systemd:0= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/expat
+	test? (
+		${PYTHON_DEPS}
+		>=dev-libs/glib-2.40:2
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	selinux? ( sec-policy/selinux-dbus )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD="${WORKDIR}/${P}-tests-build"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-enable-elogind.patch"
+	"${FILESDIR}/${PN}-daemon-optional.patch" # bug #653136
+)
+
+pkg_setup() {
+	enewgroup messagebus
+	enewuser messagebus -1 -1 -1 messagebus
+
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	# Tests were restricted because of this
+	sed -i \
+		-e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+		-e '/"dispatch"/d' \
+		bus/test-main.c || die
+
+	default
+
+	if [[ ${CHOST} == *-solaris* ]]; then
+		# fix standards conflict, due to gcc being c99 by default nowadays
+		sed -i \
+			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
+			configure.ac || die
+	fi
+
+	# required for bug 263909, cross-compile so don't remove eautoreconf
+	eautoreconf
+}
+
+src_configure() {
+	local rundir=$(usex kernel_linux /run /var/run)
+	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in > "${WORKDIR}"/dbus.initd || die
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local docconf myconf testconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic' wrt #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		--docdir="${EPREFIX}/usr/share/doc/${PF}"
+		--htmldir="${EPREFIX}/usr/share/doc/${PF}/html"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		--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
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
+		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-dbus-user=messagebus
+		$(use_with X x)
+	)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-daemon
+			--disable-selinux
+			--disable-libaudit
+			--disable-elogind
+			--disable-systemd
+			--without-x
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		testconf=(
+			$(use_enable test asserts)
+			$(use_enable test checks)
+			$(use_enable test embedded-tests)
+			$(use_enable test stats)
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+		)
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# after the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${WORKDIR}"/dbus.initd dbus
+
+	if use X; then
+		# dbus X session script (#77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		doexe "${FILESDIR}"/80-dbus
+	fi
+
+	# needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	dodoc AUTHORS ChangeLog NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	# Ensure unique id is generated and put it in /etc wrt #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+
+	if use user-session; then
+		ewarn "You have enabled user-session. Please note this can cause"
+		ewarn "bogus behaviors in several dbus consumers that are not prepared"
+		ewarn "for this dbus activation method yet."
+		ewarn
+		ewarn "See the following link for background on this change:"
+		ewarn "https://lists.freedesktop.org/archives/systemd-devel/2015-January/027711.html"
+		ewarn
+		ewarn "Known issues are tracked here:"
+		ewarn "https://bugs.gentoo.org/show_bug.cgi?id=576028"
+	fi
+}

diff --git a/sys-apps/dbus/files/dbus.initd.in b/sys-apps/dbus/files/dbus.initd.in
new file mode 100644
index 00000000000..10c7201be47
--- /dev/null
+++ b/sys-apps/dbus/files/dbus.initd.in
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+
+description="An IPC message bus daemon"
+pidfile="@rundir@/dbus.pid"
+command="/usr/bin/dbus-daemon"
+command_args="--system"
+
+dbus_socket="@rundir@/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 "@rundir@/dbus"
+}
+
+stop_post() {
+	[ ! -S "${dbus_socket}" ] || rm -f "${dbus_socket}"
+}
+
+reload() {
+	ebegin "Reloading D-BUS messagebus config"
+	dbus-send --print-reply --system --type=method_call \
+			--dest=org.freedesktop.DBus \
+			/ org.freedesktop.DBus.ReloadConfig > /dev/null
+	eend $?
+}


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2022-03-31 16:25 Mike Gilbert
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Gilbert @ 2022-03-31 16:25 UTC (permalink / raw
  To: gentoo-commits

commit:     327024d4f4606f13c70655d4b67d8b03c447b23f
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 31 16:23:53 2022 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Thu Mar 31 16:24:38 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=327024d4

sys-apps/dbus: backport fix for _dbus_reset_oom_score_adj

Closes: https://bugs.gentoo.org/834725
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 sys-apps/dbus/dbus-1.12.22.ebuild               |  6 +++--
 sys-apps/dbus/dbus-1.14.0.ebuild                |  7 +++---
 sys-apps/dbus/files/dbus-1.12.22-check-fd.patch | 33 +++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/sys-apps/dbus/dbus-1.12.22.ebuild b/sys-apps/dbus/dbus-1.12.22.ebuild
index 7427d268d82c..1caf4c88cc06 100644
--- a/sys-apps/dbus/dbus-1.12.22.ebuild
+++ b/sys-apps/dbus/dbus-1.12.22.ebuild
@@ -60,8 +60,10 @@ DOC_CONTENTS="
 TBD="${WORKDIR}/${P}-tests-build"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-enable-elogind.patch"
-	"${FILESDIR}/${PN}-daemon-optional.patch" # bug #653136
+	"${FILESDIR}/dbus-enable-elogind.patch"
+	"${FILESDIR}/dbus-daemon-optional.patch" # bug #653136
+
+	"${FILESDIR}/dbus-1.12.22-check-fd.patch"
 )
 
 pkg_setup() {

diff --git a/sys-apps/dbus/dbus-1.14.0.ebuild b/sys-apps/dbus/dbus-1.14.0.ebuild
index 03e772f142c6..fa70a989b3d6 100644
--- a/sys-apps/dbus/dbus-1.14.0.ebuild
+++ b/sys-apps/dbus/dbus-1.14.0.ebuild
@@ -63,10 +63,11 @@ DOC_CONTENTS="
 TBD="${WORKDIR}/${P}-tests-build"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-enable-elogind.patch"
-	"${FILESDIR}/${PN}-daemon-optional.patch" # bug #653136
+	"${FILESDIR}/dbus-enable-elogind.patch"
+	"${FILESDIR}/dbus-daemon-optional.patch" # bug #653136
 
-	"${FILESDIR}/${P}-x-autoconf-fixes.patch"
+	"${FILESDIR}/dbus-1.14.0-x-autoconf-fixes.patch"
+	"${FILESDIR}/dbus-1.12.22-check-fd.patch"
 )
 
 pkg_setup() {

diff --git a/sys-apps/dbus/files/dbus-1.12.22-check-fd.patch b/sys-apps/dbus/files/dbus-1.12.22-check-fd.patch
new file mode 100644
index 000000000000..9038411bb13b
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-1.12.22-check-fd.patch
@@ -0,0 +1,33 @@
+From 769a0462befb9829594a76e675526aba8579317e Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sun, 27 Mar 2022 15:09:48 -0400
+Subject: [PATCH] sysdeps-unix: check fd before calling
+ _dbus_fd_set_close_on_exec()
+
+If /proc/self/oom_score_adj does not exist, fd will invalid (-1).
+Attempting to set the CLOEXEC flag will obviously fail, and we lose the
+original errno value from open().
+
+Bug: https://bugs.gentoo.org/834725
+Signed-off-by: Mike Gilbert <floppym@gentoo.org>
+---
+ dbus/dbus-sysdeps-util-unix.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
+index 314ce64b..8f079cbf 100644
+--- a/dbus/dbus-sysdeps-util-unix.c
++++ b/dbus/dbus-sysdeps-util-unix.c
+@@ -1633,7 +1633,8 @@ _dbus_reset_oom_score_adj (const char **error_str_p)
+   if (fd < 0)
+     {
+       fd = open ("/proc/self/oom_score_adj", O_RDWR);
+-      _dbus_fd_set_close_on_exec (fd);
++      if (fd >= 0)
++        _dbus_fd_set_close_on_exec (fd);
+     }
+ 
+   if (fd >= 0)
+-- 
+GitLab
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2022-06-20  1:19 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-06-20  1:19 UTC (permalink / raw
  To: gentoo-commits

commit:     8abff68e4ed7ce2563a36c144c88ec0253964aba
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 20 01:18:53 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jun 20 01:19:09 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8abff68e

sys-apps/dbus: drop which, bash dependency

Closes: https://bugs.gentoo.org/845141
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/dbus/dbus-1.14.0-r3.ebuild | 292 ++++++++++++++++++++++++++++++++++++
 sys-apps/dbus/files/80-dbus-r1      |  13 ++
 2 files changed, 305 insertions(+)

diff --git a/sys-apps/dbus/dbus-1.14.0-r3.ebuild b/sys-apps/dbus/dbus-1.14.0-r3.ebuild
new file mode 100644
index 000000000000..19c59de260f4
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.14.0-r3.ebuild
@@ -0,0 +1,292 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+TMPFILES_OPTIONAL=1
+
+# At least at the moment, while a CMake port exists, it's not recommended
+# for distributions.
+# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L189
+inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/"
+SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz"
+
+LICENSE="|| ( AFL-2.1 GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc elogind selinux static-libs systemd test X"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+BDEPEND="
+	acct-user/messagebus
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	sys-devel/autoconf-archive
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+"
+COMMON_DEPEND="
+	>=dev-libs/expat-2.1.0
+	elogind? ( sys-auth/elogind )
+	selinux? ( sys-libs/libselinux )
+	systemd? ( sys-apps/systemd:0= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/expat
+	test? (
+		${PYTHON_DEPS}
+		>=dev-libs/glib-2.40:2
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	acct-user/messagebus
+	selinux? ( sec-policy/selinux-dbus )
+	systemd? ( virtual/tmpfiles )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD="${WORKDIR}/${P}-tests-build"
+
+PATCHES=(
+	"${FILESDIR}/dbus-enable-elogind.patch"
+	"${FILESDIR}/dbus-daemon-optional.patch" # bug #653136
+
+	"${FILESDIR}/dbus-1.14.0-x-autoconf-fixes.patch"
+	"${FILESDIR}/dbus-1.12.22-check-fd.patch"
+
+	# https://bugs.gentoo.org/836560
+	"${FILESDIR}/dbus-1.14.0-oom_score_adj.patch"
+)
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	default
+
+	if [[ ${CHOST} == *-solaris* ]]; then
+		# fix standards conflict, due to gcc being c99 by default nowadays
+		sed -i \
+			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
+			configure.ac || die
+	fi
+
+	# required for bug #263909, cross-compile so don't remove eautoreconf
+	eautoreconf
+}
+
+src_configure() {
+	local rundir=$(usex kernel_linux /run /var/run)
+
+	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
+		> "${T}"/dbus.initd || die
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local docconf myconf testconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic', bug #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		--disable-apparmor
+		$(use_enable kernel_linux inotify)
+		--disable-kqueue
+		$(use_enable elogind)
+		$(use_enable systemd)
+		$(use_enable systemd user-session)
+		--disable-embedded-tests
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
+		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-systemduserunitdir="$(systemd_get_userunitdir)"
+		--with-dbus-user=messagebus
+		$(use_with X x)
+	)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-daemon
+			--disable-selinux
+			--disable-libaudit
+			--disable-elogind
+			--disable-systemd
+			--without-x
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		testconf=(
+			$(use_enable test asserts)
+			$(use_enable test checks)
+			$(use_enable test embedded-tests)
+			$(use_enable test stats)
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+		)
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# After the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	# DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs
+	# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231
+	DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
+
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${T}"/dbus.initd dbus
+
+	if use X; then
+		# dbus X session script (bug #77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		newexe "${FILESDIR}"/80-dbus-r1 80-dbus
+	fi
+
+	# Needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# Let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	# bug #761763
+	rm -rf "${ED}"/usr/lib/sysusers.d
+
+	dodoc AUTHORS NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if use systemd; then
+		tmpfiles_process dbus.conf
+	fi
+
+	# Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	# TODO: should be safe to remove at least the ln because of the above tmpfiles_process?
+	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+}

diff --git a/sys-apps/dbus/files/80-dbus-r1 b/sys-apps/dbus/files/80-dbus-r1
new file mode 100644
index 000000000000..edef88a3c30c
--- /dev/null
+++ b/sys-apps/dbus/files/80-dbus-r1
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# launches a session dbus instance
+
+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`
+  fi
+fi
+


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2022-09-23  5:41 Sam James
  0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-09-23  5:41 UTC (permalink / raw
  To: gentoo-commits

commit:     e3741b2fe7369b84f06622e9ef4e566f76c8c4e1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 23 05:09:45 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Sep 23 05:17:15 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3741b2f

sys-apps/dbus: add 1.15.0 (unkeyworded)

Someone needs to test elogind support and I don't have an elogind
machine available right now.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/dbus/Manifest                             |   1 +
 sys-apps/dbus/dbus-1.15.0.ebuild                   | 294 +++++++++++++++++++++
 .../dbus/files/dbus-1.15.0-daemon-optional.patch   |  65 +++++
 .../dbus/files/dbus-1.15.0-enable-elogind.patch    |  75 ++++++
 4 files changed, 435 insertions(+)

diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index 729071e9798f..7acceaef14bc 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,2 +1,3 @@
 DIST dbus-1.12.22.tar.gz 2108231 BLAKE2B 40c30ad9e48d8ac6b5f1c67726015eb17cb3501372ef2c8ffcd8ad73e4a2f186b80a7bbba094460d4093d1d0a3f1bbb8d83a27724397a8f5312bb8542237e6b7 SHA512 0a716022f9d693fcaf871b6dfb5f242b49a8dd05d3316ec3e530f5129f1d81a2fa9caec795fa62cfdcba6ed21549fdd2f896f9bf1cc9a96e2a7d04f2c7ec7be6
 DIST dbus-1.14.0.tar.xz 1360228 BLAKE2B ae0ebc2779e840e2d83f633029f81fba0e35969648dddce0280640dd9bee3f9508aa7fb6aef696d1c4c56d40f91b754941f847525afaee5cc3170ad23a7eddbf SHA512 9bf17a3ebb3cf44722c6fbf24ee56e9dc14d6882fc312f26c7f07459d969424bc2fb63a229139e011804ecc479a8f0eb1a0c83286f8d5a664c5979d12634179f
+DIST dbus-1.15.0.tar.xz 1391044 BLAKE2B 50cd9e5fc27f8ff53350f426d29b0ee7dd17a791e82e9d0465789c095443826d14396045c8301e73996d054e2b723b09c1c28dd392a240ed74b6c49c1369d480 SHA512 6f7e1d4ff525ce13c5f671f1b045a089c379cbfb777662ce7a55ffe4893a8ab2aaf38877a7b8f261823067a20f3b336437449eb353a97d30699496375e00bf1a

diff --git a/sys-apps/dbus/dbus-1.15.0.ebuild b/sys-apps/dbus/dbus-1.15.0.ebuild
new file mode 100644
index 000000000000..fd178a8b873f
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.15.0.ebuild
@@ -0,0 +1,294 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+TMPFILES_OPTIONAL=1
+
+# From 1.15.0 release notes:
+# "• Add a Meson build system. This is currently considered experimental,
+#  but the intention is for it to replace Autotools and/or CMake in future
+#  releases, preferably both. Please test!"
+# We haven't migrated to it yet as it's experimental but our elogind
+# patch needs adjusting too (and upstreaming, ideally!)
+# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/NEWS#L31
+inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal
+
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/"
+SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz"
+
+LICENSE="|| ( AFL-2.1 GPL-2 )"
+SLOT="0"
+# Needs testing on elogind system
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="debug doc elogind selinux static-libs systemd test X"
+RESTRICT="!test? ( test )"
+
+REQUIRED_USE="?? ( elogind systemd )"
+
+BDEPEND="
+	acct-user/messagebus
+	app-text/xmlto
+	app-text/docbook-xml-dtd:4.4
+	sys-devel/autoconf-archive
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+"
+COMMON_DEPEND="
+	>=dev-libs/expat-2.1.0
+	elogind? ( sys-auth/elogind )
+	selinux? (
+		sys-process/audit
+		sys-libs/libselinux
+	)
+	systemd? ( sys-apps/systemd:0= )
+	X? (
+		x11-libs/libX11
+		x11-libs/libXt
+	)
+"
+DEPEND="${COMMON_DEPEND}
+	dev-libs/expat
+	test? (
+		${PYTHON_DEPS}
+		>=dev-libs/glib-2.40:2
+	)
+"
+RDEPEND="${COMMON_DEPEND}
+	acct-user/messagebus
+	selinux? ( sec-policy/selinux-dbus )
+	systemd? ( virtual/tmpfiles )
+"
+
+DOC_CONTENTS="
+	Some applications require a session bus in addition to the system
+	bus. Please see \`man dbus-launch\` for more information.
+"
+
+# out of sources build dir for make check
+TBD="${WORKDIR}/${P}-tests-build"
+
+PATCHES=(
+	"${FILESDIR}/dbus-1.15.0-enable-elogind.patch"
+	"${FILESDIR}/dbus-1.15.0-daemon-optional.patch" # bug #653136
+)
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+
+	if use kernel_linux; then
+		CONFIG_CHECK="~EPOLL"
+		linux-info_pkg_setup
+	fi
+}
+
+src_prepare() {
+	default
+
+	if [[ ${CHOST} == *-solaris* ]]; then
+		# fix standards conflict, due to gcc being c99 by default nowadays
+		sed -i \
+			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
+			configure.ac || die
+	fi
+
+	# required for bug #263909, cross-compile so don't remove eautoreconf
+	eautoreconf
+}
+
+src_configure() {
+	local rundir=$(usex kernel_linux /run /var/run)
+
+	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
+		> "${T}"/dbus.initd || die
+
+	multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+	local docconf myconf testconf
+
+	# so we can get backtraces from apps
+	case ${CHOST} in
+		*-mingw*)
+			# error: unrecognized command line option '-rdynamic', bug #488036
+			;;
+		*)
+			append-flags -rdynamic
+			;;
+	esac
+
+	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
+	# not on an SELinux profile.
+	myconf=(
+		--localstatedir="${EPREFIX}/var"
+		$(use_enable static-libs static)
+		$(use_enable debug verbose-mode)
+		--disable-asserts
+		--disable-checks
+		$(use_enable selinux)
+		$(use_enable selinux libaudit)
+		--disable-apparmor
+		$(use_enable kernel_linux inotify)
+		--disable-kqueue
+		$(use_enable elogind)
+		$(use_enable systemd)
+		$(use_enable systemd user-session)
+		--disable-embedded-tests
+		--disable-modular-tests
+		$(use_enable debug stats)
+		--with-session-socket-dir="${EPREFIX}"/tmp
+		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
+		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
+		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
+		--with-systemduserunitdir="$(systemd_get_userunitdir)"
+		--with-dbus-user=messagebus
+		$(use_with X x)
+	)
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		myconf+=(
+			--enable-launchd
+			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
+		)
+	fi
+
+	if multilib_is_native_abi; then
+		docconf=(
+			--enable-xml-docs
+			$(use_enable doc doxygen-docs)
+		)
+	else
+		docconf=(
+			--disable-xml-docs
+			--disable-doxygen-docs
+		)
+		myconf+=(
+			--disable-daemon
+			--disable-selinux
+			--disable-libaudit
+			--disable-elogind
+			--disable-systemd
+			--without-x
+		)
+	fi
+
+	einfo "Running configure in ${BUILD_DIR}"
+	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
+
+	if multilib_is_native_abi && use test; then
+		mkdir "${TBD}" || die
+		cd "${TBD}" || die
+		testconf=(
+			$(use_enable test asserts)
+			$(use_enable test checks)
+			$(use_enable test embedded-tests)
+			$(use_enable test stats)
+			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
+		)
+		einfo "Running configure in ${TBD}"
+		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
+	fi
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		# After the compile, it uses a selinuxfs interface to
+		# check if the SELinux policy has the right support
+		use selinux && addwrite /selinux/access
+
+		einfo "Running make in ${BUILD_DIR}"
+		emake
+
+		if use test; then
+			einfo "Running make in ${TBD}"
+			emake -C "${TBD}"
+		fi
+	else
+		emake -C dbus libdbus-1.la
+	fi
+}
+
+src_test() {
+	# DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs
+	# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231
+	DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
+
+}
+
+multilib_src_install() {
+	if multilib_is_native_abi; then
+		emake DESTDIR="${D}" install
+	else
+		emake DESTDIR="${D}" install-pkgconfigDATA
+		emake DESTDIR="${D}" -C dbus \
+			install-libLTLIBRARIES install-dbusincludeHEADERS \
+			install-nodist_dbusarchincludeHEADERS
+	fi
+}
+
+multilib_src_install_all() {
+	newinitd "${T}"/dbus.initd dbus
+
+	if use X; then
+		# dbus X session script (bug #77504)
+		# turns out to only work for GDM (and startx). has been merged into
+		# other desktop (kdm and such scripts)
+		exeinto /etc/X11/xinit/xinitrc.d
+		newexe "${FILESDIR}"/80-dbus-r1 80-dbus
+	fi
+
+	# Needs to exist for dbus sessions to launch
+	keepdir /usr/share/dbus-1/services
+	keepdir /etc/dbus-1/{session,system}.d
+	# machine-id symlink from pkg_postinst()
+	keepdir /var/lib/dbus
+	# Let the init script create the /var/run/dbus directory
+	rm -rf "${ED}"/var/run
+
+	# bug #761763
+	rm -rf "${ED}"/usr/lib/sysusers.d
+
+	dodoc AUTHORS NEWS README doc/TODO
+	readme.gentoo_create_doc
+
+	find "${ED}" -name '*.la' -delete || die
+}
+
+pkg_postinst() {
+	readme.gentoo_print_elog
+
+	if use systemd; then
+		tmpfiles_process dbus.conf
+	fi
+
+	# Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink
+	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
+	# dependencies with hardcoded paths (although the known ones got fixed already)
+	# TODO: should be safe to remove at least the ln because of the above tmpfiles_process?
+	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
+	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
+
+	if [[ ${CHOST} == *-darwin* ]]; then
+		local plist="org.freedesktop.dbus-session.plist"
+		elog
+		elog
+		elog "For MacOS/Darwin we now ship launchd support for dbus."
+		elog "This enables autolaunch of dbus at session login and makes"
+		elog "dbus usable under MacOS/Darwin."
+		elog
+		elog "The launchd plist file ${plist} has been"
+		elog "installed in ${EPREFIX}/Library/LaunchAgents."
+		elog "For it to be used, you will have to do all of the following:"
+		elog " + cd ~/Library/LaunchAgents"
+		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
+		elog " + logout and log back in"
+		elog
+		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
+		elog "specified and refused to start otherwise, then export the"
+		elog "the following to your environment:"
+		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
+	fi
+}

diff --git a/sys-apps/dbus/files/dbus-1.15.0-daemon-optional.patch b/sys-apps/dbus/files/dbus-1.15.0-daemon-optional.patch
new file mode 100644
index 000000000000..2b9cd03472d8
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-1.15.0-daemon-optional.patch
@@ -0,0 +1,65 @@
+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
+
+--- a/bus/Makefile.am
++++ b/bus/Makefile.am
+@@ -76,6 +76,7 @@ agentdir=$(LAUNCHD_AGENT_DIR)
+ agent_DATA=org.freedesktop.dbus-session.plist
+ endif
+ 
++if DBUS_DAEMON
+ if DBUS_BUS_ENABLE_KQUEUE
+ DIR_WATCH_SOURCE=dir-watch-kqueue.c
+ else
+@@ -230,6 +231,7 @@ EXTRA_DIST += \
+ 	tmpfiles.d/dbus.conf.in \
+ 	tmpfiles.d/meson.build \
+ 	$(NULL)
++endif DBUS_DAEMON
+ 
+ if HAVE_SYSTEMD
+ systemdsystemunit_DATA = \
+--- a/configure.ac
++++ b/configure.ac
+@@ -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)
++AC_ARG_ENABLE(daemon, AS_HELP_STRING([--enable-daemon],[build with the dbus daemon]),enable_daemon=$enableval,enable_daemon=yes)
+ 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)
+@@ -658,7 +659,20 @@ AC_CHECK_MEMBER([struct unpcbid.unp_pid],
+                 [],
+                 [[#include <sys/un.h>]])
+ 
+-PKG_CHECK_MODULES([EXPAT], [expat])
++# dbusdaemon checks
++if test x$enable_daemon = xno ; then
++    have_daemon=no
++else
++    have_daemon=yes
++fi
++
++dnl check if daemon shall be built
++if test x$have_daemon = xyes; then
++   AC_DEFINE(DBUS_DAEMON,1,[Use daemon])
++   PKG_CHECK_MODULES([EXPAT], [expat])
++fi
++
++AM_CONDITIONAL(DBUS_DAEMON, test x$have_daemon = xyes)
+ 
+ save_cflags="$CFLAGS"
+ save_libs="$LIBS"
+@@ -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 elogind support: ${have_elogind}

diff --git a/sys-apps/dbus/files/dbus-1.15.0-enable-elogind.patch b/sys-apps/dbus/files/dbus-1.15.0-enable-elogind.patch
new file mode 100644
index 000000000000..a6c0e1bd2153
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-1.15.0-enable-elogind.patch
@@ -0,0 +1,75 @@
+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)
+ 
+@@ -904,6 +905,24 @@ fi
+ 
+ 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;
+@@ -1024,7 +1043,7 @@ if test x$with_valgrind != xno; then
+ 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
+@@ -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}
+--- 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)
+     {


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/
@ 2022-11-08 21:03 Andreas Sturmlechner
  0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2022-11-08 21:03 UTC (permalink / raw
  To: gentoo-commits

commit:     781ba70f2dfac3bd2f5c2bb46e99e007120b40db
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  8 21:01:47 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov  8 21:03:20 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=781ba70f

sys-apps/dbus: drop 1.14.0-r4, 1.14.2, 1.14.4, 1.15.0-r1

Bug: https://bugs.gentoo.org/875518
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-apps/dbus/Manifest                             |   4 -
 sys-apps/dbus/dbus-1.14.0-r4.ebuild                | 292 --------------------
 sys-apps/dbus/dbus-1.14.2.ebuild                   | 290 --------------------
 sys-apps/dbus/dbus-1.14.4.ebuild                   | 290 --------------------
 sys-apps/dbus/dbus-1.15.0-r1.ebuild                | 294 ---------------------
 sys-apps/dbus/files/80-dbus                        |  13 -
 sys-apps/dbus/files/dbus-1.12.22-check-fd.patch    |  33 ---
 .../dbus/files/dbus-1.14.0-oom_score_adj.patch     | 115 --------
 .../dbus/files/dbus-1.14.0-x-autoconf-fixes.patch  | 147 -----------
 9 files changed, 1478 deletions(-)

diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
index 889d3508e9b8..11d823d0f66c 100644
--- a/sys-apps/dbus/Manifest
+++ b/sys-apps/dbus/Manifest
@@ -1,5 +1 @@
-DIST dbus-1.14.0.tar.xz 1360228 BLAKE2B ae0ebc2779e840e2d83f633029f81fba0e35969648dddce0280640dd9bee3f9508aa7fb6aef696d1c4c56d40f91b754941f847525afaee5cc3170ad23a7eddbf SHA512 9bf17a3ebb3cf44722c6fbf24ee56e9dc14d6882fc312f26c7f07459d969424bc2fb63a229139e011804ecc479a8f0eb1a0c83286f8d5a664c5979d12634179f
-DIST dbus-1.14.2.tar.xz 1362972 BLAKE2B 81c79bbdaa19b214d2462e5ebc42933b60c72c346c71e89e2b15ed17860257ec81c1dc86cd4726f7b352933b02bf5172c1466be0bc63e67a432c76d97fbbb68b SHA512 6e503385bfc1b17d4922dc6d2fb3fa10626ed306fe2b3a6a59f6cf81667c4cd63c2fc5e4fd040f48415235e9f4a75b10948ef512f022af1edab20f426271a9b4
-DIST dbus-1.14.4.tar.xz 1368196 BLAKE2B 7da5cd8f09eaef7a64f35f8ccbeb81c5687b3fad02d6ac05dd4c232e0f731dbcf4c76c36b615e6216815c8f8631bf9cb32543665440153a1199b1b35922cdda4 SHA512 7c8ce95b8a4c63cf51cc9f10bebbc19e66d6a96c4806befad48c3fe73b4468bb2b50f9570b73fe05ff12223e5e6815032139d316995eb670c28b23c028f293d6
-DIST dbus-1.15.0.tar.xz 1391044 BLAKE2B 50cd9e5fc27f8ff53350f426d29b0ee7dd17a791e82e9d0465789c095443826d14396045c8301e73996d054e2b723b09c1c28dd392a240ed74b6c49c1369d480 SHA512 6f7e1d4ff525ce13c5f671f1b045a089c379cbfb777662ce7a55ffe4893a8ab2aaf38877a7b8f261823067a20f3b336437449eb353a97d30699496375e00bf1a
 DIST dbus-1.15.2.tar.xz 1395516 BLAKE2B fdfaf8a1a407ddcac23ce5d22497b975b4b95e62a8afaa1ed8f5f25933ad4a113aea4a39c686c1e4a046e2a05b83ab7bb9c063f77012caaa7ecbdc8ea522259c SHA512 486eab8c4f87d75e988558724bff1b0708c969341ecb62bcb9d0b0612a653ac2674aa7caa4d129dd81c00af7989b122ee7837599262c9a0c5c7f9335ed3dacaf

diff --git a/sys-apps/dbus/dbus-1.14.0-r4.ebuild b/sys-apps/dbus/dbus-1.14.0-r4.ebuild
deleted file mode 100644
index 973247c30368..000000000000
--- a/sys-apps/dbus/dbus-1.14.0-r4.ebuild
+++ /dev/null
@@ -1,292 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..10} )
-TMPFILES_OPTIONAL=1
-
-# At least at the moment, while a CMake port exists, it's not recommended
-# for distributions.
-# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L189
-inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal
-
-DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/"
-SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz"
-
-LICENSE="|| ( AFL-2.1 GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc elogind selinux static-libs systemd test X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( elogind systemd )"
-
-BDEPEND="
-	acct-user/messagebus
-	app-text/xmlto
-	app-text/docbook-xml-dtd:4.4
-	sys-devel/autoconf-archive
-	virtual/pkgconfig
-	doc? ( app-doc/doxygen )
-"
-COMMON_DEPEND="
-	>=dev-libs/expat-2.1.0
-	elogind? ( sys-auth/elogind )
-	selinux? ( sys-libs/libselinux )
-	systemd? ( sys-apps/systemd:0= )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-libs/expat
-	test? (
-		${PYTHON_DEPS}
-		>=dev-libs/glib-2.40:2
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-user/messagebus
-	selinux? ( sec-policy/selinux-dbus )
-	systemd? ( virtual/tmpfiles )
-"
-
-DOC_CONTENTS="
-	Some applications require a session bus in addition to the system
-	bus. Please see \`man dbus-launch\` for more information.
-"
-
-# out of sources build dir for make check
-TBD="${WORKDIR}/${P}-tests-build"
-
-PATCHES=(
-	"${FILESDIR}/dbus-enable-elogind.patch"
-	"${FILESDIR}/dbus-daemon-optional.patch" # bug #653136
-
-	"${FILESDIR}/dbus-1.14.0-x-autoconf-fixes.patch"
-	"${FILESDIR}/dbus-1.12.22-check-fd.patch"
-
-	# https://bugs.gentoo.org/836560
-	"${FILESDIR}/dbus-1.14.0-oom_score_adj.patch"
-)
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-
-	if use kernel_linux; then
-		CONFIG_CHECK="~EPOLL"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-
-	if [[ ${CHOST} == *-solaris* ]]; then
-		# fix standards conflict, due to gcc being c99 by default nowadays
-		sed -i \
-			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
-			configure.ac || die
-	fi
-
-	# required for bug #263909, cross-compile so don't remove eautoreconf
-	eautoreconf
-}
-
-src_configure() {
-	local rundir=$(usex kernel_linux /run /var/run)
-
-	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
-		> "${T}"/dbus.initd || die
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local docconf myconf testconf
-
-	# so we can get backtraces from apps
-	case ${CHOST} in
-		*-mingw*)
-			# error: unrecognized command line option '-rdynamic', bug #488036
-			;;
-		*)
-			append-flags -rdynamic
-			;;
-	esac
-
-	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
-	# not on an SELinux profile.
-	myconf=(
-		--localstatedir="${EPREFIX}/var"
-		$(use_enable static-libs static)
-		$(use_enable debug verbose-mode)
-		--disable-asserts
-		--disable-checks
-		$(use_enable selinux)
-		$(use_enable selinux libaudit)
-		--disable-apparmor
-		$(use_enable kernel_linux inotify)
-		--disable-kqueue
-		$(use_enable elogind)
-		$(use_enable systemd)
-		$(use_enable systemd user-session)
-		--disable-embedded-tests
-		--disable-modular-tests
-		$(use_enable debug stats)
-		--with-session-socket-dir="${EPREFIX}"/tmp
-		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
-		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-systemduserunitdir="$(systemd_get_userunitdir)"
-		--with-dbus-user=messagebus
-		$(use_with X x)
-	)
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		myconf+=(
-			--enable-launchd
-			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
-		)
-	fi
-
-	if multilib_is_native_abi; then
-		docconf=(
-			--enable-xml-docs
-			$(use_enable doc doxygen-docs)
-		)
-	else
-		docconf=(
-			--disable-xml-docs
-			--disable-doxygen-docs
-		)
-		myconf+=(
-			--disable-daemon
-			--disable-selinux
-			--disable-libaudit
-			--disable-elogind
-			--disable-systemd
-			--without-x
-		)
-	fi
-
-	einfo "Running configure in ${BUILD_DIR}"
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
-
-	if multilib_is_native_abi && use test; then
-		mkdir "${TBD}" || die
-		cd "${TBD}" || die
-		testconf=(
-			$(use_enable test asserts)
-			$(use_enable test checks)
-			$(use_enable test embedded-tests)
-			$(use_enable test stats)
-			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
-		)
-		einfo "Running configure in ${TBD}"
-		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		# After the compile, it uses a selinuxfs interface to
-		# check if the SELinux policy has the right support
-		use selinux && addwrite /selinux/access
-
-		einfo "Running make in ${BUILD_DIR}"
-		emake
-
-		if use test; then
-			einfo "Running make in ${TBD}"
-			emake -C "${TBD}"
-		fi
-	else
-		emake -C dbus libdbus-1.la
-	fi
-}
-
-src_test() {
-	# DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs
-	# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231
-	DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
-
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		emake DESTDIR="${D}" install
-	else
-		emake DESTDIR="${D}" install-pkgconfigDATA
-		emake DESTDIR="${D}" -C dbus \
-			install-libLTLIBRARIES install-dbusincludeHEADERS \
-			install-nodist_dbusarchincludeHEADERS
-	fi
-}
-
-multilib_src_install_all() {
-	newinitd "${T}"/dbus.initd dbus
-
-	if use X; then
-		# dbus X session script (bug #77504)
-		# turns out to only work for GDM (and startx). has been merged into
-		# other desktop (kdm and such scripts)
-		exeinto /etc/X11/xinit/xinitrc.d
-		newexe "${FILESDIR}"/80-dbus-r1 80-dbus
-	fi
-
-	# Needs to exist for dbus sessions to launch
-	keepdir /usr/share/dbus-1/services
-	keepdir /etc/dbus-1/{session,system}.d
-	# machine-id symlink from pkg_postinst()
-	keepdir /var/lib/dbus
-	# Let the init script create the /var/run/dbus directory
-	rm -rf "${ED}"/var/run
-
-	# bug #761763
-	rm -rf "${ED}"/usr/lib/sysusers.d
-
-	dodoc AUTHORS NEWS README doc/TODO
-	readme.gentoo_create_doc
-
-	find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	if use systemd; then
-		tmpfiles_process dbus.conf
-	fi
-
-	# Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink
-	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
-	# dependencies with hardcoded paths (although the known ones got fixed already)
-	# TODO: should be safe to remove at least the ln because of the above tmpfiles_process?
-	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
-	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		local plist="org.freedesktop.dbus-session.plist"
-		elog
-		elog
-		elog "For MacOS/Darwin we now ship launchd support for dbus."
-		elog "This enables autolaunch of dbus at session login and makes"
-		elog "dbus usable under MacOS/Darwin."
-		elog
-		elog "The launchd plist file ${plist} has been"
-		elog "installed in ${EPREFIX}/Library/LaunchAgents."
-		elog "For it to be used, you will have to do all of the following:"
-		elog " + cd ~/Library/LaunchAgents"
-		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
-		elog " + logout and log back in"
-		elog
-		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
-		elog "specified and refused to start otherwise, then export the"
-		elog "the following to your environment:"
-		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
-	fi
-}

diff --git a/sys-apps/dbus/dbus-1.14.2.ebuild b/sys-apps/dbus/dbus-1.14.2.ebuild
deleted file mode 100644
index 9333216aff30..000000000000
--- a/sys-apps/dbus/dbus-1.14.2.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-TMPFILES_OPTIONAL=1
-
-# At least at the moment, while a CMake port exists, it's not recommended
-# for distributions.
-# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L189
-inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal
-
-DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/"
-SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz"
-
-LICENSE="|| ( AFL-2.1 GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc elogind selinux static-libs systemd test X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( elogind systemd )"
-
-BDEPEND="
-	acct-user/messagebus
-	app-text/xmlto
-	app-text/docbook-xml-dtd:4.4
-	sys-devel/autoconf-archive
-	virtual/pkgconfig
-	doc? ( app-doc/doxygen )
-"
-COMMON_DEPEND="
-	>=dev-libs/expat-2.1.0
-	elogind? ( sys-auth/elogind )
-	selinux? (
-		sys-process/audit
-		sys-libs/libselinux
-	)
-	systemd? ( sys-apps/systemd:0= )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-libs/expat
-	test? (
-		${PYTHON_DEPS}
-		>=dev-libs/glib-2.40:2
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-user/messagebus
-	selinux? ( sec-policy/selinux-dbus )
-	systemd? ( virtual/tmpfiles )
-"
-
-DOC_CONTENTS="
-	Some applications require a session bus in addition to the system
-	bus. Please see \`man dbus-launch\` for more information.
-"
-
-# out of sources build dir for make check
-TBD="${WORKDIR}/${P}-tests-build"
-
-PATCHES=(
-	"${FILESDIR}/dbus-enable-elogind.patch"
-	"${FILESDIR}/dbus-daemon-optional.patch" # bug #653136
-)
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-
-	if use kernel_linux; then
-		CONFIG_CHECK="~EPOLL"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-
-	if [[ ${CHOST} == *-solaris* ]]; then
-		# fix standards conflict, due to gcc being c99 by default nowadays
-		sed -i \
-			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
-			configure.ac || die
-	fi
-
-	# required for bug #263909, cross-compile so don't remove eautoreconf
-	eautoreconf
-}
-
-src_configure() {
-	local rundir=$(usex kernel_linux /run /var/run)
-
-	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
-		> "${T}"/dbus.initd || die
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local docconf myconf testconf
-
-	# so we can get backtraces from apps
-	case ${CHOST} in
-		*-mingw*)
-			# error: unrecognized command line option '-rdynamic', bug #488036
-			;;
-		*)
-			append-flags -rdynamic
-			;;
-	esac
-
-	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
-	# not on an SELinux profile.
-	myconf=(
-		--localstatedir="${EPREFIX}/var"
-		--runstatedir="${EPREFIX}${rundir}"
-		$(use_enable static-libs static)
-		$(use_enable debug verbose-mode)
-		--disable-asserts
-		--disable-checks
-		$(use_enable selinux)
-		$(use_enable selinux libaudit)
-		--disable-apparmor
-		$(use_enable kernel_linux inotify)
-		--disable-kqueue
-		$(use_enable elogind)
-		$(use_enable systemd)
-		$(use_enable systemd user-session)
-		--disable-embedded-tests
-		--disable-modular-tests
-		$(use_enable debug stats)
-		--with-session-socket-dir="${EPREFIX}"/tmp
-		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
-		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-systemduserunitdir="$(systemd_get_userunitdir)"
-		--with-dbus-user=messagebus
-		$(use_with X x)
-	)
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		myconf+=(
-			--enable-launchd
-			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
-		)
-	fi
-
-	if multilib_is_native_abi; then
-		docconf=(
-			--enable-xml-docs
-			$(use_enable doc doxygen-docs)
-		)
-	else
-		docconf=(
-			--disable-xml-docs
-			--disable-doxygen-docs
-		)
-		myconf+=(
-			--disable-daemon
-			--disable-selinux
-			--disable-libaudit
-			--disable-elogind
-			--disable-systemd
-			--without-x
-		)
-	fi
-
-	einfo "Running configure in ${BUILD_DIR}"
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
-
-	if multilib_is_native_abi && use test; then
-		mkdir "${TBD}" || die
-		cd "${TBD}" || die
-		testconf=(
-			$(use_enable test asserts)
-			$(use_enable test checks)
-			$(use_enable test embedded-tests)
-			$(use_enable test stats)
-			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
-		)
-		einfo "Running configure in ${TBD}"
-		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		# After the compile, it uses a selinuxfs interface to
-		# check if the SELinux policy has the right support
-		use selinux && addwrite /selinux/access
-
-		einfo "Running make in ${BUILD_DIR}"
-		emake
-
-		if use test; then
-			einfo "Running make in ${TBD}"
-			emake -C "${TBD}"
-		fi
-	else
-		emake -C dbus libdbus-1.la
-	fi
-}
-
-src_test() {
-	# DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs
-	# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231
-	DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
-
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		emake DESTDIR="${D}" install
-	else
-		emake DESTDIR="${D}" install-pkgconfigDATA
-		emake DESTDIR="${D}" -C dbus \
-			install-libLTLIBRARIES install-dbusincludeHEADERS \
-			install-nodist_dbusarchincludeHEADERS
-	fi
-}
-
-multilib_src_install_all() {
-	newinitd "${T}"/dbus.initd dbus
-
-	if use X; then
-		# dbus X session script (bug #77504)
-		# turns out to only work for GDM (and startx). has been merged into
-		# other desktop (kdm and such scripts)
-		exeinto /etc/X11/xinit/xinitrc.d
-		newexe "${FILESDIR}"/80-dbus-r1 80-dbus
-	fi
-
-	# Needs to exist for dbus sessions to launch
-	keepdir /usr/share/dbus-1/services
-	keepdir /etc/dbus-1/{session,system}.d
-	# machine-id symlink from pkg_postinst()
-	keepdir /var/lib/dbus
-	# Let the init script create the /var/run/dbus directory
-	rm -rf "${ED}"/var/run
-
-	# bug #761763
-	rm -rf "${ED}"/usr/lib/sysusers.d
-
-	dodoc AUTHORS NEWS README doc/TODO
-	readme.gentoo_create_doc
-
-	find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	if use systemd; then
-		tmpfiles_process dbus.conf
-	fi
-
-	# Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink
-	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
-	# dependencies with hardcoded paths (although the known ones got fixed already)
-	# TODO: should be safe to remove at least the ln because of the above tmpfiles_process?
-	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
-	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		local plist="org.freedesktop.dbus-session.plist"
-		elog
-		elog
-		elog "For MacOS/Darwin we now ship launchd support for dbus."
-		elog "This enables autolaunch of dbus at session login and makes"
-		elog "dbus usable under MacOS/Darwin."
-		elog
-		elog "The launchd plist file ${plist} has been"
-		elog "installed in ${EPREFIX}/Library/LaunchAgents."
-		elog "For it to be used, you will have to do all of the following:"
-		elog " + cd ~/Library/LaunchAgents"
-		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
-		elog " + logout and log back in"
-		elog
-		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
-		elog "specified and refused to start otherwise, then export the"
-		elog "the following to your environment:"
-		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
-	fi
-}

diff --git a/sys-apps/dbus/dbus-1.14.4.ebuild b/sys-apps/dbus/dbus-1.14.4.ebuild
deleted file mode 100644
index 9333216aff30..000000000000
--- a/sys-apps/dbus/dbus-1.14.4.ebuild
+++ /dev/null
@@ -1,290 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-TMPFILES_OPTIONAL=1
-
-# At least at the moment, while a CMake port exists, it's not recommended
-# for distributions.
-# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L189
-inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal
-
-DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/"
-SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz"
-
-LICENSE="|| ( AFL-2.1 GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc elogind selinux static-libs systemd test X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( elogind systemd )"
-
-BDEPEND="
-	acct-user/messagebus
-	app-text/xmlto
-	app-text/docbook-xml-dtd:4.4
-	sys-devel/autoconf-archive
-	virtual/pkgconfig
-	doc? ( app-doc/doxygen )
-"
-COMMON_DEPEND="
-	>=dev-libs/expat-2.1.0
-	elogind? ( sys-auth/elogind )
-	selinux? (
-		sys-process/audit
-		sys-libs/libselinux
-	)
-	systemd? ( sys-apps/systemd:0= )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-libs/expat
-	test? (
-		${PYTHON_DEPS}
-		>=dev-libs/glib-2.40:2
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-user/messagebus
-	selinux? ( sec-policy/selinux-dbus )
-	systemd? ( virtual/tmpfiles )
-"
-
-DOC_CONTENTS="
-	Some applications require a session bus in addition to the system
-	bus. Please see \`man dbus-launch\` for more information.
-"
-
-# out of sources build dir for make check
-TBD="${WORKDIR}/${P}-tests-build"
-
-PATCHES=(
-	"${FILESDIR}/dbus-enable-elogind.patch"
-	"${FILESDIR}/dbus-daemon-optional.patch" # bug #653136
-)
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-
-	if use kernel_linux; then
-		CONFIG_CHECK="~EPOLL"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-
-	if [[ ${CHOST} == *-solaris* ]]; then
-		# fix standards conflict, due to gcc being c99 by default nowadays
-		sed -i \
-			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
-			configure.ac || die
-	fi
-
-	# required for bug #263909, cross-compile so don't remove eautoreconf
-	eautoreconf
-}
-
-src_configure() {
-	local rundir=$(usex kernel_linux /run /var/run)
-
-	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
-		> "${T}"/dbus.initd || die
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local docconf myconf testconf
-
-	# so we can get backtraces from apps
-	case ${CHOST} in
-		*-mingw*)
-			# error: unrecognized command line option '-rdynamic', bug #488036
-			;;
-		*)
-			append-flags -rdynamic
-			;;
-	esac
-
-	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
-	# not on an SELinux profile.
-	myconf=(
-		--localstatedir="${EPREFIX}/var"
-		--runstatedir="${EPREFIX}${rundir}"
-		$(use_enable static-libs static)
-		$(use_enable debug verbose-mode)
-		--disable-asserts
-		--disable-checks
-		$(use_enable selinux)
-		$(use_enable selinux libaudit)
-		--disable-apparmor
-		$(use_enable kernel_linux inotify)
-		--disable-kqueue
-		$(use_enable elogind)
-		$(use_enable systemd)
-		$(use_enable systemd user-session)
-		--disable-embedded-tests
-		--disable-modular-tests
-		$(use_enable debug stats)
-		--with-session-socket-dir="${EPREFIX}"/tmp
-		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
-		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-systemduserunitdir="$(systemd_get_userunitdir)"
-		--with-dbus-user=messagebus
-		$(use_with X x)
-	)
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		myconf+=(
-			--enable-launchd
-			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
-		)
-	fi
-
-	if multilib_is_native_abi; then
-		docconf=(
-			--enable-xml-docs
-			$(use_enable doc doxygen-docs)
-		)
-	else
-		docconf=(
-			--disable-xml-docs
-			--disable-doxygen-docs
-		)
-		myconf+=(
-			--disable-daemon
-			--disable-selinux
-			--disable-libaudit
-			--disable-elogind
-			--disable-systemd
-			--without-x
-		)
-	fi
-
-	einfo "Running configure in ${BUILD_DIR}"
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
-
-	if multilib_is_native_abi && use test; then
-		mkdir "${TBD}" || die
-		cd "${TBD}" || die
-		testconf=(
-			$(use_enable test asserts)
-			$(use_enable test checks)
-			$(use_enable test embedded-tests)
-			$(use_enable test stats)
-			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
-		)
-		einfo "Running configure in ${TBD}"
-		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		# After the compile, it uses a selinuxfs interface to
-		# check if the SELinux policy has the right support
-		use selinux && addwrite /selinux/access
-
-		einfo "Running make in ${BUILD_DIR}"
-		emake
-
-		if use test; then
-			einfo "Running make in ${TBD}"
-			emake -C "${TBD}"
-		fi
-	else
-		emake -C dbus libdbus-1.la
-	fi
-}
-
-src_test() {
-	# DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs
-	# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231
-	DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
-
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		emake DESTDIR="${D}" install
-	else
-		emake DESTDIR="${D}" install-pkgconfigDATA
-		emake DESTDIR="${D}" -C dbus \
-			install-libLTLIBRARIES install-dbusincludeHEADERS \
-			install-nodist_dbusarchincludeHEADERS
-	fi
-}
-
-multilib_src_install_all() {
-	newinitd "${T}"/dbus.initd dbus
-
-	if use X; then
-		# dbus X session script (bug #77504)
-		# turns out to only work for GDM (and startx). has been merged into
-		# other desktop (kdm and such scripts)
-		exeinto /etc/X11/xinit/xinitrc.d
-		newexe "${FILESDIR}"/80-dbus-r1 80-dbus
-	fi
-
-	# Needs to exist for dbus sessions to launch
-	keepdir /usr/share/dbus-1/services
-	keepdir /etc/dbus-1/{session,system}.d
-	# machine-id symlink from pkg_postinst()
-	keepdir /var/lib/dbus
-	# Let the init script create the /var/run/dbus directory
-	rm -rf "${ED}"/var/run
-
-	# bug #761763
-	rm -rf "${ED}"/usr/lib/sysusers.d
-
-	dodoc AUTHORS NEWS README doc/TODO
-	readme.gentoo_create_doc
-
-	find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	if use systemd; then
-		tmpfiles_process dbus.conf
-	fi
-
-	# Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink
-	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
-	# dependencies with hardcoded paths (although the known ones got fixed already)
-	# TODO: should be safe to remove at least the ln because of the above tmpfiles_process?
-	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
-	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		local plist="org.freedesktop.dbus-session.plist"
-		elog
-		elog
-		elog "For MacOS/Darwin we now ship launchd support for dbus."
-		elog "This enables autolaunch of dbus at session login and makes"
-		elog "dbus usable under MacOS/Darwin."
-		elog
-		elog "The launchd plist file ${plist} has been"
-		elog "installed in ${EPREFIX}/Library/LaunchAgents."
-		elog "For it to be used, you will have to do all of the following:"
-		elog " + cd ~/Library/LaunchAgents"
-		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
-		elog " + logout and log back in"
-		elog
-		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
-		elog "specified and refused to start otherwise, then export the"
-		elog "the following to your environment:"
-		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
-	fi
-}

diff --git a/sys-apps/dbus/dbus-1.15.0-r1.ebuild b/sys-apps/dbus/dbus-1.15.0-r1.ebuild
deleted file mode 100644
index 36a64abaa510..000000000000
--- a/sys-apps/dbus/dbus-1.15.0-r1.ebuild
+++ /dev/null
@@ -1,294 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{8..10} )
-TMPFILES_OPTIONAL=1
-
-# From 1.15.0 release notes:
-# "• Add a Meson build system. This is currently considered experimental,
-#  but the intention is for it to replace Autotools and/or CMake in future
-#  releases, preferably both. Please test!"
-# We haven't migrated to it yet as it's experimental but our elogind
-# patch needs adjusting too (and upstreaming, ideally!)
-# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/NEWS#L31
-inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal
-
-DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/"
-SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz"
-
-LICENSE="|| ( AFL-2.1 GPL-2 )"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="debug doc elogind selinux static-libs systemd test X"
-RESTRICT="!test? ( test )"
-
-REQUIRED_USE="?? ( elogind systemd )"
-
-BDEPEND="
-	acct-user/messagebus
-	app-text/xmlto
-	app-text/docbook-xml-dtd:4.4
-	sys-devel/autoconf-archive
-	virtual/pkgconfig
-	doc? ( app-doc/doxygen )
-"
-COMMON_DEPEND="
-	>=dev-libs/expat-2.1.0
-	elogind? ( sys-auth/elogind )
-	selinux? (
-		sys-process/audit
-		sys-libs/libselinux
-	)
-	systemd? ( sys-apps/systemd:0= )
-	X? (
-		x11-libs/libX11
-		x11-libs/libXt
-	)
-"
-DEPEND="${COMMON_DEPEND}
-	dev-libs/expat
-	test? (
-		${PYTHON_DEPS}
-		>=dev-libs/glib-2.40:2
-	)
-"
-RDEPEND="${COMMON_DEPEND}
-	acct-user/messagebus
-	selinux? ( sec-policy/selinux-dbus )
-	systemd? ( virtual/tmpfiles )
-"
-
-DOC_CONTENTS="
-	Some applications require a session bus in addition to the system
-	bus. Please see \`man dbus-launch\` for more information.
-"
-
-# out of sources build dir for make check
-TBD="${WORKDIR}/${P}-tests-build"
-
-PATCHES=(
-	"${FILESDIR}/dbus-1.15.0-enable-elogind.patch"
-	"${FILESDIR}/dbus-1.15.0-daemon-optional.patch" # bug #653136
-)
-
-pkg_setup() {
-	use test && python-any-r1_pkg_setup
-
-	if use kernel_linux; then
-		CONFIG_CHECK="~EPOLL"
-		linux-info_pkg_setup
-	fi
-}
-
-src_prepare() {
-	default
-
-	if [[ ${CHOST} == *-solaris* ]]; then
-		# fix standards conflict, due to gcc being c99 by default nowadays
-		sed -i \
-			-e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \
-			configure.ac || die
-	fi
-
-	# required for bug #263909, cross-compile so don't remove eautoreconf
-	eautoreconf
-}
-
-src_configure() {
-	local rundir=$(usex kernel_linux /run /var/run)
-
-	sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \
-		> "${T}"/dbus.initd || die
-
-	multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
-	local docconf myconf testconf
-
-	# so we can get backtraces from apps
-	case ${CHOST} in
-		*-mingw*)
-			# error: unrecognized command line option '-rdynamic', bug #488036
-			;;
-		*)
-			append-flags -rdynamic
-			;;
-	esac
-
-	# libaudit is *only* used in DBus wrt SELinux support, so disable it, if
-	# not on an SELinux profile.
-	myconf=(
-		--localstatedir="${EPREFIX}/var"
-		--runstatedir="${EPREFIX}${rundir}"
-		$(use_enable static-libs static)
-		$(use_enable debug verbose-mode)
-		--disable-asserts
-		--disable-checks
-		$(use_enable selinux)
-		$(use_enable selinux libaudit)
-		--disable-apparmor
-		$(use_enable kernel_linux inotify)
-		--disable-kqueue
-		$(use_enable elogind)
-		$(use_enable systemd)
-		$(use_enable systemd user-session)
-		--disable-embedded-tests
-		--disable-modular-tests
-		$(use_enable debug stats)
-		--with-session-socket-dir="${EPREFIX}"/tmp
-		--with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid
-		--with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket
-		--with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
-		--with-systemduserunitdir="$(systemd_get_userunitdir)"
-		--with-dbus-user=messagebus
-		$(use_with X x)
-	)
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		myconf+=(
-			--enable-launchd
-			--with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents
-		)
-	fi
-
-	if multilib_is_native_abi; then
-		docconf=(
-			--enable-xml-docs
-			$(use_enable doc doxygen-docs)
-		)
-	else
-		docconf=(
-			--disable-xml-docs
-			--disable-doxygen-docs
-		)
-		myconf+=(
-			--disable-daemon
-			--disable-selinux
-			--disable-libaudit
-			--disable-elogind
-			--disable-systemd
-			--without-x
-		)
-	fi
-
-	einfo "Running configure in ${BUILD_DIR}"
-	ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}"
-
-	if multilib_is_native_abi && use test; then
-		mkdir "${TBD}" || die
-		cd "${TBD}" || die
-		testconf=(
-			$(use_enable test asserts)
-			$(use_enable test checks)
-			$(use_enable test embedded-tests)
-			$(use_enable test stats)
-			$(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
-		)
-		einfo "Running configure in ${TBD}"
-		ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}"
-	fi
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		# After the compile, it uses a selinuxfs interface to
-		# check if the SELinux policy has the right support
-		use selinux && addwrite /selinux/access
-
-		einfo "Running make in ${BUILD_DIR}"
-		emake
-
-		if use test; then
-			einfo "Running make in ${TBD}"
-			emake -C "${TBD}"
-		fi
-	else
-		emake -C dbus libdbus-1.la
-	fi
-}
-
-src_test() {
-	# DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs
-	# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231
-	DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check
-
-}
-
-multilib_src_install() {
-	if multilib_is_native_abi; then
-		emake DESTDIR="${D}" install
-	else
-		emake DESTDIR="${D}" install-pkgconfigDATA
-		emake DESTDIR="${D}" -C dbus \
-			install-libLTLIBRARIES install-dbusincludeHEADERS \
-			install-nodist_dbusarchincludeHEADERS
-	fi
-}
-
-multilib_src_install_all() {
-	newinitd "${T}"/dbus.initd dbus
-
-	if use X; then
-		# dbus X session script (bug #77504)
-		# turns out to only work for GDM (and startx). has been merged into
-		# other desktop (kdm and such scripts)
-		exeinto /etc/X11/xinit/xinitrc.d
-		newexe "${FILESDIR}"/80-dbus-r1 80-dbus
-	fi
-
-	# Needs to exist for dbus sessions to launch
-	keepdir /usr/share/dbus-1/services
-	keepdir /etc/dbus-1/{session,system}.d
-	# machine-id symlink from pkg_postinst()
-	keepdir /var/lib/dbus
-	# Let the init script create the /var/run/dbus directory
-	rm -rf "${ED}"/var/run
-
-	# bug #761763
-	rm -rf "${ED}"/usr/lib/sysusers.d
-
-	dodoc AUTHORS NEWS README doc/TODO
-	readme.gentoo_create_doc
-
-	find "${ED}" -name '*.la' -delete || die
-}
-
-pkg_postinst() {
-	readme.gentoo_print_elog
-
-	if use systemd; then
-		tmpfiles_process dbus.conf
-	fi
-
-	# Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink
-	# for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
-	# dependencies with hardcoded paths (although the known ones got fixed already)
-	# TODO: should be safe to remove at least the ln because of the above tmpfiles_process?
-	dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
-	ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
-
-	if [[ ${CHOST} == *-darwin* ]]; then
-		local plist="org.freedesktop.dbus-session.plist"
-		elog
-		elog
-		elog "For MacOS/Darwin we now ship launchd support for dbus."
-		elog "This enables autolaunch of dbus at session login and makes"
-		elog "dbus usable under MacOS/Darwin."
-		elog
-		elog "The launchd plist file ${plist} has been"
-		elog "installed in ${EPREFIX}/Library/LaunchAgents."
-		elog "For it to be used, you will have to do all of the following:"
-		elog " + cd ~/Library/LaunchAgents"
-		elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}"
-		elog " + logout and log back in"
-		elog
-		elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS"
-		elog "specified and refused to start otherwise, then export the"
-		elog "the following to your environment:"
-		elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\""
-	fi
-}

diff --git a/sys-apps/dbus/files/80-dbus b/sys-apps/dbus/files/80-dbus
deleted file mode 100644
index 5593e2cd7390..000000000000
--- a/sys-apps/dbus/files/80-dbus
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-# launches a session dbus instance
-
-dbuslaunch="`which 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`
-  fi
-fi
-

diff --git a/sys-apps/dbus/files/dbus-1.12.22-check-fd.patch b/sys-apps/dbus/files/dbus-1.12.22-check-fd.patch
deleted file mode 100644
index 9038411bb13b..000000000000
--- a/sys-apps/dbus/files/dbus-1.12.22-check-fd.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 769a0462befb9829594a76e675526aba8579317e Mon Sep 17 00:00:00 2001
-From: Mike Gilbert <floppym@gentoo.org>
-Date: Sun, 27 Mar 2022 15:09:48 -0400
-Subject: [PATCH] sysdeps-unix: check fd before calling
- _dbus_fd_set_close_on_exec()
-
-If /proc/self/oom_score_adj does not exist, fd will invalid (-1).
-Attempting to set the CLOEXEC flag will obviously fail, and we lose the
-original errno value from open().
-
-Bug: https://bugs.gentoo.org/834725
-Signed-off-by: Mike Gilbert <floppym@gentoo.org>
----
- dbus/dbus-sysdeps-util-unix.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
-index 314ce64b..8f079cbf 100644
---- a/dbus/dbus-sysdeps-util-unix.c
-+++ b/dbus/dbus-sysdeps-util-unix.c
-@@ -1633,7 +1633,8 @@ _dbus_reset_oom_score_adj (const char **error_str_p)
-   if (fd < 0)
-     {
-       fd = open ("/proc/self/oom_score_adj", O_RDWR);
--      _dbus_fd_set_close_on_exec (fd);
-+      if (fd >= 0)
-+        _dbus_fd_set_close_on_exec (fd);
-     }
- 
-   if (fd >= 0)
--- 
-GitLab
-

diff --git a/sys-apps/dbus/files/dbus-1.14.0-oom_score_adj.patch b/sys-apps/dbus/files/dbus-1.14.0-oom_score_adj.patch
deleted file mode 100644
index 094529708088..000000000000
--- a/sys-apps/dbus/files/dbus-1.14.0-oom_score_adj.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 499cdfde1b3f5d812912e89b1a1a0d7a4fb83306 Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Fri, 1 Apr 2022 18:58:34 +0100
-Subject: [PATCH 1/2] activation-helper: Never crash if unable to write
- oom_score_adj
-
-_dbus_warn() normally only logs a warning, but can be made fatal by
-environment variables. In particular, we do that during unit testing,
-which can result in a build-time test failure if dbus is built in a
-sandbox environment that prevents write access.
-
-_dbus_log() does only the logging part of _dbus_warn(), which seems
-more appropriate here.
-
-Signed-off-by: Simon McVittie <smcv@collabora.com>
----
- bus/activation-helper.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bus/activation-helper.c b/bus/activation-helper.c
-index 8a4fd732..df0472ce 100644
---- a/bus/activation-helper.c
-+++ b/bus/activation-helper.c
-@@ -348,7 +348,7 @@ exec_for_correct_user (char *exec, char *user, DBusError *error)
-   /* Resetting the OOM score adjustment is best-effort, so we don't
-    * treat a failure to do so as fatal. */
-   if (!_dbus_reset_oom_score_adj (&error_str))
--    _dbus_warn ("%s: %s", error_str, strerror (errno));
-+    _dbus_log (DBUS_SYSTEM_LOG_WARNING, "%s: %s", error_str, strerror (errno));
- 
-   if (!switch_user (user, error))
-     return FALSE;
--- 
-GitLab
-
-
-From 5c8e5b7140c4f1f88684c7a83ce9587fff2def0c Mon Sep 17 00:00:00 2001
-From: Simon McVittie <smcv@collabora.com>
-Date: Fri, 1 Apr 2022 18:56:26 +0100
-Subject: [PATCH 2/2] sysdeps: Only open oom_score_adj read/write if we need to
- write it
-
-If we're running in a sandbox, we might not have write access to
-oom_score_adj. In the common case where we don't have any special
-protection from the OOM-killer, we can detect that with only read
-access, and skip the part where we open it for writing.
-
-(We would also not have write access to oom_score_adj if we're running
-with elevated Linux capabilities while not root, but that should never
-actually happen for dbus-daemon-launch-helper, which is setuid root
-for production use or has no capabilities during unit-testing.)
-
-Signed-off-by: Simon McVittie <smcv@collabora.com>
----
- dbus/dbus-sysdeps-util-unix.c | 26 +++++++++++++++++++++++---
- 1 file changed, 23 insertions(+), 3 deletions(-)
-
-diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c
-index 8f079cbf..ca130cff 100644
---- a/dbus/dbus-sysdeps-util-unix.c
-+++ b/dbus/dbus-sysdeps-util-unix.c
-@@ -1627,12 +1627,12 @@ _dbus_reset_oom_score_adj (const char **error_str_p)
-   const char *error_str = NULL;
- 
- #ifdef O_CLOEXEC
--  fd = open ("/proc/self/oom_score_adj", O_RDWR | O_CLOEXEC);
-+  fd = open ("/proc/self/oom_score_adj", O_RDONLY | O_CLOEXEC);
- #endif
- 
-   if (fd < 0)
-     {
--      fd = open ("/proc/self/oom_score_adj", O_RDWR);
-+      fd = open ("/proc/self/oom_score_adj", O_RDONLY);
-       if (fd >= 0)
-         _dbus_fd_set_close_on_exec (fd);
-     }
-@@ -1680,6 +1680,26 @@ _dbus_reset_oom_score_adj (const char **error_str_p)
-           goto out;
-         }
- 
-+      close (fd);
-+#ifdef O_CLOEXEC
-+      fd = open ("/proc/self/oom_score_adj", O_WRONLY | O_CLOEXEC);
-+
-+      if (fd < 0)
-+#endif
-+        {
-+          fd = open ("/proc/self/oom_score_adj", O_WRONLY);
-+          if (fd >= 0)
-+            _dbus_fd_set_close_on_exec (fd);
-+        }
-+
-+      if (fd < 0)
-+        {
-+          ret = FALSE;
-+          error_str = "open(/proc/self/oom_score_adj) for writing";
-+          saved_errno = errno;
-+          goto out;
-+        }
-+
-       if (pwrite (fd, "0", sizeof (char), 0) < 0)
-         {
-           ret = FALSE;
-@@ -1700,7 +1720,7 @@ _dbus_reset_oom_score_adj (const char **error_str_p)
-   else
-     {
-       ret = FALSE;
--      error_str = "open(/proc/self/oom_score_adj)";
-+      error_str = "open(/proc/self/oom_score_adj) for reading";
-       saved_errno = errno;
-       goto out;
-     }
--- 
-GitLab
-

diff --git a/sys-apps/dbus/files/dbus-1.14.0-x-autoconf-fixes.patch b/sys-apps/dbus/files/dbus-1.14.0-x-autoconf-fixes.patch
deleted file mode 100644
index d9eb2a611bfd..000000000000
--- a/sys-apps/dbus/files/dbus-1.14.0-x-autoconf-fixes.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-https://gitlab.freedesktop.org/dbus/dbus/-/commit/7d462fe93844df711ff8433ad798b54e57f8609d.patch
-(dropped NEWS to avoid conflicts with more patches in future)
-
-From fdbb32bd1f3c972d3d5fd3998930749206a1095a Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Tue, 1 Mar 2022 15:56:30 +0100
-Subject: [PATCH 1/6] build: Treat --with-x[=yes] the same as --with-x=auto
-
-Previously, --with-x would disable the check for X11 libraries, which
-was not intended.
-
-(cherry picked from commit 99cc28e0eb1a37233c0f7d3595175d1f331550e7)
---- a/configure.ac
-+++ b/configure.ac
-@@ -1115,7 +1115,7 @@ if test "x$dbus_win" = xyes; then
- 
-     enable_x11_autolaunch=no
-     have_x11=no
--else if test "x$with_x" = xauto; then
-+else if test "x$with_x" != xno; then
-     PKG_CHECK_MODULES([X], [x11],
-             [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library])],
-             [ have_x11=no ])
-GitLab
-From 5f2577aea3c5291dbb97e77c7384924851b30102 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Tue, 1 Mar 2022 16:01:29 +0100
-Subject: [PATCH 2/6] Move DBUS_X_* definitions into PKG_CHECK_MODULES block
-
-(cherry picked from commit 51e468d828785cbc7060678f6f257723ba11cd10)
---- a/configure.ac
-+++ b/configure.ac
-@@ -1117,15 +1117,15 @@ if test "x$dbus_win" = xyes; then
-     have_x11=no
- else if test "x$with_x" != xno; then
-     PKG_CHECK_MODULES([X], [x11],
--            [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library])],
-+            [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library])
-+	     have_x11=yes
-+	     DBUS_X_LIBS="$X_LIBS"
-+	     DBUS_X_CFLAGS="$X_CFLAGS"
-+            ],
-             [ have_x11=no ])
- 
-     if test "x$have_x11" = xno; then
-         AC_MSG_WARN([Couldn't found X11, tried with pkg-config.])
--    else
--        have_x11=yes
--        DBUS_X_LIBS="$X_LIBS"
--        DBUS_X_CFLAGS="$X_CFLAGS"
-     fi
- else
-     AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [
-GitLab
-From 5dad12f34c54e2359adfe8e7f122681df1d24bcb Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Tue, 1 Mar 2022 16:05:52 +0100
-Subject: [PATCH 3/6] Emit an error when --with-x was given but no X11 libs
- were found
-
-(cherry picked from commit 17c88a894499da64460a0ef76db1d8b88ceb9eeb)
---- a/configure.ac
-+++ b/configure.ac
-@@ -1121,12 +1121,13 @@ else if test "x$with_x" != xno; then
- 	     have_x11=yes
- 	     DBUS_X_LIBS="$X_LIBS"
- 	     DBUS_X_CFLAGS="$X_CFLAGS"
--            ],
--            [ have_x11=no ])
--
--    if test "x$have_x11" = xno; then
--        AC_MSG_WARN([Couldn't found X11, tried with pkg-config.])
--    fi
-+            ], [
-+             AS_IF([test "x$with_x" = xyes],
-+                [AC_MSG_ERROR([Couldn't find X11, tried with pkg-config.])],
-+                [AC_MSG_WARN([Couldn't find X11, tried with pkg-config.])]
-+             )
-+             have_x11=no
-+            ])
- else
-     AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [
-       AC_MSG_ERROR([--enable-x11-autolaunch and --without-x are not compatible])
-GitLab
-From e03554eb0bf2731e39c06191403f7544df9bb307 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Tue, 1 Mar 2022 16:08:06 +0100
-Subject: [PATCH 4/6] Add have_x11=no if --without-x was given to make later
- checks happy
-
-(cherry picked from commit bf3cb42c6db1f4479467d66a111b08a98afef31b)
---- a/configure.ac
-+++ b/configure.ac
-@@ -1129,6 +1129,7 @@ else if test "x$with_x" != xno; then
-              have_x11=no
-             ])
- else
-+    have_x11=no
-     AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [
-       AC_MSG_ERROR([--enable-x11-autolaunch and --without-x are not compatible])
-     ])
-GitLab
-From 62361f47f9da2346a9ff9a8c4b4bd4a288dc44d5 Mon Sep 17 00:00:00 2001
-From: Lars Wendler <polynomial-c@gentoo.org>
-Date: Tue, 1 Mar 2022 16:11:05 +0100
-Subject: [PATCH 5/6] Convert "if" calls to AS_IF macro for the block that
- handles X11
-
-(cherry picked from commit c71f013a64cd7f6de4c9cf3cf3b236239d713eb1)
---- a/configure.ac
-+++ b/configure.ac
-@@ -1108,14 +1108,14 @@ AC_ARG_ENABLE([x11-autolaunch],
-   AS_HELP_STRING([--enable-x11-autolaunch], [build with X11 auto-launch support]),
-   [], [enable_x11_autolaunch=auto])
- 
--if test "x$dbus_win" = xyes; then
--    if test "x$enable_x11_autolaunch" = xyes; then
-+AS_IF([test "x$dbus_win" = xyes], [
-+    AS_IF([test "x$enable_x11_autolaunch" = xyes], [
-         AC_MSG_ERROR([X11 auto-launch is not supported on Windows])
--    fi
-+    ])
- 
-     enable_x11_autolaunch=no
-     have_x11=no
--else if test "x$with_x" != xno; then
-+], [test "x$with_x" != xno], [
-     PKG_CHECK_MODULES([X], [x11],
-             [AC_DEFINE([HAVE_X11], [1], [Define to 1 if you have X11 library])
- 	     have_x11=yes
-@@ -1128,13 +1128,12 @@ else if test "x$with_x" != xno; then
-              )
-              have_x11=no
-             ])
--else
-+], [
-     have_x11=no
-     AS_IF([test "x$enable_x11_autolaunch" = "xyes"], [
-       AC_MSG_ERROR([--enable-x11-autolaunch and --without-x are not compatible])
-     ])
--fi
--fi
-+])
- 
- if test "x$enable_x11_autolaunch,$have_x11" = xyes,no; then
-     AC_MSG_ERROR([X11 auto-launch requires X headers/libraries])
-GitLab


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-11-08 21:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-04  1:58 [gentoo-commits] repo/gentoo:master commit in: sys-apps/dbus/, sys-apps/dbus/files/ Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2022-11-08 21:03 Andreas Sturmlechner
2022-09-23  5:41 Sam James
2022-06-20  1:19 Sam James
2022-03-31 16:25 Mike Gilbert
2019-02-21 23:54 Andreas Sturmlechner
2017-04-06 13:08 Lars Wendler
2017-03-25  3:27 Michael Palimaka
2016-03-08  8:04 Lars Wendler
2015-12-06 17:40 Mike Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox