summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-09-29 16:28:50 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-09-29 16:28:50 +0000
commita40caf7941a8907ba4e45c34e70f7e8d95ec1114 (patch)
tree1621cf6d3a8d0c160ce311b927524c185e39a993 /sys-apps/dbus
parentVersion bump. (diff)
downloadgentoo-2-a40caf7941a8907ba4e45c34e70f7e8d95ec1114.tar.gz
gentoo-2-a40caf7941a8907ba4e45c34e70f7e8d95ec1114.tar.bz2
gentoo-2-a40caf7941a8907ba4e45c34e70f7e8d95ec1114.zip
old
(Portage version: 2.2.0_alpha128/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/dbus')
-rw-r--r--sys-apps/dbus/ChangeLog7
-rw-r--r--sys-apps/dbus/dbus-1.4.16.ebuild191
-rw-r--r--sys-apps/dbus/dbus-1.6.0.ebuild188
-rw-r--r--sys-apps/dbus/dbus-1.6.4-r1.ebuild190
-rw-r--r--sys-apps/dbus/dbus-1.6.4.ebuild191
-rw-r--r--sys-apps/dbus/files/dbus-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.patch234
6 files changed, 6 insertions, 995 deletions
diff --git a/sys-apps/dbus/ChangeLog b/sys-apps/dbus/ChangeLog
index 5c28fae95b00..c1e2dc4b0b52 100644
--- a/sys-apps/dbus/ChangeLog
+++ b/sys-apps/dbus/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-apps/dbus
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v 1.353 2012/09/29 16:26:19 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/ChangeLog,v 1.354 2012/09/29 16:28:50 ssuominen Exp $
+
+ 29 Sep 2012; Samuli Suominen <ssuominen@gentoo.org> -dbus-1.4.16.ebuild,
+ -dbus-1.6.0.ebuild, -dbus-1.6.4.ebuild, -dbus-1.6.4-r1.ebuild,
+ -files/dbus-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.patch:
+ old
*dbus-1.6.8 (29 Sep 2012)
diff --git a/sys-apps/dbus/dbus-1.4.16.ebuild b/sys-apps/dbus/dbus-1.4.16.ebuild
deleted file mode 100644
index f723d12ad630..000000000000
--- a/sys-apps/dbus/dbus-1.4.16.ebuild
+++ /dev/null
@@ -1,191 +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.4.16.ebuild,v 1.12 2012/08/25 22:36:01 vapier Exp $
-
-EAPI=2
-inherit autotools eutils multilib 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="|| ( 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}
- virtual/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
-
- # 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="--disable-asserts
- --disable-checks
- --disable-embedded-tests
- --disable-modular-tests
- $(use_with X x)
- $(use_enable debug verbose-mode)
- --disable-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
- --docdir=/usr/share/doc/${PF}
- --htmldir=/usr/share/doc/${PF}/html"
-
- 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 circ
- has_version dev-libs/dbus-glib && circ="--enable-modular-tests"
-
- 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 asserts) \
- ${circ}
- 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 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}"
- emake DESTDIR="${D}" install || die
-
- # 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 "${ROOT}"/var/lib/dbus/machine-id "${ROOT}"/etc/machine-id
- dbus-uuidgen --ensure="${ROOT}"/etc/machine-id
-}
diff --git a/sys-apps/dbus/dbus-1.6.0.ebuild b/sys-apps/dbus/dbus-1.6.0.ebuild
deleted file mode 100644
index 445f64c3a625..000000000000
--- a/sys-apps/dbus/dbus-1.6.0.ebuild
+++ /dev/null
@@ -1,188 +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.0.ebuild,v 1.1 2012/06/06 10:45:04 ssuominen 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"
-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-32 )
- 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=(
- --localstatedir=/var
- --docdir=/usr/share/doc/${PF}
- --htmldir=/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
-
- find "${ED}" -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 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
-}
diff --git a/sys-apps/dbus/dbus-1.6.4-r1.ebuild b/sys-apps/dbus/dbus-1.6.4-r1.ebuild
deleted file mode 100644
index cdc0221933c5..000000000000
--- a/sys-apps/dbus/dbus-1.6.4-r1.ebuild
+++ /dev/null
@@ -1,190 +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.4-r1.ebuild,v 1.1 2012/09/22 11:16:00 ssuominen 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"
-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 \
- "${FILESDIR}"/${PN}-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.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=(
- --localstatedir=/var
- --docdir=/usr/share/doc/${PF}
- --htmldir=/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
-}
-
-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
-}
diff --git a/sys-apps/dbus/dbus-1.6.4.ebuild b/sys-apps/dbus/dbus-1.6.4.ebuild
deleted file mode 100644
index cac582690204..000000000000
--- a/sys-apps/dbus/dbus-1.6.4.ebuild
+++ /dev/null
@@ -1,191 +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.4.ebuild,v 1.2 2012/09/22 11:16:00 ssuominen 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"
-IUSE="debug doc selinux static-libs systemd 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 \
- "${FILESDIR}"/${PN}-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.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() {
- # so we can get backtraces from apps
- append-flags -rdynamic
-
- local myconf=( --disable-systemd )
- if use systemd && has_version sys-apps/systemd; then
- myconf=( --enable-systemd )
- fi
-
- # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
- # not on an SELinux profile.
- myconf+=(
- --localstatedir=/var
- --docdir=/usr/share/doc/${PF}
- --htmldir=/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-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
-}
-
-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
-}
diff --git a/sys-apps/dbus/files/dbus-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.patch b/sys-apps/dbus/files/dbus-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.patch
deleted file mode 100644
index b449a70cee1c..000000000000
--- a/sys-apps/dbus/files/dbus-1.6.4-CVE-2012-3524-Don-t-access-environment-variables-or-.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From 450d975046bbd54271da62ce5fcbe50113f2e453 Mon Sep 17 00:00:00 2001
-From: Colin Walters <walters@verbum.org>
-Date: Wed, 22 Aug 2012 10:03:34 -0400
-Subject: [PATCH] CVE-2012-3524: Don't access environment variables or run
- dbus-launch when setuid
-
-This matches a corresponding change in GLib. See
-glib/gutils.c:g_check_setuid().
-
-Some programs attempt to use libdbus when setuid; notably the X.org
-server is shipped in such a configuration. libdbus never had an
-explicit policy about its use in setuid programs.
-
-I'm not sure whether we should advertise such support. However, given
-that there are real-world programs that do this currently, we can make
-them safer with not too much effort.
-
-Better to fix a problem caused by an interaction between two
-components in *both* places if possible.
-
-How to determine whether or not we're running in a privilege-escalated
-path is operating system specific. Note that GTK+'s code to check
-euid versus uid worked historically on Unix, more modern systems have
-filesystem capabilities and SELinux domain transitions, neither of
-which are captured by the uid comparison.
-
-On Linux/glibc, the way this works is that the kernel sets an
-AT_SECURE flag in the ELF auxiliary vector, and glibc looks for it on
-startup. If found, then glibc sets a public-but-undocumented
-__libc_enable_secure variable which we can use. Unfortunately, while
-it *previously* worked to check this variable, a combination of newer
-binutils and RPM break it:
-http://www.openwall.com/lists/owl-dev/2012/08/14/1
-
-So for now on Linux/glibc, we fall back to the historical Unix version
-until we get glibc fixed.
-
-On some BSD variants, there is a issetugid() function. On other Unix
-variants, we fall back to what GTK+ has been doing.
-
-Reported-by: Sebastian Krahmer <krahmer@suse.de>
-Signed-off-by: Colin Walters <walters@verbum.org>
----
- configure.ac | 2 +-
- dbus/dbus-keyring.c | 7 +++++
- dbus/dbus-sysdeps-unix.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++
- dbus/dbus-sysdeps-win.c | 6 ++++
- dbus/dbus-sysdeps.c | 5 ++++
- dbus/dbus-sysdeps.h | 1 +
- 6 files changed, 94 insertions(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index e2c9bdf..b0f2ec2 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -595,7 +595,7 @@ AC_DEFINE_UNQUOTED([DBUS_USE_SYNC], [$have_sync], [Use the gcc __sync extension]
- AC_SEARCH_LIBS(socket,[socket network])
- AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
-
--AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull)
-+AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll setlocale localeconv strtoll strtoull issetugid getresuid)
-
- AC_CHECK_HEADERS([syslog.h])
- if test "x$ac_cv_header_syslog_h" = "xyes"; then
-diff --git a/dbus/dbus-keyring.c b/dbus/dbus-keyring.c
-index 23b9df5..3b9ce31 100644
---- a/dbus/dbus-keyring.c
-+++ b/dbus/dbus-keyring.c
-@@ -717,6 +717,13 @@ _dbus_keyring_new_for_credentials (DBusCredentials *credentials,
- DBusCredentials *our_credentials;
-
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-+
-+ if (_dbus_check_setuid ())
-+ {
-+ dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
-+ "Unable to create DBus keyring when setuid");
-+ return NULL;
-+ }
-
- keyring = NULL;
- error_set = FALSE;
-diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
-index cef8bd3..b4ecc96 100644
---- a/dbus/dbus-sysdeps-unix.c
-+++ b/dbus/dbus-sysdeps-unix.c
-@@ -3434,6 +3434,13 @@ _dbus_get_autolaunch_address (const char *scope,
- DBusString uuid;
- dbus_bool_t retval;
-
-+ if (_dbus_check_setuid ())
-+ {
-+ dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
-+ "Unable to autolaunch when setuid");
-+ return FALSE;
-+ }
-+
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
- retval = FALSE;
-
-@@ -3551,6 +3558,13 @@ _dbus_lookup_launchd_socket (DBusString *socket_path,
-
- _DBUS_ASSERT_ERROR_IS_CLEAR (error);
-
-+ if (_dbus_check_setuid ())
-+ {
-+ dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
-+ "Unable to find launchd socket when setuid");
-+ return FALSE;
-+ }
-+
- i = 0;
- argv[i] = "launchctl";
- ++i;
-@@ -3591,6 +3605,13 @@ _dbus_lookup_session_address_launchd (DBusString *address, DBusError *error)
- dbus_bool_t valid_socket;
- DBusString socket_path;
-
-+ if (_dbus_check_setuid ())
-+ {
-+ dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
-+ "Unable to find launchd socket when setuid");
-+ return FALSE;
-+ }
-+
- if (!_dbus_string_init (&socket_path))
- {
- _DBUS_SET_OOM (error);
-@@ -4086,4 +4107,57 @@ _dbus_close_all (void)
- close (i);
- }
-
-+/**
-+ * **NOTE**: If you modify this function, please also consider making
-+ * the corresponding change in GLib. See
-+ * glib/gutils.c:g_check_setuid().
-+ *
-+ * Returns TRUE if the current process was executed as setuid (or an
-+ * equivalent __libc_enable_secure is available). See:
-+ * http://osdir.com/ml/linux.lfs.hardened/2007-04/msg00032.html
-+ */
-+dbus_bool_t
-+_dbus_check_setuid (void)
-+{
-+ /* TODO: get __libc_enable_secure exported from glibc.
-+ * See http://www.openwall.com/lists/owl-dev/2012/08/14/1
-+ */
-+#if 0 && defined(HAVE_LIBC_ENABLE_SECURE)
-+ {
-+ /* See glibc/include/unistd.h */
-+ extern int __libc_enable_secure;
-+ return __libc_enable_secure;
-+ }
-+#elif defined(HAVE_ISSETUGID)
-+ /* BSD: http://www.freebsd.org/cgi/man.cgi?query=issetugid&sektion=2 */
-+ return issetugid ();
-+#else
-+ uid_t ruid, euid, suid; /* Real, effective and saved user ID's */
-+ gid_t rgid, egid, sgid; /* Real, effective and saved group ID's */
-+
-+ static dbus_bool_t check_setuid_initialised;
-+ static dbus_bool_t is_setuid;
-+
-+ if (_DBUS_UNLIKELY (!check_setuid_initialised))
-+ {
-+#ifdef HAVE_GETRESUID
-+ if (getresuid (&ruid, &euid, &suid) != 0 ||
-+ getresgid (&rgid, &egid, &sgid) != 0)
-+#endif /* HAVE_GETRESUID */
-+ {
-+ suid = ruid = getuid ();
-+ sgid = rgid = getgid ();
-+ euid = geteuid ();
-+ egid = getegid ();
-+ }
-+
-+ check_setuid_initialised = TRUE;
-+ is_setuid = (ruid != euid || ruid != suid ||
-+ rgid != egid || rgid != sgid);
-+
-+ }
-+ return is_setuid;
-+#endif
-+}
-+
- /* tests in dbus-sysdeps-util.c */
-diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c
-index 397520a..bc4951b 100644
---- a/dbus/dbus-sysdeps-win.c
-+++ b/dbus/dbus-sysdeps-win.c
-@@ -3632,6 +3632,12 @@ _dbus_path_is_absolute (const DBusString *filename)
- return FALSE;
- }
-
-+dbus_bool_t
-+_dbus_check_setuid (void)
-+{
-+ return FALSE;
-+}
-+
- /** @} end of sysdeps-win */
- /* tests in dbus-sysdeps-util.c */
-
-diff --git a/dbus/dbus-sysdeps.c b/dbus/dbus-sysdeps.c
-index 861bfec..04fb8d7 100644
---- a/dbus/dbus-sysdeps.c
-+++ b/dbus/dbus-sysdeps.c
-@@ -182,6 +182,11 @@ _dbus_setenv (const char *varname,
- const char*
- _dbus_getenv (const char *varname)
- {
-+ /* Don't respect any environment variables if the current process is
-+ * setuid. This is the equivalent of glibc's __secure_getenv().
-+ */
-+ if (_dbus_check_setuid ())
-+ return NULL;
- return getenv (varname);
- }
-
-diff --git a/dbus/dbus-sysdeps.h b/dbus/dbus-sysdeps.h
-index 4052cda..eee9160 100644
---- a/dbus/dbus-sysdeps.h
-+++ b/dbus/dbus-sysdeps.h
-@@ -87,6 +87,7 @@ typedef struct DBusPipe DBusPipe;
-
- void _dbus_abort (void) _DBUS_GNUC_NORETURN;
-
-+dbus_bool_t _dbus_check_setuid (void);
- const char* _dbus_getenv (const char *varname);
- dbus_bool_t _dbus_setenv (const char *varname,
- const char *value);
---
-1.7.11.4
-