diff options
author | Robert Buchholz <rbu@gentoo.org> | 2007-07-24 17:58:40 +0000 |
---|---|---|
committer | Robert Buchholz <rbu@gentoo.org> | 2007-07-24 17:58:40 +0000 |
commit | c50362714be674aaddf33f6861823c82cba4d48c (patch) | |
tree | 068945d03d3f5df71d87b299b1a13c32ad4533cf | |
download | xen-c50362714be674aaddf33f6861823c82cba4d48c.tar.gz xen-c50362714be674aaddf33f6861823c82cba4d48c.tar.bz2 xen-c50362714be674aaddf33f6861823c82cba4d48c.zip |
Moving files to /overlay subdir
svn path=/overlay/; revision=6
24 files changed, 883 insertions, 0 deletions
diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest new file mode 100644 index 0000000..cbe6243 --- /dev/null +++ b/app-emulation/xen-tools/Manifest @@ -0,0 +1,40 @@ +AUX xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 +MD5 9df68ac65dc3f372f5d61183abdc83ff files/xen-consoles.logrotate 63 +RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 files/xen-consoles.logrotate 63 +SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 files/xen-consoles.logrotate 63 +AUX xen-tools-3.0.4_p1--as-needed.patch 517 RMD160 579721dff853f9762c649f17af86ef920b5e98eb SHA1 2cbf34f6daa27ff09a2d0e23396c775f0d2eb3e0 SHA256 37d64ba6b5b76f15d6300855a808ac632a1e228e9d3dc4bf8f3ddaac3d326c8a +MD5 79a4dfd90d23e1a01a334c3c2ee29bb2 files/xen-tools-3.0.4_p1--as-needed.patch 517 +RMD160 579721dff853f9762c649f17af86ef920b5e98eb files/xen-tools-3.0.4_p1--as-needed.patch 517 +SHA256 37d64ba6b5b76f15d6300855a808ac632a1e228e9d3dc4bf8f3ddaac3d326c8a files/xen-tools-3.0.4_p1--as-needed.patch 517 +AUX xen-tools-3.0.4_p1-network-bridge-broadcast.patch 841 RMD160 21fd0a5e50109cb9665717e17522afded6c26c26 SHA1 88142952527acc47b00c98a4ccde15661449ee04 SHA256 75c0739f55cc63f1d17d16465ec681c943155ae57b5c9d67ed7c6be6254d3223 +MD5 2812525317e8827f626962738e4643d4 files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch 841 +RMD160 21fd0a5e50109cb9665717e17522afded6c26c26 files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch 841 +SHA256 75c0739f55cc63f1d17d16465ec681c943155ae57b5c9d67ed7c6be6254d3223 files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch 841 +AUX xen-tools-3.1.0-python-site-packages.patch 1205 RMD160 319e95a53b9860358849fef1eea6454a088f3b33 SHA1 8b850508f6caf189d04d5f2938599b5f2efacce4 SHA256 ff26da54fad7ac66b17774963220f265950d28ad167808bf41f9084425eb07d6 +MD5 e95f0b1dfd034e510237b90e9601c095 files/xen-tools-3.1.0-python-site-packages.patch 1205 +RMD160 319e95a53b9860358849fef1eea6454a088f3b33 files/xen-tools-3.1.0-python-site-packages.patch 1205 +SHA256 ff26da54fad7ac66b17774963220f265950d28ad167808bf41f9084425eb07d6 files/xen-tools-3.1.0-python-site-packages.patch 1205 +AUX xend.initd 1187 RMD160 6e5313e02198700204b27e4b02f8579a247aa2a0 SHA1 f16d2d5e014c91b6bc0ff63da717e79b4faada1d SHA256 1e619990ccebe11dab4c6fa1a6e4e0e1101854f633ef9c05836d0e9fba25d5cd +MD5 e62f964336e77b320dcff0321d6166cf files/xend.initd 1187 +RMD160 6e5313e02198700204b27e4b02f8579a247aa2a0 files/xend.initd 1187 +SHA256 1e619990ccebe11dab4c6fa1a6e4e0e1101854f633ef9c05836d0e9fba25d5cd files/xend.initd 1187 +AUX xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a +MD5 65a57a4fae5a300aed8b84c24cdeee42 files/xendomains-screen.confd 594 +RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 files/xendomains-screen.confd 594 +SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a files/xendomains-screen.confd 594 +AUX xendomains.confd 163 RMD160 4bbf857cdfe7c15b5e3eac437020f4d9ac7dd837 SHA1 bf9a43a4812947189c9bedbf0f1b457f39f50893 SHA256 980eca0fe5723ac9941b28227818c430a16d63786f499f621cf62ddcc99f9aef +MD5 b9420a9887a4b4ca6749006f5586f130 files/xendomains.confd 163 +RMD160 4bbf857cdfe7c15b5e3eac437020f4d9ac7dd837 files/xendomains.confd 163 +SHA256 980eca0fe5723ac9941b28227818c430a16d63786f499f621cf62ddcc99f9aef files/xendomains.confd 163 +AUX xendomains.initd 2168 RMD160 c6dc22f50cf575393cb076c2abfff8b3f24b5540 SHA1 a7f75a7aff0ffdb3ca330f853855b888cfb7f752 SHA256 ed1adcb24e5ffe1c0abc33d6bd69f129b31b3d4f068222ee343809a8dd12b8d0 +MD5 a3b477fa44710894c47b0aeca7d6a57a files/xendomains.initd 2168 +RMD160 c6dc22f50cf575393cb076c2abfff8b3f24b5540 files/xendomains.initd 2168 +SHA256 ed1adcb24e5ffe1c0abc33d6bd69f129b31b3d4f068222ee343809a8dd12b8d0 files/xendomains.initd 2168 +DIST xen-3.1.0-src.tgz 6831094 RMD160 2fd65a3b81e522d0ed2d62fd11e5977167f1ceb3 SHA1 fa4b54c36626f2cce9b15dc99cafda0b42c54777 SHA256 b5d7cea6deeee1439e8883fed4b3f1a8e4f675b4af8148178721f99bd76676b7 +EBUILD xen-tools-3.1.0.ebuild 5753 RMD160 a0a474e6d06dd5fd05f54762c8c2ea82172f6ed7 SHA1 c97f16f51a1acb503dfa009b80190593cbc58331 SHA256 866ef333c12a8c5ab593d489f7d358b4a10125bc4567125c0fd3a3022b3647fa +MD5 59346209a9fcc7ed46b43550322dfd7b xen-tools-3.1.0.ebuild 5753 +RMD160 a0a474e6d06dd5fd05f54762c8c2ea82172f6ed7 xen-tools-3.1.0.ebuild 5753 +SHA256 866ef333c12a8c5ab593d489f7d358b4a10125bc4567125c0fd3a3022b3647fa xen-tools-3.1.0.ebuild 5753 +MD5 b2e86effae6681cbbecdbf864b193b4a files/digest-xen-tools-3.1.0 235 +RMD160 2366b7298f0125f11d41aca0c6088c20863dbed1 files/digest-xen-tools-3.1.0 235 +SHA256 12c130912c624791e6855ebeb932368fc8889371876db396055b02ac9a3b9892 files/digest-xen-tools-3.1.0 235 diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.1.0 b/app-emulation/xen-tools/files/digest-xen-tools-3.1.0 new file mode 100644 index 0000000..e436de9 --- /dev/null +++ b/app-emulation/xen-tools/files/digest-xen-tools-3.1.0 @@ -0,0 +1,3 @@ +MD5 b7ae1f652b071862ae4c90b72d549627 xen-3.1.0-src.tgz 6831094 +RMD160 2fd65a3b81e522d0ed2d62fd11e5977167f1ceb3 xen-3.1.0-src.tgz 6831094 +SHA256 b5d7cea6deeee1439e8883fed4b3f1a8e4f675b4af8148178721f99bd76676b7 xen-3.1.0-src.tgz 6831094 diff --git a/app-emulation/xen-tools/files/xen-consoles.logrotate b/app-emulation/xen-tools/files/xen-consoles.logrotate new file mode 100644 index 0000000..c644523 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-consoles.logrotate @@ -0,0 +1,5 @@ +/var/log/xen-consoles/*.log { + rotate 7 + missingok + compress +} diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch new file mode 100644 index 0000000..8243ac8 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1--as-needed.patch @@ -0,0 +1,12 @@ +diff -rpuN xen-3.0.4_1-src.orig/tools/xenmon/Makefile xen-3.0.4_1-src/tools/xenmon/Makefile +--- xen-3.0.4_1-src.orig/tools/xenmon/Makefile 2007-01-08 15:00:51.000000000 +0000 ++++ xen-3.0.4_1-src/tools/xenmon/Makefile 2007-02-09 01:02:08.000000000 +0000 +@@ -42,6 +42,6 @@ clean: + + + %: %.c Makefile +- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $< ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl + xentrace_%: %.c Makefile +- $(CC) $(CFLAGS) $(LDFLAGS) -lxenctrl -o $@ $< ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lxenctrl diff --git a/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch new file mode 100644 index 0000000..e830de5 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.0.4_p1-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/files/xen-tools-3.1.0-python-site-packages.patch b/app-emulation/xen-tools/files/xen-tools-3.1.0-python-site-packages.patch new file mode 100644 index 0000000..ea5a217 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.1.0-python-site-packages.patch @@ -0,0 +1,31 @@ +With xen-3.1.0 on Pardus 2007, "/usr/sbin/xend start" returns "Cannot find Xen +Python modules." cause Xen Python modules installed +into "/usr/lib/python2.4/site-packages/" + +Following patch adds site-packages into search path + +Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> + +diff -r aee991c7723a tools/misc/xen-python-path +--- a/tools/misc/xen-python-path Wed May 09 16:34:47 2007 +0100 ++++ b/tools/misc/xen-python-path Sat May 19 02:24:24 2007 +0300 +@@ -30,12 +30,13 @@ import sys + + for p in ['python%s' % sys.version[:3], 'python']: + for l in ['/usr/lib64', '/usr/lib']: +- d = os.path.join(l, p) +- if os.path.exists(os.path.join(d, AUXBIN)): +- sys.path.append(d) +- import xen.util.auxbin +- print os.path.join(xen.util.auxbin.libpath(), p) +- sys.exit(0) ++ for k in ['', 'site-packages/']: ++ d = os.path.join(l, p, k) ++ if os.path.exists(os.path.join(d, AUXBIN)): ++ sys.path.append(d) ++ import xen.util.auxbin ++ print os.path.join(xen.util.auxbin.libpath(), p) ++ sys.exit(0) + + print >>sys.stderr, "Cannot find Xen Python modules." + sys.exit(1) diff --git a/app-emulation/xen-tools/files/xend.initd b/app-emulation/xen-tools/files/xend.initd new file mode 100644 index 0000000..7c24793 --- /dev/null +++ b/app-emulation/xen-tools/files/xend.initd @@ -0,0 +1,61 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +opts="start stop status restart" + +depend() { + need net + before xendomains sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp +} + +await_daemons_up() { + for ((i=0; i<5; i++)); do + sleep 1 + /usr/sbin/xend status && return 0 + done + return 1 +} + +is_privileged_domain() { + grep -qsE '^control_d$' /proc/xen/capabilities + return $? +} + +start() { + if is_privileged_domain ; then + ebegin "Starting Xen control daemon" + /usr/sbin/xend start + /usr/sbin/xend status || await_daemons_up + eend $? + else + eerror "Can't start xend - this is not a privileged domain." + return 1 + fi +} + +stop() { + if [ "$(xm list | wc -l)" -gt 2 ]; then + ebegin " Stopping all domains" + /usr/sbin/xm shutdown --all --wait >/dev/null + eend $? + fi + + ebegin "Stopping Xen control daemon" + /usr/sbin/xend stop + eend $? + + # This needs more testing (bug #149321) + #ebegin "Stopping xenconsoled" + #kill $(</var/run/xenconsoled.pid) + #eend $? + + #ebegin "Stopping xenstored" + #kill $(</var/run/xenstore.pid) + #eend $? +} + +status() { + is_privileged_domain && /usr/sbin/xend status +} diff --git a/app-emulation/xen-tools/files/xendomains-screen.confd b/app-emulation/xen-tools/files/xendomains-screen.confd new file mode 100644 index 0000000..1482c0a --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains-screen.confd @@ -0,0 +1,15 @@ +# When SCREEN="yes", domains in AUTODIR have their consoles connected to a +# screen session named SCREEN_NAME, with output logged to individual files +# named after each domain and written to /var/log/xen-consoles/ . These files +# are rotated (using app-admin/logrotate) every time xendomains is started. + +SCREEN="yes" +SCREEN_NAME="xen" + +# Number of seconds between writes to screen's logfiles. +# +# Lower values mean more disk activity and hence a possible performance +# impact, but higher values mean a greater chance of loosing some output +# in the event of a crash. + +SCREEN_LOG_INTERVAL="1" diff --git a/app-emulation/xen-tools/files/xendomains.confd b/app-emulation/xen-tools/files/xendomains.confd new file mode 100644 index 0000000..f1d810d --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.confd @@ -0,0 +1,7 @@ +# /etc/conf.d/xendomains + +# Directory of domains to boot. AUTODIR should contain one or more symlinks +# to domain config files in /etc/xen + +AUTODIR=/etc/xen/auto + diff --git a/app-emulation/xen-tools/files/xendomains.initd b/app-emulation/xen-tools/files/xendomains.initd new file mode 100644 index 0000000..6b408f9 --- /dev/null +++ b/app-emulation/xen-tools/files/xendomains.initd @@ -0,0 +1,96 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +opts="start stop status restart" + +depend() { + need xend + after dhcp +} + +get_domname() { + local name_from_file=$(sed -rn 's/^name\W*=\W*\"?([[:alnum:]_\.-]+)\"?\W*;?/\1/p' "${1}" | tail -n 1) + + if [[ -z ${name_from_file} ]] ; then + basename "${1}" + else + echo ${name_from_file} + fi +} + +is_running() { + /usr/sbin/xm list "${1}" >/dev/null 2>&1 +} + +using_screen() { + [[ "${SCREEN}" == "yes" || "${SCREEN}" == "YES" ]] +} + +set_screen_cmd() { + screen_cmd="screen -q -r ${SCREEN_NAME:=xen} -X" +} + +start() { + set_screen_cmd + + einfo "Starting Xen domains from ${AUTODIR:=/etc/xen/auto}" + if using_screen ; then + ebegin "Creating screen session to hold domain consoles" + ( screen -d -m -S ${SCREEN_NAME} -t dom0 \ + && ${screen_cmd} zombie dr \ + && logrotate -f /etc/xen/xen-consoles.logrotate \ + && ${screen_cmd} logfile /var/log/xen-consoles/%t.log \ + && ${screen_cmd} logfile flush ${SCREEN_LOG_INTERVAL:-1} \ + && ${screen_cmd} log on \ + && ${screen_cmd} deflog on ) >/dev/null + if [[ $? -ne 0 ]] ; then + eend 1 + return 1 + else + eend + fi + fi + # Create all domains with config files in AUTODIR. + for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do + name=$(get_domname ${dom}) + if ! is_running ${name} ; then + ebegin " Starting domain ${name}" + if using_screen ; then + ${screen_cmd} screen -t ${name} xm create ${dom} -c + else + xm create --quiet ${dom} + fi + eend $? + else + einfo " Not starting domain ${name} - already running" + fi + done +} + +stop() { + set_screen_cmd + + einfo "Shutting down Xen domains from ${AUTODIR:=/etc/xen/auto}" + # Stop all domains with config files in AUTODIR. + for dom in $(ls "${AUTODIR}/"* 2>/dev/null); do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Stopping domain ${name}" + xm shutdown --wait ${name} >/dev/null + eend $? + else + einfo " Not stopping domain ${name} - not running" + fi + done + if using_screen ; then + ebegin "Closing screen session ${SCREEN_NAME}" + ${screen_cmd} quit + eend $? + fi +} + +status() { + /usr/sbin/xm list +} diff --git a/app-emulation/xen-tools/xen-tools-3.1.0.ebuild b/app-emulation/xen-tools/xen-tools-3.1.0.ebuild new file mode 100644 index 0000000..a6b7b89 --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.1.0.ebuild @@ -0,0 +1,193 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/xen-tools-3.0.4_p1.ebuild,v 1.2 2007/05/16 00:57:34 marineam Exp $ + +inherit flag-o-matic distutils eutils multilib + +DESCRIPTION="Xend daemon and tools" +HOMEPAGE="http://www.xensource.com/xen/xen/" +SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/src.tgz/xen-${PV}-src.tgz" +S="${WORKDIR}/xen-${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 + doc? ( + dev-tex/latex2html + media-gfx/transfig + ) + ioemu? ( + x11-proto/xproto + 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 + + # 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 + chmod 644 tools/check/check_x11_devel + sed -i -e "/^CONFIG_IOEMU := y$/d" "${S}"/config/*.mk + fi + + # Allow --as-needed LDFLAGS + epatch "${FILESDIR}/${PN}-3.0.4_p1--as-needed.patch" + + # Fix network broadcast on bridged networks + epatch "${FILESDIR}/${PN}-3.0.4_p1-network-bridge-broadcast.patch" + + # Also look in python's site packages for xen, as it installs there + epatch "${FILESDIR}/${PN}-3.1.0-python-site-packages.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}" -C tools ${myopt} install \ + || 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}"/xend.initd xend \ + || die "Couldn't install xen.initd" + newconfd "${FILESDIR}"/xendomains.confd xendomains \ + || die "Couldn't install xendomains.confd" + newinitd "${FILESDIR}"/xendomains.initd xendomains \ + || die "Couldn't install xendomains.initd" + + if use screen; then + cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains + cp "${FILESDIR}"/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 [[ "$(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 ! 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 ! use x86 && ! has x86 $(get_all_abis); then + echo + elog "Your system does not support building x86 binaries (amd64 no-multilib)" + elog "hvmloader has not been built, which is required for HVM guests." + 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 +} diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest new file mode 100644 index 0000000..e92d970 --- /dev/null +++ b/app-emulation/xen/Manifest @@ -0,0 +1,8 @@ +DIST xen-3.1.0-src.tgz 6831094 RMD160 2fd65a3b81e522d0ed2d62fd11e5977167f1ceb3 SHA1 fa4b54c36626f2cce9b15dc99cafda0b42c54777 SHA256 b5d7cea6deeee1439e8883fed4b3f1a8e4f675b4af8148178721f99bd76676b7 +EBUILD xen-3.1.0.ebuild 2327 RMD160 779eaee0c838ab46457190488f0ec0645bf8accf SHA1 91fbe6bb81e970cd68b90a489722cbc6a2b25406 SHA256 42f7bdf7e61a8fb7cc505fb447eab1d286735df1601f75fc361092b340f6ee25 +MD5 dad50dea588e2f44f043444cbf737874 xen-3.1.0.ebuild 2327 +RMD160 779eaee0c838ab46457190488f0ec0645bf8accf xen-3.1.0.ebuild 2327 +SHA256 42f7bdf7e61a8fb7cc505fb447eab1d286735df1601f75fc361092b340f6ee25 xen-3.1.0.ebuild 2327 +MD5 b2e86effae6681cbbecdbf864b193b4a files/digest-xen-3.1.0 235 +RMD160 2366b7298f0125f11d41aca0c6088c20863dbed1 files/digest-xen-3.1.0 235 +SHA256 12c130912c624791e6855ebeb932368fc8889371876db396055b02ac9a3b9892 files/digest-xen-3.1.0 235 diff --git a/app-emulation/xen/files/digest-xen-3.1.0 b/app-emulation/xen/files/digest-xen-3.1.0 new file mode 100644 index 0000000..e436de9 --- /dev/null +++ b/app-emulation/xen/files/digest-xen-3.1.0 @@ -0,0 +1,3 @@ +MD5 b7ae1f652b071862ae4c90b72d549627 xen-3.1.0-src.tgz 6831094 +RMD160 2fd65a3b81e522d0ed2d62fd11e5977167f1ceb3 xen-3.1.0-src.tgz 6831094 +SHA256 b5d7cea6deeee1439e8883fed4b3f1a8e4f675b4af8148178721f99bd76676b7 xen-3.1.0-src.tgz 6831094 diff --git a/app-emulation/xen/xen-3.1.0.ebuild b/app-emulation/xen/xen-3.1.0.ebuild new file mode 100644 index 0000000..01d3ff2 --- /dev/null +++ b/app-emulation/xen/xen-3.1.0.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit mount-boot flag-o-matic + +DESCRIPTION="The Xen virtual machine monitor" +HOMEPAGE="http://www.xensource.com/xen/xen/" +SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/src.tgz/xen-${PV}-src.tgz" +S="${WORKDIR}/xen-${PV}-src" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug custom-cflags pae" + +RDEPEND="|| ( sys-boot/grub + sys-boot/grub-static ) + >=sys-kernel/xen-sources-2.6.18" +PDEPEND="~app-emulation/xen-tools-${PV}" + +RESTRICT="test" + +# Approved by QA team in bug #144032 +QA_WX_LOAD="boot/xen-syms-${PV}" + +pkg_setup() { + 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} + # 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 +} + +src_compile() { + local myopt + use debug && myopt="${myopt} debug=y" + use pae && myopt="${myopt} pae=y" + + if use custom-cflags; then + filter-flags -fPIE -fstack-protector + else + unset CFLAGS + fi + + # Send raw LDFLAGS so that --as-needed works + emake LDFLAGS="$(raw-ldflags)" -C xen ${myopt} || die "compile failed" +} + +src_install() { + local myopt + use debug && myopt="${myopt} debug=y" + use pae && myopt="${myopt} pae=y" + + emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install || die "install failed" +} + +pkg_postinst() { + elog "Please visit the Xen and Gentoo wiki:" + elog "http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo" + + echo + elog "Note: xen tools have been moved to app-emulation/xen-tools" + + if use pae; then + echo + ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!" + fi +} diff --git a/sys-kernel/xen-sources/Manifest b/sys-kernel/xen-sources/Manifest new file mode 100644 index 0000000..a0ed2e9 --- /dev/null +++ b/sys-kernel/xen-sources/Manifest @@ -0,0 +1,40 @@ +AUX xen-sources-2.6.18-make-install.patch 2654 RMD160 b711e16e5a09a8814059b43c2d7d7d1de07ed35d SHA1 ceb0ea3eeada61859cc227c6d80017f70b667f31 SHA256 e74c725f435394d2ab08b9537ea660afae166e2091045cbc2511899621454755 +MD5 026cd6940a1c9080c78adf9019a10f08 files/xen-sources-2.6.18-make-install.patch 2654 +RMD160 b711e16e5a09a8814059b43c2d7d7d1de07ed35d files/xen-sources-2.6.18-make-install.patch 2654 +SHA256 e74c725f435394d2ab08b9537ea660afae166e2091045cbc2511899621454755 files/xen-sources-2.6.18-make-install.patch 2654 +AUX xen-sources-2.6.20-console-tty-fix.patch 2237 RMD160 c092df76ccd3703c7776f00e98aa67882eea2df2 SHA1 b82629eef5f87a1258d3172569ddfc0b467646fc SHA256 9dff7f12e0e085b25e9b9d1edfab9d5f3d234f8ca4c2b8ab0b8f759f585ed0e2 +MD5 96eb55408e4670d1e8a3b1a15ab56eb8 files/xen-sources-2.6.20-console-tty-fix.patch 2237 +RMD160 c092df76ccd3703c7776f00e98aa67882eea2df2 files/xen-sources-2.6.20-console-tty-fix.patch 2237 +SHA256 9dff7f12e0e085b25e9b9d1edfab9d5f3d234f8ca4c2b8ab0b8f759f585ed0e2 files/xen-sources-2.6.20-console-tty-fix.patch 2237 +AUX xen-sources-2.6.20-quirks-no-smp-fix.patch 616 RMD160 325394a4c2ce7d292d40e4e9548e41c78384ad72 SHA1 a34f5e7f15eef8d448e871a38ea953d4f7e707f3 SHA256 f4e95b79460c5ace124ef57f8af936243d8dffed71f6c00816bdeb975c959132 +MD5 b7c3a11aa99ac926a2a78c96c7fa32c1 files/xen-sources-2.6.20-quirks-no-smp-fix.patch 616 +RMD160 325394a4c2ce7d292d40e4e9548e41c78384ad72 files/xen-sources-2.6.20-quirks-no-smp-fix.patch 616 +SHA256 f4e95b79460c5ace124ef57f8af936243d8dffed71f6c00816bdeb975c959132 files/xen-sources-2.6.20-quirks-no-smp-fix.patch 616 +DIST fedora-xen-2.6.20-2925.11.fc7.tar.bz2 520695 RMD160 fe39a1f0e758d1e951e118ba4ac33ccf69163e40 SHA1 651a3bf6bcccb0d0e62d19b07d07605a89616689 SHA256 3ea3d3f316ab6315759efa5c8a754331f7792a3159c05c521db16d7ed97f20ed +DIST genpatches-2.6.18-10.base.tar.bz2 113483 RMD160 9f19f7147c50650369afddec946b281aff817a48 SHA1 a2655a9d923624603a31a1e62cdd5e2a5c45066b SHA256 2d72cbe1e238318438a6ee9375a0ed42432a95c4d6fccb5afb14f8655a4a15b2 +DIST genpatches-2.6.20-13.base.tar.bz2 114313 RMD160 e6d41f0e15444f17cfbae55499ea2f079a7913ce SHA1 70e5da99ef34975f705a6041adaa48291d401e0c SHA256 51eb630e880c693c1a2bcc31451d4e8b3c1c2b0b3cc2dad1a7130322197b733f +DIST linux-2.6.18.tar.bz2 41863580 RMD160 f92283f956880676bfb1f1d5288325461e4e02e7 SHA1 178f7d5bb3af0978d42b37651b8753323c7129c2 SHA256 c95280ff6c5d2a17788f7cc582d23ae8a9a7ba3f202ec6e4238eaadfce7c163d +DIST linux-2.6.20.tar.bz2 43375937 RMD160 14657ade7be4363143dbd5593f5710d21eda7a03 SHA1 e730979adfb287528263e779c91284659672510d SHA256 2c14ada1ac7d272e03b430d3a530d60fc9ec69cc8252382aa049afba7d2b8558 +DIST patch-2.6.18.2_to_xen-3.1.0.bz2 598933 RMD160 1c3ff9cafcc2168b6b738feee9d7ca74107b63ac SHA1 ede34a316083e8745ce7ad8fc11e63c97542bdb0 SHA256 05d97e029b8ca35794329a1c59c1d7fb84fbd7d68b6df0388bbe6d18e5bbdeda +DIST patch-2.6.18_to_xen-3.1.0.bz2 598640 RMD160 2365a93cd056aa0829d00cff9a92a4368e3b0dba SHA1 a1ffbbb86bee0fbf2fc82a4afb27bc33aaf09ecc SHA256 ac3e4c165d4d77c7720be498133f4a5a999a7aaeb646c7b2c21c7aeedd809e83 +EBUILD xen-sources-2.6.18-r1.ebuild 1034 RMD160 889752df84640a3b0e1a3e669cb71765c7108010 SHA1 16ccbe7ca88b91bf1b32dbb5f9bfc88f2c9a76fb SHA256 a0ac3c48fe2ce6ff6d2830140cb7d2a362394a976a4bd9a3ef2fb10567abd8ef +MD5 f8a77d1449543475c5db7e8931183a0c xen-sources-2.6.18-r1.ebuild 1034 +RMD160 889752df84640a3b0e1a3e669cb71765c7108010 xen-sources-2.6.18-r1.ebuild 1034 +SHA256 a0ac3c48fe2ce6ff6d2830140cb7d2a362394a976a4bd9a3ef2fb10567abd8ef xen-sources-2.6.18-r1.ebuild 1034 +EBUILD xen-sources-2.6.18.ebuild 967 RMD160 9c7030d41272192bffd453730fc1ea15aab6c782 SHA1 5a68f91daac27457fcfb856c02434068c1b28ae2 SHA256 55ee5773dcf3254d78677d29d09d0b8d8daea6afeb09993e6bfbf3d97716b133 +MD5 c029688996eb33695721d2edfe44dd2b xen-sources-2.6.18.ebuild 967 +RMD160 9c7030d41272192bffd453730fc1ea15aab6c782 xen-sources-2.6.18.ebuild 967 +SHA256 55ee5773dcf3254d78677d29d09d0b8d8daea6afeb09993e6bfbf3d97716b133 xen-sources-2.6.18.ebuild 967 +EBUILD xen-sources-2.6.20.ebuild 1050 RMD160 83dd36bd6153c85b8fe7a50a07d631a51612c39a SHA1 5b8764766c87be408ca805518d52f851dfa9e44f SHA256 4c090cda8f084bf096cee41c5073e1c5c0c914de0e1cc5a05f883200037067e4 +MD5 b0d7a01b77fcf723569a814ad652d702 xen-sources-2.6.20.ebuild 1050 +RMD160 83dd36bd6153c85b8fe7a50a07d631a51612c39a xen-sources-2.6.20.ebuild 1050 +SHA256 4c090cda8f084bf096cee41c5073e1c5c0c914de0e1cc5a05f883200037067e4 xen-sources-2.6.20.ebuild 1050 +MD5 e4d2e4167b43bdedfe39e87e65902c70 files/digest-xen-sources-2.6.18 515 +RMD160 ca27044079907ac488736a4f26c4fe0f88894e30 files/digest-xen-sources-2.6.18 515 +SHA256 148da1abe7d72ebaaf428de2e2506fb4579b7392b030a6378c58c23b8352c1e9 files/digest-xen-sources-2.6.18 515 +MD5 ced2bb0edfe9143774dd6e3a1cea0eae files/digest-xen-sources-2.6.18-r1 801 +RMD160 891ca7b4a9feca7860cff3fb7ac565b48c173501 files/digest-xen-sources-2.6.18-r1 801 +SHA256 144ac502a6ad7d02acfc51d4d0ef72cd2641488aa3bed635cd6fc802fb0d4839 files/digest-xen-sources-2.6.18-r1 801 +MD5 fae6e4bf5e75fd998e4a88f1e472145c files/digest-xen-sources-2.6.20 819 +RMD160 87efcb5e339922c7ce33ac82e86f17cddeb1482d files/digest-xen-sources-2.6.20 819 +SHA256 5786f56c83224a7b8ec3a12c7a4da72641cfd9b6f677814c17961df343db6d87 files/digest-xen-sources-2.6.20 819 diff --git a/sys-kernel/xen-sources/files/digest-xen-sources-2.6.18 b/sys-kernel/xen-sources/files/digest-xen-sources-2.6.18 new file mode 100644 index 0000000..fb87580 --- /dev/null +++ b/sys-kernel/xen-sources/files/digest-xen-sources-2.6.18 @@ -0,0 +1,6 @@ +MD5 296a6d150d260144639c3664d127d174 linux-2.6.18.tar.bz2 41863580 +RMD160 f92283f956880676bfb1f1d5288325461e4e02e7 linux-2.6.18.tar.bz2 41863580 +SHA256 c95280ff6c5d2a17788f7cc582d23ae8a9a7ba3f202ec6e4238eaadfce7c163d linux-2.6.18.tar.bz2 41863580 +MD5 84a8f645581c457d09e25cd5f4d6d62b patch-2.6.18_to_xen-3.1.0.bz2 598640 +RMD160 2365a93cd056aa0829d00cff9a92a4368e3b0dba patch-2.6.18_to_xen-3.1.0.bz2 598640 +SHA256 ac3e4c165d4d77c7720be498133f4a5a999a7aaeb646c7b2c21c7aeedd809e83 patch-2.6.18_to_xen-3.1.0.bz2 598640 diff --git a/sys-kernel/xen-sources/files/digest-xen-sources-2.6.18-r1 b/sys-kernel/xen-sources/files/digest-xen-sources-2.6.18-r1 new file mode 100644 index 0000000..0ea6e03 --- /dev/null +++ b/sys-kernel/xen-sources/files/digest-xen-sources-2.6.18-r1 @@ -0,0 +1,9 @@ +MD5 7e3eaba91aa76d2b88ed7bb20f64d4c9 genpatches-2.6.18-10.base.tar.bz2 113483 +RMD160 9f19f7147c50650369afddec946b281aff817a48 genpatches-2.6.18-10.base.tar.bz2 113483 +SHA256 2d72cbe1e238318438a6ee9375a0ed42432a95c4d6fccb5afb14f8655a4a15b2 genpatches-2.6.18-10.base.tar.bz2 113483 +MD5 296a6d150d260144639c3664d127d174 linux-2.6.18.tar.bz2 41863580 +RMD160 f92283f956880676bfb1f1d5288325461e4e02e7 linux-2.6.18.tar.bz2 41863580 +SHA256 c95280ff6c5d2a17788f7cc582d23ae8a9a7ba3f202ec6e4238eaadfce7c163d linux-2.6.18.tar.bz2 41863580 +MD5 a644c8cfccf0e6b7c4357b38215ee1da patch-2.6.18.2_to_xen-3.1.0.bz2 598933 +RMD160 1c3ff9cafcc2168b6b738feee9d7ca74107b63ac patch-2.6.18.2_to_xen-3.1.0.bz2 598933 +SHA256 05d97e029b8ca35794329a1c59c1d7fb84fbd7d68b6df0388bbe6d18e5bbdeda patch-2.6.18.2_to_xen-3.1.0.bz2 598933 diff --git a/sys-kernel/xen-sources/files/digest-xen-sources-2.6.20 b/sys-kernel/xen-sources/files/digest-xen-sources-2.6.20 new file mode 100644 index 0000000..59fb462 --- /dev/null +++ b/sys-kernel/xen-sources/files/digest-xen-sources-2.6.20 @@ -0,0 +1,9 @@ +MD5 545747791907812daa79685852f78a9f fedora-xen-2.6.20-2925.11.fc7.tar.bz2 520695 +RMD160 fe39a1f0e758d1e951e118ba4ac33ccf69163e40 fedora-xen-2.6.20-2925.11.fc7.tar.bz2 520695 +SHA256 3ea3d3f316ab6315759efa5c8a754331f7792a3159c05c521db16d7ed97f20ed fedora-xen-2.6.20-2925.11.fc7.tar.bz2 520695 +MD5 93b2bfd84674f010ada4aa31ad4898ce genpatches-2.6.20-13.base.tar.bz2 114313 +RMD160 e6d41f0e15444f17cfbae55499ea2f079a7913ce genpatches-2.6.20-13.base.tar.bz2 114313 +SHA256 51eb630e880c693c1a2bcc31451d4e8b3c1c2b0b3cc2dad1a7130322197b733f genpatches-2.6.20-13.base.tar.bz2 114313 +MD5 34b0f354819217e6a345f48ebbd8f13e linux-2.6.20.tar.bz2 43375937 +RMD160 14657ade7be4363143dbd5593f5710d21eda7a03 linux-2.6.20.tar.bz2 43375937 +SHA256 2c14ada1ac7d272e03b430d3a530d60fc9ec69cc8252382aa049afba7d2b8558 linux-2.6.20.tar.bz2 43375937 diff --git a/sys-kernel/xen-sources/files/xen-sources-2.6.18-make-install.patch b/sys-kernel/xen-sources/files/xen-sources-2.6.18-make-install.patch new file mode 100644 index 0000000..108c648 --- /dev/null +++ b/sys-kernel/xen-sources/files/xen-sources-2.6.18-make-install.patch @@ -0,0 +1,52 @@ +diff -ru linux-2.6.18-xen.orig/arch/i386/Makefile linux-2.6.18-xen/arch/i386/Makefile +--- linux-2.6.18-xen.orig/arch/i386/Makefile 2007-07-16 17:58:05.000000000 -0700 ++++ linux-2.6.18-xen/arch/i386/Makefile 2007-07-16 18:22:18.000000000 -0700 +@@ -125,7 +125,7 @@ + $(Q)$(MAKE) $(build)=$(boot) $@ + + install: +- $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@ ++ $(Q)$(MAKE) $(build)=$(boot) $@ + else + all: bzImage + +diff -ru linux-2.6.18-xen.orig/arch/i386/boot-xen/Makefile linux-2.6.18-xen/arch/i386/boot-xen/Makefile +--- linux-2.6.18-xen.orig/arch/i386/boot-xen/Makefile 2007-07-16 17:58:05.000000000 -0700 ++++ linux-2.6.18-xen/arch/i386/boot-xen/Makefile 2007-07-16 18:36:08.000000000 -0700 +@@ -10,12 +10,17 @@ + INSTALL_ROOT := $(patsubst %/boot,%,$(INSTALL_PATH)) + + XINSTALL_NAME ?= $(KERNELRELEASE) ++ ++ifdef CONFIG_XEN_PRIVILEGED_GUEST ++XENGUEST= ++else ++XENGUEST=-domU ++endif ++ + install: + mkdir -p $(INSTALL_ROOT)/boot +- ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(XENGUEST)$(INSTALL_SUFFIX) +- rm -f $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) +- install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) +- install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(INSTALL_SUFFIX) +- install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(INSTALL_SUFFIX) +- install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX) +- ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)$(XENGUEST)$(INSTALL_SUFFIX) ++ install -m0644 vmlinuz $(INSTALL_ROOT)/boot/vmlinuz-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX) ++ install -m0644 vmlinux $(INSTALL_ROOT)/boot/vmlinux-syms-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX) ++ install -m0664 .config $(INSTALL_ROOT)/boot/config-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX) ++ install -m0664 System.map $(INSTALL_ROOT)/boot/System.map-$(XINSTALL_NAME)$(XENGUEST)$(INSTALL_SUFFIX) ++ ln -f -s vmlinuz-$(XINSTALL_NAME)$(INSTALL_SUFFIX) $(INSTALL_ROOT)/boot/vmlinuz-$(VERSION).$(PATCHLEVEL)-xen$(XENGUEST)$(INSTALL_SUFFIX) +diff -ru linux-2.6.18-xen.orig/arch/x86_64/Makefile linux-2.6.18-xen/arch/x86_64/Makefile +--- linux-2.6.18-xen.orig/arch/x86_64/Makefile 2007-07-16 17:58:05.000000000 -0700 ++++ linux-2.6.18-xen/arch/x86_64/Makefile 2007-07-16 18:22:34.000000000 -0700 +@@ -91,7 +91,7 @@ + $(Q)$(MAKE) $(build)=$(boot) $@ + + install: +- $(Q)$(MAKE) $(build)=$(boot) XENGUEST=$(XENGUEST) $@ ++ $(Q)$(MAKE) $(build)=$(boot) $@ + else + #Default target when executing "make" + all: bzImage diff --git a/sys-kernel/xen-sources/files/xen-sources-2.6.20-console-tty-fix.patch b/sys-kernel/xen-sources/files/xen-sources-2.6.20-console-tty-fix.patch new file mode 100644 index 0000000..72a90a8 --- /dev/null +++ b/sys-kernel/xen-sources/files/xen-sources-2.6.20-console-tty-fix.patch @@ -0,0 +1,75 @@ +diff -rup linux-2.6.20-xen.orig/drivers/char/tty_io.c linux-2.6.20-xen/drivers/char/tty_io.c +--- linux-2.6.20-xen.orig/drivers/char/tty_io.c 2007-07-16 11:14:52.000000000 -0700 ++++ linux-2.6.20-xen/drivers/char/tty_io.c 2007-07-16 15:57:19.000000000 -0700 +@@ -133,6 +133,8 @@ LIST_HEAD(tty_drivers); /* linked list + DEFINE_MUTEX(tty_mutex); + EXPORT_SYMBOL(tty_mutex); + ++int console_use_vt = 1; ++ + #ifdef CONFIG_UNIX98_PTYS + extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */ + extern int pty_limit; /* Config limit on Unix98 ptys */ +@@ -2518,7 +2520,7 @@ retry_open: + goto got_driver; + } + #ifdef CONFIG_VT +- if (device == MKDEV(TTY_MAJOR,0)) { ++ if (console_use_vt && (device == MKDEV(TTY_MAJOR,0))) { + extern struct tty_driver *console_driver; + driver = console_driver; + index = fg_console; +@@ -3910,6 +3912,8 @@ static int __init tty_init(void) + #endif + + #ifdef CONFIG_VT ++ if (!console_use_vt) ++ goto out_vt; + cdev_init(&vc0_cdev, &console_fops); + if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) +@@ -3917,6 +3921,7 @@ static int __init tty_init(void) + device_create(tty_class, NULL, MKDEV(TTY_MAJOR, 0), "tty0"); + + vty_init(); ++ out_vt: + #endif + return 0; + } +diff -rup linux-2.6.20-xen.orig/drivers/xen/console/console.c linux-2.6.20-xen/drivers/xen/console/console.c +--- linux-2.6.20-xen.orig/drivers/xen/console/console.c 2007-07-16 11:14:52.000000000 -0700 ++++ linux-2.6.20-xen/drivers/xen/console/console.c 2007-07-16 16:02:26.000000000 -0700 +@@ -86,23 +86,30 @@ static unsigned long sysrq_requested; + + void xencons_early_setup(void) + { +- if (is_initial_xendomain()) ++ extern int console_use_vt; ++ ++ if (is_initial_xendomain()) { + xc_mode = XC_SERIAL; +- else +- xc_mode = XC_XVC; ++ } else { ++ xc_mode = XC_TTY; ++ console_use_vt = 0; ++ } + } + + static int __init xencons_setup(char *str) + { + char *q; + int n; ++ extern int console_use_vt; + ++ console_use_vt = 1; + if (!strncmp(str, "ttyS", 4)) { + xc_mode = XC_SERIAL; + str += 4; + } else if (!strncmp(str, "tty", 3)) { + xc_mode = XC_TTY; + str += 3; ++ console_use_vt = 0; + } else if (!strncmp(str, "xvc", 3)) { + xc_mode = XC_XVC; + str += 3; diff --git a/sys-kernel/xen-sources/files/xen-sources-2.6.20-quirks-no-smp-fix.patch b/sys-kernel/xen-sources/files/xen-sources-2.6.20-quirks-no-smp-fix.patch new file mode 100644 index 0000000..77de84c --- /dev/null +++ b/sys-kernel/xen-sources/files/xen-sources-2.6.20-quirks-no-smp-fix.patch @@ -0,0 +1,12 @@ +diff -rup linux-2.6.20-xen.orig/arch/i386/kernel/quirks.c linux-2.6.20-xen/arch/i386/kernel/quirks.c +--- linux-2.6.20-xen.orig/arch/i386/kernel/quirks.c 2007-07-23 10:59:51.000000000 -0700 ++++ linux-2.6.20-xen/arch/i386/kernel/quirks.c 2007-07-23 11:02:15.000000000 -0700 +@@ -7,7 +7,7 @@ + #include <asm/genapic.h> + #include <asm/cpu.h> + +-#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_SMP) || defined(CONFIG_XEN)) && defined(CONFIG_PCI) ++#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) + static void __devinit verify_quirk_intel_irqbalance(struct pci_dev *dev) + { + u8 config, rev; diff --git a/sys-kernel/xen-sources/xen-sources-2.6.18-r1.ebuild b/sys-kernel/xen-sources/xen-sources-2.6.18-r1.ebuild new file mode 100644 index 0000000..a6192f0 --- /dev/null +++ b/sys-kernel/xen-sources/xen-sources-2.6.18-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xen-sources/xen-sources-2.6.16.49.ebuild,v 1.1 2007/05/02 03:31:45 marineam Exp $ + +ETYPE="sources" +UNIPATCH_STRICTORDER="1" +K_WANT_GENPATCHES="base" +K_GENPATCHES_VER="10" +inherit kernel-2 +detect_version + +DESCRIPTION="Full sources for a dom0/domU Linux kernel to run under Xen" +HOMEPAGE="http://www.xensource.com/xen/xen/" + +XEN_VERSION="3.1.0" +XEN_BASE_KV="2.6.18.2" +XEN_PATCH="patch-${XEN_BASE_KV}_to_xen-${XEN_VERSION}.bz2" +#PATCH_URI="mirror://gentoo/${XEN_PATCH}" +PATCH_URI="http://dev.gentoo.org/~marineam/files/xen/${XEN_PATCH}" +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${PATCH_URI}" + +UNIPATCH_LIST="${DISTDIR}/${XEN_PATCH} + ${FILESDIR}/${P}-make-install.patch" + +KEYWORDS="~x86 ~amd64" + +#pkg_postinst() { +# postinst_sources +# +# elog "This kernel uses the linux patches released with Xen 3.0.4" +# elog "It claims to have a 3.0.2 compatibility option but it may not work." +#} diff --git a/sys-kernel/xen-sources/xen-sources-2.6.18.ebuild b/sys-kernel/xen-sources/xen-sources-2.6.18.ebuild new file mode 100644 index 0000000..896d469 --- /dev/null +++ b/sys-kernel/xen-sources/xen-sources-2.6.18.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/xen-sources/xen-sources-2.6.16.49.ebuild,v 1.1 2007/05/02 03:31:45 marineam Exp $ + +ETYPE="sources" +UNIPATCH_STRICTORDER="1" +inherit kernel-2 +detect_version + +DESCRIPTION="Full sources for a dom0/domU Linux kernel to run under Xen" +HOMEPAGE="http://www.xensource.com/xen/xen/" + +XEN_VERSION="3.1.0" +XEN_BASE_KV="2.6.18" +XEN_PATCH="patch-${XEN_BASE_KV}_to_xen-${XEN_VERSION}.bz2" +#PATCH_URI="mirror://gentoo/${XEN_PATCH}" +PATCH_URI="http://dev.gentoo.org/~marineam/files/xen/${XEN_PATCH}" +SRC_URI="${KERNEL_URI} ${PATCH_URI}" + +UNIPATCH_LIST="${DISTDIR}/${XEN_PATCH} + ${FILESDIR}/${P}-make-install.patch" + +KEYWORDS="~x86 ~amd64" + +#pkg_postinst() { +# postinst_sources +# +# elog "This kernel uses the linux patches released with Xen 3.0.4" +# elog "It claims to have a 3.0.2 compatibility option but it may not work." +#} diff --git a/sys-kernel/xen-sources/xen-sources-2.6.20.ebuild b/sys-kernel/xen-sources/xen-sources-2.6.20.ebuild new file mode 100644 index 0000000..8222161 --- /dev/null +++ b/sys-kernel/xen-sources/xen-sources-2.6.20.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +ETYPE="sources" +UNIPATCH_STRICTORDER="1" +K_WANT_GENPATCHES="base" +K_GENPATCHES_VER="13" +inherit kernel-2 +detect_version + +DESCRIPTION="Full sources for a dom0/domU Linux kernel to run under Xen" +HOMEPAGE="http://www.xensource.com/xen/xen/" + +XEN_PATCH="fedora-xen-2.6.20-2925.11.fc7.tar.bz2" +#PATCH_URI="mirror://gentoo/${XEN_PATCH}" +PATCH_URI="http://dev.gentoo.org/~marineam/files/xen/${XEN_PATCH}" +SRC_URI="${KERNEL_URI} ${GENPATCHES_URI} ${PATCH_URI}" + +UNIPATCH_LIST="${DISTDIR}/${XEN_PATCH} + ${FILESDIR}/${P}-console-tty-fix.patch + ${FILESDIR}/${P}-quirks-no-smp-fix.patch + ${FILESDIR}/${PN}-2.6.18-make-install.patch" + +KEYWORDS="~x86 ~amd64" + +DEPEND="${DEPEND} + >=sys-devel/binutils-2.17" + +pkg_postinst() { + postinst_sources + + elog "This kernel is for Xen 3.1.0 and based on RedHat's patchset in" + elog "Fedora 7, if you have troubles try xen-sources-2.6.18* which is" + elog "based on the patches released with Xen." +} |