diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/dbus | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/dbus')
-rw-r--r-- | sys-apps/dbus/Manifest | 3 | ||||
-rw-r--r-- | sys-apps/dbus/dbus-1.8.16.ebuild | 248 | ||||
-rw-r--r-- | sys-apps/dbus/dbus-1.8.18.ebuild | 252 | ||||
-rw-r--r-- | sys-apps/dbus/dbus-1.8.20.ebuild | 252 | ||||
-rw-r--r-- | sys-apps/dbus/files/80-dbus | 13 | ||||
-rw-r--r-- | sys-apps/dbus/files/dbus.initd | 50 | ||||
-rw-r--r-- | sys-apps/dbus/metadata.xml | 14 |
7 files changed, 832 insertions, 0 deletions
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest new file mode 100644 index 000000000000..93b8c20642ad --- /dev/null +++ b/sys-apps/dbus/Manifest @@ -0,0 +1,3 @@ +DIST dbus-1.8.16.tar.gz 1866436 SHA256 7f795268efd343ff0498786acb35097564390d40b1b6158daf1b4f742b522b07 SHA512 79e0fb21912fe5644e1babf96fc2a64595edef6524ef50d54f6beb8cd0f1224b8484a52a7815494b40bd00bf048176002ab35443c0bb6bd04abdc3c60599f1d5 WHIRLPOOL 5e992caf51c0fb24885099b957ce01205a249118c5db27c5161e6d45ae85a889d7f26d32dfa03a207025e87e233f74c6cffd09a5ccc44d4e598d3d535b8d4247 +DIST dbus-1.8.18.tar.gz 1868625 SHA256 36f2eb9c777a3c71562573da36a147e900a642afcd44d2b0470d992a4898c4f2 SHA512 4995246af3f940b939231a4af6ba743902e1260e1d1cca607d5b36c1cda4e5b1d586dd99e2b45c5058e04cf49e81217c68395fb1b22302438d9acb6a08e7d82e WHIRLPOOL 294ce01e260928388d2ac78e46bb00bc1305486ed11a19fa457d2581845ad15e64ae229ce8b778a3835722a1520ec234b0b8c7691cb3f98744181b652cf14a3c +DIST dbus-1.8.20.tar.gz 1871722 SHA256 5c4fbf4c64621c96e871da91d2b729a5b00536e116d3c4612a469d924b1b703a SHA512 d63c29267e0445e329dc811e72d7858847fbae260920fd359b1fa889f08dead2a8b380e372718994daa92a262af970d1fcc58034fbcb8ffb3026ab5f30f63067 WHIRLPOOL 9eaf3ab12396159e119cfe3435fc5d160440dab4c4abce4d506450f6db59b72e6e4feba43b1ee9fd304a8e514983186a8e61f3a1f0c917c2c72891f72167201e diff --git a/sys-apps/dbus/dbus-1.8.16.ebuild b/sys-apps/dbus/dbus-1.8.16.ebuild new file mode 100644 index 000000000000..1bba9db1416d --- /dev/null +++ b/sys-apps/dbus/dbus-1.8.16.ebuild @@ -0,0 +1,248 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo systemd virtualx user multilib-minimal + +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 arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="debug doc selinux static-libs systemd test X" + +CDEPEND=">=dev-libs/expat-2 + selinux? ( + sys-libs/libselinux + ) + systemd? ( sys-apps/systemd:0= ) + X? ( + x11-libs/libX11 + x11-libs/libXt + ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20131008-r4 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +DEPEND="${CDEPEND} + app-text/xmlto + app-text/docbook-xml-dtd:4.4 + virtual/pkgconfig + doc? ( app-doc/doxygen ) + test? ( + >=dev-libs/glib-2.24 + ${PYTHON_DEPS} + )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-dbus ) +" + +DOC_CONTENTS=" + Some applications require a session bus in addition to the system + bus. Please see \`man dbus-launch\` for more information. +" + +# out of sources build dir for make check +TBD=${WORKDIR}/${P}-tests-build + +pkg_setup() { + enewgroup messagebus + enewuser messagebus -1 -1 -1 messagebus + + use test && python-any-r1_pkg_setup + + if use kernel_linux; then + CONFIG_CHECK="~EPOLL" + linux-info_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_user + + # required for asneeded patch but also for bug 263909, cross-compile so + # don't remove eautoreconf + eautoreconf +} + +multilib_src_configure() { + local docconf myconf + + # so we can get backtraces from apps + case ${CHOST} in + *-mingw*) + # error: unrecognized command line option '-rdynamic' wrt #488036 + ;; + *) + append-flags -rdynamic + ;; + esac + + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if + # not on an SELinux profile. + myconf=( + --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-session-socket-dir="${EPREFIX}"/tmp + --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket + --with-dbus-user=messagebus + $(use_with X x) + "$(systemd_with_unitdir)" + ) + + if [[ ${CHOST} == *-darwin* ]]; then + myconf+=( + --enable-launchd + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents + ) + fi + + if multilib_is_native_abi; then + docconf=( + --enable-xml-docs + $(use_enable doc doxygen-docs) + ) + else + docconf=( + --disable-xml-docs + --disable-doxygen-docs + ) + myconf+=( + --disable-selinux + --disable-libaudit + --disable-systemd + --without-x + + # expat is used for the daemon only + # fake the check for multilib library build + ac_cv_lib_expat_XML_ParserCreate_MM=yes + ) + fi + + einfo "Running configure in ${BUILD_DIR}" + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}" + + if multilib_is_native_abi && use test; then + mkdir "${TBD}" || die + cd "${TBD}" || die + 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 +} + +multilib_src_compile() { + if multilib_is_native_abi; then + # after the compile, it uses a selinuxfs interface to + # check if the SELinux policy has the right support + use selinux && addwrite /selinux/access + + einfo "Running make in ${BUILD_DIR}" + emake + + if use test; then + einfo "Running make in ${TBD}" + emake -C "${TBD}" + fi + else + emake -C dbus libdbus-1.la + fi +} + +src_test() { + DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + else + emake DESTDIR="${D}" install-pkgconfigDATA + emake DESTDIR="${D}" -C dbus \ + install-libLTLIBRARIES install-dbusincludeHEADERS \ + install-nodist_dbusarchincludeHEADERS + fi +} + +multilib_src_install_all() { + 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 + # let the init script create the /var/run/dbus directory + rm -rf "${ED}"/var/run + + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO + readme.gentoo_create_doc + + prune_libtool_files --all +} + +pkg_postinst() { + readme.gentoo_print_elog + + # 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 + + if [[ ${CHOST} == *-darwin* ]]; then + local plist="org.freedesktop.dbus-session.plist" + elog + elog + elog "For MacOS/Darwin we now ship launchd support for dbus." + elog "This enables autolaunch of dbus at session login and makes" + elog "dbus usable under MacOS/Darwin." + elog + elog "The launchd plist file ${plist} has been" + elog "installed in ${EPREFIX}/Library/LaunchAgents." + elog "For it to be used, you will have to do all of the following:" + elog " + cd ~/Library/LaunchAgents" + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}" + elog " + logout and log back in" + elog + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS" + elog "specified and refused to start otherwise, then export the" + elog "the following to your environment:" + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\"" + fi +} diff --git a/sys-apps/dbus/dbus-1.8.18.ebuild b/sys-apps/dbus/dbus-1.8.18.ebuild new file mode 100644 index 000000000000..824ceb85a73f --- /dev/null +++ b/sys-apps/dbus/dbus-1.8.18.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo systemd virtualx user multilib-minimal + +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 ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="debug doc selinux static-libs systemd test X" + +CDEPEND=" + >=dev-libs/expat-2 + selinux? ( + sys-libs/libselinux + ) + systemd? ( sys-apps/systemd:0= ) + X? ( + x11-libs/libX11 + x11-libs/libXt + ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20131008-r4 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ) +" +DEPEND="${CDEPEND} + app-text/xmlto + app-text/docbook-xml-dtd:4.4 + virtual/pkgconfig + doc? ( app-doc/doxygen ) + test? ( + >=dev-libs/glib-2.24:2 + ${PYTHON_DEPS} + ) +" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-dbus ) +" + +DOC_CONTENTS=" + Some applications require a session bus in addition to the system + bus. Please see \`man dbus-launch\` for more information. +" + +# out of sources build dir for make check +TBD=${WORKDIR}/${P}-tests-build + +pkg_setup() { + enewgroup messagebus + enewuser messagebus -1 -1 -1 messagebus + + use test && python-any-r1_pkg_setup + + if use kernel_linux; then + CONFIG_CHECK="~EPOLL" + linux-info_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_user + + # required for asneeded patch but also for bug 263909, cross-compile so + # don't remove eautoreconf + eautoreconf +} + +multilib_src_configure() { + local docconf myconf + + # so we can get backtraces from apps + case ${CHOST} in + *-mingw*) + # error: unrecognized command line option '-rdynamic' wrt #488036 + ;; + *) + append-flags -rdynamic + ;; + esac + + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if + # not on an SELinux profile. + myconf=( + --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-session-socket-dir="${EPREFIX}"/tmp + --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket + --with-dbus-user=messagebus + $(use_with X x) + "$(systemd_with_unitdir)" + ) + + if [[ ${CHOST} == *-darwin* ]]; then + myconf+=( + --enable-launchd + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents + ) + fi + + if multilib_is_native_abi; then + docconf=( + --enable-xml-docs + $(use_enable doc doxygen-docs) + ) + else + docconf=( + --disable-xml-docs + --disable-doxygen-docs + ) + myconf+=( + --disable-selinux + --disable-libaudit + --disable-systemd + --without-x + + # expat is used for the daemon only + # fake the check for multilib library build + ac_cv_lib_expat_XML_ParserCreate_MM=yes + ) + fi + + einfo "Running configure in ${BUILD_DIR}" + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}" + + if multilib_is_native_abi && use test; then + mkdir "${TBD}" || die + cd "${TBD}" || die + 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 +} + +multilib_src_compile() { + if multilib_is_native_abi; then + # after the compile, it uses a selinuxfs interface to + # check if the SELinux policy has the right support + use selinux && addwrite /selinux/access + + einfo "Running make in ${BUILD_DIR}" + emake + + if use test; then + einfo "Running make in ${TBD}" + emake -C "${TBD}" + fi + else + emake -C dbus libdbus-1.la + fi +} + +src_test() { + DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + else + emake DESTDIR="${D}" install-pkgconfigDATA + emake DESTDIR="${D}" -C dbus \ + install-libLTLIBRARIES install-dbusincludeHEADERS \ + install-nodist_dbusarchincludeHEADERS + fi +} + +multilib_src_install_all() { + 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 + # let the init script create the /var/run/dbus directory + rm -rf "${ED}"/var/run + + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO + readme.gentoo_create_doc + + prune_libtool_files --all +} + +pkg_postinst() { + readme.gentoo_print_elog + + # 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 + + if [[ ${CHOST} == *-darwin* ]]; then + local plist="org.freedesktop.dbus-session.plist" + elog + elog + elog "For MacOS/Darwin we now ship launchd support for dbus." + elog "This enables autolaunch of dbus at session login and makes" + elog "dbus usable under MacOS/Darwin." + elog + elog "The launchd plist file ${plist} has been" + elog "installed in ${EPREFIX}/Library/LaunchAgents." + elog "For it to be used, you will have to do all of the following:" + elog " + cd ~/Library/LaunchAgents" + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}" + elog " + logout and log back in" + elog + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS" + elog "specified and refused to start otherwise, then export the" + elog "the following to your environment:" + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\"" + fi +} diff --git a/sys-apps/dbus/dbus-1.8.20.ebuild b/sys-apps/dbus/dbus-1.8.20.ebuild new file mode 100644 index 000000000000..824ceb85a73f --- /dev/null +++ b/sys-apps/dbus/dbus-1.8.20.ebuild @@ -0,0 +1,252 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit autotools eutils linux-info flag-o-matic python-any-r1 readme.gentoo systemd virtualx user multilib-minimal + +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 ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="debug doc selinux static-libs systemd test X" + +CDEPEND=" + >=dev-libs/expat-2 + selinux? ( + sys-libs/libselinux + ) + systemd? ( sys-apps/systemd:0= ) + X? ( + x11-libs/libX11 + x11-libs/libXt + ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20131008-r4 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ) +" +DEPEND="${CDEPEND} + app-text/xmlto + app-text/docbook-xml-dtd:4.4 + virtual/pkgconfig + doc? ( app-doc/doxygen ) + test? ( + >=dev-libs/glib-2.24:2 + ${PYTHON_DEPS} + ) +" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-dbus ) +" + +DOC_CONTENTS=" + Some applications require a session bus in addition to the system + bus. Please see \`man dbus-launch\` for more information. +" + +# out of sources build dir for make check +TBD=${WORKDIR}/${P}-tests-build + +pkg_setup() { + enewgroup messagebus + enewuser messagebus -1 -1 -1 messagebus + + use test && python-any-r1_pkg_setup + + if use kernel_linux; then + CONFIG_CHECK="~EPOLL" + linux-info_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_user + + # required for asneeded patch but also for bug 263909, cross-compile so + # don't remove eautoreconf + eautoreconf +} + +multilib_src_configure() { + local docconf myconf + + # so we can get backtraces from apps + case ${CHOST} in + *-mingw*) + # error: unrecognized command line option '-rdynamic' wrt #488036 + ;; + *) + append-flags -rdynamic + ;; + esac + + # libaudit is *only* used in DBus wrt SELinux support, so disable it, if + # not on an SELinux profile. + myconf=( + --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-session-socket-dir="${EPREFIX}"/tmp + --with-system-pid-file="${EPREFIX}"/var/run/dbus.pid + --with-system-socket="${EPREFIX}"/var/run/dbus/system_bus_socket + --with-dbus-user=messagebus + $(use_with X x) + "$(systemd_with_unitdir)" + ) + + if [[ ${CHOST} == *-darwin* ]]; then + myconf+=( + --enable-launchd + --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents + ) + fi + + if multilib_is_native_abi; then + docconf=( + --enable-xml-docs + $(use_enable doc doxygen-docs) + ) + else + docconf=( + --disable-xml-docs + --disable-doxygen-docs + ) + myconf+=( + --disable-selinux + --disable-libaudit + --disable-systemd + --without-x + + # expat is used for the daemon only + # fake the check for multilib library build + ac_cv_lib_expat_XML_ParserCreate_MM=yes + ) + fi + + einfo "Running configure in ${BUILD_DIR}" + ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}" + + if multilib_is_native_abi && use test; then + mkdir "${TBD}" || die + cd "${TBD}" || die + 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 +} + +multilib_src_compile() { + if multilib_is_native_abi; then + # after the compile, it uses a selinuxfs interface to + # check if the SELinux policy has the right support + use selinux && addwrite /selinux/access + + einfo "Running make in ${BUILD_DIR}" + emake + + if use test; then + einfo "Running make in ${TBD}" + emake -C "${TBD}" + fi + else + emake -C dbus libdbus-1.la + fi +} + +src_test() { + DBUS_VERBOSE=1 Xemake -j1 -C "${TBD}" check +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake DESTDIR="${D}" install + else + emake DESTDIR="${D}" install-pkgconfigDATA + emake DESTDIR="${D}" -C dbus \ + install-libLTLIBRARIES install-dbusincludeHEADERS \ + install-nodist_dbusarchincludeHEADERS + fi +} + +multilib_src_install_all() { + 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 + # let the init script create the /var/run/dbus directory + rm -rf "${ED}"/var/run + + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO + readme.gentoo_create_doc + + prune_libtool_files --all +} + +pkg_postinst() { + readme.gentoo_print_elog + + # 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 + + if [[ ${CHOST} == *-darwin* ]]; then + local plist="org.freedesktop.dbus-session.plist" + elog + elog + elog "For MacOS/Darwin we now ship launchd support for dbus." + elog "This enables autolaunch of dbus at session login and makes" + elog "dbus usable under MacOS/Darwin." + elog + elog "The launchd plist file ${plist} has been" + elog "installed in ${EPREFIX}/Library/LaunchAgents." + elog "For it to be used, you will have to do all of the following:" + elog " + cd ~/Library/LaunchAgents" + elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}" + elog " + logout and log back in" + elog + elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS" + elog "specified and refused to start otherwise, then export the" + elog "the following to your environment:" + elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\"" + fi +} diff --git a/sys-apps/dbus/files/80-dbus b/sys-apps/dbus/files/80-dbus new file mode 100644 index 000000000000..5593e2cd7390 --- /dev/null +++ b/sys-apps/dbus/files/80-dbus @@ -0,0 +1,13 @@ +#!/bin/bash + +# launches a session dbus instance + +dbuslaunch="`which dbus-launch 2>/dev/null`" +if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + if [ -n "$command" ]; then + command="$dbuslaunch --exit-with-session $command" + else + eval `$dbuslaunch --sh-syntax --exit-with-session` + fi +fi + diff --git a/sys-apps/dbus/files/dbus.initd b/sys-apps/dbus/files/dbus.initd new file mode 100644 index 000000000000..58838ccb1796 --- /dev/null +++ b/sys-apps/dbus/files/dbus.initd @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Id$ + +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} +} diff --git a/sys-apps/dbus/metadata.xml b/sys-apps/dbus/metadata.xml new file mode 100644 index 000000000000..70f327cffe8b --- /dev/null +++ b/sys-apps/dbus/metadata.xml @@ -0,0 +1,14 @@ +<?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> + <upstream> + <remote-id type="cpe">cpe:/a:freedesktop:dbus</remote-id> + </upstream> +</pkgmetadata> |