From 6d8172cd6594e08913dc220853a5193abcdb221e Mon Sep 17 00:00:00 2001 From: Robert Piasek Date: Tue, 17 Mar 2009 13:02:30 +0000 Subject: Version bump for: libvirt virt-manager xen xen-tools svn path=/overlay/; revision=85 --- app-emulation/libvirt/Manifest | 5 + .../files/libvirt-0.4.6-qemu-img-name.patch | 18 ++ app-emulation/libvirt/files/libvirtd.confd | 15 ++ app-emulation/libvirt/files/libvirtd.init | 73 +++++++ app-emulation/libvirt/libvirt-0.6.1.ebuild | 108 +++++++++ app-emulation/virt-manager/Manifest | 2 + .../virt-manager/virt-manager-0.7.0.ebuild | 48 ++++ app-emulation/xen-tools/Manifest | 11 + .../xen-tools/files/xen-consoles.logrotate | 5 + .../xen-tools-3.1.3-network-bridge-broadcast.patch | 11 + .../xen-tools/files/xen-tools-3.3.0-nostrip.patch | 26 +++ .../xen-tools-3.3.0-xen-detect-nopie-fix.patch | 12 + .../xen-tools/files/xen-tools-3.3.1-qemu-xen.patch | 15 ++ app-emulation/xen-tools/files/xend.initd | 61 ++++++ .../xen-tools/files/xendomains-screen.confd | 15 ++ app-emulation/xen-tools/files/xendomains.confd | 9 + app-emulation/xen-tools/files/xendomains.initd | 108 +++++++++ app-emulation/xen-tools/xen-tools-3.3.1.ebuild | 241 +++++++++++++++++++++ app-emulation/xen/Manifest | 2 + app-emulation/xen/xen-3.3.1.ebuild | 103 +++++++++ 20 files changed, 888 insertions(+) create mode 100644 app-emulation/libvirt/Manifest create mode 100644 app-emulation/libvirt/files/libvirt-0.4.6-qemu-img-name.patch create mode 100644 app-emulation/libvirt/files/libvirtd.confd create mode 100755 app-emulation/libvirt/files/libvirtd.init create mode 100644 app-emulation/libvirt/libvirt-0.6.1.ebuild create mode 100644 app-emulation/virt-manager/Manifest create mode 100644 app-emulation/virt-manager/virt-manager-0.7.0.ebuild create mode 100644 app-emulation/xen-tools/Manifest create mode 100644 app-emulation/xen-tools/files/xen-consoles.logrotate create mode 100644 app-emulation/xen-tools/files/xen-tools-3.1.3-network-bridge-broadcast.patch create mode 100644 app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch create mode 100644 app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch create mode 100644 app-emulation/xen-tools/files/xen-tools-3.3.1-qemu-xen.patch create mode 100644 app-emulation/xen-tools/files/xend.initd create mode 100644 app-emulation/xen-tools/files/xendomains-screen.confd create mode 100644 app-emulation/xen-tools/files/xendomains.confd create mode 100755 app-emulation/xen-tools/files/xendomains.initd create mode 100644 app-emulation/xen-tools/xen-tools-3.3.1.ebuild create mode 100644 app-emulation/xen/Manifest create mode 100644 app-emulation/xen/xen-3.3.1.ebuild diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest new file mode 100644 index 0000000..f9b3f08 --- /dev/null +++ b/app-emulation/libvirt/Manifest @@ -0,0 +1,5 @@ +AUX libvirt-0.4.6-qemu-img-name.patch 811 RMD160 821ad55830f4724fc4d3314d58d7ea7971f0060c SHA1 1e154cf2a0522db05fd202ebddafb530e714c657 SHA256 fe0eb8a43a79c7c3d764387170addb3d490673d5e942ea1dd7b7633da4b11b7d +AUX libvirtd.confd 476 RMD160 63b92da0cf0d589c1c6e76551982deb6b5fc8f9a SHA1 5b76082bb28705606758880c19af922dde1ccb01 SHA256 ff2c94d2a64058152be669256d8d2e241cde4356a77bd653eac9fa3b084666f6 +AUX libvirtd.init 2045 RMD160 b544578c242c6f84e2cf07682a06ce261bf40b8a SHA1 81976137c43f6b507e27ac926a6d7947e1a329d3 SHA256 96cbdf8e68a171d170f91167a4217a366325ca668b9e2621ec6800fd35d42c5c +EBUILD libvirt-0.6.1.ebuild 2725 RMD160 16d2d0b713504ffa8d1316faca890ab4d1a23f45 SHA1 71f2864639c37efc30ef8a9968dd96fd5d898a3d SHA256 3763bbb0662e4a155cfde71dbd0779ecc442e9e99a7ed7e9278c1a85578baf37 +DIST libvirt-0.6.1.tar.gz 6476130 RMD160 fbd10cda5494efeafe59ff190d97e6543ff6f330 SHA1 705d8409ed28619fcd4cd6c2063d60228762c45d SHA256 65a54819eec280a28fdf1a19b960aa33a8275f14a8ede06ae54752d5023b99de diff --git a/app-emulation/libvirt/files/libvirt-0.4.6-qemu-img-name.patch b/app-emulation/libvirt/files/libvirt-0.4.6-qemu-img-name.patch new file mode 100644 index 0000000..a1c27d2 --- /dev/null +++ b/app-emulation/libvirt/files/libvirt-0.4.6-qemu-img-name.patch @@ -0,0 +1,18 @@ +--- libvirt-0.4.6/configure.in.orig 2008-11-20 22:44:26.000000000 -0500 ++++ libvirt-0.4.6/configure.in 2008-11-20 23:06:29.000000000 -0500 +@@ -698,7 +698,14 @@ + [Location or name of the showmount program]) + fi + +-AC_PATH_PROG([QEMU_IMG], [qemu-img], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin]) ++AC_ARG_WITH([qemu-img-name], [AC_HELP_STRING([--with-qemu-img-name=[name of binary|qemu-img]], [Name of the qemu-img binary])]) ++if test "x$with_qemu_img_name" == "x" ; then ++ QEMU_IMG_BIN="qemu-img" ++else ++ QEMU_IMG_BIN="$with_qemu_img_name" ++fi ++ ++AC_PATH_PROG([QEMU_IMG], [$QEMU_IMG_BIN], [], [$PATH:/sbin:/usr/sbin:/bin:/usr/bin]) + if test -n "$QEMU_IMG" ; then + AC_DEFINE_UNQUOTED([HAVE_QEMU_IMG], 1, [whether qemu-img is available for non-raw files]) + AC_DEFINE_UNQUOTED([QEMU_IMG],["$QEMU_IMG"], diff --git a/app-emulation/libvirt/files/libvirtd.confd b/app-emulation/libvirt/files/libvirtd.confd new file mode 100644 index 0000000..705b785 --- /dev/null +++ b/app-emulation/libvirt/files/libvirtd.confd @@ -0,0 +1,15 @@ +# /etc/conf.d/libvirtd + +# You may want to add '--listen' to have libvirtd listen for tcp/ip connections +# if you want to use libvirt for remote control + +# Please consult 'libvirtd --help' for more options + +#LIBVIRTD_OPTS="--listen" + +# Automatically shutdown KVM domains when stopping libvirtd +LIBVIRTD_KVM_SHUTDOWN="yes" + +# Timeout in seconds until stopping libvirtd and "pulling the plug" on the +# remaining VM's still in a running state +#LIBVIRTD_KVM_SHUTDOWN_MAXWAIT="100" diff --git a/app-emulation/libvirt/files/libvirtd.init b/app-emulation/libvirt/files/libvirtd.init new file mode 100755 index 0000000..10765f5 --- /dev/null +++ b/app-emulation/libvirt/files/libvirtd.init @@ -0,0 +1,73 @@ +#!/sbin/runscript + +opts="start stop status reload restart" + +depend() { + need net + before sshd ntp-client ntpd nfs nfsmount rsyncd portmap dhcp +} + +libvirtd_virsh() { + # Silence errors because virsh always throws an error about + # not finding the hypervisor version when connecting to libvirtd + LC_ALL=C virsh -c qemu:///system "$@" 2>/dev/null +} + +libvirtd_dom_list() { + libvirtd_virsh list | grep running | awk '{ print $1 }' +} + +libvirtd_dom_count() { + libvirtd_dom_list | wc -l +} + +start() { + ebegin "Starting libvirtd" + start-stop-daemon --start --quiet --exec /usr/sbin/libvirtd -- -d ${LIBVIRTD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping libvirtd" + # try to shutdown all (KVM/Qemu) domains + DOM_COUNT="$(libvirtd_dom_count)" + if [ "${LIBVIRTD_KVM_SHUTDOWN}" = "yes" ] \ + && [ "${DOM_COUNT}" != "0" ] ; then + + einfo " Shutting down domain(s):" + for DOM_ID in $(libvirtd_dom_list) ; do + NAME="$(libvirtd_virsh domname ${DOM_ID} | head -n 1)" + einfo " ${NAME}" + libvirtd_virsh shutdown ${DOM_ID} > /dev/null + done + + if [ -n "${LIBVIRTD_KVM_SHUTDOWN_MAXWAIT}" ] ; then + COUNTER="${LIBVIRTD_KVM_SHUTDOWN_MAXWAIT}" + else + COUNTER=100 + fi + + einfo " Waiting ${COUNTER} seconds while domains shutdown ..." + DOM_COUNT="$(libvirtd_dom_count)" + while [ ${DOM_COUNT} -gt 0 ] && [ ${COUNTER} -gt 0 ] ; do + DOM_COUNT="$(libvirtd_dom_count)" + sleep 1 + COUNTER=$((${COUNTER} - 1)) + echo -n "." + done + + DOM_COUNT="$(libvirtd_dom_count)" + if [ "${DOM_COUNT}" != "0" ] ; then + eerror " !!! Some guests are still running, stopping anyways" + fi + + fi + start-stop-daemon --stop --quiet --exec /usr/sbin/libvirtd --pidfile=/var/run/libvirtd.pid + eend $? +} + +reload() { + ebegin "Reloading libvirtd" + start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/libvirtd.pid --oknodo + eend $? +} diff --git a/app-emulation/libvirt/libvirt-0.6.1.ebuild b/app-emulation/libvirt/libvirt-0.6.1.ebuild new file mode 100644 index 0000000..7160731 --- /dev/null +++ b/app-emulation/libvirt/libvirt-0.6.1.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.5.1.ebuild,v 1.2 2009/02/20 17:47:32 cardoe Exp $ + +inherit eutils autotools + +DESCRIPTION="C toolkit to manipulate virtual machines" +HOMEPAGE="http://www.libvirt.org/" +SRC_URI="http://libvirt.org/sources/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="avahi iscsi lvm lxc hal kvm openvz parted qemu sasl selinux uml xen" +# policykit is in package.mask +# devicekit isn't in portage + +DEPEND="sys-libs/readline + sys-libs/ncurses + >=dev-libs/libxml2-2.5 + >=net-libs/gnutls-1.0.25 + dev-lang/python + sys-fs/sysfsutils + net-misc/bridge-utils + net-analyzer/netcat + net-dns/dnsmasq + dev-util/pkgconfig + avahi? ( >=net-dns/avahi-0.6 ) + iscsi? ( sys-block/open-iscsi ) + kvm? ( app-emulation/kvm ) + lvm? ( sys-fs/lvm2 ) + openvz? ( sys-kernel/openvz-sources ) + parted? ( >=sys-apps/parted-1.8 ) + qemu? ( app-emulation/qemu ) + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( sys-libs/libselinux ) + xen? ( app-emulation/xen-tools app-emulation/xen ) + policykit? ( >=sys-auth/policykit-0.6 )" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/"${PN}"-0.4.6-qemu-img-name.patch + eautoreconf +} + +pkg_setup() { + local hasbackend=0 + local backends="lxc kvm openvz qemu uml xen" + local backend + + for backend in $backends ; do + use $backend && hasbackend=1 + done + + if [ "$hasbackend" == 0 ]; then + local msg="You must enable one of these USE flags: $backends" + eerror "$msg" + die "$msg" + fi +} + +src_compile() { + local my_conf="" + if use qemu || use kvm ; then + # fix path for kvm-img but use qemu-img if the useflag is set + my_conf="--with-qemu \ + $(use_with !qemu qemu-img-name kvm-img)" + else + my_conf="--without-qemu" + fi + + econf \ + $(use_with avahi) \ + $(use_with iscsi storage-iscsi) \ + $(use_with lvm storage-lvm) \ + $(use_with lxc) \ + $(use_with hal) \ + $(use_with openvz) \ + $(use_with parted storage-disk) \ + $(use_with sasl) \ + $(use_with selinux) \ + $(use_with uml) \ + $(use_with xen) \ + $(use_with polkit) \ + ${my_conf} \ + --without-devkit \ + --with-remote \ + --disable-iptables-lokkit \ + --localstatedir=/var \ + --with-remote-pid-file=/var/run/libvirtd.pid \ + || die "econf failed" + #$(use_with policykit) \ + emake || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die + mv "${D}"/usr/share/doc/{${PN}-python*,${P}/python} + newinitd "${FILESDIR}"/libvirtd.init libvirtd + newconfd "${FILESDIR}"/libvirtd.confd libvirtd +} + +pkg_postinst() { + elog "To allow normal users to connect to libvirtd you must change the" + elog " unix sock group and/or perms in /etc/libvirt/libvirtd.conf" +} diff --git a/app-emulation/virt-manager/Manifest b/app-emulation/virt-manager/Manifest new file mode 100644 index 0000000..4895c85 --- /dev/null +++ b/app-emulation/virt-manager/Manifest @@ -0,0 +1,2 @@ +EBUILD virt-manager-0.7.0.ebuild 1366 RMD160 8c842ee1cf8d080777285444c2572920ca45df06 SHA1 c933d8d2ceba8f0ce5c425edfda519be5a3d386b SHA256 1061508723da06048c742074d75861c0b869c2400074757cf5156d358fb6d02f +DIST virt-manager-0.7.0.tar.gz 2010911 RMD160 48fc2bf1c1ce217d6794dd0fb4ebfb6316434e9e SHA1 436c18b2df4745327ad0a20ff3f514b6407d064f SHA256 e4cf8368b70017717cafe1b751f4206ea0820c3f1245c53572dd13bc881a152e diff --git a/app-emulation/virt-manager/virt-manager-0.7.0.ebuild b/app-emulation/virt-manager/virt-manager-0.7.0.ebuild new file mode 100644 index 0000000..112d19c --- /dev/null +++ b/app-emulation/virt-manager/virt-manager-0.7.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/virt-manager/virt-manager-0.6.0-r1.ebuild,v 1.1 2008/12/02 03:38:10 marineam Exp $ + +# Stop gnome2.eclass from doing stuff on USE=debug +GCONF_DEBUG="no" + +inherit eutils gnome2 + +DESCRIPTION="A graphical tool for administering virtual machines such as Xen" +HOMEPAGE="http://virt-manager.org/" +SRC_URI="http://virt-manager.org/download/sources/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gnome-keyring" +RDEPEND=">=dev-python/pygtk-1.99.12 + >=app-emulation/libvirt-0.4.5 + >=dev-libs/libxml2-2.6.23 + >=app-emulation/virtinst-0.400.0 + >=gnome-base/librsvg-2 + >=x11-libs/vte-0.12.2 + >=net-libs/gtk-vnc-0.3.4 + dev-python/dbus-python + dev-python/gconf-python + dev-python/libgnome-python + gnome-keyring? ( dev-python/gnome-keyring-python )" +DEPEND="${RDEPEND}" + +pkg_setup() { + if ! built_with_use dev-libs/libxml2 python; then + local msg="You must install libxml2 with USE=python." + eerror "$msg" + die "$msg" + fi + + if ! built_with_use x11-libs/vte python; then + local msg="You must install vte with USE=python." + eerror "$msg" + die "$msg" + fi + + if ! built_with_use net-libs/gtk-vnc python; then + local msg="You must install gtk-vnc with USE=python." + eerror "$msg" + die "$msg" + fi +} diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest new file mode 100644 index 0000000..0307937 --- /dev/null +++ b/app-emulation/xen-tools/Manifest @@ -0,0 +1,11 @@ +AUX xen-consoles.logrotate 63 RMD160 035bd8baf1ba68a5525bab4379c0c4e350001a74 SHA1 6f88a4da3349aade6070dfc5c4465e2c00f3e68c SHA256 0da87a4b9094f934e3de937e8ef8d3afc752e76793aa3d730182d0241e118b19 +AUX xen-tools-3.1.3-network-bridge-broadcast.patch 490 RMD160 67a2a7f07e986b0c43f75ade5c073bbcfdae5fca SHA1 53171e6764c6018e529b805a98fa369d2568364b SHA256 1c971a0a81219b8626a25c2d135d51bc8108e7ac839794f356cc349386fe34e3 +AUX xen-tools-3.3.0-nostrip.patch 1021 RMD160 f702b588596dfdebf71fafbf866d270ac5bb549e SHA1 bb4db097af6e206ed68bcc1a1c3ef48b02e9a4c5 SHA256 2debac718c01a7eac4daf3182a7ae04aa562137d791cd510ecf1848d7eaccebd +AUX xen-tools-3.3.0-xen-detect-nopie-fix.patch 394 RMD160 77f48ee4bdeb61f91f5dd1c0ebf2351c8ffa1b55 SHA1 07eea51bb2979f7fe342954902b8680a6bd1a7bc SHA256 64266079194f5b8374ae0c2537645f4e3658817b42e55971ebc869dc03f37208 +AUX xen-tools-3.3.1-qemu-xen.patch 697 RMD160 d25a576b64bffd13b3d1c1df45b577ca510dfebc SHA1 b8dc8e797b28c08593124668fc225efd38c501cf SHA256 e8917ad249c6f6d3ad97229f5e7dab7c5b84c96ee99f1606d356ce65e4361d18 +AUX xend.initd 1291 RMD160 96659d237688d0c42e5c30491ad883d4af0f1c0f SHA1 2ffe2b29df7014d1dbf69f850a23a95e1b294288 SHA256 41ae7f38565a477abc1fb8ac5af9d6285bf90d171b922c6413aa8aefe5b00889 +AUX xendomains-screen.confd 594 RMD160 79c7a3546cf1d3f8558c2120d6e8c93c753e66b9 SHA1 7f9ed2986495d5fa4a6f8b050cd632fde6a19994 SHA256 c4d7ffcdbeccc5e93460e2abbf70d642a78a363d79ccbbce0407f50cace54e0a +AUX xendomains.confd 291 RMD160 75d55db5360da12fc3d721c37001ccbfbb844e52 SHA1 e7be8973a4bcbfc7680258e369b07e2ed097ef49 SHA256 2fac318bb96b357dd185f7729d83c0a0b941799cdb89c24ed83051bb085735dc +AUX xendomains.initd 2609 RMD160 d606f752d3b1f9451bf9e1895f3a28350e8bdc87 SHA1 8e57c4ea216cede1898d960650008fd65ae4037f SHA256 16cac2533e045dba45cac60abde9184bc3aa41e9c319a1ac286dd4036222ff00 +EBUILD xen-tools-3.3.1.ebuild 7005 RMD160 b303ea2f4120374e27f9a24ff1577ad62bfdcb66 SHA1 0b0b3ec92281f2249b4148ff9713550b142a7b63 SHA256 a5d9fc322ed63e87e4ec6ec0eff6d9ee33e6cd8156c9031d3c67482e882a3a56 +DIST xen-3.3.1.tar.gz 11329774 RMD160 31d3e801b4eec37715900c6247be403aaafdd5e1 SHA1 fa63c80e04dfc1bb376d98c5a0a0b08f7912b3f9 SHA256 88b4234eeee80560a3321c7e887cedd7696f45694e3e9557c21b150de1c54a49 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.1.3-network-bridge-broadcast.patch b/app-emulation/xen-tools/files/xen-tools-3.1.3-network-bridge-broadcast.patch new file mode 100644 index 0000000..f916ece --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.1.3-network-bridge-broadcast.patch @@ -0,0 +1,11 @@ +--- xen-3.1.3/tools/examples/network-bridge.orig 2008-01-31 02:06:54.000000000 -0800 ++++ xen-3.1.3/tools/examples/network-bridge 2008-02-02 17:21:25.000000000 -0800 +@@ -70,7 +70,7 @@ + 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 //'` + } + diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch new file mode 100644 index 0000000..48e7cd5 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.3.0-nostrip.patch @@ -0,0 +1,26 @@ +Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile +=================================================================== +--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile ++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile +@@ -205,7 +205,7 @@ endif + install: all $(if $(BUILD_DOCS),install-doc) + mkdir -p "$(DESTDIR)$(bindir)" + ifneq ($(TOOLS),) +- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" ++ $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(bindir)" + endif + mkdir -p "$(DESTDIR)$(datadir)" + set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ +Index: xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target +=================================================================== +--- xen-3.3.0.orig/tools/ioemu-qemu-xen/Makefile.target ++++ xen-3.3.0/tools/ioemu-qemu-xen/Makefile.target +@@ -707,7 +707,7 @@ clean: + + install: all install-hook + ifneq ($(PROGS),) +- $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" ++ $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" + endif + + # Include automatically generated dependency files diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch b/app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch new file mode 100644 index 0000000..f1039d8 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.3.0-xen-detect-nopie-fix.patch @@ -0,0 +1,12 @@ +Index: xen-3.3.0/tools/misc/Makefile +=================================================================== +--- xen-3.3.0.orig/tools/misc/Makefile ++++ xen-3.3.0/tools/misc/Makefile +@@ -51,3 +51,7 @@ clean: + + xenperf: %: %.o Makefile + $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDFLAGS_libxenctrl) ++ ++xen-detect: %: %.c Makefile ++ $(CC) $(CFLAGS) $(LDFLAGS) $(call cc-option,$(CC),-nopie,) -o $@ $< ++ diff --git a/app-emulation/xen-tools/files/xen-tools-3.3.1-qemu-xen.patch b/app-emulation/xen-tools/files/xen-tools-3.3.1-qemu-xen.patch new file mode 100644 index 0000000..9957c21 --- /dev/null +++ b/app-emulation/xen-tools/files/xen-tools-3.3.1-qemu-xen.patch @@ -0,0 +1,15 @@ +--- tools/ioemu-qemu-xen/xen-setup~ 2009-01-05 11:36:22.000000000 +0000 ++++ tools/ioemu-qemu-xen/xen-setup 2009-03-11 13:08:51.000000000 +0000 +@@ -3,9 +3,9 @@ + + # git-clean -x -d && ./xen-setup && make prefix=/usr CMDLINE_CFLAGS='-O0 -g' -j4 && make install DESTDIR=`pwd`/dist/ prefix=/usr && rsync -a --stats --delete . thule:shadow/qemu-iwj.git/ && rsync -a --stats dist/. root@thule:/ + +-rm -f $target/Makefile +-rm -f $target/config.mak +-rm -f config-host.mak ++[[ -f $target/Makefile ]] && rm -f $target/Makefile ++[[ -f $target/config.mak ]] && rm -f $target/config.mak ++[[ -f config-host.mak ]] && rm -f config-host.mak + + if test -f config-host.h; then mv config-host.h config-host.h~; fi + diff --git a/app-emulation/xen-tools/files/xend.initd b/app-emulation/xen-tools/files/xend.initd new file mode 100644 index 0000000..a28c6b4 --- /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: /var/cvsroot/gentoo-x86/app-emulation/xen-tools/files/xend.initd,v 1.1 2007/05/02 04:10:04 marineam Exp $ + +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 $(/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:=/etc/xen/auto}/"* 2>/dev/null | sort); 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. + DOMAINS="$(ls "${AUTODIR:=/etc/xen/auto}/"* 2>/dev/null | sort -r)" + + if [[ "$PARALLEL_SHUTDOWN" = "yes" ]] ; then + for dom in $DOMAINS ; do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Asking domain ${name} to shutdown..." + xm shutdown ${name} >/dev/null + eend $? + fi + done + fi + for dom in $DOMAINS ; do + name=$(get_domname ${dom}) + if is_running ${name} ; then + ebegin " Waiting for domain ${name} to shutdown" + 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.3.1.ebuild b/app-emulation/xen-tools/xen-tools-3.3.1.ebuild new file mode 100644 index 0000000..98dd33e --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.3.1.ebuild @@ -0,0 +1,241 @@ +# 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.3.0.ebuild,v 1.1 2008/09/01 00:41:07 rbu Exp $ + +inherit flag-o-matic eutils multilib python + +# TPMEMUFILE=tpm_emulator-0.4.tar.gz + +DESCRIPTION="Xend daemon and tools" +HOMEPAGE="http://xen.org/" +SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz" +# vtpm? ( mirror://berlios/tpm-emulator/${TPMEMUFILE} )" +S="${WORKDIR}/xen-${PV}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc debug screen custom-cflags pygrub hvm api acm flask" + + +EAPI=2 + +CDEPEND="dev-lang/python[threads] + sys-libs/zlib + hvm? ( media-libs/libsdl ) + acm? ( dev-libs/libxml2 ) + api? ( dev-libs/libxml2 net-misc/curl ) + pygrub? ( dev-lang/python[ncurses] )" +# vtpm? ( dev-libs/gmp dev-libs/openssl ) + +DEPEND="${CDEPEND} + sys-devel/gcc + dev-lang/perl + app-misc/pax-utils + doc? ( + app-doc/doxygen + dev-tex/latex2html[png,gif] + media-gfx/transfig + media-gfx/graphviz + ) + + hvm? ( + x11-proto/xproto + sys-devel/dev86 + )" + +RDEPEND="${CDEPEND} + sys-apps/iproute2 + net-misc/bridge-utils + dev-python/pyxml + 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" +QA_EXECSTACK="usr/share/xen/qemu/openbios-sparc32 + usr/share/xen/qemu/openbios-sparc64" + +pkg_setup() { + export "CONFIG_LOMOUNT=y" + + 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 + +# use vtpm && export "VTPM_TOOLS=y" + use api && export "LIBXENAPI_BINDINGS=y" + use acm && export "ACM_SECURITY=y" + use flask && export "FLASK_ENABLE=y" +} + +src_configure() { +# use vtpm && cp "${DISTDIR}"/${TPMEMUFILE} tools/vtpm + + # 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-$(PYTHON_TOOLS) += pygrub$/d' "${S}"/tools/Makefile + fi + + # 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.3.0-xen-detect-nopie-fix.patch" + + # Do not strip binaries + epatch "${FILESDIR}/${PN}-3.3.0-nostrip.patch" + + # Fix eqemu-xen + epatch "${FILESDIR}/${P}-qemu-xen.patch" + +} + +src_compile() { + export VARTEXFONTS="${T}/fonts" + local myopt + 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 + + emake -C tools ${myopt} || die "compile failed" + + if use doc; then + sh ./docs/check_pkgs || die "package check failed" + emake docs || die "compiling docs failed" + emake dev-docs || die "make dev-docs failed" + fi + + emake -C docs man-pages || die "make man-pages failed" +} + +src_install() { + make DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" XEN_PYTHON_NATIVE_INSTALL=y install-tools \ + || die "install failed" + + # Remove RedHat-specific stuff + rm -rf "${D}"/etc/sysconfig + + dodoc README docs/README.xen-bugtool docs/ChangeLog + if use doc; then + emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs \ + || die "install docs failed" + + dohtml -r docs/api/ + docinto pdf + dodoc docs/api/tools/python/latex/refman.pdf + + [ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html + fi + rm -rf "${D}"/usr/share/doc/xen/ + + 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 '', see bug #141866" + 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 + + python_mod_optimize +} + +pkg_postrm() { + python_mod_cleanup +} diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest new file mode 100644 index 0000000..694d2b3 --- /dev/null +++ b/app-emulation/xen/Manifest @@ -0,0 +1,2 @@ +EBUILD xen-3.3.1.ebuild 2872 RMD160 20ea5b4d8adea891e5d5b3f61a24ceb35f298cc7 SHA1 b964d6b846daaf34feb58880cf7e50b1a8356679 SHA256 c2f05997dd872fcd5e5957ae0494d84851de981b250ef0c06f1a9d68a3b0093b +DIST xen-3.3.1.tar.gz 11329774 RMD160 31d3e801b4eec37715900c6247be403aaafdd5e1 SHA1 fa63c80e04dfc1bb376d98c5a0a0b08f7912b3f9 SHA256 88b4234eeee80560a3321c7e887cedd7696f45694e3e9557c21b150de1c54a49 diff --git a/app-emulation/xen/xen-3.3.1.ebuild b/app-emulation/xen/xen-3.3.1.ebuild new file mode 100644 index 0000000..ae77cd6 --- /dev/null +++ b/app-emulation/xen/xen-3.3.1.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-3.3.0.ebuild,v 1.1 2008/09/01 00:30:53 rbu Exp $ + +inherit mount-boot flag-o-matic toolchain-funcs + +DESCRIPTION="The Xen virtual machine monitor" +HOMEPAGE="http://xen.org/" +SRC_URI="http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug custom-cflags pae acm flask xsm" + +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 && 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 xsm ; then + export "XSM_ENABLE=y" + use acm && export "ACM_SECURITY=y" + if use flask ; then + ! use acm && export "FLASK_ENABLE=y" + use acm && ewarn "Both acm and flask XSM specified, defaulting to acm." + fi + elif use acm || use flask ; then + ewarn "acm and flask require USE=xsm to be set, dropping use 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 +} + +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 + replace-flags -O3 -O2 + else + unset CFLAGS + fi + + # Send raw LDFLAGS so that --as-needed works + emake CC="$(tc-getCC)" 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 "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 use pae; then + echo + ewarn "This is a PAE build of Xen. It will *only* boot PAE kernels!" + fi +} -- cgit v1.2.3-65-gdbad