diff options
author | Sven 'sleipnir' Rebhan <odinshorse@googlemail.com> | 2009-03-20 08:11:40 +0000 |
---|---|---|
committer | Sven 'sleipnir' Rebhan <odinshorse@googlemail.com> | 2009-03-20 08:11:40 +0000 |
commit | 15273f30a9130a63b3f9ecbc05d5061569b9e0f6 (patch) | |
tree | de4ef7317d0c8979e65edc522d40554412641450 /sys-apps | |
parent | Added some cache entried for libidl and orbit (diff) | |
download | embedded-cross-15273f30a9130a63b3f9ecbc05d5061569b9e0f6.tar.gz embedded-cross-15273f30a9130a63b3f9ecbc05d5061569b9e0f6.tar.bz2 embedded-cross-15273f30a9130a63b3f9ecbc05d5061569b9e0f6.zip |
Fix dbus to compile without env hack.
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/dbus/Manifest | 8 | ||||
-rw-r--r-- | sys-apps/dbus/dbus-1.2.3-r1.ebuild | 136 | ||||
-rw-r--r-- | sys-apps/dbus/files/30-dbus | 9 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.2.3-bsd.patch | 50 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.2.3-cross-sys_lib_search_path_spec.patch | 17 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus-1.2.3-panic-from-dbus_signature_validate.patch | 32 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus.init-1.0 | 51 |
7 files changed, 303 insertions, 0 deletions
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest new file mode 100644 index 0000000..a869ca7 --- /dev/null +++ b/sys-apps/dbus/Manifest @@ -0,0 +1,8 @@ +AUX 30-dbus 243 RMD160 b5e7a813cd5d91f2ea60bb22260e432cbfb72fd9 SHA1 35ee3a5d3db9c7e372603ce916e17a41edd01d36 SHA256 a8e8fec9769cc5d46df8216f7d1e1f9df422c4e46f293fd70d4b017fb01d959d +AUX dbus-1.2.3-bsd.patch 1638 RMD160 9a134c5e1ccc1215d0579a02568a5707ad39e484 SHA1 061787f8131f33ccf07f11e04e6a327372de1c69 SHA256 0428d70451344153c6bf44f12d04fb7732070abf44d0d162ad995de5a9a24f1e +AUX dbus-1.2.3-cross-sys_lib_search_path_spec.patch 757 RMD160 2e6416a4571487b7f269cd4bcd1d4b413a461d07 SHA1 dd39de9ff1b47177362138c3e14da04c21008015 SHA256 fccbf7cb9eb59cb3091b41df787d6b5e6adf18db4c3cfb5ec1247e9927cc5da2 +AUX dbus-1.2.3-panic-from-dbus_signature_validate.patch 1064 RMD160 a7a587fb604f94f8d064c21d0adfae080edc1a80 SHA1 309faf628e3a207985c79afd2789b8cce696eed6 SHA256 455e2834b71878b3ea1ff9f0b678c8890b2c25f0c309c96c4a8e5551e23bca68 +AUX dbus.init-1.0 1152 RMD160 f0f409b59167beef2e2b8c14f701fbeaa54c3bc9 SHA1 b00e23868046c67eaec87220e92ffcea5d9dd911 SHA256 a2e13a025faa488ff35521188c0d44909bc82c55e8676a24a5a5179545303d98 +DIST dbus-1.2.3.tar.gz 1564475 RMD160 d1a207b2a4c744f27c9c01388e80cebdb61f43f0 SHA1 ceb8d496bc1a9c2dcdbe559515c01ec9c0cdcf81 SHA256 16ffaa4a8758f115cf02c78962b0849ed4d802872420fd460c433a9cd580ed1a +EBUILD dbus-1.2.3-r1.ebuild 4015 RMD160 869bb8fc5d1ef1aa4c3ecfb7cd3a568e64be284b SHA1 d34769d264894f63a185f231249cd8c8422f5fa0 SHA256 c2a507469c241741d811c9decc88e297ea533055ddf451a9f98e1319da68f11b +MISC dbus-1.2.3-r1.ebuild~ 4013 RMD160 e76bf7cbf087f8ba94d3eae9b078759825161c57 SHA1 c2ac6529fab87af5d59c9611c1b6a7b335f6fbd9 SHA256 15ec1c5ad327eae93296ecced484dc5427ea3df7059cba10469f9f7b6c71f60e diff --git a/sys-apps/dbus/dbus-1.2.3-r1.ebuild b/sys-apps/dbus/dbus-1.2.3-r1.ebuild new file mode 100644 index 0000000..d2f24dc --- /dev/null +++ b/sys-apps/dbus/dbus-1.2.3-r1.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.2.3-r1.ebuild,v 1.10 2009/02/05 19:03:24 aballier Exp $ + +inherit eutils multilib flag-o-matic autotools + +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 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 )" + +src_unpack() { + unpack ${A} + + cd "${S}" + + # Fix potential DoS issue. fdo bug #17803. Gentoo bug #240308 + epatch "${FILESDIR}"/${PN}-1.2.3-panic-from-dbus_signature_validate.patch + # Fix runtime error on FreeBSD. Gentoo bug #236779, fdo bug #17061 + # From upstream, drop at next bump + epatch "${FILESDIR}"/${P}-bsd.patch + + # Fix cross-compilation by using the correct sys_lib_search_path_spec + epatch "${FILESDIR}"/${P}-cross-sys_lib_search_path_spec.patch + + # We need to redo the autoconf/automake magic because of the above patch + eautoreconf || die "Autoreconf failed" +} + +src_compile() { + # so we can get backtraces from apps + append-flags -rdynamic + + local myconf="" + + hasq test ${FEATURES} && myconf="${myconf} --enable-tests=yes" + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if + # not on an SELinux profile. + econf \ + $(use_with X x) \ + $(use_enable kernel_linux inotify) \ + $(use_enable kernel_FreeBSD kqueue) \ + $(use_enable selinux) \ + $(use_enable selinux libaudit) \ + $(use_enable debug verbose-mode) \ + $(use_enable debug asserts) \ + --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 \ + $(use_enable doc doxygen-docs) \ + --disable-xml-docs \ + ${myconf} \ + || die "econf failed" + + # after the compile, it uses a selinuxfs interface to + # check if the SELinux policy has the right support + use selinux && addwrite /selinux/access + + emake || die "make failed" +} + +src_test() { + DBUS_VERBOSE=1 make check || die "make check failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + # initscript + newinitd "${FILESDIR}"/dbus.init-1.0 dbus + + # 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 + + # 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 + if use doc; then + dohtml doc/*html + fi +} + +pkg_preinst() { + enewgroup messagebus + enewuser messagebus -1 "-1" -1 messagebus +} + +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 + elog + ewarn "You MUST run 'revdep-rebuild' after emerging this package" + elog + ewarn "If you are currently running X with the hal useflag enabled" + ewarn "restarting the dbus service WILL restart X as well" + ebeep 5 + elog + ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run" + ewarn "the new version of the daemon. For many people, this means" + ewarn "exiting X as well." + +} 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-1.2.3-bsd.patch b/sys-apps/dbus/files/dbus-1.2.3-bsd.patch new file mode 100644 index 0000000..d85b93d --- /dev/null +++ b/sys-apps/dbus/files/dbus-1.2.3-bsd.patch @@ -0,0 +1,50 @@ +https://bugs.gentoo.org/show_bug.cgi?id=236779 + + +commit 3564e5cbe4d9c0538d6eb519904ef0befab39d75 +Author: Joe Marcus Clarke <marcus@freedesktop.org> +Date: Thu Sep 4 22:13:30 2008 -0400 + + Bug 17061: Handle error return from sysconf correctly + + * dbus/dbus-sysdeps-unix.c: + * dbus/dbus-sysdeps-util-unix.c: Cast return + from sysconf temporarily so we actually see + -1. + + Signed-off-by: Colin Walters <walters@verbum.org> + +diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c +index 3f963bc..24a3774 100644 +--- a/dbus/dbus-sysdeps-unix.c ++++ b/dbus/dbus-sysdeps-unix.c +@@ -1493,7 +1493,11 @@ fill_user_info (DBusUserInfo *info, + /* retrieve maximum needed size for buf */ + buflen = sysconf (_SC_GETPW_R_SIZE_MAX); + +- if (buflen <= 0) ++ /* sysconf actually returns a long, but everything else expects size_t, ++ * so just recast here. ++ * https://bugs.freedesktop.org/show_bug.cgi?id=17061 ++ */ ++ if ((long) buflen <= 0) + buflen = 1024; + + result = -1; +diff --git a/dbus/dbus-sysdeps-util-unix.c b/dbus/dbus-sysdeps-util-unix.c +index 55eb934..0343a90 100644 +--- a/dbus/dbus-sysdeps-util-unix.c ++++ b/dbus/dbus-sysdeps-util-unix.c +@@ -836,7 +836,11 @@ fill_group_info (DBusGroupInfo *info, + /* retrieve maximum needed size for buf */ + buflen = sysconf (_SC_GETGR_R_SIZE_MAX); + +- if (buflen <= 0) ++ /* sysconf actually returns a long, but everything else expects size_t, ++ * so just recast here. ++ * https://bugs.freedesktop.org/show_bug.cgi?id=17061 ++ */ ++ if ((long) buflen <= 0) + buflen = 1024; + + result = -1; diff --git a/sys-apps/dbus/files/dbus-1.2.3-cross-sys_lib_search_path_spec.patch b/sys-apps/dbus/files/dbus-1.2.3-cross-sys_lib_search_path_spec.patch new file mode 100644 index 0000000..f5119de --- /dev/null +++ b/sys-apps/dbus/files/dbus-1.2.3-cross-sys_lib_search_path_spec.patch @@ -0,0 +1,17 @@ +--- aclocal.m4 2008-08-06 19:43:36.000000000 +0000 ++++ aclocal.m4.new 2009-03-20 07:54:16.000000000 +0000 +@@ -1632,8 +1632,12 @@ + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes +- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" +- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ++ if test -z "sys_lib_search_path_spec"; then ++ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" ++ fi ++ if test -z "sys_lib_dlsearch_path_spec"; then ++ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" ++ fi + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then diff --git a/sys-apps/dbus/files/dbus-1.2.3-panic-from-dbus_signature_validate.patch b/sys-apps/dbus/files/dbus-1.2.3-panic-from-dbus_signature_validate.patch new file mode 100644 index 0000000..772da17 --- /dev/null +++ b/sys-apps/dbus/files/dbus-1.2.3-panic-from-dbus_signature_validate.patch @@ -0,0 +1,32 @@ +From: Colin Walters <walters@verbum.org> +Date: Wed, 1 Oct 2008 17:49:48 +0000 (-0400) +Subject: Bug 17803: Panic from dbus_signature_validate +X-Git-Url: http://gitweb.freedesktop.org/?p=dbus/dbus.git;a=commitdiff;h=7b10b46c5c8658449783ce45f1273dd35c353bce + +Bug 17803: Panic from dbus_signature_validate + + * dbus/dbus-marshal-validate.c: Ensure we validate + a basic type before calling is_basic on it. + * dbus-marshal-validate-util.c: Test. +--- + +--- a/dbus/dbus-marshal-validate-util.c ++++ b/dbus/dbus-marshal-validate-util.c +@@ -228,6 +228,7 @@ _dbus_marshal_validate_test (void) + "123", + ".", + "(" ++ "a{(ii)i}" /* https://bugs.freedesktop.org/show_bug.cgi?id=17803 */ + }; + + /* Signature with reason */ +--- a/dbus/dbus-marshal-validate.c ++++ b/dbus/dbus-marshal-validate.c +@@ -247,6 +247,7 @@ _dbus_validate_signature_with_reason (co + } + + if (last == DBUS_DICT_ENTRY_BEGIN_CHAR && ++ _dbus_type_is_valid (*p) && + !dbus_type_is_basic (*p)) + { + result = DBUS_INVALID_DICT_KEY_MUST_BE_BASIC_TYPE; 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} +} |