Portage is a package management system used by Gentoo Linux
# ChangeLog for app-emulation/xen-tools
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/ChangeLog,v 1.37 2008/05/04 18:59:10 rbu Exp $
*xen-tools-3.2.1 (04 May 2008)
04 May 2008; Robert Buchholz
+files/xen-tools-3.2.1-qemu-nodocs.patch, -xen-tools-3.1.2.ebuild,
+xen-tools-3.2.1.ebuild:
Version bump to the Xen 3.2.1 release (bug #219339), thanks to Troy Bowman
for testig. Disable magic building of QEMU documentation (bug #192427).
*xen-tools-3.2.0 (08 Feb 2008)
08 Feb 2008; Michael Marineau
+xen-tools-3.2.0.ebuild:
Add version 3.2.0
*xen-tools-3.1.3 (03 Feb 2008)
03 Feb 2008; Michael Marineau
+files/xen-tools-3.1.3-network-bridge-broadcast.patch,
+xen-tools-3.1.3.ebuild:
Version bump to 3.1.3
14 Dec 2007; Robert Buchholz
Added a check for USE=ncurses in python in case we use pygrub
*xen-tools-3.1.2 (17 Nov 2007)
17 Nov 2007; Michael Marineau
-files/xen-tools-3.0.4_p1-pygrub-security-fix.patch,
-files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch,
-files/xen-tools-3.0.4_p1-vnclisten.patch,
-files/xen-tools-3.1.0-pygrub-security-fix.patch,
-files/xen-tools-3.1.0-python-site-packages.patch,
-files/xen-tools-3.1.1-insecure-file-creation-fix.patch,
-xen-tools-3.0.4_p1-r2.ebuild, -xen-tools-3.1.0-r2.ebuild,
-xen-tools-3.1.1-r1.ebuild, +xen-tools-3.1.2.ebuild:
Bump to 3.1.2. Clean out old versions.
*xen-tools-3.1.1-r1 (23 Oct 2007)
*xen-tools-3.1.0-r2 (23 Oct 2007)
*xen-tools-3.0.4_p1-r2 (23 Oct 2007)
23 Oct 2007; Michael Marineau
+files/xen-tools-3.1.1-insecure-file-creation-fix.patch,
-xen-tools-3.0.4_p1-r1.ebuild, +xen-tools-3.0.4_p1-r2.ebuild,
-xen-tools-3.1.0-r1.ebuild, +xen-tools-3.1.0-r2.ebuild,
-xen-tools-3.1.1.ebuild, +xen-tools-3.1.1-r1.ebuild:
Fix an insecure temp file creation, bug #196824, CVE-2007-3919
*xen-tools-3.1.1 (15 Oct 2007)
15 Oct 2007; Michael Marineau
+xen-tools-3.1.1.ebuild:
Version bump.
02 Oct 2007; Michael Marineau
xen-tools-3.1.0-r1.ebuild:
Fix build on gcc 4.2.0, fixes bug #191172.
Warn user if iproute2 was built with USE=minimal, fixes bug #194224.
Minor cleanups, etc.
*xen-tools-3.1.0-r1 (26 Sep 2007)
*xen-tools-3.0.4_p1-r1 (26 Sep 2007)
26 Sep 2007; Michael Marineau
+files/xen-tools-3.0.4_p1-pygrub-security-fix.patch,
+files/xen-tools-3.1.0-pygrub-security-fix.patch,
-xen-tools-3.0.4_p1.ebuild, +xen-tools-3.0.4_p1-r1.ebuild,
-xen-tools-3.1.0.ebuild, +xen-tools-3.1.0-r1.ebuild:
Security Bump: Guest domains could execute code on Dom0 via pygrub.
Bug #193808 and CVE-2007-4993
03 Sep 2007; Michael Marineau
xen-tools-3.0.4_p1.ebuild, xen-tools-3.1.0.ebuild:
Fix documentation dependencies.
27 Aug 2007; Michael Marineau
xen-tools-3.0.4_p1.ebuild, xen-tools-3.1.0.ebuild:
Die if both x86 and amd64 are set in USE.
26 Aug 2007; Michael Marineau
+files/xen-tools-3.1.0-xen-detect-nopie-fix.patch, xen-tools-3.1.0.ebuild:
Fix build on x86 hardened.
*xen-tools-3.1.0 (24 Aug 2007)
24 Aug 2007; Michael Marineau
-files/xen-tools-3.0.2--as-needed.patch,
-files/xen-tools-3.0.2-bxclobber.patch,
-files/xen-tools-3.0.2-pushpop.patch,
-files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch,
-files/xen-tools-3.0.2-test-uuid.patch,
-files/xen-tools-3.0.2-test-xauthority.patch,
-files/xen-tools-3.0.2-xc_ptrace.patch,
+files/xen-tools-3.1.0-python-site-packages.patch, -files/xend-init,
-xen-tools-3.0.2-r4.ebuild, +xen-tools-3.1.0.ebuild:
Copy Xen 3.1.0 related ebuilds over from the Xen project overlay.
Remove Xen 3.0.2.
10 Jul 2007; Michael Marineau
xen-tools-3.0.4_p1.ebuild:
Remove unneeded hardened flag checking and add some more info to the post
install message.
25 Jun 2007; Michael Marineau
xen-tools-3.0.4_p1.ebuild:
Fix typo in -fno-pie flag.
16 May 2007; Michael Marineau
xen-tools-3.0.4_p1.ebuild:
Only depend on xproto when ioemu is enabled. Bug #177110.
*xen-tools-3.0.4_p1 (02 May 2007)
02 May 2007; Michael Marineau
-files/3.0.2-r4/pygrub-progsreiserfs-0.3.1.patch,
-files/3.0.2-r4/xc_ptrace.patch, -files/3.0.2-r4/xend.initd,
-files/3.0.2-r4/xendomains.initd, +files/xen-tools-3.0.2-xc_ptrace.patch,
+files/xen-tools-3.0.2-pygrub-progsreiserfs-0.3.1.patch,
+files/xen-tools-3.0.4_p1--as-needed.patch,
+files/xen-tools-3.0.4_p1-network-bridge-broadcast.patch,
+files/xen-tools-3.0.4_p1-remove-monitor-mode-from-vnc.patch,
+files/xen-tools-3.0.4_p1-vnclisten.patch, +files/xend.initd,
+files/xendomains.initd, -files/xendomains-conf, -files/xendomains-init,
-xen-tools-3.0.2-r2.ebuild, -xen-tools-3.0.2-r3.ebuild,
xen-tools-3.0.2-r4.ebuild, +xen-tools-3.0.4_p1.ebuild:
Add Xen 3.0.4_1 from the marineam-xen overlay.
Clean out some old ebuilds and clean up the files dir.
13 Mar 2007; Andrew Ross
xen-tools-3.0.2-r4.ebuild:
Use "type" instead of "which", as per
http://archives.gentoo.org/gentoo-dev/msg_143424.xml
16 Dec 2006; Andrew Ross
Narrow dep on app-emulation/xen to match version of xen-tools.
*xen-tools-3.0.2-r4 (13 Oct 2006)
13 Oct 2006;
+files/3.0.2-r4/pygrub-progsreiserfs-0.3.1.patch,
+files/3.0.2-r4/xc_ptrace.patch, +files/3.0.2-r4/xendomains.initd,
+files/3.0.2-r4/xend.initd, +xen-tools-3.0.2-r4.ebuild:
Fix a PTRACE_* compilation error, thanks to Thomas Veith
in #151014.
Introduce the pygrub local USE flag and fix a compile error when
sys-fs/progsreiserfs is installed, thanks to M. Edward Borasky
#137137.
Make ntp-client start after xend, thanks to Harris Landgarten
Make /etc/init.d/xendomains correctly handle domains with numbers, periods
and/or hyphens, thanks to Robert S
Fix a compile error with python-2.5, thanks to Charlie Shepherd
Fix a compilation error on AMD64 with a 64 bit kernel and 32 bit userland,
thanks to tonich
Make /etc/init.d/xend fail gracefully when started in a non-privileged
domain or unmodified kernel, thanks to Christian Hesse
and Robert S
Only warn instead of dying when python is build with stack smashing
protection (ssp), thanks to Tuan Van
Replace the hardened USE flag with test-flag-CC from flag-o-matic.eclass to
avoid compile errors with gcc-4.1 and USE=hardened, thanks to Richard
Benjamin Voigt
*xen-tools-3.0.2-r3 (15 Aug 2006)
15 Aug 2006; Andrew Ross
-files/xend-conf, +files/xendomains.confd, +files/xendomains.initd,
+files/xendomains-screen.confd, metadata.xml, -xen-tools-3.0.2-r1.ebuild,
xen-tools-3.0.2-r2.ebuild, +xen-tools-3.0.2-r3.ebuild:
Fix bugs #141981, #142011, #141866, and #137886. Thanks to Brad Plant
10 Aug 2006; Sven Wegener
+files/xen-tools-3.0.2-bxclobber.patch,
+files/xen-tools-3.0.2-pushpop.patch, -files/hardened-bx-clobber.patch,
metadata.xml, xen-tools-3.0.2-r2.ebuild:
Fix push and pop usage for amd64, bug #142682. Disable the 32bit-only
vmxassist, if we can't compile x86 32bit code, bug #138314.
10 Aug 2006; Andrew Ross
Fix minor bug (debug USE flag ignored) introduced by the fix for bug #124361
10 Aug 2006; Andrew Ross
+files/xen-tools-3.0.2-test-uuid.patch,
+files/xen-tools-3.0.2-test-xauthority.patch, metadata.xml,
xen-tools-3.0.2-r1.ebuild, xen-tools-3.0.2-r2.ebuild:
Fix bug #141233 and add myself as a maintainer.
*xen-tools-3.0.2-r2 (04 Aug 2006)
04 Aug 2006; Chris Bainbridge
+xen-tools-3.0.2-r2.ebuild:
Add support for vnc and sdl - thanks to Nick Devito and Andrew Ross in bug
#124361
*xen-tools-3.0.2-r1 (09 Jun 2006)
09 Jun 2006; Chris Bainbridge
+xen-tools-3.0.2-r1.ebuild:
Clean up .pyc files, thanks to Andrew Ross, bug #136159
02 Jun 2006; Roy Marples
+files/xen-tools-3.0.2--as-needed.patch, -xen-tools-3.0.1.ebuild,
-xen-tools-3.0.1_p9029.ebuild, xen-tools-3.0.2.ebuild:
Add patch to enable --as-needed LDFLAG, #135145
26 Apr 2006; Aron Griffis
xen-tools-3.0.1_p9029.ebuild, xen-tools-3.0.2.ebuild:
Remove ~ia64 since this ebuild deps on app-emulation/xen, which won't have
ia64 keywords for a while yet
11 Apr 2006;
xen-tools-3.0.2.ebuild:
add hardened patch and IUSE flag, #129491
10 Apr 2006;
Fix hardened flags for hvmloader and vmxassist, #129491
10 Apr 2006;
removed the hardened stripping flags - now that the hypervisor is split out,
the tools should be compilable with hardened flags. There is currently a bug
with register clobbering which has been filed at bugzilla.xensource.com #609
10 Apr 2006;
add some extra man pages, #129189
10 Apr 2006;
remove sed fix, #129429
10 Apr 2006;
new digest
*xen-tools-3.0.2 (09 Apr 2006)
09 Apr 2006;
bump, #129191
01 Apr 2006; Aron Griffis
xen-tools-3.0.1_p9029.ebuild:
Add warning regarding dev-lang/python built without USE=ncurses #128175
*xen-tools-3.0.1_p9029 (24 Mar 2006)
*xen-tools-3.0.1 (24 Mar 2006)
24 Mar 2006; Aron Griffis
+files/xend-init, +files/xendomains-conf, +files/xendomains-init,
+metadata.xml, +xen-tools-3.0.1.ebuild, +xen-tools-3.0.1_p9029.ebuild:
Split xen-tools from xen; this package installs xend and the tools, but not
the hypervisor or include files. Unify the release and snapshot ebuilds for
easier maintenance. Switch to a snapshot versioning scheme that keeps
release/snapshot versions in order. Add myself as an additional maintainer
in metadata.xml
AUX xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19
AUX xen-tools-3.0.4_p1--as-needed.patch 517 RMD160 579721dff853f9762c649f17af86ef920b5e98eb SHA1 2cbf34f6daa27ff09a2d0e23396c775f0d2eb3e0 SHA256 37d64ba6b5b76f15d6300855a808ac632a1e228e9d3dc4bf8f3ddaac3d326c8a
AUX xen-tools-3.0.4_p1-network-bridge-broadcast.patch 841 RMD160 21fd0a5e50109cb9665717e17522afded6c26c26 SHA1 88142952527acc47b00c98a4ccde15661449ee04 SHA256 75c0739f55cc63f1d17d16465ec681c943155ae57b5c9d67ed7c6be6254d3223
AUX xen-tools-3.1.0-xen-detect-nopie-fix.patch 385 RMD160 5ad84ac847c1eeeaa7aac2fbcfd3b476ee7c991d SHA1 bd59257c972b7cd976b4b1953ff44a43a1d2b003 SHA256 c8b7a0858001b15ff12cc652977eb7ada06b036a8c593fccac9015ce05c84816
AUX xen-tools-3.1.3-network-bridge-broadcast.patch 490 RMD160 67a2a7f07e986b0c43f75ade5c073bbcfdae5fca SHA1 53171e6764c6018e529b805a98fa369d2568364b SHA256 1c971a0a81219b8626a25c2d135d51bc8108e7ac839794f356cc349386fe34e3
AUX xen-tools-3.2.1-qemu-nodocs.patch 1377 RMD160 d20780a6ac4a9f2fee98523edd6701e6bc15951f SHA1 6d7cb96b5fd717291d9d18885bb7a6be869882e4 SHA256 f8dec919bb0187a71217643f302403de7d488729109e21349e5627b3bb569656
AUX xend.initd 1291 RMD160 96659d237688d0c42e5c30491ad883d4af0f1c0f SHA1 2ffe2b29df7014d1dbf69f850a23a95e1b294288 SHA256 41ae7f38565a477abc1fb8ac5af9d6285bf90d171b922c6413aa8aefe5b00889
AUX xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a
AUX xendomains.confd 163 RMD160 4bbf857cdfe7c15b5e3eac437020f4d9ac7dd837 SHA1 bf9a43a4812947189c9bedbf0f1b457f39f50893 SHA256 980eca0fe5723ac9941b28227818c430a16d63786f499f621cf62ddcc99f9aef
AUX xendomains.initd 2278 RMD160 797b4db93fc54d217d7db98d2c408b03f993c47c SHA1 4f23d42b6d400cf9b9915fdccf0f7dd86a67629a SHA256 b0dd6c8e588ce76026488243dbe8d6adf9af7d8276fb268fcb439ba1ce59f756
DIST xen-3.1.3.tar.bz2 5852287 RMD160 df36208c8e709c61f2b4a74d18d2e81531ab4721 SHA1 5542d2bd07afaf80d70c85f7b75c6e6b432be08b SHA256 b94ab7a07269848dec8904625f348405c4af4ac7b579a402b2d830503ecd53a1
DIST xen-3.2.0.tar.bz2 5452441 RMD160 4b3a144d6cc128ea4d523c9383f29b14587ba310 SHA1 23b962a79104769ed2e3293a279b285e2a27c36e SHA256 6f774a2dd55af81edb54b074ad3210438ab01568fe1c0b8eb68ad13ef1dd01e8
DIST xen-3.2.1.tar.gz 6356315 RMD160 9ddda1185e6a19a6ccd73f5dde15640d2e31b125 SHA1 753f3d79d7ae2175e78b261765a9935db6255996 SHA256 dc3c057acab2173330db88d1f1d0587caf5717a4a882b93694a1bc90c71ad12a
EBUILD xen-tools-3.1.3.ebuild 6657 RMD160 908c386349e533e85e7ed3aaf30c21960da26d69 SHA1 240d5ee186ca824ea9ea8a727c7dc1460c4acd84 SHA256 f77bde05f6bfb6fb1b111b51837eec57872b0533219ddb300843aeb1733ff414
EBUILD xen-tools-3.2.0.ebuild 6657 RMD160 c96aaa12d6c89da61bfde6d4134a812b8a571212 SHA1 5c9ed2bfacef74584631225c87b54d777c927221 SHA256 ccd1541da9a35eb9675ecf0cfcefc5497591508361e864d89e604f947795a8f2
EBUILD xen-tools-3.2.1.ebuild 6798 RMD160 faecdbda051e2d28649f32b3f715aea513516cf7 SHA1 96155100d37099d393d93967206bab7da6b7b443 SHA256 d3297e5eadd32a51047788fe5eace4164031f6b1c9ba6a11d774ae9a36b32642
MISC ChangeLog 11214 RMD160 ec7361240fa9f672bdd9757c1fdbc97fe29b840a SHA1 39b2343ba77c4c2a4d7877130d74bc846a37773b SHA256 bc3e2869b0d50c50776d9bb505f2a5a8bb7e4213949285749ac6cc371acc4208
MISC metadata.xml 156 RMD160 bb062b1ba5554779dcfd0e73baf533ce9fbcdf68 SHA1 e6da014f2004758c7a806592ef9450489eebf593 SHA256 4a030777459245372bda9f7925f3a5ed3ef2b29b77e1a2971f3400ac2059b1e2
# Copyright 1999-2008 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.1.3.ebuild,v 1.1 2008/02/03 01:45:04 marineam Exp $
inherit flag-o-matic eutils multilib
DESCRIPTION="Xend daemon and tools"
HOMEPAGE="http://www.xensource.com/xen/xen/"
SRC_URI="mirror://gentoo/xen-${PV}.tar.bz2"
S="${WORKDIR}/xen-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc debug screen custom-cflags pygrub hvm"
CDEPEND="dev-lang/python
sys-libs/zlib
hvm? ( media-libs/libsdl )"
DEPEND="${CDEPEND}
sys-devel/gcc
dev-lang/perl
app-misc/pax-utils
doc? (
dev-tex/latex2html
media-gfx/transfig
media-gfx/graphviz
)
hvm? (
x11-proto/xproto
net-libs/libvncserver
sys-devel/dev86
)"
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 ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
eerror "an amd64 multilib profile is required. Remove the hvm use flag"
eerror "to build xen-tools on your current profile."
die "USE=hvm is unsupported on this system."
fi
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif 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
if use doc && ! built_with_use -o dev-tex/latex2html png gif; then
# die early instead of later
eerror "USE=doc requires latex2html with image support. Please add"
eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
die "latex2html missing both png and gif flags"
fi
if use pygrub && ! built_with_use dev-lang/python ncurses; then
eerror "USE=pygrub requires python to be built with ncurses support. Please add"
eerror "'ncurses' to your use flags and re-emerge python"
die "python is missing ncurses flags"
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 hvm support on systems that don't support x86_32 binaries.
if ! use hvm; then
chmod 644 tools/check/check_x11_devel
sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
fi
if ! use pygrub; then
sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile
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.1.3-network-bridge-broadcast.patch"
# Fix building small dumb utility called 'xen-detect' on hardened
epatch "${FILESDIR}/${PN}-3.1.0-xen-detect-nopie-fix.patch"
}
src_compile() {
local myopt myconf
use debug && myopt="${myopt} debug=y"
use custom-cflags || unset CFLAGS
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
if use hvm; 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
# for xendomains
keepdir /etc/xen/auto
}
pkg_postinst() {
elog "Official Xen Guide and the unoffical wiki page:"
elog " http://www.gentoo.org/doc/en/xen-guide.xml"
elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
echo
ewarn "xend may not work when python is built with stack smashing protection (ssp)."
ewarn "If 'xm create' fails with '
ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
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 built_with_use sys-apps/iproute2 minimal; then
echo
ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
ewarn "will not work until you rebuild iproute2 without USE=minimal."
fi
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 multilib system is required to build HVM support."
echo
elog "The ioemu use flag has been removed and replaced with hvm."
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
}
# Copyright 1999-2008 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.2.0.ebuild,v 1.1 2008/02/08 22:17:46 marineam Exp $
inherit flag-o-matic eutils multilib
DESCRIPTION="Xend daemon and tools"
HOMEPAGE="http://www.xensource.com/xen/xen/"
SRC_URI="mirror://gentoo/xen-${PV}.tar.bz2"
S="${WORKDIR}/xen-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc debug screen custom-cflags pygrub hvm"
CDEPEND="dev-lang/python
sys-libs/zlib
hvm? ( media-libs/libsdl )"
DEPEND="${CDEPEND}
sys-devel/gcc
dev-lang/perl
app-misc/pax-utils
doc? (
dev-tex/latex2html
media-gfx/transfig
media-gfx/graphviz
)
hvm? (
x11-proto/xproto
net-libs/libvncserver
sys-devel/dev86
)"
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 ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
eerror "an amd64 multilib profile is required. Remove the hvm use flag"
eerror "to build xen-tools on your current profile."
die "USE=hvm is unsupported on this system."
fi
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif 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
if use doc && ! built_with_use -o dev-tex/latex2html png gif; then
# die early instead of later
eerror "USE=doc requires latex2html with image support. Please add"
eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
die "latex2html missing both png and gif flags"
fi
if use pygrub && ! built_with_use dev-lang/python ncurses; then
eerror "USE=pygrub requires python to be built with ncurses support. Please add"
eerror "'ncurses' to your use flags and re-emerge python"
die "python is missing ncurses flags"
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 hvm support on systems that don't support x86_32 binaries.
if ! use hvm; then
chmod 644 tools/check/check_x11_devel
sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
fi
if ! use pygrub; then
sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile
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.1.3-network-bridge-broadcast.patch"
# Fix building small dumb utility called 'xen-detect' on hardened
epatch "${FILESDIR}/${PN}-3.1.0-xen-detect-nopie-fix.patch"
}
src_compile() {
local myopt myconf
use debug && myopt="${myopt} debug=y"
use custom-cflags || unset CFLAGS
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
if use hvm; 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
# for xendomains
keepdir /etc/xen/auto
}
pkg_postinst() {
elog "Official Xen Guide and the unoffical wiki page:"
elog " http://www.gentoo.org/doc/en/xen-guide.xml"
elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
echo
ewarn "xend may not work when python is built with stack smashing protection (ssp)."
ewarn "If 'xm create' fails with '
ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
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 built_with_use sys-apps/iproute2 minimal; then
echo
ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
ewarn "will not work until you rebuild iproute2 without USE=minimal."
fi
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 multilib system is required to build HVM support."
echo
elog "The ioemu use flag has been removed and replaced with hvm."
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
}
# Copyright 1999-2008 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.2.1.ebuild,v 1.1 2008/05/04 18:59:10 rbu Exp $
inherit flag-o-matic eutils multilib
DESCRIPTION="Xend daemon and tools"
HOMEPAGE="http://xen.org/"
SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz"
S="${WORKDIR}/xen-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc debug screen custom-cflags pygrub hvm"
CDEPEND="dev-lang/python
sys-libs/zlib
hvm? ( media-libs/libsdl )"
DEPEND="${CDEPEND}
sys-devel/gcc
dev-lang/perl
app-misc/pax-utils
doc? (
dev-tex/latex2html
media-gfx/transfig
media-gfx/graphviz
)
hvm? (
x11-proto/xproto
net-libs/libvncserver
sys-devel/dev86
)"
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 ! use x86 && ! has x86 $(get_all_abis) && use hvm; then
eerror "HVM (VT-x and AMD-v) cannot be built on this system. An x86 or"
eerror "an amd64 multilib profile is required. Remove the hvm use flag"
eerror "to build xen-tools on your current profile."
die "USE=hvm is unsupported on this system."
fi
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif 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
if use doc && ! built_with_use -o dev-tex/latex2html png gif; then
# die early instead of later
eerror "USE=doc requires latex2html with image support. Please add"
eerror "'png' and/or 'gif' to your use flags and re-emerge latex2html"
die "latex2html missing both png and gif flags"
fi
if use pygrub && ! built_with_use dev-lang/python ncurses; then
eerror "USE=pygrub requires python to be built with ncurses support. Please add"
eerror "'ncurses' to your use flags and re-emerge python"
die "python is missing ncurses flags"
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 hvm support on systems that don't support x86_32 binaries.
if ! use hvm; then
chmod 644 tools/check/check_x11_devel
sed -i -e '/^CONFIG_IOEMU := y$/d' "${S}"/config/*.mk
sed -i -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' "${S}"/tools/Makefile
fi
if ! use pygrub; then
sed -i -e "/^SUBDIRS-y += pygrub$/d" "${S}"/tools/Makefile
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.1.3-network-bridge-broadcast.patch"
# Fix building small dumb utility called 'xen-detect' on hardened
epatch "${FILESDIR}/${PN}-3.1.0-xen-detect-nopie-fix.patch"
# Introduce a configure option to disable qemu documentation building, #192427
epatch "${FILESDIR}/${PN}-3.2.1-qemu-nodocs.patch"
}
src_compile() {
local myopt myconf
use debug && myopt="${myopt} debug=y"
use custom-cflags || unset CFLAGS
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
if use hvm; 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
# for xendomains
keepdir /etc/xen/auto
}
pkg_postinst() {
elog "Official Xen Guide and the unoffical wiki page:"
elog " http://www.gentoo.org/doc/en/xen-guide.xml"
elog " http://gentoo-wiki.com/HOWTO_Xen_and_Gentoo"
if [[ "$(scanelf -s __guard -q $(type -P python))" ]] ; then
echo
ewarn "xend may not work when python is built with stack smashing protection (ssp)."
ewarn "If 'xm create' fails with '
ewarn "This probablem may be resolved as of Xen 3.0.4, if not post in the bug."
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 built_with_use sys-apps/iproute2 minimal; then
echo
ewarn "Your sys-apps/iproute2 is built with USE=minimal. Networking"
ewarn "will not work until you rebuild iproute2 without USE=minimal."
fi
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 multilib system is required to build HVM support."
echo
elog "The ioemu use flag has been removed and replaced with hvm."
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
}