From 5cde19314114ed7cb58aa6abe4b41e76e3066e01 Mon Sep 17 00:00:00 2001 From: Andrew Ross Date: Thu, 2 Nov 2006 10:29:33 +0000 Subject: Import proposed xen-tools-3.0.3 ebuild from bug #151764 svn path=/; revision=29 --- app-emulation/xen-tools/Manifest | 8 + .../xen-tools/files/digest-xen-tools-3.0.3 | 3 + app-emulation/xen-tools/xen-tools-3.0.3.ebuild | 176 +++++++++++++++++++++ 3 files changed, 187 insertions(+) create mode 100644 app-emulation/xen-tools/files/digest-xen-tools-3.0.3 create mode 100644 app-emulation/xen-tools/xen-tools-3.0.3.ebuild diff --git a/app-emulation/xen-tools/Manifest b/app-emulation/xen-tools/Manifest index cf43e17..d2eeb71 100644 --- a/app-emulation/xen-tools/Manifest +++ b/app-emulation/xen-tools/Manifest @@ -55,6 +55,7 @@ MD5 99faf5e0acd1af480c0676189ffe7c9a files/xendomains.initd 2272 RMD160 ef57e016a0c6076f385ece4da77ea62b18349924 files/xendomains.initd 2272 SHA256 6cdba349028a8af689a960a700f32f2e146334c38ae75b8afd7141dbd160d000 files/xendomains.initd 2272 DIST xen-3.0.2-src.tgz 4933621 RMD160 34e4431a981891319f8a5ea0c3f604e7d8d7d7af SHA1 b7e797048b516f8b385afd3da9ae2eded1b8033a SHA256 f18ffab16a457fa721d11933c75f8288f6958c88c2669857c7c11d5107ba2951 +DIST xen-3.0.3_0-src.tgz 5465968 RMD160 528020035ee32144b52bcdfccc8c44708b0196ea SHA1 9505ae3a5a42bc969836de81f501341409291f78 SHA256 7220bb4b0474e530559f558fcb4da8c88f1095c8e2f420602a26dfea5020443f EBUILD xen-tools-3.0.2-r3.ebuild 5530 RMD160 fe932ebe8722970f5a433a0619552c6ec2f93eaf SHA1 421419794bd2c77c6780d936c91f1c19c000dfb2 SHA256 cff3399ef7a791cafcf2053c00124ab56772b730ac8aa32a088ced857b011c1e MD5 11588a83ffd3177430efeca5cc668ba3 xen-tools-3.0.2-r3.ebuild 5530 RMD160 fe932ebe8722970f5a433a0619552c6ec2f93eaf xen-tools-3.0.2-r3.ebuild 5530 @@ -63,9 +64,16 @@ EBUILD xen-tools-3.0.2-r4.ebuild 5606 RMD160 4e79b938e0c67f8b74b0c7a59634e0f9540 MD5 0ddef7e6f6bf4b683d51ac27aed477c8 xen-tools-3.0.2-r4.ebuild 5606 RMD160 4e79b938e0c67f8b74b0c7a59634e0f95408a913 xen-tools-3.0.2-r4.ebuild 5606 SHA256 4bbfe1ce372e6c21e87e7177757b847361669e371dfa9c30ba80590d80527e74 xen-tools-3.0.2-r4.ebuild 5606 +EBUILD xen-tools-3.0.3.ebuild 5067 RMD160 d6ebbdc48567f59696a961a61a941d4aca626521 SHA1 b0802de17147ac1e26afcf7646b24d49fe003496 SHA256 c7c3b130c7c4dad6b48e8405ec7136886bbd596fd6480859a7a8d7060553988b +MD5 1b27b369b0278536e7d1ed82af5b6849 xen-tools-3.0.3.ebuild 5067 +RMD160 d6ebbdc48567f59696a961a61a941d4aca626521 xen-tools-3.0.3.ebuild 5067 +SHA256 c7c3b130c7c4dad6b48e8405ec7136886bbd596fd6480859a7a8d7060553988b xen-tools-3.0.3.ebuild 5067 MD5 6618adc624bc8ab64af0f4555c33529a files/digest-xen-tools-3.0.2-r3 235 RMD160 ad3a1d2a82c40b0bca653431c2d7964809580e5e files/digest-xen-tools-3.0.2-r3 235 SHA256 274536fc8a3cb10fda114e533062b0dbddcda4ae15f52033a39b85785b221794 files/digest-xen-tools-3.0.2-r3 235 MD5 6618adc624bc8ab64af0f4555c33529a files/digest-xen-tools-3.0.2-r4 235 RMD160 ad3a1d2a82c40b0bca653431c2d7964809580e5e files/digest-xen-tools-3.0.2-r4 235 SHA256 274536fc8a3cb10fda114e533062b0dbddcda4ae15f52033a39b85785b221794 files/digest-xen-tools-3.0.2-r4 235 +MD5 12dd00fa0bb9c2e41430eb5ce8982919 files/digest-xen-tools-3.0.3 241 +RMD160 49d94fe9ef9ea6b0c3b47ab119fe58bfee581e89 files/digest-xen-tools-3.0.3 241 +SHA256 bd445798febcfd9845666be6a1f8a0969d951389aa4984f6a8445eab6bac43fd files/digest-xen-tools-3.0.3 241 diff --git a/app-emulation/xen-tools/files/digest-xen-tools-3.0.3 b/app-emulation/xen-tools/files/digest-xen-tools-3.0.3 new file mode 100644 index 0000000..c045c5b --- /dev/null +++ b/app-emulation/xen-tools/files/digest-xen-tools-3.0.3 @@ -0,0 +1,3 @@ +MD5 75d895858a467405114599abf94d60a2 xen-3.0.3_0-src.tgz 5465968 +RMD160 528020035ee32144b52bcdfccc8c44708b0196ea xen-3.0.3_0-src.tgz 5465968 +SHA256 7220bb4b0474e530559f558fcb4da8c88f1095c8e2f420602a26dfea5020443f xen-3.0.3_0-src.tgz 5465968 diff --git a/app-emulation/xen-tools/xen-tools-3.0.3.ebuild b/app-emulation/xen-tools/xen-tools-3.0.3.ebuild new file mode 100644 index 0000000..45a1d57 --- /dev/null +++ b/app-emulation/xen-tools/xen-tools-3.0.3.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit mount-boot flag-o-matic distutils eutils multilib + +DESCRIPTION="Xend daemon and tools" +HOMEPAGE="http://xen.sourceforge.net" +XEN_VERSION="3.0.3_0" +SRC_URI="http://bits.xensource.com/oss-xen/release/${XEN_VERSION/_/-}/src.tgz/xen-${XEN_VERSION}-src.tgz" +S="${WORKDIR}/xen-${XEN_VERSION}-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 ) + pygrub? ( >=sys-fs/progsreiserfs-0.3.1_rc8 )" + +DEPEND="${CDEPEND} + sys-devel/gcc + dev-lang/perl + app-misc/pax-utils + doc? ( + dev-tex/latex2html + media-gfx/transfig + ) + ioemu? ( net-libs/libvncserver )" + +RDEPEND="${CDEPEND} + >=app-emulation/xen-3.0.3 + sys-apps/iproute2 + net-misc/bridge-utils + screen? ( + app-misc/screen + app-admin/logrotate + ) + || ( sys-fs/udev sys-apps/hotplug )" + +PYTHON_MODNAME="xen grub" + +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 '', see bug #141866" + fi + + if [[ -z ${XEN_TARGET_ARCH} ]] ; then + if use x86 ; then + export XEN_TARGET_ARCH="x86_32" + elif use amd64 ; then + export XEN_TARGET_ARCH="x86_64" + else + die "Unsupported architecture!" + fi + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # if the user *really* wants to use their own custom-cflags, let them + if use custom-cflags; then + einfo "User wants their own CFLAGS - removing defaults" + # try and remove all the default custom-cflags + find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \ + -e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \ + -e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \ + -i {} \; + fi + + # xen tries to be smart and filter out CFLAGs not supported by gcc. + # It doesn't handle no* flags though, but flag-o-matic's test-flag-CC does. + for FLAG in -nopie -fno-stack-protector -fno-stack-protector-all; do + test-flag-CC ${FLAG} && HARDFLAGS="${HARDFLAGS} ${FLAG}" + done + sed -i "s/^CFLAGS :=$/& ${HARDFLAGS}/" \ + "${S}"/tools/firmware/{hvmloader,vmxassist}/Makefile + + + # Disable the 32bit-only vmxassist if we are not on x86 + # and we don't support the x86 ABI + if ! use x86 && ! has x86 $(get_all_abis); then + sed -i -e "/SUBDIRS += vmxassist/d" "${S}"tools/firmware/Makefile + fi + + if use pygrub; then + # Upstream use Debian and hence progsreiserfs-0.3.0, + # which has a different API to 0.3.1 + epatch "${FILESDIR}/"3.0.2-r4/pygrub-progsreiserfs-0.3.1.patch + else + sed -i -e "/^SUBDIRS += pygrub$/d" "${S}"/tools/Makefile + fi + + # Don't bother with ioemu, only needed for fully virtualised guests + if ! use ioemu; then + sed -i -e "/^CONFIG_IOEMU := y$/d" "${S}"/config/*.mk + fi +} + +src_compile() { + local myopt myconf + use debug && myopt="${myopt} debug=y" + + use custom-cflags || unset CFLAGS + gcc-specs-ssp && append-flags -fno-stack-protector -fno-stack-protector-all + + if use ioemu; then + myconf="${myconf} --disable-system --disable-user" + (cd tools/ioemu && econf ${myconf}) || die "configure failured" + fi + + emake -C tools ${myopt} || die "compile failed" + + if use doc; then + sh ./docs/check_pkgs || die "package check failed" + emake -C docs || die "compiling docs failed" + fi + + emake -C docs man-pages || die "make man-pages failed" +} + +src_install() { + local myopt="XEN_PYTHON_NATIVE_INSTALL=1" + + make DESTDIR="${D}" ${myopt} install-tools \ + || die "install failed" + + # Remove RedHat-specific stuff + rm -rf "${D}"/etc/sysconfig + + if use doc; then + make DESTDIR="${D}" -C docs install || die "install docs failed" + # Rename doc/xen to the Gentoo-style doc/xen-x.y + mv "${D}"/usr/share/doc/{${PN},${PF}} + fi + + doman docs/man?/* + + newinitd "${FILESDIR}/${PVR}"/xend.initd xend + newconfd "${FILESDIR}"/xendomains.confd xendomains + newinitd "${FILESDIR}/${PVR}"/xendomains.initd xendomains + + 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 ! built_with_use dev-lang/python ncurses; then + echo + ewarn "NB: Your dev-lang/python is built without USE=ncurses." + ewarn "Please rebuild python with USE=ncurses to make use of xenmon.py." + fi + + if grep -qsF XENSV= "${ROOT}/etc/conf.d/xend"; then + echo + elog "xensv is broken upstream (Gentoo bug #142011)." + elog "Please remove '${ROOT%/}/etc/conf.d/xend', as it is no longer needed." + fi +} -- cgit v1.2.3-65-gdbad