diff options
author | Benedikt Böhm <bb@xnull.de> | 2010-07-19 13:21:08 +0200 |
---|---|---|
committer | Benedikt Böhm <bb@xnull.de> | 2010-07-19 13:21:08 +0200 |
commit | 63898da009e0df1eec1922f1665d8e8c9b809cac (patch) | |
tree | c4fc1c534b27e90ca6862a2eec3f0492e5842a34 /sys-apps/dbus | |
parent | let's try with dbus-1.2.24 first (diff) | |
download | betagarden-63898da009e0df1eec1922f1665d8e8c9b809cac.tar.gz betagarden-63898da009e0df1eec1922f1665d8e8c9b809cac.tar.bz2 betagarden-63898da009e0df1eec1922f1665d8e8c9b809cac.zip |
add live git ebuild for dbus, so systemd will work
Diffstat (limited to 'sys-apps/dbus')
-rw-r--r-- | sys-apps/dbus/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/dbus/dbus-9999.ebuild | 168 | ||||
-rw-r--r-- | sys-apps/dbus/files/30-dbus | 9 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus.init-1.0 | 51 |
4 files changed, 231 insertions, 0 deletions
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest new file mode 100644 index 0000000..a9cb03b --- /dev/null +++ b/sys-apps/dbus/Manifest @@ -0,0 +1,3 @@ +AUX 30-dbus 243 RMD160 b5e7a813cd5d91f2ea60bb22260e432cbfb72fd9 SHA1 35ee3a5d3db9c7e372603ce916e17a41edd01d36 SHA256 a8e8fec9769cc5d46df8216f7d1e1f9df422c4e46f293fd70d4b017fb01d959d +AUX dbus.init-1.0 1152 RMD160 f0f409b59167beef2e2b8c14f701fbeaa54c3bc9 SHA1 b00e23868046c67eaec87220e92ffcea5d9dd911 SHA256 a2e13a025faa488ff35521188c0d44909bc82c55e8676a24a5a5179545303d98 +EBUILD dbus-9999.ebuild 4316 RMD160 213222c161f603cafea1595ecbf34e2fc0ed8f0b SHA1 35a3490e5e6b7cf206620b46d0a5ad7de36d7890 SHA256 1e1c87047da40c8ea0e7a0e8fc8431b212697ca1bab236feba6e21b4c545d9b4 diff --git a/sys-apps/dbus/dbus-9999.ebuild b/sys-apps/dbus/dbus-9999.ebuild new file mode 100644 index 0000000..109f76d --- /dev/null +++ b/sys-apps/dbus/dbus-9999.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="3" + +inherit autotools eutils multilib flag-o-matic git + +DESCRIPTION="A message bus system, a simple way for applications to talk to each other" +HOMEPAGE="http://dbus.freedesktop.org/" +EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}" + +LICENSE="|| ( GPL-2 AFL-2.1 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc selinux test X" + +RDEPEND="X? ( x11-libs/libXt x11-libs/libX11 ) + selinux? ( sys-libs/libselinux + sec-policy/selinux-dbus ) + >=dev-libs/expat-1.95.8 + !<sys-apps/dbus-0.91" +DEPEND="${RDEPEND} + dev-util/pkgconfig + doc? ( + app-doc/doxygen + app-text/xmlto + app-text/docbook-xml-dtd:4.1.2 )" + +# out of sources build directory +BD=${WORKDIR}/${P}-build +# out of sources build dir for make check +TBD=${WORKDIR}/${P}-tests-build + +pkg_setup() { + enewgroup messagebus + enewuser messagebus -1 "-1" -1 messagebus +} + +src_unpack() { + git_src_unpack +} + +src_prepare() { + sed 's/-Wno-pointer-sign//g' -i configure.in || die "sed failed" + sed -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \ + -e '/"dispatch"/d' -i "${S}/bus/test-main.c" + eautoreconf +} + +src_configure() { + local my_conf + + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if + # not on an SELinux profile. + my_conf="$(use_with X x) + $(use_enable debug verbose-mode) + $(use_enable debug asserts) + $(use_enable kernel_linux inotify) + $(use_enable kernel_FreeBSD kqueue) + $(use_enable selinux) + $(use_enable selinux libaudit) + --with-xml=expat + --with-system-pid-file=/var/run/dbus.pid + --with-system-socket=/var/run/dbus/system_bus_socket + --with-session-socket-dir=/tmp + --with-dbus-user=messagebus + --localstatedir=/var" + + mkdir "${BD}" + cd "${BD}" + einfo "Running configure in ${BD}" + ECONF_SOURCE="${S}" econf ${my_conf} \ + $(use_enable doc doxygen-docs) \ + $(use_enable doc xml-docs) + + if use test; then + mkdir "${TBD}" + cd "${TBD}" + einfo "Running configure in ${TBD}" + ECONF_SOURCE="${S}" econf \ + ${my_conf} \ + $(use_enable test checks) \ + $(use_enable test tests) \ + $(use_enable test asserts) + fi +} + +src_compile() { + # after the compile, it uses a selinuxfs interface to + # check if the SELinux policy has the right support + use selinux && addwrite /selinux/access + + cd "${BD}" + einfo "Running make in ${BD}" + emake || die "make failed" + + if use doc; then + einfo "Building API documentation..." + doxygen || die "doxygen failed" + fi + + if use test; then + cd "${TBD}" + einfo "Running make in ${TBD}" + emake || die "make failed" + fi +} + +src_test() { + cd "${TBD}" + DBUS_VERBOSE=1 make check || die "make check failed" +} + +src_install() { + # initscript + newinitd "${FILESDIR}"/dbus.init-1.0 dbus + + if use X ; then + # dbus X session script (#77504) + # turns out to only work for GDM. has been merged into other desktop + # (kdm and such scripts) + exeinto /etc/X11/xinit/xinitrc.d/ + doexe "${FILESDIR}"/30-dbus || die "doexe failed" + fi + + # needs to exist for the system socket + keepdir /var/run/dbus + # needs to exist for machine id + keepdir /var/lib/dbus + # needs to exist for dbus sessions to launch + + keepdir /usr/lib/dbus-1.0/services + keepdir /usr/share/dbus-1/services + keepdir /etc/dbus-1/system.d/ + keepdir /etc/dbus-1/session.d/ + + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO || die "dodoc failed" + + cd "${BD}" + # FIXME: split dtd's in dbus-dtd ebuild + emake DESTDIR="${D}" install || die "make install failed" + if use doc; then + dohtml doc/*.html doc/api/html/* || die "dohtml failed" + fi +} + +pkg_postinst() { + elog "To start the D-Bus system-wide messagebus by default" + elog "you should add it to the default runlevel :" + elog "\`rc-update add dbus default\`" + elog + elog "Some applications require a session bus in addition to the system" + elog "bus. Please see \`man dbus-launch\` for more information." + elog + ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run" + ewarn "the new version of the daemon." + + if has_version "x11-base/xorg-server[hal]"; then + elog + ewarn "You are currently running X with the hal useflag enabled" + ewarn "restarting the dbus service WILL restart X as well" + ebeep 5 + fi + + # Ensure unique id is generated + dbus-uuidgen --ensure="${ROOT}"/var/lib/dbus/machine-id +} diff --git a/sys-apps/dbus/files/30-dbus b/sys-apps/dbus/files/30-dbus new file mode 100644 index 0000000..603e92d --- /dev/null +++ b/sys-apps/dbus/files/30-dbus @@ -0,0 +1,9 @@ +#!/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 + eval `$dbuslaunch --sh-syntax --exit-with-session` +fi + diff --git a/sys-apps/dbus/files/dbus.init-1.0 b/sys-apps/dbus/files/dbus.init-1.0 new file mode 100644 index 0000000..e96ea05 --- /dev/null +++ b/sys-apps/dbus/files/dbus.init-1.0 @@ -0,0 +1,51 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/files/dbus.init-1.0,v 1.4 2007/04/04 13:35:25 cardoe Exp $ + +opts="reload" + +depend() { + need localmount + after bootmisc +} + +start() { + ebegin "Starting D-BUS system messagebus" + + /usr/bin/dbus-uuidgen --ensure + + # 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} +} |