drop(sys-apps/dbus): Moved to portage-stable

This commit is contained in:
Michael Marineau 2013-08-03 20:25:54 -04:00
parent 07632fc185
commit 7878926463
23 changed files with 0 additions and 3710 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +0,0 @@
DIST dbus-1.2.20.tar.gz 1672544 SHA256 0ef086d738710384d525130797ee86a0ce2daebffa7dc4d28386503ef7448011 SHA512 69ffc868e3652a7aca3c3097806d4533aaac895ab6449e26784af9647e605e2b603c836b2ffa2c536d597f92f789a72cc8e3ff71e853ef767b5be9a885594de5 WHIRLPOOL 3c88e8494c93cb030a557f2b94bfc96f76f0faf54ff6de092f26d8cc7ddf653d1a882a8091d945f9aca4ec6362e90dced04995bd18eace6f92bb10efa364c23c
DIST dbus-1.4.1.tar.gz 1850139 SHA256 caa1a0ded2d0f2e95c1d4ec7e3c8bd44834928c5b0ed41a7189963f3593983bd SHA512 ddfe9c641f40ce3bc13fc60bd4163241f837887515c25b2cb0d8497aa41f23724da6b7e265aafe67ffdfd5864ffaabe4b2e3d14dc6fcf2f464903b2b36fe53ba WHIRLPOOL d09e1657d823fcb0f9e4eb4fa3d6ec75c9007958cfee00e885663eb7877d7d2da41cdd284d9359731b0348c38c336e5fdfe3921c03cde31532679520f6b1d0f3
DIST dbus-1.4.12.tar.gz 1878025 SHA256 da3c97fd546610558d588799e27c4fa81101e754acbcd34747a42c131f30dbe7 SHA512 71154e42e98b172b6abad91abff7fb83f646bb2c4601922b4355eb10aaab4e23aca0607a66346d4e38b64433b0501149f3a498a80f18f0e5ac69cd83e883229d WHIRLPOOL ee617df19913cc70a14eda149ac3f2aabb2cc06c77aaf9237476a61b1507dfdc46b07589ecf028e161b1fa05030813b342ff09999d6191d1b4c7361da479bf37
DIST dbus-1.6.8.tar.gz 1929630 SHA256 fc1370ef38abeeb13f55c905ec002e60705fb0bfde3b8d21c8d6eb8056c11bac SHA512 eb26f1dfb6c6e3757a408a98e0f4012eda926e2f8ee7a2356ebd567a2e4a7d96effca7cec6e6b4f9e7bc578cbdd7b703d00158343a260859aff0718c76f296b0 WHIRLPOOL b614da2bc57376c8ad626ed2469e9a2cfcf7a2debba97187728048ad73e0c5075b290766d088e470b266fcad3e3cf2ec2c9c8477f1f7c5a232f1f74cadc83c1a

View File

@ -1,142 +0,0 @@
# 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.12.ebuild,v 1.3 2009/04/23 05:46:44 nirbheek Exp $
inherit 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 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 )"
src_unpack() {
unpack ${A}
cd "${S}"
# 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"
}
src_compile() {
# so we can get backtraces from apps
append-flags -rdynamic
epatch "${FILESDIR}"/${PN}-gold.patch
epatch "${FILESDIR}"/dbus-send-print-fixed.patch
# 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) \
$(use_enable test tests) \
$(use_enable test 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 \
|| 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
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
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/
# TODO(petkov): See crosbug.com/p/2264 -- remove when fixed.
dosym /usr/bin/dbus-uuidgen /bin/dbus-uuidgen
dosym /usr/bin/dbus-daemon /bin/dbus-daemon
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 "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 && built_with_use 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
if use test; then
elog
ewarn "You have unit tests enabled, this results in an insecure library"
ewarn "It is recommended that you reinstall *without* FEATURES=test"
fi
}

View File

@ -1 +0,0 @@
dbus-1.4.1.ebuild

View File

@ -1,203 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.1.ebuild,v 1.10 2011/03/03 00:31:42 arfrever Exp $
EAPI="2"
inherit autotools eutils multilib flag-o-matic python virtualx
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="amd64 x86"
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
)
test? ( =dev-lang/python-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
if use test; then
python_set_active_version 2
python_pkg_setup
fi
}
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}"/${PN}-1.4.0-asneeded.patch
epatch "${FILESDIR}"/dbus-send-print-fixed.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 Xmake 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/
# TODO(petkov): See crosbug.com/p/2264 -- remove when fixed.
dosym /usr/bin/dbus-uuidgen /bin/dbus-uuidgen
dosym /usr/bin/dbus-daemon /bin/dbus-daemon
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
}

View File

@ -1,202 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.12.ebuild,v 1.7 2011/06/26 10:44:46 armin76 Exp $
EAPI=2
inherit autotools eutils multilib flag-o-matic python systemd virtualx
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"
RDEPEND="
X? (
x11-libs/libX11
x11-libs/libXt
)
selinux? (
sys-libs/libselinux
sec-policy/selinux-dbus
)
>=dev-libs/expat-1.95.8
"
DEPEND="${RDEPEND}
dev-util/pkgconfig
doc? (
app-doc/doxygen
app-text/docbook-xml-dtd:4.1.2
app-text/xmlto
)
test? (
=dev-lang/python-2*
>=dev-libs/glib-2.22: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
if use test; then
python_set_active_version 2
python_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 "${FILESDIR}"/${PN}-1.4.0-asneeded.patch
epatch "${FILESDIR}"/${P}-send-print-fixed.patch
epatch "${FILESDIR}"/${P}-send-unix-fd.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
$(systemd_with_unitdir)
--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
local circular
if ! has_version dev-libs/dbus-glib; then
circular="--disable-modular-tests"
ewarn "Skipping modular tests because dev-libs/dbus-glib is missing"
fi
mkdir "${TBD}"
cd "${TBD}"
einfo "Running configure in ${TBD}"
ECONF_SOURCE="${S}" econf \
${my_conf} \
$(use_enable test checks) \
$(use_enable test embedded-tests) \
$(use_enable test modular-tests) \
$(use_enable test asserts) \
${circular}
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
if use doc; then
doxygen || die
fi
if use test; then
cd "${TBD}"
einfo "Running make in ${TBD}"
emake || die
fi
}
src_test() {
cd "${TBD}"
DBUS_VERBOSE=1 Xemake -j1 check || die
}
src_install() {
# initscript
newinitd "${FILESDIR}"/dbus.init-1.0 dbus || die
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
fi
# needs to exist for the system socket
keepdir /var/run/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
cd "${BD}"
# FIXME: split dtd's in dbus-dtd ebuild
emake DESTDIR="${D}" install || die
if use doc; then
dohtml -p api/ doc/api/html/* || die
cd "${S}"
dohtml doc/*.html || die
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."
# Move to /etc per #370451 and ensure unique id is generated
[[ -e ${ROOT}/var/lib/dbus/machine-id ]] && \
mv -vf "${ROOT}"/var/lib/dbus/machine-id "${ROOT}"/etc/machine-id
dbus-uuidgen --ensure="${ROOT}"/etc/machine-id
}

View File

@ -1,209 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.4.12.ebuild,v 1.7 2011/06/26 10:44:46 armin76 Exp $
EAPI=2
inherit autotools eutils multilib flag-o-matic python systemd virtualx
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"
RDEPEND="
X? (
x11-libs/libX11
x11-libs/libXt
)
selinux? (
sys-libs/libselinux
sec-policy/selinux-dbus
)
>=dev-libs/expat-1.95.8
"
DEPEND="${RDEPEND}
dev-util/pkgconfig
doc? (
app-doc/doxygen
app-text/docbook-xml-dtd:4.1.2
app-text/xmlto
)
test? (
=dev-lang/python-2*
>=dev-libs/glib-2.22: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
if use test; then
python_set_active_version 2
python_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 "${FILESDIR}"/${PN}-1.4.0-asneeded.patch
epatch "${FILESDIR}"/${P}-send-print-fixed.patch
epatch "${FILESDIR}"/${P}-send-unix-fd.patch
epatch "${FILESDIR}"/${P}-send-variant-dict.patch
# chromium-os:36381
epatch "${FILESDIR}"/${P}-match-rules.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
$(systemd_with_unitdir)
--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
local circular
if ! has_version dev-libs/dbus-glib; then
circular="--disable-modular-tests"
ewarn "Skipping modular tests because dev-libs/dbus-glib is missing"
fi
mkdir "${TBD}"
cd "${TBD}"
einfo "Running configure in ${TBD}"
ECONF_SOURCE="${S}" econf \
${my_conf} \
$(use_enable test checks) \
$(use_enable test embedded-tests) \
$(use_enable test modular-tests) \
$(use_enable test asserts) \
${circular}
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
if use doc; then
doxygen || die
fi
if use test; then
cd "${TBD}"
einfo "Running make in ${TBD}"
emake || die
fi
}
src_test() {
cd "${TBD}"
DBUS_VERBOSE=1 Xemake -j1 check || die
}
src_install() {
# initscript
newinitd "${FILESDIR}"/dbus.init-1.0 dbus || die
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
fi
# needs to exist for the system socket
keepdir /var/run/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/
insinto /usr/share/dbus-1/interfaces
doins "${FILESDIR}"/org.freedesktop.DBus.Properties.xml
dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO || die
cd "${BD}"
# FIXME: split dtd's in dbus-dtd ebuild
emake DESTDIR="${D}" install || die
if use doc; then
dohtml -p api/ doc/api/html/* || die
cd "${S}"
dohtml doc/*.html || die
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."
# Move to /etc per #370451 and ensure unique id is generated
[[ -e ${ROOT}/var/lib/dbus/machine-id ]] && \
mv -vf "${ROOT}"/var/lib/dbus/machine-id "${ROOT}"/etc/machine-id
dbus-uuidgen --ensure="${ROOT}"/etc/machine-id
}

View File

@ -1,195 +0,0 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.6.8-r1.ebuild,v 1.2 2012/11/17 13:21:01 pacho Exp $
EAPI=4
inherit autotools eutils linux-info flag-o-matic python systemd virtualx user
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 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd x86-fbsd x86-linux"
IUSE="debug doc selinux static-libs systemd test X"
RDEPEND=">=dev-libs/expat-2
selinux? (
sec-policy/selinux-dbus
sys-libs/libselinux
)
systemd? ( >=sys-apps/systemd-44-r1 )
X? (
x11-libs/libX11
x11-libs/libXt
)"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? (
app-doc/doxygen
app-text/docbook-xml-dtd:4.1.2
app-text/xmlto
)
test? (
>=dev-libs/glib-2.24
dev-lang/python:2.7
)"
# 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
if use test; then
python_set_active_version 2
python_pkg_setup
fi
if use kernel_linux; then
CONFIG_CHECK="~EPOLL"
linux-info_pkg_setup
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.5.12-selinux-when-dropping-capabilities-only-include-AUDI.patch
# 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
# required for asneeded patch but also for bug 263909, cross-compile so
# don't remove eautoreconf
eautoreconf
}
src_configure() {
local myconf
# 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.
myconf=(
--disable-silent-rules
--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)
--disable-embedded-tests
--disable-modular-tests
$(use_enable debug stats)
--with-xml=expat
--with-session-socket-dir=/tmp
--with-system-pid-file=/var/run/dbus.pid
--with-system-socket=/var/run/dbus/system_bus_socket
--with-dbus-user=messagebus
$(use_with X x)
"$(systemd_with_unitdir)"
)
mkdir "${BD}"
cd "${BD}"
einfo "Running configure in ${BD}"
ECONF_SOURCE="${S}" econf "${myconf[@]}" \
$(use_enable doc xml-docs) \
$(use_enable doc doxygen-docs)
if use test; then
mkdir "${TBD}"
cd "${TBD}"
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
}
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
if use test; then
cd "${TBD}"
einfo "Running make in ${TBD}"
emake
fi
}
src_test() {
cd "${TBD}"
DBUS_VERBOSE=1 Xemake -j1 check
}
src_install() {
newinitd "${FILESDIR}"/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
dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
cd "${BD}"
emake DESTDIR="${D}" install
prune_libtool_files --all
}
pkg_postinst() {
if [ "$(rc-config list default | grep dbus)" = "" ] ; then
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
fi
elog "Some applications require a session bus in addition to the system"
elog "bus. Please see \`man dbus-launch\` for more information."
elog
if [ "$(rc-status | grep dbus | grep started)" ] ; then
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."
fi
# 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 "${EROOT}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
}

View File

@ -1,187 +0,0 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.6.8.ebuild,v 1.10 2013/01/20 11:21:03 pinkbyte Exp $
EAPI=4
inherit autotools eutils linux-info flag-o-matic python virtualx user
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 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-linux"
IUSE="debug doc selinux static-libs test X"
RDEPEND=">=dev-libs/expat-2
selinux? (
sec-policy/selinux-dbus
sys-libs/libselinux
)
X? (
x11-libs/libX11
x11-libs/libXt
)"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? (
app-doc/doxygen
app-text/docbook-xml-dtd:4.1.2
app-text/xmlto
)
test? (
>=dev-libs/glib-2.24
dev-lang/python:2.7
)"
# 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
if use test; then
python_set_active_version 2
python_pkg_setup
fi
if use kernel_linux; then
CONFIG_CHECK="~EPOLL"
linux-info_pkg_setup
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.5.12-selinux-when-dropping-capabilities-only-include-AUDI.patch
# 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
# required for asneeded patch but also for bug 263909, cross-compile so
# don't remove eautoreconf
eautoreconf
}
src_configure() {
local myconf
# 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.
myconf=(
--disable-silent-rules
--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)
--disable-systemd
--disable-embedded-tests
--disable-modular-tests
$(use_enable debug stats)
--with-xml=expat
--with-session-socket-dir=/tmp
--with-system-pid-file=/var/run/dbus.pid
--with-system-socket=/var/run/dbus/system_bus_socket
--with-dbus-user=messagebus
$(use_with X x)
)
mkdir "${BD}"
cd "${BD}"
einfo "Running configure in ${BD}"
ECONF_SOURCE="${S}" econf "${myconf[@]}" \
$(use_enable doc xml-docs) \
$(use_enable doc doxygen-docs)
if use test; then
mkdir "${TBD}"
cd "${TBD}"
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
}
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
if use test; then
cd "${TBD}"
einfo "Running make in ${TBD}"
emake
fi
}
src_test() {
cd "${TBD}"
DBUS_VERBOSE=1 Xemake -j1 check
}
src_install() {
newinitd "${FILESDIR}"/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
dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
cd "${BD}"
emake DESTDIR="${D}" install
prune_libtool_files --all
}
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 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 "${EROOT}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
}

View File

@ -1,9 +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
eval `$dbuslaunch --sh-syntax --exit-with-session`
fi

View File

@ -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

View File

@ -1,94 +0,0 @@
http://bugs.freedesktop.org/show_bug.cgi?id=23162
--- dbus/Makefile.am
+++ dbus/Makefile.am
@@ -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
--- test/Makefile.am
+++ test/Makefile.am
@@ -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@
--- test/name-test/Makefile.am
+++ test/name-test/Makefile.am
@@ -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

View File

@ -1,10 +0,0 @@
--- a/bus/system.conf.in 2012-08-15 07:01:02.000000000 -0700
+++ b/bus/system.conf.in 2012-11-19 15:18:37.388906177 -0800
@@ -80,4 +80,7 @@
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
+ <!-- Chromium talks to most services on the bus so needs a relatively
+ large number of match rules. -->
+ <limit name="max_match_rules_per_connection">4096</limit>
</busconfig>

View File

@ -1,343 +0,0 @@
diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c
index 75d00ac..abb45ee 100644
--- a/tools/dbus-print-message.c
+++ b/tools/dbus-print-message.c
@@ -142,6 +142,284 @@ print_ay (DBusMessageIter *iter, int depth)
free (bytes);
}
+#include <inttypes.h>
+#define DBUS_INT64_PRINTF_ARGUMENT PRIi64
+#define DBUS_UINT64_PRINTF_ARGUMENT PRIu64
+#define MAXPFX 4096
+
+static int
+pf_can_simple(DBusMessageIter *iter)
+{
+ switch (dbus_message_iter_get_arg_type(iter))
+ {
+ case DBUS_TYPE_STRING:
+ case DBUS_TYPE_INT16:
+ case DBUS_TYPE_INT32:
+ case DBUS_TYPE_UINT16:
+ case DBUS_TYPE_UINT32:
+ case DBUS_TYPE_INT64:
+ case DBUS_TYPE_UINT64:
+ case DBUS_TYPE_BYTE:
+ case DBUS_TYPE_BOOLEAN:
+ case DBUS_TYPE_DOUBLE:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static void pf_key(DBusMessageIter *iter, const char *pfx, char *buf, size_t sz)
+{
+ char *sv;
+ dbus_bool_t bv;
+ dbus_int16_t i16v;
+ dbus_int32_t i32v;
+ dbus_int64_t i64v;
+ dbus_uint16_t u16v;
+ dbus_uint32_t u32v;
+ dbus_uint64_t u64v;
+ unsigned char u8v;
+ double dv;
+
+ switch (dbus_message_iter_get_arg_type(iter)) {
+ case DBUS_TYPE_STRING:
+ dbus_message_iter_get_basic(iter, &sv);
+ snprintf(buf, sz, "%s/%s", pfx, sv);
+ break;
+ case DBUS_TYPE_BOOLEAN:
+ dbus_message_iter_get_basic(iter, &bv);
+ snprintf(buf, sz, "%s/%s", pfx, (bv ? "true" : "false"));
+ break;
+ case DBUS_TYPE_INT16:
+ dbus_message_iter_get_basic(iter, &i16v);
+ snprintf(buf, sz, "%s/%d", pfx, i16v);
+ break;
+ case DBUS_TYPE_INT32:
+ dbus_message_iter_get_basic(iter, &i32v);
+ snprintf(buf, sz, "%s/%d", pfx, i32v);
+ break;
+ case DBUS_TYPE_INT64:
+ dbus_message_iter_get_basic(iter, &i64v);
+#ifdef DBUS_INT64_PRINTF_ARGUMENT
+ snprintf(buf, sz, "%s/%" DBUS_INT64_PRINTF_ARGUMENT, pfx, i64v);
+#else
+ snprintf(buf, sz, "%s/[int64]", pfx);
+#endif
+ break;
+ case DBUS_TYPE_UINT16:
+ dbus_message_iter_get_basic(iter, &u16v);
+ snprintf(buf, sz, "%s/%u", pfx, u16v);
+ break;
+ case DBUS_TYPE_UINT32:
+ dbus_message_iter_get_basic(iter, &u32v);
+ snprintf(buf, sz, "%s/%u", pfx, u32v);
+ break;
+ case DBUS_TYPE_UINT64:
+ dbus_message_iter_get_basic(iter, &u64v);
+#ifdef DBUS_UINT64_PRINTF_ARGUMENT
+ snprintf(buf, sz, "%s/%" DBUS_UINT64_PRINTF_ARGUMENT, pfx, u64v);
+#else
+ snprintf(buf, sz, "%s/[uint64]", pfx);
+#endif
+ break;
+ case DBUS_TYPE_BYTE:
+ dbus_message_iter_get_basic(iter, &u8v);
+ snprintf(buf, sz, "%s/%02x", pfx, (unsigned int)u8v & 0xFF);
+ break;
+ case DBUS_TYPE_DOUBLE:
+ dbus_message_iter_get_basic(iter, &dv);
+ snprintf(buf, sz, "%s/%g", pfx, dv);
+ break;
+ default:
+ snprintf(buf, sz, "%s/[pf-unknown]", pfx);
+ break;
+ }
+}
+
+static void print_fixed_iter(DBusMessageIter *iter, const char *pfx, int all);
+
+static void pf_string(DBusMessageIter *iter, const char *pfx)
+{
+ char *val;
+ dbus_message_iter_get_basic(iter, &val);
+ printf("%s%s%s\n", pfx, pfx[0] ? " " : "", val);
+}
+
+static void pf_boolean(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_bool_t bv;
+ dbus_message_iter_get_basic(iter, &bv);
+ printf("%s%s%s\n", pfx, pfx[0] ? " " : "", (bv ? "true" : "false"));
+}
+
+static void pf_uint16(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_uint16_t uv;
+ dbus_message_iter_get_basic(iter, &uv);
+ printf("%s%s%u\n", pfx, pfx[0] ? " " : "", uv);
+}
+
+static void pf_int16(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_int16_t iv;
+ dbus_message_iter_get_basic(iter, &iv);
+ printf("%s%s%d\n", pfx, pfx[0] ? " " : "", iv);
+}
+
+static void pf_uint32(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_uint32_t uv;
+ dbus_message_iter_get_basic(iter, &uv);
+ printf("%s%s%u\n", pfx, pfx[0] ? " " : "", uv);
+}
+
+static void pf_int32(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_int32_t iv;
+ dbus_message_iter_get_basic(iter, &iv);
+ printf("%s%s%d\n", pfx, pfx[0] ? " " : "", iv);
+}
+
+static void pf_uint64(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_uint64_t uv;
+ dbus_message_iter_get_basic(iter, &uv);
+#ifdef DBUS_UINT64_PRINTF_ARGUMENT
+ printf("%s%s%" DBUS_UINT64_PRINTF_ARGUMENT "\n", pfx, pfx[0] ? " " : "", uv);
+#else
+ printf("%s%s[uint64]\n", pfx, pfx[0] ? " " : "");
+#endif
+}
+
+static void pf_int64(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_int64_t iv;
+ dbus_message_iter_get_basic(iter, &iv);
+#ifdef DBUS_INT64_PRINTF_ARGUMENT
+ printf("%s%s%" DBUS_INT64_PRINTF_ARGUMENT "\n", pfx, pfx[0] ? " " : "", iv);
+#else
+ printf("%s%s[int64]\n", pfx, pfx[0] ? " " : "");
+#endif
+}
+
+static void pf_double(DBusMessageIter *iter, const char *pfx)
+{
+ double dv;
+ dbus_message_iter_get_basic(iter, &dv);
+ printf("%s%s%g\n", pfx, pfx[0] ? " " : "", dv);
+}
+
+static void pf_byte(DBusMessageIter *iter, const char *pfx)
+{
+ unsigned char bv;
+ dbus_message_iter_get_basic(iter, &bv);
+ printf("%s%s%02x\n", pfx, pfx[0] ? " " : "", (unsigned int)bv & 0xFF);
+}
+
+static void pf_array(DBusMessageIter *iter, const char *pfx)
+{
+ int type;
+ DBusMessageIter subiter;
+ char npfx[MAXPFX];
+ int i = 0;
+
+ dbus_message_iter_recurse(iter, &subiter);
+ type = dbus_message_iter_get_arg_type(&subiter);
+
+ while (type != DBUS_TYPE_INVALID)
+ {
+ snprintf(npfx, sizeof(npfx), "%s/%d", pfx, i);
+ print_fixed_iter(&subiter, npfx, 0);
+ dbus_message_iter_next(&subiter);
+ type = dbus_message_iter_get_arg_type(&subiter);
+ i++;
+ }
+}
+
+static void pf_variant(DBusMessageIter *iter, const char *pfx)
+{
+ DBusMessageIter subiter;
+ dbus_message_iter_recurse(iter, &subiter);
+ print_fixed_iter(&subiter, pfx, 0);
+}
+
+static void pf_dict(DBusMessageIter *iter, const char *pfx)
+{
+ DBusMessageIter subiter;
+ char npfx[MAXPFX];
+
+ dbus_message_iter_recurse(iter, &subiter);
+ /* Nasty hack to make string -> thing dicts more parseable. */
+ if (pf_can_simple(&subiter))
+ {
+ pf_key(&subiter, pfx, npfx, sizeof(npfx));
+ }
+ else
+ {
+ snprintf(npfx, MAXPFX, "%s/[complex-key]", pfx);
+ }
+ dbus_message_iter_next(&subiter);
+ print_fixed_iter(&subiter, npfx, 0);
+}
+
+static void print_fixed_iter(DBusMessageIter *iter, const char *pfx, int all)
+{
+ static struct {
+ int type;
+ void (*func)(DBusMessageIter *iter, const char *pfx);
+ } printers[] = {
+ { DBUS_TYPE_STRING, pf_string },
+ { DBUS_TYPE_ARRAY, pf_array },
+ { DBUS_TYPE_STRUCT, pf_array }, /* yes, really. They're identical. */
+ { DBUS_TYPE_VARIANT, pf_variant },
+ { DBUS_TYPE_DICT_ENTRY, pf_dict },
+ { DBUS_TYPE_BOOLEAN, pf_boolean },
+ { DBUS_TYPE_UINT32, pf_uint32 },
+ { DBUS_TYPE_INT32, pf_int32 },
+ { DBUS_TYPE_SIGNATURE, pf_string },
+ { DBUS_TYPE_OBJECT_PATH, pf_string },
+ { DBUS_TYPE_INT16, pf_int16 },
+ { DBUS_TYPE_UINT16, pf_uint16 },
+ { DBUS_TYPE_INT64, pf_int64 },
+ { DBUS_TYPE_UINT64, pf_uint64 },
+ { DBUS_TYPE_DOUBLE, pf_double },
+ { DBUS_TYPE_BYTE, pf_byte },
+ { 0, NULL }
+ };
+ int type;
+ int i;
+
+ do
+ {
+ type = dbus_message_iter_get_arg_type(iter);
+ if (type == DBUS_TYPE_INVALID)
+ return;
+ for (i = 0; printers[i].func; i++)
+ {
+ if (printers[i].type == type)
+ {
+ printers[i].func(iter, pfx);
+ break;
+ }
+ }
+ if (!printers[i].func)
+ {
+ printf("print-fixed-iter: no idea what %d is\n", type);
+ }
+ }
+ while (all && dbus_message_iter_next(iter));
+}
+
+void print_message_fixed(DBusMessage *msg)
+{
+ DBusMessageIter iter;
+ int type;
+
+ type = dbus_message_get_type(msg);
+ dbus_message_iter_init(msg, &iter);
+ print_fixed_iter(&iter, "", 1);
+}
+
static void
print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
{
diff --git a/tools/dbus-print-message.h b/tools/dbus-print-message.h
index 26700d8..cb72efd 100644
--- a/tools/dbus-print-message.h
+++ b/tools/dbus-print-message.h
@@ -26,6 +26,7 @@
#include <string.h>
#include <dbus/dbus.h>
+void print_message_fixed (DBusMessage *message);
void print_message (DBusMessage *message, dbus_bool_t literal);
#endif /* DBUS_PRINT_MESSAGE_H */
diff --git a/tools/dbus-send.c b/tools/dbus-send.c
index c7d5090..ffd9b71 100644
--- a/tools/dbus-send.c
+++ b/tools/dbus-send.c
@@ -51,7 +51,7 @@ static const char *appname;
static void
usage (int ecode)
{
- fprintf (stderr, "Usage: %s [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]\n", appname);
+ fprintf (stderr, "Usage: %s [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--fixed] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]\n", appname);
exit (ecode);
}
@@ -242,6 +242,7 @@ main (int argc, char *argv[])
const char *type_str = NULL;
const char *address = NULL;
int session_or_system = FALSE;
+ int fixed = 0;
appname = argv[0];
@@ -298,6 +299,8 @@ main (int argc, char *argv[])
type_str = strchr (arg, '=') + 1;
else if (!strcmp(arg, "--help"))
usage (0);
+ else if (!strcmp(arg, "--fixed"))
+ fixed = 1;
else if (arg[0] == '-')
usage (1);
else if (path == NULL)
@@ -524,7 +527,10 @@ main (int argc, char *argv[])
if (reply)
{
- print_message (reply, print_reply_literal);
+ if (fixed)
+ print_message_fixed (reply);
+ else
+ print_message (reply, print_reply_literal);
dbus_message_unref (reply);
}
}

View File

@ -1,33 +0,0 @@
diff --git a/tools/dbus-send.c b/tools/dbus-send.c
index cde0bb7..0a6f79a 100644
--- a/tools/dbus-send.c
+++ b/tools/dbus-send.c
@@ -67,6 +67,7 @@ append_arg (DBusMessageIter *iter, int type, const char *value)
double d;
unsigned char byte;
dbus_bool_t v_BOOLEAN;
+ int _int;
/* FIXME - we are ignoring OOM returns on all these functions */
switch (type)
@@ -137,6 +138,11 @@ append_arg (DBusMessageIter *iter, int type, const char *value)
}
break;
+ case DBUS_TYPE_UNIX_FD:
+ _int = strtoul (value, NULL, 0);
+ dbus_message_iter_append_basic (iter, DBUS_TYPE_UNIX_FD, &_int);
+ break;
+
default:
fprintf (stderr, "%s: Unsupported data type %c\n", appname, (char) type);
exit (1);
@@ -215,6 +221,8 @@ type_from_name (const char *arg)
type = DBUS_TYPE_BOOLEAN;
else if (!strcmp (arg, "objpath"))
type = DBUS_TYPE_OBJECT_PATH;
+ else if (!strcmp (arg, "fd"))
+ type = DBUS_TYPE_UNIX_FD;
else
{
fprintf (stderr, "%s: Unknown type \"%s\"\n", appname, arg);

View File

@ -1,58 +0,0 @@
diff --git a/tools/dbus-send.c b/tools/dbus-send.c
index 0a6f79a..6c56306 100644
--- a/tools/dbus-send.c
+++ b/tools/dbus-send.c
@@ -164,6 +164,8 @@ append_array (DBusMessageIter *iter, int type, const char *value)
free (dupval);
}
+static int type_from_name(const char *name);
+
static void
append_dict (DBusMessageIter *iter, int keytype, int valtype, const char *value)
{
@@ -187,7 +189,30 @@ append_dict (DBusMessageIter *iter, int keytype, int valtype, const char *value)
fprintf (stderr, "%s: Malformed dictionary\n", appname);
exit (1);
}
- append_arg (&subiter, valtype, val);
+ if (valtype == DBUS_TYPE_VARIANT)
+ {
+ char sig[2];
+ char *c = strchr(val, ':');
+ if (!c)
+ {
+ fprintf (stderr, "Missing type in variant dict\n");
+ exit (1);
+ }
+ *(c++) = '\0';
+ sig[0] = type_from_name(val);
+ sig[1] = '\0';
+ DBusMessageIter subsubiter;
+ dbus_message_iter_open_container (&subiter,
+ DBUS_TYPE_VARIANT,
+ sig,
+ &subsubiter);
+ append_arg(&subsubiter, sig[0], c);
+ dbus_message_iter_close_container (&subiter, &subsubiter);
+ }
+ else
+ {
+ append_arg (&subiter, valtype, val);
+ }
dbus_message_iter_close_container (iter, &subiter);
val = strtok (NULL, ",");
@@ -473,7 +498,11 @@ main (int argc, char *argv[])
exit (1);
}
*(c++) = 0;
- secondary_type = type_from_name (arg);
+ if (!strcmp(arg, "variant"))
+ /* Hack: support variant values for dictionaries. */
+ secondary_type = DBUS_TYPE_VARIANT;
+ else
+ secondary_type = type_from_name (arg);
sig[0] = DBUS_DICT_ENTRY_BEGIN_CHAR;
sig[1] = type;
sig[2] = secondary_type;

View File

@ -1,39 +0,0 @@
http://bugs.gentoo.org/405975
From e1b83fb58eadfd02227673db9a7e2833d29b0c98 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Mon, 23 Apr 2012 00:32:43 +0200
Subject: [PATCH] selinux: when dropping capabilities only include AUDIT caps
if we have them
When we drop capabilities we shouldn't assume we can keep
CAP_AUDIT_WRITE unconditionally, since it will not be available when
running in containers.
This patch only adds CAP_AUDIT_WRITE to the list of caps we keep if we
actually have it in the first place.
This makes audit/selinux enabled D-Bus work in a Linux container.
---
bus/selinux.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bus/selinux.c b/bus/selinux.c
index 36287e9..1bfc791 100644
--- a/bus/selinux.c
+++ b/bus/selinux.c
@@ -1053,8 +1053,9 @@ _dbus_change_to_daemon_user (const char *user,
int rc;
capng_clear (CAPNG_SELECT_BOTH);
- capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED,
- CAP_AUDIT_WRITE);
+ if (capng_have_capability (CAPNG_PERMITTED, CAP_AUDIT_WRITE))
+ capng_update (CAPNG_ADD, CAPNG_EFFECTIVE | CAPNG_PERMITTED,
+ CAP_AUDIT_WRITE);
rc = capng_change_id (uid, gid, CAPNG_DROP_SUPP_GRP);
if (rc)
{
--
1.7.10

View File

@ -1,12 +0,0 @@
diff --git a/dbus-1.2.20/configure b/dbus-1.2.20.patched/configure
index 0bfd213..728d40b 100755
--- a/dbus-1.2.20/configure
+++ b/dbus-1.2.20.patched/configure
@@ -9933,6 +9933,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
fi
supports_anon_versioning=no
case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...

View File

@ -1,340 +0,0 @@
diff --git a/tools/dbus-print-message.c b/tools/dbus-print-message.c
index 75d00ac..abb45ee 100644
--- a/tools/dbus-print-message.c
+++ b/tools/dbus-print-message.c
@@ -142,6 +142,281 @@ print_ay (DBusMessageIter *iter, int depth)
free (bytes);
}
+#define MAXPFX 4096
+
+static int
+pf_can_simple(DBusMessageIter *iter)
+{
+ switch (dbus_message_iter_get_arg_type(iter))
+ {
+ case DBUS_TYPE_STRING:
+ case DBUS_TYPE_INT16:
+ case DBUS_TYPE_INT32:
+ case DBUS_TYPE_UINT16:
+ case DBUS_TYPE_UINT32:
+ case DBUS_TYPE_INT64:
+ case DBUS_TYPE_UINT64:
+ case DBUS_TYPE_BYTE:
+ case DBUS_TYPE_BOOLEAN:
+ case DBUS_TYPE_DOUBLE:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static void pf_key(DBusMessageIter *iter, const char *pfx, char *buf, size_t sz)
+{
+ char *sv;
+ dbus_bool_t bv;
+ dbus_int16_t i16v;
+ dbus_int32_t i32v;
+ dbus_int64_t i64v;
+ dbus_uint16_t u16v;
+ dbus_uint32_t u32v;
+ dbus_uint64_t u64v;
+ unsigned char u8v;
+ double dv;
+
+ switch (dbus_message_iter_get_arg_type(iter)) {
+ case DBUS_TYPE_STRING:
+ dbus_message_iter_get_basic(iter, &sv);
+ snprintf(buf, sz, "%s/%s", pfx, sv);
+ break;
+ case DBUS_TYPE_BOOLEAN:
+ dbus_message_iter_get_basic(iter, &bv);
+ snprintf(buf, sz, "%s/%s", pfx, (bv ? "true" : "false"));
+ break;
+ case DBUS_TYPE_INT16:
+ dbus_message_iter_get_basic(iter, &i16v);
+ snprintf(buf, sz, "%s/%d", pfx, i16v);
+ break;
+ case DBUS_TYPE_INT32:
+ dbus_message_iter_get_basic(iter, &i32v);
+ snprintf(buf, sz, "%s/%d", pfx, i32v);
+ break;
+ case DBUS_TYPE_INT64:
+ dbus_message_iter_get_basic(iter, &i64v);
+#ifdef DBUS_INT64_PRINTF_MODIFIER
+ snprintf(buf, sz, "%s/%" DBUS_INT64_PRINTF_MODIFIER "d", pfx, i64v);
+#else
+ snprintf(buf, sz, "%s/[int64]", pfx);
+#endif
+ break;
+ case DBUS_TYPE_UINT16:
+ dbus_message_iter_get_basic(iter, &u16v);
+ snprintf(buf, sz, "%s/%u", pfx, u16v);
+ break;
+ case DBUS_TYPE_UINT32:
+ dbus_message_iter_get_basic(iter, &u32v);
+ snprintf(buf, sz, "%s/%u", pfx, u32v);
+ break;
+ case DBUS_TYPE_UINT64:
+ dbus_message_iter_get_basic(iter, &u64v);
+#ifdef DBUS_UINT64_PRINTF_MODIFIER
+ snprintf(buf, sz, "%s/%" DBUS_UINT64_PRINTF_MODIFIER "u", pfx, u64v);
+#else
+ snprintf(buf, sz, "%s/[uint64]", pfx);
+#endif
+ break;
+ case DBUS_TYPE_BYTE:
+ dbus_message_iter_get_basic(iter, &u8v);
+ snprintf(buf, sz, "%s/%02x", pfx, (unsigned int)u8v & 0xFF);
+ break;
+ case DBUS_TYPE_DOUBLE:
+ dbus_message_iter_get_basic(iter, &dv);
+ snprintf(buf, sz, "%s/%g", pfx, dv);
+ break;
+ default:
+ snprintf(buf, sz, "%s/[pf-unknown]", pfx);
+ break;
+ }
+}
+
+static void print_fixed_iter(DBusMessageIter *iter, const char *pfx, int all);
+
+static void pf_string(DBusMessageIter *iter, const char *pfx)
+{
+ char *val;
+ dbus_message_iter_get_basic(iter, &val);
+ printf("%s%s%s\n", pfx, pfx[0] ? " " : "", val);
+}
+
+static void pf_boolean(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_bool_t bv;
+ dbus_message_iter_get_basic(iter, &bv);
+ printf("%s%s%s\n", pfx, pfx[0] ? " " : "", (bv ? "true" : "false"));
+}
+
+static void pf_uint16(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_uint16_t uv;
+ dbus_message_iter_get_basic(iter, &uv);
+ printf("%s%s%u\n", pfx, pfx[0] ? " " : "", uv);
+}
+
+static void pf_int16(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_int16_t iv;
+ dbus_message_iter_get_basic(iter, &iv);
+ printf("%s%s%d\n", pfx, pfx[0] ? " " : "", iv);
+}
+
+static void pf_uint32(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_uint32_t uv;
+ dbus_message_iter_get_basic(iter, &uv);
+ printf("%s%s%u\n", pfx, pfx[0] ? " " : "", uv);
+}
+
+static void pf_int32(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_int32_t iv;
+ dbus_message_iter_get_basic(iter, &iv);
+ printf("%s%s%d\n", pfx, pfx[0] ? " " : "", iv);
+}
+
+static void pf_uint64(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_uint64_t uv;
+ dbus_message_iter_get_basic(iter, &uv);
+#ifdef DBUS_UINT64_PRINTF_MODIFIER
+ printf("%s%s%" DBUS_UINT64_PRINTF_MODIFIER "u\n", pfx, pfx[0] ? " " : "", uv);
+#else
+ printf("%s%s[uint64]\n", pfx, pfx[0] ? " " : "");
+#endif
+}
+
+static void pf_int64(DBusMessageIter *iter, const char *pfx)
+{
+ dbus_int64_t iv;
+ dbus_message_iter_get_basic(iter, &iv);
+#ifdef DBUS_INT64_PRINTF_MODIFIER
+ printf("%s%s%" DBUS_INT64_PRINTF_MODIFIER "d\n", pfx, pfx[0] ? " " : "", iv);
+#else
+ printf("%s%s[int64]\n", pfx, pfx[0] ? " " : "");
+#endif
+}
+
+static void pf_double(DBusMessageIter *iter, const char *pfx)
+{
+ double dv;
+ dbus_message_iter_get_basic(iter, &dv);
+ printf("%s%s%g\n", pfx, pfx[0] ? " " : "", dv);
+}
+
+static void pf_byte(DBusMessageIter *iter, const char *pfx)
+{
+ unsigned char bv;
+ dbus_message_iter_get_basic(iter, &bv);
+ printf("%s%s%02x\n", pfx, pfx[0] ? " " : "", (unsigned int)bv & 0xFF);
+}
+
+static void pf_array(DBusMessageIter *iter, const char *pfx)
+{
+ int type;
+ DBusMessageIter subiter;
+ char npfx[MAXPFX];
+ int i = 0;
+
+ dbus_message_iter_recurse(iter, &subiter);
+ type = dbus_message_iter_get_arg_type(&subiter);
+
+ while (type != DBUS_TYPE_INVALID)
+ {
+ snprintf(npfx, sizeof(npfx), "%s/%d", pfx, i);
+ print_fixed_iter(&subiter, npfx, 0);
+ dbus_message_iter_next(&subiter);
+ type = dbus_message_iter_get_arg_type(&subiter);
+ i++;
+ }
+}
+
+static void pf_variant(DBusMessageIter *iter, const char *pfx)
+{
+ DBusMessageIter subiter;
+ dbus_message_iter_recurse(iter, &subiter);
+ print_fixed_iter(&subiter, pfx, 0);
+}
+
+static void pf_dict(DBusMessageIter *iter, const char *pfx)
+{
+ DBusMessageIter subiter;
+ char npfx[MAXPFX];
+
+ dbus_message_iter_recurse(iter, &subiter);
+ /* Nasty hack to make string -> thing dicts more parseable. */
+ if (pf_can_simple(&subiter))
+ {
+ pf_key(&subiter, pfx, npfx, sizeof(npfx));
+ }
+ else
+ {
+ snprintf(npfx, MAXPFX, "%s/[complex-key]", pfx);
+ }
+ dbus_message_iter_next(&subiter);
+ print_fixed_iter(&subiter, npfx, 0);
+}
+
+static void print_fixed_iter(DBusMessageIter *iter, const char *pfx, int all)
+{
+ static struct {
+ int type;
+ void (*func)(DBusMessageIter *iter, const char *pfx);
+ } printers[] = {
+ { DBUS_TYPE_STRING, pf_string },
+ { DBUS_TYPE_ARRAY, pf_array },
+ { DBUS_TYPE_STRUCT, pf_array }, /* yes, really. They're identical. */
+ { DBUS_TYPE_VARIANT, pf_variant },
+ { DBUS_TYPE_DICT_ENTRY, pf_dict },
+ { DBUS_TYPE_BOOLEAN, pf_boolean },
+ { DBUS_TYPE_UINT32, pf_uint32 },
+ { DBUS_TYPE_INT32, pf_int32 },
+ { DBUS_TYPE_SIGNATURE, pf_string },
+ { DBUS_TYPE_OBJECT_PATH, pf_string },
+ { DBUS_TYPE_INT16, pf_int16 },
+ { DBUS_TYPE_UINT16, pf_uint16 },
+ { DBUS_TYPE_INT64, pf_int64 },
+ { DBUS_TYPE_UINT64, pf_uint64 },
+ { DBUS_TYPE_DOUBLE, pf_double },
+ { DBUS_TYPE_BYTE, pf_byte },
+ { 0, NULL }
+ };
+ int type;
+ int i;
+
+ do
+ {
+ type = dbus_message_iter_get_arg_type(iter);
+ if (type == DBUS_TYPE_INVALID)
+ return;
+ for (i = 0; printers[i].func; i++)
+ {
+ if (printers[i].type == type)
+ {
+ printers[i].func(iter, pfx);
+ break;
+ }
+ }
+ if (!printers[i].func)
+ {
+ printf("print-fixed-iter: no idea what %d is\n", type);
+ }
+ }
+ while (all && dbus_message_iter_next(iter));
+}
+
+void print_message_fixed(DBusMessage *msg)
+{
+ DBusMessageIter iter;
+ int type;
+
+ type = dbus_message_get_type(msg);
+ dbus_message_iter_init(msg, &iter);
+ print_fixed_iter(&iter, "", 1);
+}
+
static void
print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
{
diff --git a/tools/dbus-print-message.h b/tools/dbus-print-message.h
index 26700d8..cb72efd 100644
--- a/tools/dbus-print-message.h
+++ b/tools/dbus-print-message.h
@@ -26,6 +26,7 @@
#include <string.h>
#include <dbus/dbus.h>
+void print_message_fixed (DBusMessage *message);
void print_message (DBusMessage *message, dbus_bool_t literal);
#endif /* DBUS_PRINT_MESSAGE_H */
diff --git a/tools/dbus-send.c b/tools/dbus-send.c
index c7d5090..ffd9b71 100644
--- a/tools/dbus-send.c
+++ b/tools/dbus-send.c
@@ -51,7 +51,7 @@ static const char *appname;
static void
usage (int ecode)
{
- fprintf (stderr, "Usage: %s [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]\n", appname);
+ fprintf (stderr, "Usage: %s [--help] [--system | --session | --address=ADDRESS] [--dest=NAME] [--type=TYPE] [--print-reply=(literal)] [--fixed] [--reply-timeout=MSEC] <destination object path> <message name> [contents ...]\n", appname);
exit (ecode);
}
@@ -242,6 +242,7 @@ main (int argc, char *argv[])
const char *type_str = NULL;
const char *address = NULL;
int session_or_system = FALSE;
+ int fixed = 0;
appname = argv[0];
@@ -298,6 +299,8 @@ main (int argc, char *argv[])
type_str = strchr (arg, '=') + 1;
else if (!strcmp(arg, "--help"))
usage (0);
+ else if (!strcmp(arg, "--fixed"))
+ fixed = 1;
else if (arg[0] == '-')
usage (1);
else if (path == NULL)
@@ -526,7 +529,10 @@ main (int argc, char *argv[])
if (reply)
{
- print_message (reply, print_reply_literal);
+ if (fixed)
+ print_message_fixed (reply);
+ else
+ print_message (reply, print_reply_literal);
dbus_message_unref (reply);
}
}

View File

@ -1,51 +0,0 @@
#!/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}
}

View File

@ -1,50 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2011 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.initd,v 1.1 2011/11/05 13:56:10 ssuominen Exp $
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}
}

View File

@ -1,21 +0,0 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!-- From http://dbus.freedesktop.org/doc/dbus-specification.html -->
<node>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg name="interface" direction="in" type="s" />
<arg name="name" direction="in" type="s" />
<arg name="value" direction="out" type="v" />
</method>
<method name="Set">
<arg name="interface" direction="in" type="s" />
<arg name="name" direction="in" type="s" />
<arg name="value" direction="in" type="v" />
</method>
<method name="GetAll">
<arg name="interface" direction="in" type="s" />
<arg name="properties" direction="out" type="a{sv}" />
</method>
</interface>
</node>

View File

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>freedesktop</herd>
<maintainer>
<email>freedesktop-bugs@gentoo.org</email>
</maintainer>
<use>
<flag name='systemd'>Build with <pkg>sys-apps/systemd</pkg> at_console support</flag>
</use>
</pkgmetadata>