Merge pull request #150 from marineam/systemd

Systemd/init/profile updates
This commit is contained in:
Michael Marineau 2013-08-04 14:15:18 -07:00
commit ae96378bfa
48 changed files with 65 additions and 3939 deletions

View File

@ -140,7 +140,7 @@ USE_EXPAND_HIDDEN="${USE_EXPAND_HIDDEN} CROS_WORKON_TREE"
# Extra use flags for Core OS SDK (and possibly targets) # Extra use flags for Core OS SDK (and possibly targets)
# Previously defined in make.conf # Previously defined in make.conf
USE="${USE} hardened cros_host pic pie expat -introspection -cups -openrc" USE="${USE} hardened cros_host pic pie expat -introspection -cups"
# Enable bindist for both SDK and targets # Enable bindist for both SDK and targets
USE="${USE} bindist" USE="${USE} bindist"

View File

@ -64,12 +64,6 @@
=sys-devel/llvm-3.2 ~amd64 =sys-devel/llvm-3.2 ~amd64
=dev-python/pyusb-1.0.0_alpha3 ~amd64 =dev-python/pyusb-1.0.0_alpha3 ~amd64
# Accept the unstable nature of systemd
=sys-apps/systemd-197-r1 ~amd64
=sys-apps/systemd-204 ~amd64
=sys-apps/systemd-sysv-utils-194 ~amd64
=sys-apps/dbus-1.6.8-r1 ~amd64
# Get updated core code # Get updated core code
=sys-auth/pam_pwdfile-0.99-r1 ~amd64 =sys-auth/pam_pwdfile-0.99-r1 ~amd64
=net-misc/tlsdate-0.0.5 ~amd64 =net-misc/tlsdate-0.0.5 ~amd64
@ -95,7 +89,6 @@
# Everything needed for the boot engine # Everything needed for the boot engine
>=sys-apps/kexec-tools-2.0.4-r1 ~amd64 >=sys-apps/kexec-tools-2.0.4-r1 ~amd64
>=sys-kernel/dracut-027-r3 ~amd64 >=sys-kernel/dracut-027-r3 ~amd64
=sys-apps/sysvinit-tools-2.88-r4 ~amd64
# Needed for docker # Needed for docker
=sys-fs/aufs-util-3.7.6 ~amd64 =sys-fs/aufs-util-3.7.6 ~amd64

View File

@ -5,7 +5,3 @@
# even a simple mta (like ssmtp). http://crosbug.com/5777 # even a simple mta (like ssmtp). http://crosbug.com/5777
mail-mta/ssmtp-2.64 mail-mta/ssmtp-2.64
net-mail/mailbase-1 net-mail/mailbase-1
# Ideally baselayout should have a use flag to select between openrc
# and systemd but this works in the mean time.
sys-apps/openrc-9999

View File

@ -1 +0,0 @@
=sys-apps/systemd-sysv-utils-194

View File

@ -0,0 +1 @@
../../features/systemd

View File

@ -0,0 +1 @@
USE="systemd"

View File

@ -0,0 +1,9 @@
sys-apps/systemd ~amd64 ~x86
sys-apps/systemd-ui ~amd64 ~x86
sys-apps/systemd-sysv-utils ~amd64 ~x86
sys-apps/efunctions ~amd64 ~x86
# Various dependencies that also need to be up-to-date
sys-apps/hwids ~amd64 ~x86
sys-apps/kmod ~amd64 ~x86
virtual/udev ~amd64 ~x86

View File

@ -0,0 +1,4 @@
# Mask sysvinit+openrc and runit+openrc in favor of systemd
sys-apps/sysvinit
sys-apps/openrc
sys-process/runit

View File

@ -0,0 +1,3 @@
sys-apps/systemd
sys-apps/systemd-ui
sys-apps/systemd-sysv-utils

View File

@ -0,0 +1,2 @@
# Add systemd to the 'system' set
*sys-apps/systemd

View File

@ -0,0 +1,2 @@
sys-apps/dbus
sys-apps/efunctions

View File

@ -0,0 +1,2 @@
openrc
-systemd

View File

@ -64,10 +64,8 @@
=sys-apps/i2c-tools-3.0.2 amd64 arm x86 =sys-apps/i2c-tools-3.0.2 amd64 arm x86
=sys-apps/keyutils-1.1 amd64 arm x86 =sys-apps/keyutils-1.1 amd64 arm x86
=sys-apps/net-tools-1.60_p20090728014017-r1 amd64 arm x86 =sys-apps/net-tools-1.60_p20090728014017-r1 amd64 arm x86
=sys-apps/openrc-0.4.3-r4 amd64 arm x86
=sys-apps/rescan-scsi-bus-1.29 amd64 arm x86 =sys-apps/rescan-scsi-bus-1.29 amd64 arm x86
=sys-apps/sg3_utils-1.27.20090411 amd64 arm x86 =sys-apps/sg3_utils-1.27.20090411 amd64 arm x86
=sys-apps/sysvinit-2.86-r12 amd64 arm x86
=sys-apps/usbutils-0.86-r1 amd64 arm x86 =sys-apps/usbutils-0.86-r1 amd64 arm x86
=sys-apps/util-linux-2.16.1 amd64 arm x86 =sys-apps/util-linux-2.16.1 amd64 arm x86
=sys-auth/consolekit-0.3.0-r3 amd64 arm x86 =sys-auth/consolekit-0.3.0-r3 amd64 arm x86
@ -79,7 +77,6 @@
=sys-fs/avfs-1.0.0 amd64 arm x86 =sys-fs/avfs-1.0.0 amd64 arm x86
=sys-fs/lvm2-2.02.73-r1 amd64 arm x86 =sys-fs/lvm2-2.02.73-r1 amd64 arm x86
=sys-fs/squashfs-4.2 amd64 arm x86 =sys-fs/squashfs-4.2 amd64 arm x86
=sys-fs/udev-171-r2 amd64 arm x86
=sys-block/btrace-1.0.0 amd64 arm x86 =sys-block/btrace-1.0.0 amd64 arm x86
=x11-libs/libdrm-2.4.24 amd64 arm x86 =x11-libs/libdrm-2.4.24 amd64 arm x86
=sys-libs/libhx-3.1 amd64 arm x86 =sys-libs/libhx-3.1 amd64 arm x86

View File

@ -50,7 +50,7 @@ net-wireless/bluez-test alsa -consolekit -readline test-programs
net-wireless/wpa_supplicant dbus debug -readline ssl net-wireless/wpa_supplicant dbus debug -readline ssl
sci-geosciences/gpsd -python -ntp -X dbus garmin minimal ocean tntc usb -sockets sci-geosciences/gpsd -python -ntp -X dbus garmin minimal ocean tntc usb -sockets
sys-apps/busybox -pam -selinux sys-apps/busybox -pam -selinux
sys-apps/dbus -X sys-apps/dbus -X -systemd
sys-apps/iproute2 ipv6 sys-apps/iproute2 ipv6
# mosys: crosbug.com/p/11630 # mosys: crosbug.com/p/11630
sys-apps/mosys static sys-apps/mosys static
@ -60,7 +60,6 @@ sys-auth/polkit -introspection
sys-block/parted device-mapper sys-block/parted device-mapper
sys-fs/lvm2 -lvm1 -readline -static -thin sys-fs/lvm2 -lvm1 -readline -static -thin
sys-fs/ntfs3g -crypt -external-fuse ntfsprogs suid sys-fs/ntfs3g -crypt -external-fuse ntfsprogs suid
sys-fs/udev -devfs-compat -rule_generator hwdb acl gudev
sys-fs/squashfs lzo sys-fs/squashfs lzo
sys-libs/gdbm -berkdb sys-libs/gdbm -berkdb
sys-libs/ncurses minimal sys-libs/ncurses minimal

View File

@ -2,6 +2,7 @@
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.2.ebuild,v 1.14 2013/05/20 17:56:20 ago Exp $ # $Header: /var/cvsroot/gentoo-x86/sys-apps/baselayout/baselayout-2.2.ebuild,v 1.14 2013/05/20 17:56:20 ago Exp $
EAPI=1
inherit eutils multilib inherit eutils multilib
DESCRIPTION="Filesystem baselayout and init scripts" DESCRIPTION="Filesystem baselayout and init scripts"
@ -12,9 +13,10 @@ SRC_URI="mirror://gentoo/${P}.tar.bz2
LICENSE="GPL-2" LICENSE="GPL-2"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
IUSE="build kernel_linux" IUSE="build kernel_linux +openrc"
PDEPEND="sys-apps/openrc" PDEPEND="openrc? ( sys-apps/openrc )
!openrc? ( sys-apps/efunctions )"
pkg_setup() { pkg_setup() {
multilib_layout multilib_layout

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>

View File

@ -1,5 +0,0 @@
AUX README 295 SHA256 f842d28cd3372d4b96588dd4b6242901a20df404d0a84c9f0e01ce79790d9027 SHA512 be439cc96a7c99e14ac7c7e4c1bbad3857e2147f8896acc991a428e0f7c927090617d69d43ea43a953d9e8637fa1f8b6ed6358a03d85de3f0059d036697eeeb9 WHIRLPOOL da680781443eec7a0e39ca4f1e02d253d0a4ab71d36ae878208ea09cc67cb016bd98addc886280be6237b519fddcabd4a7bf4c659b28d38f45bf9364a354fb79
AUX sysvinit-2.88-makefile.patch 1545 SHA256 34d6ee50be139ad08b620569df11ac6a4cdf3dae737733dda21a716c4064c194 SHA512 d19e260902f69dd19bfaa4f3e415a816388663a7f89b9d102b27f44c5f2d0654b64ab2e5689a20a3975ff0801e4fb96ef7b6737bfb4ba9466ec58c477de322aa WHIRLPOOL bba46046a59969ac2007c3c932bf07646a5ebece72a216990c185b8eeead724e88cd349219ae528060b9c71a5df97d1e3221691cdbb77e16c9522014c836a76d
AUX sysvinit-2.88-selinux.patch 1041 SHA256 e987ab6e478e5b3987ae1c6e338cfc66ae356f704d0c3ea932f9e4335b4986f0 SHA512 46eeb3ab2dd25f314b9f60b2dc8a7da2aa2aafb978953a730ccc36456d240e317930e86df69ce2592cf45978f3307dfc2522b24ae1158e64ff17dfa6ed84dcb8 WHIRLPOOL 4fe319df09759addf9499367a6da47e8effe93ec0a4ba5b7e7b1d0c746b324a303cdc81eb360c81e529faf41260d69e2b4364d6695b390db9dba1e3d1693c872
DIST sysvinit-2.88dsf.tar.bz2 105551 SHA256 60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519 SHA512 0bd8eeb124e84fdfa8e621b05f796804ee69a9076b65f5115826bfa814ac1d5d28d31a5c22ebe77c86a93b2288edf4891adc0afaecc4de656c4ecda8a83807bf WHIRLPOOL f4809e19ea2c72c733d3c09a4964d7a6e67b091d1f1d9ef276515b2f138148bfbf516034d3fb1009289f9520f2fbe9e29687f432bba06fb437ebd6e2b9ef570c
EBUILD sysvinit-tools-2.88-r4.ebuild 1759 SHA256 09f4ca7c8114782e8de706e7d1f8545f93464df3cae573abccd0e9b24007ee4a SHA512 983eda068ba0bd91b5640951ed34688eda70e32d486bce351d5434cdadc113826ff418f64051a37a0dd223427dafe426eb140c49466b867ae7ea98c6019e5b71 WHIRLPOOL 2eeb14a42fd7c81ce5b40a65a196a162bd10f2da7b06cee156fa3c4604e1bdab234322e8da3ddc004492b501659853d475ad0498983af58bff9709dbebbacd75

View File

@ -1,13 +0,0 @@
This is a stripped down version of sysvinit which only
installs the following programs:
/usr/bin/last
/usr/bin/mesg
/usr/bin/wall
/usr/bin/lastb
/sbin/killall5
/sbin/fstab-decode
/bin/pidof
It is made with the only purpose of having a system
with only systemd installed. Use at your own risk.

View File

@ -1,60 +0,0 @@
http://savannah.nongnu.org/bugs/index.php?29758
From 2b7d90f04cdd0e343f413c5c7672615926c02706 Mon Sep 17 00:00:00 2001
From: wfink <wfink@456724a4-4300-0410-8514-c89748c515a2>
Date: Tue, 4 May 2010 07:50:12 +0000
Subject: [PATCH] Fix sysvinit bug #29758
git-svn-id: svn://svn.sv.gnu.org/sysvinit/sysvinit/trunk@87 456724a4-4300-0410-8514-c89748c515a2
diff --git a/src/Makefile b/src/Makefile
index e2b8028..19675c5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -92,9 +92,9 @@ all: $(BIN) $(SBIN) $(USRBIN)
init: LDLIBS += $(INITLIBS) $(STATIC)
init: init.o init_utmp.o
-halt: halt.o ifdown.o hddown.o utmp.o reboot.h
+halt: halt.o ifdown.o hddown.o utmp.o
-last: last.o oldutmp.h
+last: last.o
mesg: mesg.o
@@ -109,7 +109,7 @@ sulogin: sulogin.o
wall: dowall.o wall.o
-shutdown: dowall.o shutdown.o utmp.o reboot.h
+shutdown: dowall.o shutdown.o utmp.o
bootlogd: LDLIBS += -lutil
bootlogd: bootlogd.o
@@ -118,14 +118,22 @@ sulogin.o: CPPFLAGS += $(SELINUX_DEF)
sulogin.o: sulogin.c
init.o: CPPFLAGS += $(SELINUX_DEF)
-init.o: init.c init.h set.h reboot.h initreq.h
+init.o: init.c init.h initreq.h paths.h reboot.h set.h
-utmp.o: utmp.c init.h
+utmp.o:
init_utmp.o: CPPFLAGS += -DINIT_MAIN
-init_utmp.o: utmp.c init.h
+init_utmp.o: utmp.c init.h initreq.h paths.h
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+utmpdump.o: utmpdump.c oldutmp.h
+
+shutdown.o: shutdown.c paths.h reboot.h initreq.h init.h
+
+halt.o: halt.c reboot.h
+
+last.o: last.c oldutmp.h
+
cleanobjs:
rm -f *.o *.bak

View File

@ -1,38 +0,0 @@
http://svn.savannah.nongnu.org/viewvc?view=rev&root=sysvinit&revision=90
https://bugs.gentoo.org/326697
--- sysvinit/trunk/src/init.c 2010/05/07 15:16:26 89
+++ sysvinit/trunk/src/init.c 2010/05/17 09:44:34 90
@@ -54,10 +54,6 @@
#ifdef WITH_SELINUX
# include <selinux/selinux.h>
-# include <sys/mount.h>
-# ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */
-# define MNT_DETACH 2
-# endif
#endif
#ifdef __i386__
@@ -2872,11 +2868,9 @@
#ifdef WITH_SELINUX
if (getenv("SELINUX_INIT") == NULL) {
- const int rc = mount("proc", "/proc", "proc", 0, 0);
- if (is_selinux_enabled() > 0) {
- putenv("SELINUX_INIT=YES");
- if (rc == 0) umount2("/proc", MNT_DETACH);
+ if (is_selinux_enabled() != 1) {
if (selinux_init_load_policy(&enforce) == 0) {
+ putenv("SELINUX_INIT=YES");
execv(myname, argv);
} else {
if (enforce > 0) {
@@ -2887,7 +2881,6 @@
}
}
}
- if (rc == 0) umount2("/proc", MNT_DETACH);
}
#endif
/* Start booting. */

View File

@ -1,70 +0,0 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils toolchain-funcs flag-o-matic
MY_PN="sysvinit"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="/sbin/init - parent of all processes"
HOMEPAGE="http://savannah.nongnu.org/projects/sysvinit"
SRC_URI="mirror://nongnu/${MY_PN}/${MY_P}dsf.tar.bz2"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="selinux ibm static"
RDEPEND="selinux? ( >=sys-libs/libselinux-1.28 )"
DEPEND="${RDEPEND}
virtual/os-headers
!sys-apps/sysvinit"
ONLY_INSTALL_REGEXP="last\\|mesg\\|wall\\|lastb\\|killall5\\|fstab-decode\\|pidof"
S=${WORKDIR}/${MY_P}dsf
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${MY_P}-makefile.patch #319197
epatch "${FILESDIR}"/${MY_P}-selinux.patch #326697
sed -i '/^CPPFLAGS =$/d' src/Makefile
}
src_compile() {
local myconf
tc-export CC
append-lfs-flags
use static && append-ldflags -static
use selinux && myconf=WITH_SELINUX=yes
emake -C src ${myconf} || die
}
src_install() {
emake -C src install ROOT="${D}" || die
find "${D}" -xtype f | grep -v "${ONLY_INSTALL_REGEXP}" | xargs /bin/rm -f
rmdir "${D}"/usr/include
rmdir "${D}"/usr/share/man/man5
dodoc "${FILESDIR}"/README
}
pkg_postinst() {
ewarn "This is an stripped down version of sysvinit which only"
ewarn "installs the following programs:"
ewarn ""
ewarn "/usr/bin/last"
ewarn "/usr/bin/mesg"
ewarn "/usr/bin/wall"
ewarn "/usr/bin/lastb"
ewarn "/sbin/killall5"
ewarn "/sbin/fstab-decode"
ewarn "/bin/pidof"
ewarn ""
ewarn "See: https://bugs.gentoo.org/show_bug.cgi?id=399615"
ewarn ""
ewarn "It is not guaranteed to work, and it will probably eat"
ewarn "your system and make it unusable. Use at your own risk."
}

View File

@ -1 +1 @@
DIST dracut-029.tar.bz2 259163 SHA256 f32f9deb42a03878d96a06a1b365ea26cc46345fc55631502ee2f68a4c6271b9 SHA512 0b68ab67e1b9cf98b7f4fdc29e73e68495077cd7c127c6d732e5f9c26a1312c48323ce3e9595e4d08b0d6766438cda425d04bded1286b70725b53c781e572c96 WHIRLPOOL 877f6dea157e7d6435ac983121fc8e69823960a173420a3e4eb448fe95de7f0bd69d48c17090fcf99d8bafc2bf35e30fd3723fddc481512d579f93e44c06c3a8 DIST dracut-031.tar.bz2 260601 SHA256 a62fd3d22600adc0f370d2eff474f9aec51bc3dfb2be619647f258a9805bbb77 SHA512 ddde1279cff61b6fd8567f5e21b5f8d95e935e42520a342960432749c6a085637a5e049e6fd121d491727aea3b35af59e86c8b80e55180f3b5e496aff2b6eb23 WHIRLPOOL 46c9d2a3717fd8c36aac269a213a433f6534b2a547e0b23a31ffca9a4101c69c7253358fccb8a55a0ab9b19d4c4218eb902c49a6cc0fc08c48e3cd70c40eebc2

View File

@ -1,10 +1,10 @@
# Copyright 1999-2013 Gentoo Foundation # Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-027-r3.ebuild,v 1.1 2013/05/20 18:22:56 aidecoe Exp $ # $Header: /var/cvsroot/gentoo-x86/sys-kernel/dracut/dracut-031.ebuild,v 1.1 2013/08/03 21:07:51 aidecoe Exp $
EAPI=4 EAPI=4
inherit eutils linux-info systemd inherit bash-completion-r1 eutils linux-info systemd
add_req_use_for() { add_req_use_for() {
local dep="$1"; shift local dep="$1"; shift
@ -71,11 +71,9 @@ CDEPEND="virtual/udev
RDEPEND="${CDEPEND} RDEPEND="${CDEPEND}
app-arch/cpio app-arch/cpio
>=app-shells/bash-4.0 >=app-shells/bash-4.0
>=app-shells/dash-0.5.4.11
>=sys-apps/baselayout-1.12.14-r1 >=sys-apps/baselayout-1.12.14-r1
|| ( >=sys-apps/module-init-tools-3.8 >sys-apps/kmod-5[tools] ) >sys-apps/kmod-5[tools]
>=sys-apps/util-linux-2.21 >=sys-apps/util-linux-2.21
sys-apps/sysvinit-tools
virtual/pkgconfig virtual/pkgconfig
debug? ( dev-util/strace ) debug? ( dev-util/strace )
@ -172,14 +170,7 @@ src_prepare() {
src_configure() { src_configure() {
local myconf="--libdir='${MY_LIBDIR}'" local myconf="--libdir='${MY_LIBDIR}'"
local bashcompletiondir=/usr/share/bash-completion myconf+=" --bashcompletiondir=$(get_bashcompdir)"
if $(tc-getPKG_CONFIG) bash-completion --exists; then
bashcompletiondir="$($(tc-getPKG_CONFIG) bash-completion \
--variable=completionsdir)"
fi
myconf+=" --bashcompletiondir=${bashcompletiondir}"
if use dracut_modules_systemd; then if use dracut_modules_systemd; then
myconf+=" --systemdsystemunitdir='$(systemd_get_unitdir)'" myconf+=" --systemdsystemunitdir='$(systemd_get_unitdir)'"
@ -189,8 +180,6 @@ src_configure() {
} }
src_compile() { src_compile() {
emake doc
if use optimization; then if use optimization; then
ewarn "Enabling experimental optimization!" ewarn "Enabling experimental optimization!"
tc-export CC tc-export CC
@ -254,6 +243,9 @@ src_install() {
# Remove extra modules which go to future dracut-extras # Remove extra modules which go to future dracut-extras
rm_module 05busybox 97masterkey 98ecryptfs 98integrity rm_module 05busybox 97masterkey 98ecryptfs 98integrity
# dash module is no longer supported
rm_module 00dash
} }
pkg_postinst() { pkg_postinst() {

View File

@ -1,4 +1,4 @@
From 3688462730a97d4cc5644dab87aadf147d8c72f0 Mon Sep 17 00:00:00 2001 From 9a45dcf7c92d7e7b4ee7b0ff6ab61ae1a90f03f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name> From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Sun, 6 Jan 2013 13:35:01 +0100 Date: Sun, 6 Jan 2013 13:35:01 +0100
Subject: [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs - Subject: [PATCH 1/2] dracut-functions.sh: support for alternative udev dirs -
@ -13,10 +13,10 @@ Credits go to Alexander Tsoy <alexander@tsoy.me>.
1 file changed, 9 insertions(+) 1 file changed, 9 insertions(+)
diff --git a/dracut-functions.sh b/dracut-functions.sh diff --git a/dracut-functions.sh b/dracut-functions.sh
index eba7412..d888f4c 100755 index eb1278e..eaa023c 100755
--- a/dracut-functions.sh --- a/dracut-functions.sh
+++ b/dracut-functions.sh +++ b/dracut-functions.sh
@@ -961,6 +961,15 @@ inst_rules() { @@ -960,6 +960,15 @@ inst_rules() {
inst_dir "$_target" inst_dir "$_target"
for _rule in "$@"; do for _rule in "$@"; do
if [ "${_rule#/}" = "$_rule" ]; then if [ "${_rule#/}" = "$_rule" ]; then
@ -33,5 +33,5 @@ index eba7412..d888f4c 100755
if [[ -f $r/$_rule ]]; then if [[ -f $r/$_rule ]]; then
_found="$r/$_rule" _found="$r/$_rule"
-- --
1.8.1.5 1.8.3.2

View File

@ -1,4 +1,4 @@
From 624a97d4e2b548889b5f758ed6a908a1495b44be Mon Sep 17 00:00:00 2001 From fc2bb603bc17e67c66ffcf53a282aa6fb6a6261c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name> From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
Date: Sun, 16 Dec 2012 20:02:48 +0100 Date: Sun, 16 Dec 2012 20:02:48 +0100
Subject: [PATCH 2/2] gentoo.conf: let udevdir= be handled by pkg-config and Subject: [PATCH 2/2] gentoo.conf: let udevdir= be handled by pkg-config and
@ -12,7 +12,7 @@ in old and new locations.
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dracut.conf.d/gentoo.conf.example b/dracut.conf.d/gentoo.conf.example diff --git a/dracut.conf.d/gentoo.conf.example b/dracut.conf.d/gentoo.conf.example
index 1361a30..b78e5c6 100644 index 26e7314..f9617f0 100644
--- a/dracut.conf.d/gentoo.conf.example --- a/dracut.conf.d/gentoo.conf.example
+++ b/dracut.conf.d/gentoo.conf.example +++ b/dracut.conf.d/gentoo.conf.example
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
@ -26,5 +26,5 @@ index 1361a30..b78e5c6 100644
# #
-- --
1.8.1.5 1.8.3.2

View File

@ -0,0 +1,20 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/virtual/init/init-0.ebuild,v 1.16 2012/05/16 07:40:58 heroxbd Exp $
DESCRIPTION="Virtual for various init implementations"
HOMEPAGE=""
SRC_URI=""
LICENSE=""
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE=""
RDEPEND="!prefix? (
kernel_linux? ( || ( >=sys-apps/sysvinit-2.86-r6
sys-apps/systemd-sysv-utils
sys-process/runit ) )
kernel_FreeBSD? ( sys-freebsd/freebsd-sbin )
)"
DEPEND=""