summaryrefslogtreecommitdiff
path: root/app-emulation/xe-guest-utilities
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-emulation/xe-guest-utilities
reinit the tree, so we can have metadata
Diffstat (limited to 'app-emulation/xe-guest-utilities')
-rw-r--r--app-emulation/xe-guest-utilities/Manifest14
-rw-r--r--app-emulation/xe-guest-utilities/files/xe-daemon.initd27
-rw-r--r--app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-gentoo.patch35
-rw-r--r--app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-update-guest-attrs.patch11
-rw-r--r--app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Guest-Attributes.patch127
-rw-r--r--app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Linux-Distribution.patch77
-rw-r--r--app-emulation/xe-guest-utilities/metadata.xml28
-rw-r--r--app-emulation/xe-guest-utilities/xe-guest-utilities-5.6.0_p595.ebuild56
-rw-r--r--app-emulation/xe-guest-utilities/xe-guest-utilities-6.1.0_p1033.ebuild56
-rw-r--r--app-emulation/xe-guest-utilities/xe-guest-utilities-6.2.0_p1120.ebuild56
10 files changed, 487 insertions, 0 deletions
diff --git a/app-emulation/xe-guest-utilities/Manifest b/app-emulation/xe-guest-utilities/Manifest
new file mode 100644
index 000000000000..834e7ddd0b40
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/Manifest
@@ -0,0 +1,14 @@
+AUX xe-daemon.initd 628 SHA256 c65e8f0354364f32e87bee2922979cb09ea680ad6baae48a910a10d39b850987 SHA512 0278202ff6ce4d8537fd56293844039cee438d5487bb5bd843634f7ca91a0ade2afe5d5b5e5fbc3715e5ef3966ff58772a3540ae9e3cbc19b19eac4266b953b6 WHIRLPOOL c556748ff65ebcbe1595f5977da99cdeddaec3111f4a89f73873244bf4d80e5fd3579f1392e1c64bd26a41f3ca63eff52817d82ead79692833787f4612c181dc
+AUX xe-guest-utilities-5.6.100_p651-gentoo.patch 1004 SHA256 54a97383693c3b0802370594509142b3bd9701f8b8d82ee0139177042284e89a SHA512 c420d4304f749ef4c52a56ba8fb08b4979dc1334d32cc22793afe39f3494bda66dc291970474c1aa1345179e60399f37dcf82b09e7e408ad772bfd214bf9e0ed WHIRLPOOL 8edfe92d6e72ffb9b65c67f2d8cc7d52b424c08b6d80fa833905ba7898b693741e2a72e645f4919058fb899810068caeb70bfaec7b4fd7b9772a5561824a6a1f
+AUX xe-guest-utilities-5.6.100_p651-update-guest-attrs.patch 558 SHA256 e2047e6164e1d5fd1d97922933f837fddb5b7f1183f3b29b4f14ba65baa8dddc SHA512 84fb3d8f231e9597616770960e6c0bae8a4bed2d165dd185cccbd6b64d72836f2271d17574f8cbf524e39c0090a7d5a6f646959d214c38d3074e930fde2e9852 WHIRLPOOL 9d42bd7f496963b02e60fdaeb83ec075944f23c5a609add89c844c4b891cb205043a241f584e450f27f4c75f352b4178992b44b97bf390ae04d5220b20a6ac75
+AUX xe-guest-utilities-6.2.0_p1120-Guest-Attributes.patch 4599 SHA256 aebe218113a450711013535133a0da2eac5d4adc52bac925b790cf2e1c9f2feb SHA512 c9147d9a93b45d7300441b6c398c27bf3c38d39c0a6908f80a2708b8c26329c9b138522ca3b7ae7b4af2ace3b43ededda03dd39b9c8cafd31dbe32beae739690 WHIRLPOOL 6d16a2a3cab647bf1be5b99ed334be2c203bfddfaa5696d6da73f315f2b6afaacf6d2272913f608f251d38911aec14391bda87344fb8b9acfc8da82c0cae70a8
+AUX xe-guest-utilities-6.2.0_p1120-Linux-Distribution.patch 2146 SHA256 4a8838b003a6144de5581fc33453721beaf7ef28f3d328212a21e21af4916bf1 SHA512 93f5c1445b7ee449fedaed3c73a3f21b6adc0fad67d90e3bb35213749ae659ffae85dec3ddf43d4b5df21500e8b651651dd7496a2ffb8fa2d9091dd246c839de WHIRLPOOL 23cd7e7182638f4ff7924e2f1f16b4b35938cecd678e2fd28c7d37dc900eb420e56b758f3e4a74c0842a335314b947be17661e800e05d254f3096c00a0e05ef8
+DIST xe-guest-utilities-5.6.0-595.src.rpm 454569 SHA256 88082b9703b7af5eda345b471bef9f2a8a4bdc0ab6acc7e6b6a623a9d03e4516 SHA512 967f7708f074f4382c95a823e24dcf07c677e44d75a97e57078d63284584c85d2acf24e0a4b58ec2f26ba034ccaa1baad5793391f736fa4d72c04f7511bd78aa WHIRLPOOL cac2562b598ca49dfacd5146197f293b14fed56038275e1af1253dd299dab6d67dd413fda17de6fa872657fc49d1b1bdfdddd976d5d78df50db61d1f4b94e752
+DIST xe-guest-utilities-6.1.0-1033.src.rpm 554621 SHA256 a9b210dc8a7e9a2efc13bc2db3459242dba509df1b5468e7fa48ac3fe801d594 SHA512 65ab85974fb5e73619aa3bac22c861cf989d6256e4f856da3c14767a0e8fe8f1c34713db32166c6f901c589e61f2fcc3c285bd8eded4925daa829e4adb07e9e2 WHIRLPOOL 6a4af1bd3c50650a71d28c8f6b00231da30c6db2bd424485ae0cba5edf51b22ef78890f40f34c2bb85e6597feca11cc7a858415e69eb090ce779d275949bd45d
+DIST xe-guest-utilities-6.2.0-1120.src.rpm 566881 SHA256 8aabd8770a69684b9f5ab601f7e2b204763c3ab2c71f1e9c60a5374ebdad11e1 SHA512 b945b3bf8175816b41b3a07a7dd8f0d9d2fdb1a7144448a5bb7fb4b6729736c67cea88fd45031df41abdd99416addb17fa1ee9cfe1fc76acf610cde3b3213880 WHIRLPOOL 80b2612d4db43ef6c43282b283eb9f8cb74517e02f1473e93bb2a62e02c65adfae09459805aa98577e8548727d1adb5b43d1f30d7280e178cd713e994a67a7a3
+EBUILD xe-guest-utilities-5.6.0_p595.ebuild 1489 SHA256 ab1da407436787cd7e9073e1cbea776502fc036e2766b4bd0bda3898c7b6404f SHA512 82fec2ef7117e0c4184c69e3093f82c53c4a6247c5cf4c864c9cea5d7349139e0ac58d1b38ae38f35dce75c958a1ae166f776e6958835eaeda94b9c608944a36 WHIRLPOOL ed91e5732f04df612278c7bf82b4b022f00d16b02279b81450a98af9880d5930f90d0fef1a9da7dd3da1269df98237a4024b46286d41512590381419cbf86ba9
+EBUILD xe-guest-utilities-6.1.0_p1033.ebuild 1497 SHA256 168d0e807f946c7950f9c0594659b23c02ff59ef23e5e07ef5ed39cb20295c98 SHA512 d45672258065232c0bc0346e77b6dbb093885c21ff5680b5bdd67801f0b7bdfffddac3e1726fd8d6ca2246a6dffe5b96cf8580a3c54a357837454c266ae09543 WHIRLPOOL f9ca4a304ad7985414a3af3709a0853acee73d2547c30ca0b14e400979e9f5548db904f8ad3b150bf536562554b25a1e7450d1bb1a9a785fbdbfb2d1ec4bebbe
+EBUILD xe-guest-utilities-6.2.0_p1120.ebuild 1502 SHA256 c24c853e74754ff72ac4e757b2a70e83aba72f09d46a7f03d4cf00ce748067f8 SHA512 914f862eb826a3717c1827324772caf9d384b860ff1777421a357d37ccc44e785a09ce6eeb3dbf91937fb33d4b76b696313627077e6618596b75ad265a065fec WHIRLPOOL 73806d625e8f7c3606137e3d92e174414056c3fdad8b8a0947c168118be10c9e69d46caa0ef5fe0b2de0a73fef254462140610b2649e1843b96aa99042963f99
+MISC ChangeLog 3357 SHA256 f75c3b01be1763fdecf0587cba8f51408f999bd978f8c91f38960b3876770d57 SHA512 5aa36fea801653491a482daf262f2b98fabb46df4783d66c5c8a9e789ab54a699c101416b7ec74cbde3bfd87b0100a21a07f3bb74ba81b124d2d7ace1496fb80 WHIRLPOOL b9f40b414bbea84097eea34a17907226a5c9b0571a7daa511521f62f6bc8381d45ab34e573276c79607ea8c169e6f8bfea6f8e41571aaa136612bf36d2a8ddfe
+MISC ChangeLog-2015 1054 SHA256 f3fdeb5e5e41004f87de79c012e0c0553fdd6d2c2b636a18da3ee2ad6e118f6b SHA512 bf5de07fd7f6211cfc1363cdcf683277b737ae9d7b374c3f7cdbca1dc0dd08b17f2d5c3085db41fc921f7da70040d63965cfc690be31889d7b7a9d47a6f672d4 WHIRLPOOL d3a5ba97a27b6ec18afce7a690af4ce7f5b9ba1ce9a2f1dcf9d41419cf32fbfe2dff075d6cad4c01ad9dfd9ec5714a2ab0727b976b77f14fc2fab12f64c8da77
+MISC metadata.xml 888 SHA256 35dd687b22374b0845efe88e5854188d64b43d7a7b7b4b4b7dbf93e93b0bd96e SHA512 f74910d0e2ee6b7bfe4e98c7c1c5b1266c749f8df86d900d2500c4722b9a73b752f1f086451f3746131415be9c1c34c8af65307b993b14d1e3cd216546861427 WHIRLPOOL 66a5703b327f1489df613ed7b20ded131e15b380802ced490844dd4949ecf80814c3ca1aa09eb313d02a7a05a732a2262a02b09f200e1991011c7e793aeca53c
diff --git a/app-emulation/xe-guest-utilities/files/xe-daemon.initd b/app-emulation/xe-guest-utilities/files/xe-daemon.initd
new file mode 100644
index 000000000000..d2c6e51fb5bf
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/files/xe-daemon.initd
@@ -0,0 +1,27 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start() {
+ einfo "Detecting Linux distribution version"
+ /usr/sbin/xe-linux-distribution /var/cache/xe-linux-distribution
+
+ ebegin "Starting xe daemon"
+ start-stop-daemon --start --exec /usr/sbin/xe-daemon \
+ --pidfile /var/run/xe-daemon.pid \
+ --background \
+ -- -p /var/run/xe-daemon.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping xe daemon"
+ start-stop-daemon --stop --exec /usr/sbin/xe-daemon \
+ --pidfile /var/run/xe-daemon.pid
+ eend $?
+}
diff --git a/app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-gentoo.patch b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-gentoo.patch
new file mode 100644
index 000000000000..ee9b86e91396
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-gentoo.patch
@@ -0,0 +1,35 @@
+--- usr/sbin/xe-linux-distribution.orig 2011-04-18 10:56:30.000000000 -0500
++++ usr/sbin/xe-linux-distribution 2013-12-31 01:35:51.995831278 -0600
+@@ -249,6 +249,24 @@
+ write_to_output "${distro}" "${major}" "${minor}" "${description}"
+ }
+
++identify_gentoo()
++{
++ gentoo_release="$1"
++ if [ ! -e "${gentoo_release}" ] ; then
++ return 1
++ fi
++ distro="gentoo"
++ eval $(cat ${gentoo_release} | awk '{ print "release=" $5 }' )
++ if [ -z "${release}" ] ; then
++ return 1
++ fi
++ eval $(echo $release | awk -F. -- '{ print "major=" $1 ; print "minor=" $2 }' )
++ if [ -z "${major}" -o -z "$minor" ] ; then
++ return 1
++ fi
++ write_to_output "${distro}" "${major}" "${minor}" "${distro}"
++}
++
+ if [ $# -eq 1 ] ; then
+ exec 1>"$1"
+ fi
+@@ -258,6 +276,7 @@
+ identify_sles /etc/SuSE-release && exit 0
+ identify_lsb lsb_release && exit 0
+ identify_debian /etc/debian_version && exit 0
++ identify_gentoo /etc/gentoo-release && exit 0
+
+ if [ $# -eq 1 ] ; then
+ rm -f "$1"
diff --git a/app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-update-guest-attrs.patch b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-update-guest-attrs.patch
new file mode 100644
index 000000000000..c60994effa65
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-5.6.100_p651-update-guest-attrs.patch
@@ -0,0 +1,11 @@
+--- usr/sbin/xe-update-guest-attrs.orig 2011-04-18 10:56:30.000000000 -0500
++++ usr/sbin/xe-update-guest-attrs 2013-12-31 04:34:57.750083257 -0600
+@@ -172,7 +172,7 @@
+ # collisions:0 txqueuelen:0
+ # RX bytes:3604609 (3.4 MiB) TX bytes:3604609 (3.4 MiB)
+
+-eval $(/sbin/ifconfig | \
++eval $(/bin/ifconfig | \
+ sed -n -e '/^[0-9a-z][0-9a-z]*\:/,/^$/d' \
+ -e 's/^\([0-9a-z][0-9a-z]*\) .*/ifs="\$ifs \1"; current="\1"; /gp;' \
+ -e 's/ *inet addr:\('$IPADDR_RE'\) .*/eval inet_\${current}="\1"; /gp;')
diff --git a/app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Guest-Attributes.patch b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Guest-Attributes.patch
new file mode 100644
index 000000000000..d431cdfcf999
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Guest-Attributes.patch
@@ -0,0 +1,127 @@
+--- usr/sbin/xe-update-guest-attrs.orig 2013-06-14 07:57:18.000000000 -0500
++++ usr/sbin/xe-update-guest-attrs 2014-04-19 13:38:14.627477193 -0500
+@@ -1,6 +1,7 @@
+ #!/bin/sh
+
+ # Copyright (C) 2009 Citrix Systems Inc.
++# Copyright (C) 2014 Christopher J. Camisa
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+@@ -51,10 +52,10 @@
+
+ # parse command line opts
+
+-MEMORY_MODE=0 # do not update memory stats
+-while [ $# -ge 1 ] ; do
++MEMORY_MODE=0 # do not update memory stats
++while [ $# -ge 1 ] ; do
+ if [ "$1" = "--memory" ] ; then
+- MEMORY_MODE=1 # update only memory stats
++ MEMORY_MODE=1 # update only memory stats
+ fi
+ shift
+ done
+@@ -71,12 +72,12 @@
+ fi
+ else
+ # cache does not exist
+- if [ -e $cache ] ; then
++ if [ -e $cache ] ; then
+ # something (directory?) in its way
+ rm -rf $cache
+ fi
+ fi
+-
++
+ # try to write and update cache if successful
+ if $XENSTORE write "$key" "$newval" ; then
+ mkdir -p $(dirname "$cache")
+@@ -119,8 +120,8 @@
+ xenstore_list_interfaces_cached() {
+ topdir=$XS_CACHE/attr
+ if [ -d $topdir ] ; then
+- cd $topdir
+- for dir in * ; do
++ cd $topdir
++ for dir in * ; do
+ [ -f $dir/ip ] && echo $dir
+ done
+ fi
+@@ -131,7 +132,7 @@
+ eval $(cat /proc/meminfo | \
+ sed -n -e 's/MemTotal\: *\([0-9]*\)[^$]*/memtotal=\1/gp;' \
+ -e 's/MemFree\: *\([0-9]*\)[^$]*/memfree=\1/gp;')
+-
++
+ xenstore_write_cached "data/meminfo_total" "${memtotal}"
+ xenstore_write_cached "data/meminfo_free" "${memfree}"
+ fi
+@@ -140,17 +141,17 @@
+
+ # e.g.
+ # $ ip addr show
+-# 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
++# 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
+ # link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
+ # inet 127.0.0.1/8 scope host lo
+-# inet6 ::1/128 scope host
++# inet6 ::1/128 scope host
+ # valid_lft forever preferred_lft forever
+ # 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
+ # link/ether 00:13:20:95:e8:74 brd ff:ff:ff:ff:ff:ff
+ # inet 172.31.0.57/20 brd 172.31.15.255 scope global eth0
+-# inet6 fe80::213:20ff:fe95:e874/64 scope link
++# inet6 fe80::213:20ff:fe95:e874/64 scope link
+ # valid_lft forever preferred_lft forever
+-# 3: sit0: <NOARP> mtu 1480 qdisc noop
++# 3: sit0: <NOARP> mtu 1480 qdisc noop
+ # link/sit 0.0.0.0 brd 0.0.0.0
+
+ #eval $(ip addr show | \
+@@ -158,26 +159,26 @@
+ # -e 's/^[[:space:]]\{4\}inet \('${IPADDR_RE}'\)\/.*/eval inet_\${current}="\1"; /gp;')
+
+ # e.g.
+-# eth0 Link encap:Ethernet HWaddr 00:13:20:95:E8:74
++# eth0 Link encap:Ethernet HWaddr 00:13:20:95:E8:74
+ # inet addr:172.31.0.57 Bcast:172.31.15.255 Mask:255.255.240.0
+ # inet6 addr: fe80::213:20ff:fe95:e874/64 Scope:Link
+ # UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
+ # RX packets:98001128 errors:0 dropped:0 overruns:0 frame:0
+ # TX packets:87728920 errors:0 dropped:0 overruns:0 carrier:0
+-# collisions:0 txqueuelen:1000
++# collisions:0 txqueuelen:1000
+ # RX bytes:35864034092 (33.4 GiB) TX bytes:27544025180 (25.6 GiB)
+-# Interrupt:177
+-#
+-# lo Link encap:Local Loopback
++# Interrupt:177
++#
++# lo Link encap:Local Loopback
+ # inet addr:127.0.0.1 Mask:255.0.0.0
+ # inet6 addr: ::1/128 Scope:Host
+ # UP LOOPBACK RUNNING MTU:16436 Metric:1
+ # RX packets:32928 errors:0 dropped:0 overruns:0 frame:0
+ # TX packets:32928 errors:0 dropped:0 overruns:0 carrier:0
+-# collisions:0 txqueuelen:0
++# collisions:0 txqueuelen:0
+ # RX bytes:3604609 (3.4 MiB) TX bytes:3604609 (3.4 MiB)
+
+-ifs=`/sbin/ifconfig | sed -n -e 's/^\([a-z0-9]\+\).*/name \1/p' \
++ifs=`/bin/ifconfig | sed -n -e 's/^\([a-z0-9]\+\).*/name \1/p' \
+ -e 's/.*inet addr:\('$IPADDR_RE'\) .*/ipv4 \1/p' \
+ -e 's+.*inet6 addr: \('$IPADDR6_RE'\)/.*+ipv6 \1+p' | \
+ while read tag value; do
+@@ -225,9 +226,9 @@
+ # build time addons
+ xenstore_write_cached "attr/PVAddons/MajorVersion" "6"
+ xenstore_write_cached "attr/PVAddons/MinorVersion" "2"
+-xenstore_write_cached "attr/PVAddons/MicroVersion" "0"
++xenstore_write_cached "attr/PVAddons/MicroVersion" "0"
+ xenstore_write_cached "attr/PVAddons/BuildVersion" "70442"
+-xenstore_write_cached "attr/PVAddons/Installed" "1"
++xenstore_write_cached "attr/PVAddons/Installed" "1"
+
+ # update xenstore if necessary
+ if [ $XENSTORE_UPDATED -eq 1 ] ; then
diff --git a/app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Linux-Distribution.patch b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Linux-Distribution.patch
new file mode 100644
index 000000000000..45b0bbc56c69
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/files/xe-guest-utilities-6.2.0_p1120-Linux-Distribution.patch
@@ -0,0 +1,77 @@
+--- usr/sbin/xe-linux-distribution.orig 2013-06-14 07:57:18.000000000 -0500
++++ usr/sbin/xe-linux-distribution 2014-04-19 13:54:13.270477193 -0500
+@@ -1,6 +1,7 @@
+ #! /bin/sh
+
+ # Copyright (C) 2009 Citrix Systems Inc.
++# Copyright (C) 2014 Christopher J. Camisa
+ #
+ # This program is free software; you can redistribute it and/or
+ # modify it under the terms of the GNU General Public License
+@@ -68,7 +69,7 @@
+ eval $(awk -F. '/^[0-9]*\.[0-9]*/ \
+ { print "major="$1 ; print "minor="$2 ; exit 0 }' \
+ "${debian_version}")
+-
++
+ if [ -z "${major}" ] && [ -z "${minor}" ] && ! grep -q /sid "${debian_version}" ; then
+ return 1
+ fi
+@@ -118,7 +119,7 @@
+ # Enterprise Linux Enterprise Linux Server release 5 (Carthage)
+ # Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
+ # Oracle Linux Server release 5.6
+-
++
+ if [ ! -f "${redhat_release}" ] ; then
+ return 1
+ fi
+@@ -236,7 +237,7 @@
+ if [ ! -x "${lsb_release}" ] ; then
+ return 1
+ fi
+-
++
+ distro=$(${lsb_release} --short --id | tr 'A-Z' 'a-z')
+ description=$(${lsb_release} --short --description | sed -e 's/^"\(.*\)"$/\1/g')
+ release=$(${lsb_release} --short --release)
+@@ -254,6 +255,31 @@
+ write_to_output "${distro}" "${major}" "${minor}" "${description}"
+ }
+
++identify_gentoo()
++{
++ gentoo_release="$1"
++
++ if [ ! -e "${gentoo_release}" ] ; then
++ return 1
++ fi
++
++ distro="gentoo"
++
++ eval $(cat ${gentoo_release} | awk '{ print "release=" $5 }' )
++
++ if [ -z "${release}" ] ; then
++ return 1
++ fi
++
++ eval $(echo $release | awk -F. -- '{ print "major=" $1 ; print "minor=" $2 }' )
++
++ if [ -z "${major}" -o -z "$minor" ] ; then
++ return 1
++ fi
++
++ write_to_output "${distro}" "${major}" "${minor}" "${distro}"
++}
++
+ if [ $# -eq 1 ] ; then
+ exec 1>"$1"
+ fi
+@@ -265,6 +291,7 @@
+ identify_sles /etc/SuSE-release && exit 0
+ identify_lsb lsb_release && exit 0
+ identify_debian /etc/debian_version && exit 0
++ identify_gentoo /etc/gentoo-release && exit 0
+
+ if [ $# -eq 1 ] ; then
+ rm -f "$1"
diff --git a/app-emulation/xe-guest-utilities/metadata.xml b/app-emulation/xe-guest-utilities/metadata.xml
new file mode 100644
index 000000000000..733e714f2a52
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>chicago@blkid.net</email>
+ <name>Chicago</name>
+ <description>proxy maintainer</description>
+</maintainer>
+<maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+<maintainer type="project">
+ <email>openstack@gentoo.org</email>
+ <name>Openstack</name>
+</maintainer>
+<maintainer type="project">
+ <email>virtualization@gentoo.org</email>
+ <name>Gentoo Virtualization Project</name>
+</maintainer>
+<maintainer type="project">
+ <email>xen@gentoo.org</email>
+ <name>Gentoo Xen Project</name>
+</maintainer>
+<longdescription>XenServer Virtual Machine Tools</longdescription>
+<use>
+ <flag name="xenstore">Use xenstore binaries bundled by Citrix instead of building app-emulation/xen-tools</flag>
+</use>
+</pkgmetadata>
diff --git a/app-emulation/xe-guest-utilities/xe-guest-utilities-5.6.0_p595.ebuild b/app-emulation/xe-guest-utilities/xe-guest-utilities-5.6.0_p595.ebuild
new file mode 100644
index 000000000000..b6ff8ddbe87f
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/xe-guest-utilities-5.6.0_p595.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils rpm linux-info
+DESCRIPTION="XenServer Virtual Machine Tools"
+HOMEPAGE="http://www.citrix.com/"
+PV_BASE=${PV/_*}
+PV_FULL=${PV/_p/-}
+SRC_URI="http://updates.vmd.citrix.com/XenServer/${PV_BASE}/rhel4x/SRPMS/xe-guest-utilities-${PV_FULL}.src.rpm"
+LICENSE="LGPL-3 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="xenstore"
+DEPEND="app-arch/rpm2targz"
+RDEPEND="
+ !xenstore? ( app-emulation/xen-tools )
+ xenstore? ( !app-emulation/xen-tools )"
+S=${WORKDIR}
+CONFIG_CHECK="~XEN_COMPAT_XENFS ~XENFS"
+QA_PREBUILT="usr/bin/xenstore* usr/bin/xeninfo"
+
+src_unpack() {
+ rpm_src_unpack ${A}
+ # Upstream includes xenstore-sources.tar.bz2
+ # but it is NOT the complete source :-(
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-5.6.100_p651-gentoo.patch
+ epatch "${FILESDIR}"/${PN}-5.6.100_p651-update-guest-attrs.patch
+}
+
+src_install() {
+ newinitd "${FILESDIR}/xe-daemon.initd" xe-daemon
+ dosbin xe-daemon
+ dosbin xe-linux-distribution
+ dosbin xe-update-guest-attrs
+ insinto /lib/udev/rules.d
+ newins xen-vcpu-hotplug.rules 10-xen-vcpu-hotplug.rules
+
+ if use xenstore; then
+ dobin usr/bin/xeninfo
+ dobin usr/bin/xenstore
+ dobin usr/bin/xenstore-*
+ fi
+}
+
+pkg_postinst() {
+ if [ ! -e /etc/runlevels/boot/xe-daemon ]; then
+ elog "To start the xe-daemon automatically by default"
+ elog "you should add it to the boot runlevel :"
+ elog "'rc-update add xe-daemon boot'"
+ elog
+ fi
+}
diff --git a/app-emulation/xe-guest-utilities/xe-guest-utilities-6.1.0_p1033.ebuild b/app-emulation/xe-guest-utilities/xe-guest-utilities-6.1.0_p1033.ebuild
new file mode 100644
index 000000000000..b1b54c8ccde8
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/xe-guest-utilities-6.1.0_p1033.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils rpm linux-info
+DESCRIPTION="XenServer Virtual Machine Tools"
+HOMEPAGE="http://www.citrix.com/"
+PV_BASE=${PV/_*}
+PV_FULL=${PV/_p/-}
+SRC_URI="http://updates.vmd.citrix.com/XenServer/${PV_BASE}/rhel4x/SRPMS/xe-guest-utilities-${PV_FULL}.src.rpm"
+LICENSE="LGPL-3 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="xenstore"
+DEPEND="app-arch/rpm2targz"
+RDEPEND="
+ !xenstore? ( app-emulation/xen-tools )
+ xenstore? ( !app-emulation/xen-tools )"
+S=${WORKDIR}
+CONFIG_CHECK="~XEN_COMPAT_XENFS ~XENFS"
+QA_PREBUILT="usr/bin/xenstore* usr/bin/xeninfo"
+
+src_unpack() {
+ rpm_src_unpack ${A}
+ # Upstream includes xenstore-sources.tar.bz2
+ # but it is NOT the complete source :-(
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.2.0_p1120-Guest-Attributes.patch
+ epatch "${FILESDIR}"/${PN}-6.2.0_p1120-Linux-Distribution.patch
+}
+
+src_install() {
+ newinitd "${FILESDIR}/xe-daemon.initd" xe-daemon
+ dosbin xe-daemon
+ dosbin xe-linux-distribution
+ dosbin xe-update-guest-attrs
+ insinto /lib/udev/rules.d
+ newins xen-vcpu-hotplug.rules 10-xen-vcpu-hotplug.rules
+
+ if use xenstore; then
+ dobin usr/bin/xeninfo
+ dobin usr/bin/xenstore
+ dobin usr/bin/xenstore-*
+ fi
+}
+
+pkg_postinst() {
+ if [ ! -e /etc/runlevels/boot/xe-daemon ]; then
+ elog "To start the xe-daemon automatically by default"
+ elog "you should add it to the boot runlevel :"
+ elog "'rc-update add xe-daemon boot'"
+ elog
+ fi
+}
diff --git a/app-emulation/xe-guest-utilities/xe-guest-utilities-6.2.0_p1120.ebuild b/app-emulation/xe-guest-utilities/xe-guest-utilities-6.2.0_p1120.ebuild
new file mode 100644
index 000000000000..1d5f3d03a174
--- /dev/null
+++ b/app-emulation/xe-guest-utilities/xe-guest-utilities-6.2.0_p1120.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils rpm linux-info
+DESCRIPTION="XenServer Virtual Machine Tools"
+HOMEPAGE="http://www.citrix.com/"
+PV_BASE=${PV/_*}
+PV_FULL=${PV/_p/-}
+SRC_URI="http://updates.vmd.citrix.com/XenServer/${PV_BASE}/rhel4x/SRPMS/xe-guest-utilities-${PV_FULL}.src.rpm"
+LICENSE="LGPL-3 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="xenstore"
+DEPEND="app-arch/rpm2targz"
+RDEPEND="
+ !xenstore? ( app-emulation/xen-tools )
+ xenstore? ( !app-emulation/xen-tools )"
+S=${WORKDIR}
+CONFIG_CHECK="~XEN_COMPAT_XENFS ~XENFS"
+QA_PREBUILT="usr/bin/xenstore* usr/bin/xeninfo"
+
+src_unpack() {
+ rpm_src_unpack ${A}
+ # Upstream includes xenstore-sources.tar.bz2
+ # but it is NOT the complete source :-(
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-6.2.0_p1120-Guest-Attributes.patch
+ epatch "${FILESDIR}"/${PN}-6.2.0_p1120-Linux-Distribution.patch
+}
+
+src_install() {
+ newinitd "${FILESDIR}/xe-daemon.initd" xe-daemon
+ dosbin xe-daemon
+ dosbin xe-linux-distribution
+ dosbin xe-update-guest-attrs
+ insinto /lib/udev/rules.d
+ newins xen-vcpu-hotplug.rules 10-xen-vcpu-hotplug.rules
+
+ if use xenstore; then
+ dobin usr/bin/xeninfo
+ dobin usr/bin/xenstore
+ dobin usr/bin/xenstore-*
+ fi
+}
+
+pkg_postinst() {
+ if [ ! -e /etc/runlevels/boot/xe-daemon ]; then
+ elog "To start the xe-daemon automatically by default"
+ elog "you should add it to the boot runlevel :"
+ elog "'rc-update add xe-daemon boot'"
+ elog
+ fi
+}