summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Marineau <marineam@gentoo.org>2007-03-06 01:51:00 +0000
committerMichael Marineau <marineam@gentoo.org>2007-03-06 01:51:00 +0000
commit335195d168213ff92e43d364e8e97f81b23ca800 (patch)
tree443869c875bdd94c68a37fa6ad910a74505a7bce /app-emulation
downloadxen-335195d168213ff92e43d364e8e97f81b23ca800.tar.gz
xen-335195d168213ff92e43d364e8e97f81b23ca800.tar.bz2
xen-335195d168213ff92e43d364e8e97f81b23ca800.zip
Add fix for network broadcasts on bridge networks.
The network-bridge script was loosing the interface's broadcast address, causing it to become 0.0.0.0 when xend started. svn path=/xen/; revision=14
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/xen-tools/Manifest40
-rw-r--r--app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch19
-rw-r--r--app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild191
3 files changed, 250 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest
new file mode 100644
index 0000000..d321f46
--- /dev/null
+++ b/app-emulation/xen-tools/Manifest
@@ -0,0 +1,40 @@
+AUX 3.0.4_p1/xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19
+MD5 9df68ac65dc3f372f5d61183abdc83ff files/3.0.4_p1/xen-consoles.logrotate 63
+RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 files/3.0.4_p1/xen-consoles.logrotate 63
+SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 files/3.0.4_p1/xen-consoles.logrotate 63
+AUX 3.0.4_p1/xen-tools--as-needed.patch 517 RMD160 579721dff853f9762c649f17af86ef920b5e98eb SHA1 2cbf34f6daa27ff09a2d0e23396c775f0d2eb3e0 SHA256 37d64ba6b5b76f15d6300855a808ac632a1e228e9d3dc4bf8f3ddaac3d326c8a
+MD5 79a4dfd90d23e1a01a334c3c2ee29bb2 files/3.0.4_p1/xen-tools--as-needed.patch 517
+RMD160 579721dff853f9762c649f17af86ef920b5e98eb files/3.0.4_p1/xen-tools--as-needed.patch 517
+SHA256 37d64ba6b5b76f15d6300855a808ac632a1e228e9d3dc4bf8f3ddaac3d326c8a files/3.0.4_p1/xen-tools--as-needed.patch 517
+AUX 3.0.4_p1/xen-tools-network-bridge-broadcast.patch 841 RMD160 21fd0a5e50109cb9665717e17522afded6c26c26 SHA1 88142952527acc47b00c98a4ccde15661449ee04 SHA256 75c0739f55cc63f1d17d16465ec681c943155ae57b5c9d67ed7c6be6254d3223
+MD5 2812525317e8827f626962738e4643d4 files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch 841
+RMD160 21fd0a5e50109cb9665717e17522afded6c26c26 files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch 841
+SHA256 75c0739f55cc63f1d17d16465ec681c943155ae57b5c9d67ed7c6be6254d3223 files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch 841
+AUX 3.0.4_p1/xen-tools-vnclisten.patch 519 RMD160 96a88fcd593bbc4461d87fb50b3ecaf06bab8729 SHA1 95e37aa7d92fcd87616a39be032bc91c18077881 SHA256 4f368dada2c7c5538ac6c2a2e23693828dea18a4b27e54c3d4a65e5603812dcb
+MD5 423ad930eef2e40ee30b6f648f0340f2 files/3.0.4_p1/xen-tools-vnclisten.patch 519
+RMD160 96a88fcd593bbc4461d87fb50b3ecaf06bab8729 files/3.0.4_p1/xen-tools-vnclisten.patch 519
+SHA256 4f368dada2c7c5538ac6c2a2e23693828dea18a4b27e54c3d4a65e5603812dcb files/3.0.4_p1/xen-tools-vnclisten.patch 519
+AUX 3.0.4_p1/xend.initd 1187 RMD160 6e5313e02198700204b27e4b02f8579a247aa2a0 SHA1 f16d2d5e014c91b6bc0ff63da717e79b4faada1d SHA256 1e619990ccebe11dab4c6fa1a6e4e0e1101854f633ef9c05836d0e9fba25d5cd
+MD5 e62f964336e77b320dcff0321d6166cf files/3.0.4_p1/xend.initd 1187
+RMD160 6e5313e02198700204b27e4b02f8579a247aa2a0 files/3.0.4_p1/xend.initd 1187
+SHA256 1e619990ccebe11dab4c6fa1a6e4e0e1101854f633ef9c05836d0e9fba25d5cd files/3.0.4_p1/xend.initd 1187
+AUX 3.0.4_p1/xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a
+MD5 65a57a4fae5a300aed8b84c24cdeee42 files/3.0.4_p1/xendomains-screen.confd 594
+RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 files/3.0.4_p1/xendomains-screen.confd 594
+SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a files/3.0.4_p1/xendomains-screen.confd 594
+AUX 3.0.4_p1/xendomains.confd 163 RMD160 4bbf857cdfe7c15b5e3eac437020f4d9ac7dd837 SHA1 bf9a43a4812947189c9bedbf0f1b457f39f50893 SHA256 980eca0fe5723ac9941b28227818c430a16d63786f499f621cf62ddcc99f9aef
+MD5 b9420a9887a4b4ca6749006f5586f130 files/3.0.4_p1/xendomains.confd 163
+RMD160 4bbf857cdfe7c15b5e3eac437020f4d9ac7dd837 files/3.0.4_p1/xendomains.confd 163
+SHA256 980eca0fe5723ac9941b28227818c430a16d63786f499f621cf62ddcc99f9aef files/3.0.4_p1/xendomains.confd 163
+AUX 3.0.4_p1/xendomains.initd 2168 RMD160 c6dc22f50cf575393cb076c2abfff8b3f24b5540 SHA1 a7f75a7aff0ffdb3ca330f853855b888cfb7f752 SHA256 ed1adcb24e5ffe1c0abc33d6bd69f129b31b3d4f068222ee343809a8dd12b8d0
+MD5 a3b477fa44710894c47b0aeca7d6a57a files/3.0.4_p1/xendomains.initd 2168
+RMD160 c6dc22f50cf575393cb076c2abfff8b3f24b5540 files/3.0.4_p1/xendomains.initd 2168
+SHA256 ed1adcb24e5ffe1c0abc33d6bd69f129b31b3d4f068222ee343809a8dd12b8d0 files/3.0.4_p1/xendomains.initd 2168
+DIST xen-3.0.4_1-src.tgz 6473636 RMD160 f869eec35f6afe0bc9824ce2eb4a600f789d423b SHA1 7ca5af70996215229e143c7563e69b3719284a95 SHA256 6b3842393e69a9c8fcdbc2789d05830aba6f1d108a6f97f1448de4a86f92a5cb
+EBUILD xen-tools-3.0.4_p1.ebuild 5517 RMD160 7b228625e136ec66eca3ca08fb0a2f2923e53d45 SHA1 374744718141a2c615e7696ff9975a7b4568c944 SHA256 2c7c2e9b567be5e59c77c9e5ffb5f20c525206e848bd1de696550fa1e6c2e2d7
+MD5 af5c5e9c00fab82ad41cbcd88cd4e460 xen-tools-3.0.4_p1.ebuild 5517
+RMD160 7b228625e136ec66eca3ca08fb0a2f2923e53d45 xen-tools-3.0.4_p1.ebuild 5517
+SHA256 2c7c2e9b567be5e59c77c9e5ffb5f20c525206e848bd1de696550fa1e6c2e2d7 xen-tools-3.0.4_p1.ebuild 5517
+MD5 de126addfd4101f35f8880ab0817ab03 files/digest-xen-tools-3.0.4_p1 241
+RMD160 b65ff6928079bc0ee81b68ab27f3f4c9e1d36856 files/digest-xen-tools-3.0.4_p1 241
+SHA256 66cfb008cc25de8a507359e492d6896908bc619901d901ae018fb135d2d91345 files/digest-xen-tools-3.0.4_p1 241
diff --git a/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch
new file mode 100644
index 0000000..e830de5
--- /dev/null
+++ b/app-emulation/xen-tools/files/3.0.4_p1/xen-tools-network-bridge-broadcast.patch
@@ -0,0 +1,19 @@
+diff -ru xen-3.0.4_1-src.orig/tools/examples/network-bridge xen-3.0.4_1-src/tools/examples/network-bridge
+--- xen-3.0.4_1-src.orig/tools/examples/network-bridge 2007-01-08 07:00:48.000000000 -0800
++++ xen-3.0.4_1-src/tools/examples/network-bridge 2007-03-05 17:37:32.000000000 -0800
+@@ -70,13 +70,13 @@
+ vif0="vif0.${vifnum}"
+
+ get_ip_info() {
+- addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e 's/ .*//'`
++ addr_pfx=`ip addr show dev $1 | egrep '^ *inet' | sed -e 's/ *inet //' -e "s/$1//"`
+ gateway=`ip route show dev $1 | fgrep default | sed 's/default via //'`
+ }
+
+ do_ifup() {
+ if ! ifup $1 ; then
+- if [ ${addr_pfx} ] ; then
++ if [ "${addr_pfx}" ] ; then
+ # use the info from get_ip_info()
+ ip addr flush $1
+ ip addr add ${addr_pfx} dev $1
diff --git a/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild b/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild
new file mode 100644
index 0000000..4363394
--- /dev/null
+++ b/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild
@@ -0,0 +1,191 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit flag-o-matic distutils eutils multilib
+
+DESCRIPTION="Xend daemon and tools"
+HOMEPAGE="http://xen.sourceforge.net"
+MY_PV=${PV/_p/_}
+SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV/_/-}/src.tgz/xen-${MY_PV}-src.tgz"
+S="${WORKDIR}/xen-${MY_PV}-src"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc debug screen custom-cflags pygrub ioemu"
+
+CDEPEND="dev-lang/python
+ sys-libs/zlib
+ ioemu? ( media-libs/libsdl )"
+
+DEPEND="${CDEPEND}
+ sys-devel/gcc
+ dev-lang/perl
+ sys-devel/dev86
+ app-misc/pax-utils
+ x11-proto/xproto
+ doc? (
+ dev-tex/latex2html
+ media-gfx/transfig
+ )
+ ioemu? (
+ net-libs/libvncserver
+ )"
+
+RDEPEND="${CDEPEND}
+ sys-apps/iproute2
+ net-misc/bridge-utils
+ screen? (
+ app-misc/screen
+ app-admin/logrotate
+ )
+ || ( sys-fs/udev sys-apps/hotplug )"
+
+PYTHON_MODNAME="xen grub"
+
+# hvmloader is used to bootstrap a fully virtualized kernel
+# Approved by QA team in bug #144032
+QA_WX_LOAD="usr/lib/xen/boot/hvmloader"
+
+pkg_setup() {
+ if [[ "$(scanelf -s __guard -q `which python`)" ]] ; then
+ ewarn "xend may not work when python is built with stack smashing protection (ssp)."
+ ewarn "If 'xm create' fails with '<ProtocolError for /RPC2: -1 >', see bug #141866"
+ fi
+
+ if [[ -z ${XEN_TARGET_ARCH} ]] ; then
+ if use x86 ; then
+ export XEN_TARGET_ARCH="x86_32"
+ elif use amd64 ; then
+ export XEN_TARGET_ARCH="x86_64"
+ else
+ die "Unsupported architecture!"
+ fi
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # if the user *really* wants to use their own custom-cflags, let them
+ if use custom-cflags; then
+ einfo "User wants their own CFLAGS - removing defaults"
+ # try and remove all the default custom-cflags
+ find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
+ -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
+ -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
+ -i {} \;
+ fi
+
+ # xen tries to be smart and filter out CFLAGs not supported by gcc.
+ # It doesn't handle no* flags though, but flag-o-matic's test-flag-CC does.
+ for FLAG in -nopie -fno-stack-protector -fno-stack-protector-all; do
+ test-flag-CC ${FLAG} && HARDFLAGS="${HARDFLAGS} ${FLAG}"
+ done
+ sed -i "s/^CFLAGS :=$/& ${HARDFLAGS}/" \
+ "${S}"/tools/firmware/{hvmloader,vmxassist}/Makefile
+
+
+ # Disable the 32bit-only vmxassist if we are not on x86 and we don't
+ # support the x86 ABI. Also disable hvmloader, since it requires vmxassist.
+ if ! use x86 && ! has x86 $(get_all_abis); then
+ sed -i -e "/SUBDIRS += vmxassist/d" "${S}"/tools/firmware/Makefile
+ sed -i -e "/SUBDIRS += hvmloader/d" "${S}"/tools/firmware/Makefile
+ fi
+
+ if ! use pygrub; then
+ sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile
+ fi
+
+ # Don't bother with ioemu, only needed for fully virtualised guests
+ if ! use ioemu; then
+ sed -i -e "/^CONFIG_IOEMU := y$/d" "${S}"/config/*.mk
+ fi
+
+ # Allow --as-needed LDFLAGS
+ epatch "${FILESDIR}/${PVR}/${PN}"--as-needed.patch
+
+ # Fix vnclisten
+ epatch "${FILESDIR}/${PVR}/${PN}"-vnclisten.patch
+
+ # Fix network broadcast on bridged networks
+ epatch "${FILESDIR}/${PVR}/${PN}"-network-bridge-broadcast.patch
+}
+
+src_compile() {
+ local myopt myconf
+ use debug && myopt="${myopt} debug=y"
+
+ use custom-cflags || unset CFLAGS
+ gcc-specs-ssp && append-flags -fno-stack-protector -fno-stack-protector-all
+
+ if use ioemu; then
+ myconf="${myconf} --disable-system --disable-user"
+ (cd tools/ioemu && econf ${myconf}) || die "configure failured"
+ fi
+
+ emake -C tools ${myopt} || die "compile failed"
+
+ if use doc; then
+ sh ./docs/check_pkgs || die "package check failed"
+ emake -C docs || die "compiling docs failed"
+ fi
+
+ emake -C docs man-pages || die "make man-pages failed"
+}
+
+src_install() {
+ local myopt="XEN_PYTHON_NATIVE_INSTALL=1"
+
+ make DESTDIR="${D}" ${myopt} install-tools \
+ || die "install failed"
+
+ # Remove RedHat-specific stuff
+ rm -rf "${D}"/etc/sysconfig
+
+ if use doc; then
+ make DESTDIR="${D}" -C docs install || die "install docs failed"
+ # Rename doc/xen to the Gentoo-style doc/xen-x.y
+ mv "${D}"/usr/share/doc/{${PN},${PF}}
+ fi
+
+ doman docs/man?/*
+
+ newinitd "${FILESDIR}/${PVR}"/xend.initd xend \
+ || die "Couldn't install xen.initd"
+ newconfd "${FILESDIR}/${PVR}"/xendomains.confd xendomains \
+ || die "Couldn't install xendomains.confd"
+ newinitd "${FILESDIR}/${PVR}"/xendomains.initd xendomains \
+ || die "Couldn't install xendomains.initd"
+
+ if use screen; then
+ cat "${FILESDIR}/${PVR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains
+ cp "${FILESDIR}/${PVR}"/xen-consoles.logrotate "${D}"/etc/xen/
+ keepdir /var/log/xen-consoles
+ fi
+
+ # xend expects these to exist
+ keepdir /var/run/xenstored /var/lib/xenstored /var/xen/dump /var/lib/xen /var/log/xen
+}
+
+pkg_postinst() {
+ elog "Please visit the Xen and Gentoo wiki:"
+ elog "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
+
+ if ! built_with_use dev-lang/python ncurses; then
+ echo
+ ewarn "NB: Your dev-lang/python is built without USE=ncurses."
+ ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py."
+ fi
+
+ if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then
+ echo
+ elog "xensv is broken upstream (Gentoo bug #142011)."
+ elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed."
+ fi
+}