summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Gebhardt <hsggebhardt@googlemail.com>2010-11-15 04:12:10 +0100
committerHenry Gebhardt <hsggebhardt@googlemail.com>2010-11-16 13:47:49 +0100
commit1cdf65b7d6fb15683ba0f5735df26ced5fec6e21 (patch)
treea66704d9712cc419e2438afda10317fab8a270f6
parentRevert "dev-python/deseb-0.2.2: New ebuild" (diff)
downloadkork-first_commit_of_systemd_overlay.tar.gz
kork-first_commit_of_systemd_overlay.tar.bz2
kork-first_commit_of_systemd_overlay.zip
sys-apps/dbus-1.4.0: Copy from main treefirst_commit_of_systemd_overlay
-rw-r--r--sys-apps/dbus/Manifest6
-rw-r--r--sys-apps/dbus/dbus-1.4.0.ebuild191
-rw-r--r--sys-apps/dbus/files/80-dbus13
-rw-r--r--sys-apps/dbus/files/dbus-1.4.0-asneeded.patch97
-rw-r--r--sys-apps/dbus/files/dbus.init-1.051
5 files changed, 358 insertions, 0 deletions
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest
new file mode 100644
index 0000000..2a972ab
--- /dev/null
+++ b/sys-apps/dbus/Manifest
@@ -0,0 +1,6 @@
+AUX 30-dbus 243 RMD160 b5e7a813cd5d91f2ea60bb22260e432cbfb72fd9 SHA1 35ee3a5d3db9c7e372603ce916e17a41edd01d36 SHA256 a8e8fec9769cc5d46df8216f7d1e1f9df422c4e46f293fd70d4b017fb01d959d
+AUX 80-dbus 341 RMD160 3b7f55906289d91a1f0ed87edec7902ddac076c5 SHA1 df1f96934fbe164dc4f4e2e4d4b4cdeaf8cef2b5 SHA256 76ce25ce8769cdfcb0d7b7e52e5a7e6474448fc34e8ad9393afac1eca1e07fd2
+AUX dbus-1.4.0-asneeded.patch 4157 RMD160 f6fd613ff90d5570f4dabeca0738df4c3249ed49 SHA1 ceddf63bb4a3213f68117b36af415a7c69443e6a SHA256 c37d068b6923947f769682677cacbad13b267458b2de242e160b8ab261aa9b96
+AUX dbus.init-1.0 1152 RMD160 f0f409b59167beef2e2b8c14f701fbeaa54c3bc9 SHA1 b00e23868046c67eaec87220e92ffcea5d9dd911 SHA256 a2e13a025faa488ff35521188c0d44909bc82c55e8676a24a5a5179545303d98
+DIST dbus-1.4.0.tar.gz 1800347 RMD160 e3d44208f39d7c4a1bf916527dc121d3097a82d0 SHA1 4be3281005a9ef8f521f5547128c29a2632cb1d7 SHA256 c96d2f86d40e158e2bf405925a0a42cce0533a8466098e2f2238aa1614926652
+EBUILD dbus-1.4.0.ebuild 5111 RMD160 03aa2d02e41a5173f5780815c038f09fec133015 SHA1 946470a558d5d4902987e8b43e88003c1334ed58 SHA256 93546a9afa1ac0e875c41342fa09a8f5a0d40d1f0085fbd6578fc258fcc3fe00
diff --git a/sys-apps/dbus/dbus-1.4.0.ebuild b/sys-apps/dbus/dbus-1.4.0.ebuild
new file mode 100644
index 0000000..a2675bb
--- /dev/null
+++ b/sys-apps/dbus/dbus-1.4.0.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.0.ebuild,v 1.8 2010/10/30 13:08:24 ssuominen Exp $
+
+EAPI="2"
+
+inherit autotools eutils multilib flag-o-matic
+
+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="|| ( GPL-2 AFL-2.1 )"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="debug doc selinux static-libs test X"
+
+CDEPEND="
+ X? (
+ x11-libs/libX11
+ x11-libs/libXt
+ )
+ selinux? (
+ sys-libs/libselinux
+ sec-policy/selinux-dbus
+ )
+"
+RDEPEND="${CDEPEND}
+ !<sys-apps/dbus-0.91
+ >=dev-libs/expat-1.95.8
+"
+DEPEND="${CDEPEND}
+ dev-util/pkgconfig
+ doc? (
+ app-doc/doxygen
+ app-text/docbook-xml-dtd:4.1.2
+ app-text/xmlto
+ )
+"
+
+# 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_prepare() {
+ # Delete pregenerated files from tarball wrt #337989 (testsuite fails)
+ find test/data -type f -name '*.service' -exec rm -f '{}' +
+ find test/data -type f -name 'debug-*.conf' -exec rm -f '{}' +
+
+ # Remove CFLAGS that is not supported by all gcc, bug #274456
+ sed 's/-Wno-pointer-sign//g' -i configure.in configure || die
+
+ # Tests were restricted because of this
+ sed -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
+ -e '/"dispatch"/d' -i "${S}/bus/test-main.c" || die
+
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+
+ # required for asneeded patch but also for bug 263909, cross-compile so
+ # don't remove eautoreconf
+ eautoreconf
+}
+
+src_configure() {
+ local my_conf
+
+ # so we can get backtraces from apps
+ append-flags -rdynamic
+
+ # 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)
+ $(use_enable static-libs static)
+ --enable-shared
+ --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 || die "newinitd failed"
+
+ 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 || 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 -p api/ doc/api/html/* || die "dohtml api failed"
+ cd "${S}"
+ dohtml doc/*.html || die "dohtml failed"
+ fi
+
+ # Remove .la files
+ find "${D}" -type f -name '*.la' -exec rm -f '{}' +
+}
+
+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."
+ ewarn "Don't do this while X is running because it will restart your X as well."
+
+ # Ensure unique id is generated
+ dbus-uuidgen --ensure="${ROOT}"/var/lib/dbus/machine-id
+}
diff --git a/sys-apps/dbus/files/80-dbus b/sys-apps/dbus/files/80-dbus
new file mode 100644
index 0000000..5593e2c
--- /dev/null
+++ b/sys-apps/dbus/files/80-dbus
@@ -0,0 +1,13 @@
+#!/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.4.0-asneeded.patch b/sys-apps/dbus/files/dbus-1.4.0-asneeded.patch
new file mode 100644
index 0000000..1b6dd6c
--- /dev/null
+++ b/sys-apps/dbus/files/dbus-1.4.0-asneeded.patch
@@ -0,0 +1,97 @@
+http://bugs.freedesktop.org/show_bug.cgi?id=23162
+
+diff -ru ../dbus-1.4.0/dbus/Makefile.am ./dbus/Makefile.am
+--- ../dbus-1.4.0/dbus/Makefile.am 2010-08-31 23:44:19.000000000 +0200
++++ ./dbus/Makefile.am 2010-09-12 22:49:08.191226651 +0200
+@@ -277,7 +277,7 @@
+ dbus_test_SOURCES= \
+ dbus-test-main.c
+
+-dbus_test_LDADD=libdbus-internal.la $(DBUS_TEST_LIBS)
++dbus_test_LDADD=$(DBUS_TEST_LIBS) libdbus-internal.la
+ dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ ## mop up the gcov files
+diff -ru ../dbus-1.4.0/test/Makefile.am ./test/Makefile.am
+--- ../dbus-1.4.0/test/Makefile.am 2010-08-31 23:44:19.000000000 +0200
++++ ./test/Makefile.am 2010-09-12 22:51:44.021632252 +0200
+@@ -63,17 +63,17 @@
+
+ # When any programs are not linked to libdbus-internal, fix this.
+ AM_CPPFLAGS=-DDBUS_STATIC_BUILD
+-TEST_LIBS=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
++TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la
+
+-test_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
++test_service_LDADD=$(TEST_LIBS) libdbus-testutils.la
+ test_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
+-test_names_LDADD=libdbus-testutils.la $(TEST_LIBS)
++test_names_LDADD=$(TEST_LIBS) libdbus-testutils.la
+ test_names_LDFLAGS=@R_DYNAMIC_LDFLAG@
+ ## break_loader_LDADD= $(TEST_LIBS)
+ ## break_loader_LDFLAGS=@R_DYNAMIC_LDFLAG@
+-test_shell_service_LDADD=libdbus-testutils.la $(TEST_LIBS)
++test_shell_service_LDADD=$(TEST_LIBS) libdbus-testutils.la
+ test_shell_service_LDFLAGS=@R_DYNAMIC_LDFLAG@
+-shell_test_LDADD=libdbus-testutils.la $(TEST_LIBS)
++shell_test_LDADD=$(TEST_LIBS) libdbus-testutils.la
+ shell_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
+ spawn_test_LDADD=$(TEST_LIBS)
+ spawn_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
+diff -ru ../dbus-1.4.0/test/name-test/Makefile.am ./test/name-test/Makefile.am
+--- ../dbus-1.4.0/test/name-test/Makefile.am 2010-08-31 23:44:19.000000000 +0200
++++ ./test/name-test/Makefile.am 2010-09-12 22:53:29.046971038 +0200
+@@ -22,46 +22,46 @@
+ test_pending_call_dispatch_SOURCES = \
+ test-pending-call-dispatch.c
+
+-test_pending_call_dispatch_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
++test_pending_call_dispatch_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la
+ test_pending_call_dispatch_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_pending_call_timeout_SOURCES = \
+ test-pending-call-timeout.c
+
+-test_pending_call_timeout_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
++test_pending_call_timeout_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la
+ test_pending_call_timeout_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_threads_init_SOURCES = \
+ test-threads-init.c
+
+-test_threads_init_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
++test_threads_init_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la
+ test_threads_init_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_ids_SOURCES = \
+ test-ids.c
+
+-test_ids_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_TEST_LIBS)
++test_ids_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la
+ test_ids_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_shutdown_SOURCES = \
+ test-shutdown.c
+
+ test_shutdown_CFLAGS=
+-test_shutdown_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS)
++test_shutdown_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+ test_shutdown_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_privserver_SOURCES = \
+ test-privserver.c
+
+ test_privserver_CFLAGS=
+-test_privserver_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS)
++test_privserver_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+ test_privserver_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ test_privserver_client_SOURCES = \
+ test-privserver-client.c
+
+ test_privserver_client_CFLAGS=
+-test_privserver_client_LDADD=$(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la $(DBUS_TEST_LIBS)
++test_privserver_client_LDADD=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-internal.la ../libdbus-testutils.la
+ test_privserver_client_LDFLAGS=@R_DYNAMIC_LDFLAG@
+
+ endif
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}
+}