public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2022-01-15  9:31 Joonas Niilola
  0 siblings, 0 replies; 8+ messages in thread
From: Joonas Niilola @ 2022-01-15  9:31 UTC (permalink / raw
  To: gentoo-commits

commit:     8a3df79bc9bdd024fb463382ad35c8339c856306
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Thu Dec 23 19:35:40 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Sat Jan 15 09:31:18 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a3df79b

app-emulation/xen: add USE to disable boot symlinks

Closes: https://bugs.gentoo.org/829765
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/23484
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/xen/files/xen-4.16-efi.patch         | 38 ----------------------
 app-emulation/xen/files/xen-4.16-no-symlink.patch  | 17 ++++++++++
 app-emulation/xen/metadata.xml                     |  1 +
 .../{xen-4.16.0.ebuild => xen-4.16.0-r1.ebuild}    | 13 ++++----
 4 files changed, 25 insertions(+), 44 deletions(-)

diff --git a/app-emulation/xen/files/xen-4.16-efi.patch b/app-emulation/xen/files/xen-4.16-efi.patch
deleted file mode 100644
index 1285c421f3d2..000000000000
--- a/app-emulation/xen/files/xen-4.16-efi.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/xen/Makefile b/xen/Makefile
-index dfb0efcc..3bd51ec1 100644
---- a/xen/Makefile
-+++ b/xen/Makefile
-@@ -311,9 +311,17 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
- _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
- 	[ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR)
- 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
-+
-+	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
-+	else \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
-+	fi;
-+
- 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
- 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
- 	$(INSTALL_DATA) $(TARGET)-syms.map $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map
-diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
-index 69b6cfad..d8b09d95 100644
---- a/xen/arch/x86/Makefile
-+++ b/xen/arch/x86/Makefile
-@@ -127,7 +127,7 @@ export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.
- CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
- 
- # Check if the linker supports PE.
--EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
-+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
- XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o))
- # If the above failed, it may be merely because of the linker not dealing well
- # with debug info. Try again with stripping it.

diff --git a/app-emulation/xen/files/xen-4.16-no-symlink.patch b/app-emulation/xen/files/xen-4.16-no-symlink.patch
new file mode 100644
index 000000000000..8aed75b520c5
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.16-no-symlink.patch
@@ -0,0 +1,17 @@
+diff --git a/xen/Makefile b/xen/Makefile
+index dfb0efcc..1816eb66 100644
+--- a/xen/Makefile
++++ b/xen/Makefile
+@@ -311,9 +311,9 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
+ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
+ 	[ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR)
+ 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
++	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
++	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
++	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
+ 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
+ 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
+ 	$(INSTALL_DATA) $(TARGET)-syms.map $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map

diff --git a/app-emulation/xen/metadata.xml b/app-emulation/xen/metadata.xml
index c9b2f33aa70a..68e9c297bc42 100644
--- a/app-emulation/xen/metadata.xml
+++ b/app-emulation/xen/metadata.xml
@@ -14,6 +14,7 @@
 		<name>Gentoo Xen Project</name>
 	</maintainer>
 	<use>
+		<flag name="boot-symlinks">Symlink xen.gz variants in /boot, disable on fat filesystems</flag>
 		<flag name="flask">Enable the Flask XSM module from NSA</flag>
 		<flag name="efi">Adds efi boot support, requires LDFLAG -melf_x86_64 for amd64</flag>
 	</use>

diff --git a/app-emulation/xen/xen-4.16.0.ebuild b/app-emulation/xen/xen-4.16.0-r1.ebuild
similarity index 95%
rename from app-emulation/xen/xen-4.16.0.ebuild
rename to app-emulation/xen/xen-4.16.0-r1.ebuild
index 5cbf9f980141..ea9f254e98d2 100644
--- a/app-emulation/xen/xen-4.16.0.ebuild
+++ b/app-emulation/xen/xen-4.16.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -37,7 +37,8 @@ DESCRIPTION="The Xen virtual machine monitor"
 HOMEPAGE="https://www.xenproject.org"
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="debug efi flask"
+IUSE="+boot-symlinks debug efi flask"
+REQUIRED_USE="arm? ( debug )"
 
 DEPEND="${PYTHON_DEPS}
 	efi? ( >=sys-devel/binutils-2.22[multitarget] )
@@ -54,8 +55,6 @@ RESTRICT="test splitdebug strip"
 # Approved by QA team in bug #144032
 QA_WX_LOAD="boot/xen-syms-${PV}"
 
-REQUIRED_USE="arm? ( debug )"
-
 S="${WORKDIR}/${MY_P}"
 
 pkg_setup() {
@@ -94,8 +93,10 @@ src_prepare() {
 	# Gentoo's patchset
 	[[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
 
-	# Symlinks do not work on fat32 volumes
-	eapply "${FILESDIR}"/${PN}-4.16-efi.patch
+	# Symlinks do not work on fat32 volumes # 829765
+	if ! use boot-symlinks || use efi; then
+		eapply "${FILESDIR}"/${PN}-4.16-no-symlink.patch
+	fi
 
 	# Enable XSM-FLASK
 	use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2022-07-16 11:15 Florian Schmaus
  0 siblings, 0 replies; 8+ messages in thread
From: Florian Schmaus @ 2022-07-16 11:15 UTC (permalink / raw
  To: gentoo-commits

commit:     d0f4e01886b229175bda350c921a2a09b77ec6a0
Author:     Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 16 11:09:08 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sat Jul 16 11:09:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0f4e018

app-emulation/xen: move patches from FILESDIR to xen-gentoo-patches

Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 app-emulation/xen/Manifest                        |  2 +-
 app-emulation/xen/files/xen-4.16-efi.patch        | 12 ------------
 app-emulation/xen/files/xen-4.16-no-symlink.patch | 17 -----------------
 app-emulation/xen/xen-4.16.2_pre2.ebuild          |  6 ++----
 4 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 54f968d25053..24cee08af95f 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -1,5 +1,5 @@
 DIST xen-4.15.3.tar.gz 40793144 BLAKE2B 33932d855a0502cfe2768a7c8ae19d7da285d70b4970d96fd703daf0ee24a77ad47a3d1b4bcf5f465aa81aa7eb7f9295bce96302b2149ca208fa662cd966d6af SHA512 c25903cc263891885ec76500488405226c8e025bb461d2bf0d590b9bd2d7ca5c2693de7ecc38b3655bfd6793cc96314826559f14a09cc139de8cfdbeb914cbd3
 DIST xen-4.16.1.tar.gz 44964667 BLAKE2B 190d9c330b5dcdd47bae26b6ef42111c9c63b71b8b92e20eae268054c6b40aaabadef78c0c9634cb3c3b1bde32a746cbb1404b5eed2a82ab829ba10632103856 SHA512 eeabba9c263cd2425bca083e32b5ebfc6c716c00553759c144fd4b6f64a89836b260787fa25ba22c1f5c4ea65aaad7c95b8c2c1070d3377b1c43c9517aa7032a
-DIST xen-gentoo-patches-4.16.1-gentoo-patchset-1.tar.bz2 4351 BLAKE2B 1ba306fbc4a55aa1fea71139f7a900c8c363cf948f34a2aabd1ff6f8a68f2e632154ea0e0289580c84328b372c4f8cfdb2879bc63ae3ec163bfb29487783a758 SHA512 8d8198fbf8d9d4b46a83cf46c965448cb47b30438518a70c9b552c7cd1b23616e50f615206ddb18603e8482d19b25ccb611904c404d445898928ecf88051b70d
+DIST xen-gentoo-patches-4.16.1-gentoo-patchset-2.tar.bz2 5403 BLAKE2B 7fa3b4aa123b2deed260d02b8d34a35dd205207038edb92569278b25c6fe32e0f0e3857c07755553e047f0eb0d9fe7f8b0816e0f3d7f68aee7929afaf6611dfd SHA512 9e7d25640b24235acf756b031b8b7cee582dded65fe7b94a706c990232e9704d574036c3a9605f285e8e9534578d100a3f38719b27b22775f17ef8f68287997e
 DIST xen-upstream-patches-4.15.4-pre-patchset-0.1.tar.bz2 28980 BLAKE2B 5bdabed3bce4306fe5f656a965d1e537608c03b4706dc801a0b0b9649d001b875b1a2543c68c6b459483991570f0fbf2490a97ea1776761c9f61e9876f240fdf SHA512 4f6bbf0dab57ad58292f32fab55294b2eedd0442be7f62341a2df922a1d21880fe33cc29956ccbbb8b4aee4c10b38d4aa090e4db9496d6e0f5256e60999cad7d
 DIST xen-upstream-patches-4.16.2-pre-patchset-1.tar.bz2 56760 BLAKE2B 4c8030347f9e1ad3c2c4f440645656452daa1f087c34b8a3baba3cae1e7623a910e5727395e8c6f4a8573f3a37e58a318c485fa2f878c8e2f3240fb75cee0c03 SHA512 5e279845052addfbf7681ad5ccab9e692e4a1d69b73e51e1782e498f98217de77bfc4f5158307ee90164393edb023165e032b9f9f7123c0c614ee2336c021259

diff --git a/app-emulation/xen/files/xen-4.16-efi.patch b/app-emulation/xen/files/xen-4.16-efi.patch
deleted file mode 100644
index 0de5575fc9e1..000000000000
--- a/app-emulation/xen/files/xen-4.16-efi.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
---- a/xen/arch/x86/Makefile	2021-11-30 06:42:42.000000000 -0500
-+++ b/xen/arch/x86/Makefile	2022-02-17 07:43:06.597244620 -0500
-@@ -127,7 +127,7 @@
- CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
- 
- # Check if the linker supports PE.
--EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
-+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
- XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o))
- # If the above failed, it may be merely because of the linker not dealing well
- # with debug info. Try again with stripping it.

diff --git a/app-emulation/xen/files/xen-4.16-no-symlink.patch b/app-emulation/xen/files/xen-4.16-no-symlink.patch
deleted file mode 100644
index 8aed75b520c5..000000000000
--- a/app-emulation/xen/files/xen-4.16-no-symlink.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/xen/Makefile b/xen/Makefile
-index dfb0efcc..1816eb66 100644
---- a/xen/Makefile
-+++ b/xen/Makefile
-@@ -311,9 +311,9 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
- _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
- 	[ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR)
- 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
-+	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
-+	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
-+	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
- 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
- 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
- 	$(INSTALL_DATA) $(TARGET)-syms.map $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map

diff --git a/app-emulation/xen/xen-4.16.2_pre2.ebuild b/app-emulation/xen/xen-4.16.2_pre2.ebuild
index 3ce553a137d3..57c3725d8fef 100644
--- a/app-emulation/xen/xen-4.16.2_pre2.ebuild
+++ b/app-emulation/xen/xen-4.16.2_pre2.ebuild
@@ -15,7 +15,7 @@ else
 	KEYWORDS="~amd64 ~arm -x86"
 
 	XEN_PRE_PATCHSET_NUM=1
-	XEN_GENTOO_PATCHSET_NUM=1
+	XEN_GENTOO_PATCHSET_NUM=2
 	XEN_PRE_VERSION_BASE=4.16.1
 
 	XEN_BASE_PV="${PV}"
@@ -88,11 +88,9 @@ src_prepare() {
 		eapply "${XEN_GENTOO_PATCHES_DIR}"
 	fi
 
-	eapply "${FILESDIR}"/${PN}-4.16-efi.patch
-
 	# Symlinks do not work on fat32 volumes # 829765
 	if ! use boot-symlinks || use efi; then
-		eapply "${FILESDIR}"/${PN}-4.16-no-symlink.patch
+		eapply "${XEN_GENTOO_PATCHES_DIR}"/no-boot-symlinks/${PN}-4.16-no-symlinks.patch
 	fi
 
 	# Workaround new gcc-11 options


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2022-02-19  3:06 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-02-19  3:06 UTC (permalink / raw
  To: gentoo-commits

commit:     bc032ce580e626d871ca0f919172c6af899180a5
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Sat Feb 19 03:00:26 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 19 03:06:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc032ce5

app-emulation/xen: re-add accidentally removed patch

Closes: https://bugs.gentoo.org/833527
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/24267
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen/files/xen-4.16-efi.patch                   | 12 ++++++++++++
 .../xen/{xen-4.16.0-r2.ebuild => xen-4.16.0-r3.ebuild}       |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/app-emulation/xen/files/xen-4.16-efi.patch b/app-emulation/xen/files/xen-4.16-efi.patch
new file mode 100644
index 000000000000..0de5575fc9e1
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.16-efi.patch
@@ -0,0 +1,12 @@
+diff -urN a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
+--- a/xen/arch/x86/Makefile	2021-11-30 06:42:42.000000000 -0500
++++ b/xen/arch/x86/Makefile	2022-02-17 07:43:06.597244620 -0500
+@@ -127,7 +127,7 @@
+ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+ 
+ # Check if the linker supports PE.
+-EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
++EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
+ XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o))
+ # If the above failed, it may be merely because of the linker not dealing well
+ # with debug info. Try again with stripping it.

diff --git a/app-emulation/xen/xen-4.16.0-r2.ebuild b/app-emulation/xen/xen-4.16.0-r3.ebuild
similarity index 99%
rename from app-emulation/xen/xen-4.16.0-r2.ebuild
rename to app-emulation/xen/xen-4.16.0-r3.ebuild
index d42ab1882530..1d8a4d366e2c 100644
--- a/app-emulation/xen/xen-4.16.0-r2.ebuild
+++ b/app-emulation/xen/xen-4.16.0-r3.ebuild
@@ -93,6 +93,8 @@ src_prepare() {
 	# Gentoo's patchset
 	[[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
 
+	eapply "${FILESDIR}"/${PN}-4.16-efi.patch
+
 	# Symlinks do not work on fat32 volumes # 829765
 	if ! use boot-symlinks || use efi; then
 		eapply "${FILESDIR}"/${PN}-4.16-no-symlink.patch


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2021-12-21  1:37 Sam James
  0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-12-21  1:37 UTC (permalink / raw
  To: gentoo-commits

commit:     19bd44f31416467d0f6122ee26575b1644097d7a
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Mon Dec 20 20:16:21 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 21 01:28:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19bd44f3

app-emulation/xen: bump to 4.16.0

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-emulation/xen/Manifest                 |   1 +
 app-emulation/xen/files/xen-4.16-efi.patch |  38 +++++++
 app-emulation/xen/xen-4.16.0.ebuild        | 163 +++++++++++++++++++++++++++++
 3 files changed, 202 insertions(+)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 55b93cc8c2ba..79eb54ce0ff2 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -4,3 +4,4 @@ DIST xen-4.14.3.tar.gz 39982036 BLAKE2B 927fd2937f451567238702430cea3a6e5d2db70d
 DIST xen-4.15.1-upstream-patches-0.tar.xz 3532 BLAKE2B 797f6c4ce44b43c9b43ee27718dc6d0b234588df2148961f8b078b3362b23bec6c2326eb0584255b0f3128c2f8b673ac6b9590596119c5fec82e7b03a1305b2c SHA512 c7d1a21042a3003eb9d968b3eb00aabbbc5c145b8b05fdd9e520cde34d1643d7f4f8f7039f30843a65439b1d40584c751e31ead620b88332d50b10f14fe81c0d
 DIST xen-4.15.1-upstream-patches-2.tar.xz 30180 BLAKE2B 675c13cfb4a6f47121dfe125ddea21d98e7e37563f63b91cde96cd92d94eff648eaa65426fec09833ad668102959948b2e684860631db2b5a2a53b2521a01069 SHA512 f0a6c0829068828ac400d67230d3066b2370a90303e537dd5e0761920ac0d584139b59244a72d9dcd2e4cb1a151ab80d3197ba908e642e13817b89b9a33c73fb
 DIST xen-4.15.1.tar.gz 40800852 BLAKE2B 39475ea33f029fb0e84b82b4a2b13fd613bab01e3ef6c241dfede3d190ee9be53c99b62121d37d83b1e078764b3e4d88d1dfb99be1b5623691e56519850c6798 SHA512 8d3cbdf708f46477e32ee7cbd16a490c82efa855cecd84ee712b8680df4d69c987ba9ab00ff3851f627b98a8ebbc5dab71f92f142ed958ee2bc538bc792cd4b9
+DIST xen-4.16.0.tar.gz 44982322 BLAKE2B 7e16a93b3f1131e2b10307fabc10641a9c5983173155b9a35eaf6ff317b6a747bccf6b8c87c06686830acc2c4bd3e19e5867eb443eabac9a1e4ee59124dfa87f SHA512 2869ed90d1779c9754d7f2397f5fc67a655304d9c32953ac20655ef96cb154521d8fce9f23915ac0c91f984dc54f72c67e5e619e2da318b5997748f44cf21b87

diff --git a/app-emulation/xen/files/xen-4.16-efi.patch b/app-emulation/xen/files/xen-4.16-efi.patch
new file mode 100644
index 000000000000..1285c421f3d2
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.16-efi.patch
@@ -0,0 +1,38 @@
+diff --git a/xen/Makefile b/xen/Makefile
+index dfb0efcc..3bd51ec1 100644
+--- a/xen/Makefile
++++ b/xen/Makefile
+@@ -311,9 +311,17 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
+ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
+ 	[ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR)
+ 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
++
++	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
++	else \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
++	fi;
++
+ 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
+ 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
+ 	$(INSTALL_DATA) $(TARGET)-syms.map $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map
+diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
+index 69b6cfad..d8b09d95 100644
+--- a/xen/arch/x86/Makefile
++++ b/xen/arch/x86/Makefile
+@@ -127,7 +127,7 @@ export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.
+ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+ 
+ # Check if the linker supports PE.
+-EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
++EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10
+ XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(call ld-option,$(EFI_LDFLAGS) --image-base=0x100000000 -o efi/check.efi efi/check.o))
+ # If the above failed, it may be merely because of the linker not dealing well
+ # with debug info. Try again with stripping it.

diff --git a/app-emulation/xen/xen-4.16.0.ebuild b/app-emulation/xen/xen-4.16.0.ebuild
new file mode 100644
index 000000000000..5cbf9f980141
--- /dev/null
+++ b/app-emulation/xen/xen-4.16.0.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit flag-o-matic mount-boot python-any-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+	SRC_URI=""
+else
+	KEYWORDS="~amd64 ~arm -x86"
+	UPSTREAM_VER=
+	SECURITY_VER=
+	GENTOO_VER=
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
+		${UPSTREAM_PATCHSET_URI}
+		${SECURITY_PATCHSET_URI}
+		${GENTOO_PATCHSET_URI}"
+fi
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="https://www.xenproject.org"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug efi flask"
+
+DEPEND="${PYTHON_DEPS}
+	efi? ( >=sys-devel/binutils-2.22[multitarget] )
+	!efi? ( >=sys-devel/binutils-2.22 )
+	flask? ( sys-apps/checkpolicy )"
+RDEPEND=""
+PDEPEND="~app-emulation/xen-tools-${PV}"
+
+# no tests are available for the hypervisor
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
+RESTRICT="test splitdebug strip"
+
+# Approved by QA team in bug #144032
+QA_WX_LOAD="boot/xen-syms-${PV}"
+
+REQUIRED_USE="arm? ( debug )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+	if [[ -z ${XEN_TARGET_ARCH} ]]; then
+		if use amd64; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	[[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		local i
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+	fi
+
+	# Gentoo's patchset
+	[[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
+
+	# Symlinks do not work on fat32 volumes
+	eapply "${FILESDIR}"/${PN}-4.16-efi.patch
+
+	# Enable XSM-FLASK
+	use flask && eapply "${FILESDIR}"/${PN}-4.15-flask.patch
+
+	# Workaround new gcc-11 options
+	sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
+
+	# Drop .config
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	if use efi; then
+		export EFI_VENDOR="gentoo"
+		export EFI_MOUNTPOINT="/boot"
+	fi
+
+	default
+}
+
+src_configure() {
+	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
+	use debug && myopt="${myopt} debug=y"
+
+	# remove flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+
+	tc-ld-disable-gold # Bug 700374
+}
+
+src_compile() {
+	# Send raw LDFLAGS so that --as-needed works
+	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
+}
+
+src_install() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	# The 'make install' doesn't 'mkdir -p' the subdirs
+	if use efi; then
+		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
+	fi
+
+	emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
+
+	# make install likes to throw in some extra EFI bits if it built
+	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide:"
+	elog " https://wiki.gentoo.org/wiki/Xen"
+
+	use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
+
+	ewarn
+	ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
+	ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
+	ewarn "to work fine."
+	ewarn
+	ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
+	ewarn
+	ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2021-05-11 15:47 Thomas Deutschmann
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2021-05-11 15:47 UTC (permalink / raw
  To: gentoo-commits

commit:     489b541a2dbc829ca6e43ea4ff931e79cc731d49
Author:     Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Fri Apr 30 20:21:12 2021 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Tue May 11 15:47:32 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=489b541a

app-emulation/xen: bump to 4.15.0

Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 app-emulation/xen/Manifest                 |   2 +
 app-emulation/xen/files/xen-4.15-efi.patch |  38 +++++++
 app-emulation/xen/xen-4.15.0.ebuild        | 169 +++++++++++++++++++++++++++++
 3 files changed, 209 insertions(+)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 0c2a0faab07..890825b9a9c 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -6,3 +6,5 @@ DIST xen-4.13.3.tar.gz 39044539 BLAKE2B 5d0e57c76e12e1b86b78bbf561e947d70b9569a2
 DIST xen-4.14.1-upstream-patches-2.tar.xz 22920 BLAKE2B 890cd9bcc3c72b4ed192476a913de0377d50ddeb180e0d6dc4720e86662387a699ad74b263adf2b867b2421fcf3efdcacaa17bf581643afc50c9dc7e8a3dfc60 SHA512 ca0e53f40fe23d9a6c6374b460fcc0c8063e511f03ca86c02291fcb73bf9f91594de6fd615609997e0aac2e9c59ccc8512e4151a1d2646a70f3b5bacd95ad325
 DIST xen-4.14.1-upstream-patches-3.tar.xz 27864 BLAKE2B 69a67e863a30c0079f7955dd5306f69890a4f6db91d4cf2d1806a2bbd8afad88db7789c7eda8da0ff2a945da04916ff4ab5eaa9e529a417112ae01e31151d0dc SHA512 19e5ef39616fffbff20b2f658d61e50e21741fe3c5c4ca89f67e72a1606b3a593f93e9090fb0b5c76c1c801f931c237d2be6329bd174fa911d66b81ad4a332dd
 DIST xen-4.14.1.tar.gz 39970115 BLAKE2B 21e5838b2b4d78420dcaaae2b8fc98ac876230217e6a3764aa643920150b8cef96025663e6a2fc423ab15f7f470b62547e91ce1be0337fc78f00c148c7ff40ab SHA512 c75cbec82793435f5a7026626ffdb2e9a2166b42d2be4b2f1194240e0312458124f0ebd53eeb02ce7330c22afe402a28a96b32f8af66e41e9416fe94535724c9
+DIST xen-4.15.0-upstream-patches-0.tar.xz 15744 BLAKE2B e2abb68524a7c190db8d91beb79731aea5290e82f54fb21218739dab666f6f5ea85c203575ec248b46830f1862408d50d3ceea1104fcd9325babfccf3574c515 SHA512 f1a2800d15a61f08eda4d6bafaead95a9d72cc9e4d90a19278d89c696b7e2d5d6353b28dba7ed0eb0c9aeb8604d3697db6a8f4ac38047e2510279d88181752f9
+DIST xen-4.15.0.tar.gz 40785399 BLAKE2B 8b0530f5516c39656506f4bb705952da0555a8ab7f47323473b171caeb7692f3107e9d94f13171d40576600064589eed35f4d210af02db4cc4706dd4fc202100 SHA512 93683b8a97387ca5f003c635a11d163e61c87dbdc9a03081f9155fe87b49f1dfa74ce243fcd5e04dc009353a36e2375b786f1ebde828b5951a094cd64197b4c7

diff --git a/app-emulation/xen/files/xen-4.15-efi.patch b/app-emulation/xen/files/xen-4.15-efi.patch
new file mode 100644
index 00000000000..01133e98dde
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.15-efi.patch
@@ -0,0 +1,38 @@
+diff --git a/xen/Makefile b/xen/Makefile
+index acb2d28..b9dbd9c 100644
+--- a/xen/Makefile
++++ b/xen/Makefile
+@@ -272,9 +272,17 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
+ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
+ 	[ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR)
+ 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
++
++	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
++	else \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
++	fi;
++
+ 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
+ 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
+ 	$(INSTALL_DATA) $(TARGET)-syms.map $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION).map
+diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
+index b6567c4..0320a4a 100644
+--- a/xen/arch/x86/Makefile
++++ b/xen/arch/x86/Makefile
+@@ -123,7 +123,7 @@ ifneq ($(efi-y),)
+ # Check if the compiler supports the MS ABI.
+ export XEN_BUILD_EFI := $(shell $(CC) $(XEN_CFLAGS) -c efi/check.c -o efi/check.o 2>/dev/null && echo y)
+ # Check if the linker supports PE.
+-EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10 --strip-debug
++EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(XEN_LDFLAGS)) --subsystem=10 --strip-debug
+ XEN_BUILD_PE := $(if $(XEN_BUILD_EFI),$(shell $(LD) $(EFI_LDFLAGS) -o efi/check.efi efi/check.o 2>/dev/null && echo y))
+ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+ # Check if the linker produces fixups in PE by default (we need to disable it doing so for now).

diff --git a/app-emulation/xen/xen-4.15.0.ebuild b/app-emulation/xen/xen-4.15.0.ebuild
new file mode 100644
index 00000000000..bfb43d166f2
--- /dev/null
+++ b/app-emulation/xen/xen-4.15.0.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+inherit flag-o-matic mount-boot multilib python-any-r1 toolchain-funcs
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
+	SRC_URI=""
+else
+	KEYWORDS="~amd64 ~arm -x86"
+	UPSTREAM_VER=0
+	SECURITY_VER=
+	GENTOO_VER=
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
+		https://github.com/hydrapolic/gentoo-dist/raw/master/xen/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	SRC_URI="https://downloads.xenproject.org/release/xen/${MY_PV}/${MY_P}.tar.gz
+		${UPSTREAM_PATCHSET_URI}
+		${SECURITY_PATCHSET_URI}
+		${GENTOO_PATCHSET_URI}"
+fi
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="https://www.xenproject.org"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="debug efi flask"
+
+DEPEND="${PYTHON_DEPS}
+	efi? ( >=sys-devel/binutils-2.22[multitarget] )
+	!efi? ( >=sys-devel/binutils-2.22 )"
+RDEPEND=""
+PDEPEND="~app-emulation/xen-tools-${PV}"
+
+# no tests are available for the hypervisor
+# prevent the silliness of /usr/lib/debug/usr/lib/debug files
+# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
+RESTRICT="test splitdebug strip"
+
+# Approved by QA team in bug #144032
+QA_WX_LOAD="boot/xen-syms-${PV}"
+
+REQUIRED_USE="arm? ( debug )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+	python-any-r1_pkg_setup
+	if [[ -z ${XEN_TARGET_ARCH} ]]; then
+		if use amd64; then
+			export XEN_TARGET_ARCH="x86_64"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+
+	if use flask ; then
+		export "XSM_ENABLE=y"
+		export "FLASK_ENABLE=y"
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	[[ -n ${UPSTREAM_VER} ]] && eapply "${WORKDIR}"/patches-upstream
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+	einfo "Try to apply Xen Security patch set"
+		# apply main xen patches
+		# Two parallel systems, both work side by side
+		# Over time they may concdense into one. This will suffice for now
+		source "${WORKDIR}"/patches-security/${PV}.conf
+
+		local i
+		for i in ${XEN_SECURITY_MAIN}; do
+			eapply "${WORKDIR}"/patches-security/xen/$i
+		done
+	fi
+
+	# Gentoo's patchset
+	[[ -n ${GENTOO_VER} ]] && eapply "${WORKDIR}"/patches-gentoo
+
+	# Symlinks do not work on fat32 volumes 
+	eapply "${FILESDIR}"/${PN}-4.15-efi.patch
+
+	# Workaround new gcc-11 options
+	sed -e '/^CFLAGS/s/-Werror//g' -i xen/Makefile || die
+
+	# Drop .config
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	if use efi; then
+		export EFI_VENDOR="gentoo"
+		export EFI_MOUNTPOINT="/boot"
+	fi
+
+	default
+}
+
+src_configure() {
+	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
+
+	use debug && myopt="${myopt} debug=y"
+
+	# remove flags
+	unset CFLAGS
+	unset LDFLAGS
+	unset ASFLAGS
+
+	tc-ld-disable-gold # Bug 700374
+}
+
+src_compile() {
+	# Send raw LDFLAGS so that --as-needed works
+	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
+}
+
+src_install() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	# The 'make install' doesn't 'mkdir -p' the subdirs
+	if use efi; then
+		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
+	fi
+
+	emake LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" DESTDIR="${D}" -C xen ${myopt} install
+
+	# make install likes to throw in some extra EFI bits if it built
+	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide:"
+	elog " https://wiki.gentoo.org/wiki/Xen"
+
+	use efi && einfo "The efi executable is installed in /boot/efi/gentoo"
+
+	elog "You can optionally block the installation of /boot/xen-syms by an entry"
+	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
+	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
+
+	ewarn
+	ewarn "Xen 4.12+ changed the default scheduler to credit2 which can cause"
+	ewarn "domU lockups on multi-cpu systems. The legacy credit scheduler seems"
+	ewarn "to work fine."
+	ewarn
+	ewarn "Add sched=credit to xen command line options to use the legacy scheduler."
+	ewarn
+	ewarn "https://wiki.gentoo.org/wiki/Xen#Xen_domU_hanging_with_Xen_4.12.2B"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2019-05-17  8:48 Yixun Lan
  0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2019-05-17  8:48 UTC (permalink / raw
  To: gentoo-commits

commit:     670b6ca726c1175478eb9c40160eac1e65096316
Author:     Tomas Mozes <hydrapolic <AT> gmail <DOT> com>
AuthorDate: Wed May 15 20:05:15 2019 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 17 08:48:39 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=670b6ca7

app-emulation/xen: add upstream patches

Bug: https://bugs.gentoo.org/683694
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>

 app-emulation/xen/Manifest                         |  2 +-
 app-emulation/xen/files/xen.gcc9.fixes.patch       | 34 ++++++++++++++++++++++
 .../{xen-4.11.1-r2.ebuild => xen-4.11.1-r3.ebuild} |  5 +++-
 3 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 267dd54ebce..67789c8e339 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -1,5 +1,5 @@
 DIST xen-4.10.3-upstream-patches-1.tar.xz 24064 BLAKE2B ec9339d00afd4057738a78165a82dbebbab73eb561984a049daff84dfb115c0550e67796bfa775d5e5a3a4576c4ea7db408d491fe745a68c412f93a04719c58d SHA512 b3761acdb7a581d172e1e2b1e09406c4748eda3e25c81c19bb53b38e005d27e10ac64109870b47ce72372dc7b7c63ec3eca6156389c174f28ab4ad1c2b9e5634
 DIST xen-4.10.3.tar.gz 24695778 BLAKE2B 50a9e31fb4cf587eeedb357fc710405a1cd4506174a38eb9b032a0cdd9b7f7343d98624ecb07cf605b1403664c7117cdc8f011290309caa18ca9604b4008b906 SHA512 030d23109ce4c0ebf50ade6841d5525a39032bcf8fd0599ccaa9502ff301c1f61f9c5f49233b41a5934a71228958febc1e529a9fc6822ba401a0c18c490ad412
-DIST xen-4.11.1-upstream-patches-1.tar.xz 60048 BLAKE2B 60d5960183433776c881696e9b50f800c2724c9815b3ebb6eb994d108ab4b3de92cf8d7ec79c86958e8811b19550f802c26326351d49f35391cfeb3e6a1d5e76 SHA512 788245219ed374b80423f01754abae457b36de098a0d568828af02142b55692e2df78eceb8cb2a11fc20e9ee59c2cebfea8ec1de0a9d6dc64f327a88cf6bf918
+DIST xen-4.11.1-upstream-patches-2.tar.xz 78292 BLAKE2B 762c0b33500503854d3195af752a4510090b22a7212abb6bd72a74fd55b64ffc622db5d3b18ff5c2f1b804002537a82bdf5036ec23acf15c8b8e3f0ed8c722fb SHA512 4850ab53de811dc7a5499f603584624c7879f41cbacc223cbfd5fdf0042d39ba0195aa51356215d26136dab536f1b713274d21e3d265b62ca06fdab0aa923a77
 DIST xen-4.11.1.tar.gz 25152217 BLAKE2B a8dfbeb3d490787725c589e1ce82dcbbcd0be7fb4743b38daf3a8704dffda34d1faabb07d74e01d2fab1572ce0b730c21192469317545e8b3edb3fae1130ef8c SHA512 c1655c5decdaed95a2b9a99652318cfc72f6cfdae957cfe60d635f7787e8850f33e8fafc4c4b8d61fb579c9b9d93028a6382903e71808a0418b931e76d72a649
 DIST xen-4.12.0.tar.gz 26949697 BLAKE2B 9175cc9054e4a2b5c34df89a4efd667f86b4861bef9c3310bf431d041f710a7cb265b4d34a76ab18a17a3121392942d2e5d76c5044eb9b957d4255af889fe69a SHA512 0ce366dcac607c9b592c5e9c0f40652eef743913b246bed4b0c380b8d59ac23a6adcd05befec37fc799a61476f47df76d4911cbf1da6ceb51441c546bf2464de

diff --git a/app-emulation/xen/files/xen.gcc9.fixes.patch b/app-emulation/xen/files/xen.gcc9.fixes.patch
new file mode 100644
index 00000000000..111b063f9c1
--- /dev/null
+++ b/app-emulation/xen/files/xen.gcc9.fixes.patch
@@ -0,0 +1,34 @@
+--- xen-4.11.1/xen/drivers/passthrough/vtd/vtd.h.orig	2018-11-29 14:04:11.000000000 +0000
++++ xen-4.11.1/xen/drivers/passthrough/vtd/vtd.h	2019-02-05 21:32:50.056774501 +0000
+@@ -28,7 +28,7 @@
+ /* Allow for both IOAPIC and IOSAPIC. */
+ #define IO_xAPIC_route_entry IO_APIC_route_entry
+ 
+-struct IO_APIC_route_remap_entry {
++struct __packed IO_APIC_route_remap_entry {
+     union {
+         u64 val;
+         struct {
+--- xen-4.11.1/xen/common/trace.c.orig	2018-11-29 14:04:11.000000000 +0000
++++ xen-4.11.1/xen/common/trace.c	2019-02-06 20:31:27.370256971 +0000
+@@ -819,7 +819,7 @@
+ void __trace_hypercall(uint32_t event, unsigned long op,
+                        const xen_ulong_t *args)
+ {
+-    struct __packed {
++    struct {
+         uint32_t op;
+         uint32_t args[6];
+     } d;
+--- xen-4.11.1/xen/arch/x86/cpu/mtrr/generic.c.orig	2018-11-29 14:04:11.000000000 +0000
++++ xen-4.11.1/xen/arch/x86/cpu/mtrr/generic.c	2019-02-10 19:24:09.378805103 +0000
+@@ -171,6 +171,9 @@
+ 	printk("%sMTRR variable ranges %sabled:\n", level,
+ 	       mtrr_state.enabled ? "en" : "dis");
+ 	width = (paddr_bits - PAGE_SHIFT + 3) / 4;
++	if (  width > 64 ) {
++		width=64;
++	}
+ 
+ 	for (i = 0; i < num_var_ranges; ++i) {
+ 		if (mtrr_state.var_ranges[i].mask & MTRR_PHYSMASK_VALID)

diff --git a/app-emulation/xen/xen-4.11.1-r2.ebuild b/app-emulation/xen/xen-4.11.1-r3.ebuild
similarity index 97%
rename from app-emulation/xen/xen-4.11.1-r2.ebuild
rename to app-emulation/xen/xen-4.11.1-r3.ebuild
index ad9b169a8a5..8eef8eb0de4 100644
--- a/app-emulation/xen/xen-4.11.1-r2.ebuild
+++ b/app-emulation/xen/xen-4.11.1-r3.ebuild
@@ -16,7 +16,7 @@ if [[ $PV == *9999 ]]; then
 	SRC_URI=""
 else
 	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=1
+	UPSTREAM_VER=2
 	SECURITY_VER=
 	GENTOO_VER=
 
@@ -100,6 +100,9 @@ src_prepare() {
 
 	eapply "${FILESDIR}"/${PN}-4.6-efi.patch
 
+	# https://src.fedoraproject.org/rpms/xen/blob/master/f/xen.gcc9.fixes.patch
+	eapply "${FILESDIR}"/${PN}.gcc9.fixes.patch
+
 	# Drop .config
 	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
 


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2016-07-28 16:50 Yixun Lan
  0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2016-07-28 16:50 UTC (permalink / raw
  To: gentoo-commits

commit:     84bf2b9c833cde1fcaa35aa8b59fd86a67d2659b
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 16:37:03 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 16:50:46 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84bf2b9c

app-emulation/xen: drop old vulnerable versions

Gentoo-Bug: 588780

Package-Manager: portage-2.3.0

 app-emulation/xen/Manifest                         |  11 --
 .../xen/files/xen-4-fix_dotconfig-gcc.patch        |  37 ----
 app-emulation/xen/files/xen-4.2-efi.patch          |  33 ----
 app-emulation/xen/files/xen-4.5-efi.patch          |  37 ----
 app-emulation/xen/xen-4.6.0-r10.ebuild             | 197 --------------------
 app-emulation/xen/xen-4.6.0-r9.ebuild              | 197 --------------------
 app-emulation/xen/xen-4.6.1-r1.ebuild              | 199 --------------------
 app-emulation/xen/xen-4.6.1-r2.ebuild              | 199 --------------------
 app-emulation/xen/xen-4.6.1-r3.ebuild              | 193 --------------------
 app-emulation/xen/xen-4.6.1.ebuild                 | 200 ---------------------
 app-emulation/xen/xen-4.6.3.ebuild                 | 193 --------------------
 app-emulation/xen/xen-4.7.0.ebuild                 | 193 --------------------
 12 files changed, 1689 deletions(-)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 905cd14..93dc0da 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -1,14 +1,3 @@
-DIST xen-4.6.0-upstream-patches-0.tar.xz 19280 SHA256 8ef2d139f86cb52d2208a17c974e5a85356183ee359ab4b91882067548806e0c SHA512 9fde8d9def1d75e50c10069af7f9fea4b5b6992b7089eb554e1e2a4c78dd080f2977128d0dd541eeb735b951e7d6614a07101f7703457e7743ac6b3be962cdfe WHIRLPOOL 861c7f150811912422f6f5eb77437744d1456740a43bef3dfd88a2e6d6836c0e8460b788ccd4f14a7144652d65a825c08aa984ec4240b2b1ac6d09237695d19d
-DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
-DIST xen-4.6.1-upstream-patches-0.tar.xz 92472 SHA256 7b32cbd57571d838ec606c5bd2b98a51e14a6bcf44d2d61007c274fa3b6b5eb6 SHA512 2f8e9273601c70eac88fb9d94bcb607bc5ea76514f9cdee0e96309b9a9d78db881d94c57a518ad5cef398fa57274b9940ba1553d0984bb5504ca27b6b62a6003 WHIRLPOOL 9b2592f33587fc85b091fbfb357d4ab4914f39286f3207a0d8aebf26259f0ebd1eb7d6bede7da9a202427cf9c7d97c11c4c84c5f90584948b1f3c32fefac5164
-DIST xen-4.6.1.tar.gz 19693042 SHA256 44cc2fccba1e147ef4c8da0584ce0f24189c8743de0e3e9a9226da88ddb5f589 SHA512 f01a0b7874abf8b3a81432428d7ba2d5aceb9d75ae20310f8ef49a3a0df927720a51d49090f74fda7f374c779e121ad26da6966a6f2623ed1a7743b4c080427c WHIRLPOOL b4eec12118d602d1b41edee32ed7c0c61646974060bc44e3eedaf78f7c3015c151998f72573fd2bab1992263dd98f09992772334bae7826048d187de7ed022e5
 DIST xen-4.6.3.tar.gz 19707041 SHA256 02badfce9a037bd1bd4a94210c1f6b85467746216c71795805102b514bcf1fc4 SHA512 187a860b40c05139f22b8498a5fae1db173c3110d957147af29a56cb83b7111c9dc4946d65f9dffc847001fc01c5e9bf51886eaa1194bb9cfd0b6dbcd43a2c5c WHIRLPOOL f80fa73727218567b8d6c8d6bab9dfd577c4bb84ac737b084e4396128e8c4aa79776a277f73c283d5b12f17764b183b67fbf8596e240042dd0709f28cbab777e
 DIST xen-4.7.0.tar.gz 20702550 SHA256 be5876144d49729572ae06142e0bb93f1c1f2695578141eff2931995add24623 SHA512 2c52c8ef145dfab7d069e79318d5d631e1106a0ddc79d88b3bacf36c7f15cea67dccb704a245e785d2a1e42c6fb6c0ad74832f564aaeec025ad7b864031f0921 WHIRLPOOL 9725ac9fe94e78aab47b0534b5ee1a190106a773bf7d6204fed736abe7069b71937717b6680833736bd02a3a3a43f2eb2162fe7c0d992ddd47d12158b5d9835f
-DIST xen-security-patches-0.tar.xz 5944 SHA256 c0456793064185f0781668264a09a2412a25e2ff8c4ce0d332204e37b94d7e96 SHA512 de812e66563e608548b220aa00c8fd71973af748a00cea79959f46a5b6893a38248d2ea455026af43f47e3f5e566d08b5a6f3d18f22e940d75d2a2ca76cec3d3 WHIRLPOOL 3e18d32798bdfe584ee8d102963090b569ec3660fd5723d8c608091e5c7d935c1edced5e258d92bf51fe06975455a3ae33dfedd01702c6076aedf97ea61f2d1b
-DIST xen-security-patches-00.tar.gz 4280 SHA256 1cb3d3d4af15202ce8ea5d6a5982b8c9a4623e565c732c64f5ec949cf55a11c0 SHA512 06e8fa8bda712564a18712640087a920545da3dc6bd6d94762f7f7fee33afb807f2d517e8d6177a683baf8ec04832acf57557f8125973f00e7de6109b3d5131b WHIRLPOOL 8b1b7caa37b73f442f440f599d9ae8d1562c6361c693b4d18540dbe7de4fa8046e3139f19dfdff35a316466ed7f017a3a99d430eb28e0716a0c6b52d8aec5b0b
-DIST xen-security-patches-01.tar.gz 4683 SHA256 ca1e565180aff5485f217735faa24bea2f7fc821d5c5a506d1854291681fdc28 SHA512 538d5df0c3b5b5277613af3a3fc11aa46a16cfdfdc88488da5020e3ad38580b8cdb12778e251c4b41c6b5cfe37d8266a599b8b15b4032491c0689e442b388847 WHIRLPOOL a22492288fa04919c60d9e7e15181bc7eb05f457b0aad0e8ece172443fd4208d4bdeb692ef713b99aa83eb030caf3dfcf1236b5d8de13e152b93096aa2e869b8
-DIST xen-security-patches-10.tar.gz 13289 SHA256 8937b3c0045f83ac0685ce129c99be8ab035f2ed92605d0c1100d4f898d978a3 SHA512 698963479149bd63695b3ffd7d108b798ce6c694560f2908b639f3a1b00d37d4994fbc1e0e21aaba1f3a113653d5b37c28679bc1d97d75a805844345c9c070c0 WHIRLPOOL 8c2433c35499819906abf5cb8898dac23cbf7523cc4b4e9291e696eb2871971a7300d3f54865ac32738a1b67c1de18e227085f14c5717b60ec951d5038fa0493
-DIST xen-security-patches-12.tar.xz 5172 SHA256 1d3c238cbefc243a17770722895f6bc725e807641a93908d3e4002b26e4f2a8b SHA512 06f80b12c30d18f84e880ffb529fe2b90e7ade1cb3479d2fbc21447cf2c5d50c7ba3a14ddd0b31f63e87af520bf80812158e4097e657f8316bdb5f8b443c9828 WHIRLPOOL 49b776cf3d1d05758dfe9ce9f5f5cb0573eaec5f1273648eedb04b408587bb3cfe8838ea551a29423cc30622c7426e852740138fa2795898f25c22de148f91c9
 DIST xen-security-patches-13.tar.xz 3192 SHA256 2721580673d4d4f6f8997961ca6f08d8f818279916d37e5e996af0b4ea008fc7 SHA512 4fd15ca8b611d67b4868f027f9833403b756b87e2f1142a7a0ca41b4fee6143fe57b62ba5360e99c9295fdd0a356048af545c19ea96e075da5aba97845d4a3af WHIRLPOOL 4fd99edcf9afc7937da48131c4d4a82eadf911fd62778dbdf937d7fb914e20d16b2765f538179d9d8ecca5d042ee39736fd1d8cbf01d7fc3e753032472e6bc65
-DIST xen-security-patches-9.tar.gz 9793 SHA256 2167d7bc2a631cf13d5b49c9577dbc8d128517e8ecbf90ef85c38f52ab3187aa SHA512 42f4997f35cc06333584a9a3c65366493094b60a6c67928b6165f3fb7d35d3a8f9dc0c3eadd4522de0d99bcc8511afba1d5e543396399b37983eb547abedca44 WHIRLPOOL 8abb68b4ac10fbc2b590c8a29cd2474d5392d3958542dad7f21ba4ad51c7541bb1686ed2629323e214c3e72b0de7212f25a4681f653d4179404c9f4c53e3d83a
-DIST xen-upstream-patches-0.tar.gz 2297 SHA256 bf21272ad029391d30bf31896efcadc75267538f6c7de5d239453f19659d58ee SHA512 3f5d60aaebd181bddab4dd02e0064de2f75672f44a687a7331fa40e81d56763fea84504081a449d11403b21ad0ba2dac075f0b1796809ef8d16e244f6be99e3d WHIRLPOOL 4ebe79c8f2ea1c45e88e59941e477ed5639dbca3fe95c9a67e07afb0f4b6fb8b7fea8e58422d7c8f906299e4f37c14b4db15200997e5a92b647df98fa93e10c7

diff --git a/app-emulation/xen/files/xen-4-fix_dotconfig-gcc.patch b/app-emulation/xen/files/xen-4-fix_dotconfig-gcc.patch
deleted file mode 100644
index c0dbd20..0000000
--- a/app-emulation/xen/files/xen-4-fix_dotconfig-gcc.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-# Fix gcc-4.6
-diff -ur xen-4.2.0.orig/extras/mini-os/minios.mk xen-4.2.0/extras/mini-os/minios.mk
---- extras/mini-os/minios.mk	2012-09-17 18:21:17.000000000 +0800
-+++ extras/mini-os/minios.mk	2012-12-05 14:01:10.653260260 +0800
-@@ -6,7 +6,7 @@
- 
- # Define some default flags.
- # NB. '-Wcast-qual' is nasty, so I omitted it.
--DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
-+DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls
- DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
- DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
- DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
-diff -ur xen-4.2.0.orig/tools/libxc/Makefile xen-4.2.0/tools/libxc/Makefile
---- tools/libxc/Makefile       2012-09-17 18:21:18.000000000 +0800
-+++ tools/libxc/Makefile       2012-12-05 14:01:10.653260260 +0800
-@@ -73,7 +73,7 @@
-
- -include $(XEN_TARGET_ARCH)/Makefile
-
--CFLAGS   += -Werror -Wmissing-prototypes
-+CFLAGS   += -Wmissing-prototypes
- CFLAGS   += -I. $(CFLAGS_xeninclude)
-
- # Needed for posix_fadvise64() in xc_linux.c
-# Drop .config
-diff -ur xen-4.2.0.orig/Config.mk xen-4.2.0/Config.mk
---- Config.mk	2012-09-17 18:23:12.000000000 +0800
-+++ Config.mk	2012-12-05 14:01:10.641260261 +0800
-@@ -7,7 +7,6 @@
- # fallback for older make
- realpath = $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) && echo "$$PWD/$(notdir $(file))")))
- 
---include $(XEN_ROOT)/.config
- 
- # A debug build of Xen and tools?
- debug ?= n

diff --git a/app-emulation/xen/files/xen-4.2-efi.patch b/app-emulation/xen/files/xen-4.2-efi.patch
deleted file mode 100644
index 6e38aaa..0000000
--- a/app-emulation/xen/files/xen-4.2-efi.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -ur xen-4.2.0.orig/xen/arch/x86/Makefile xen-4.2.0/xen/arch/x86/Makefile
---- xen/arch/x86/Makefile	2012-09-17 18:21:19.000000000 +0800
-+++ xen/arch/x86/Makefile	2013-02-23 20:37:30.679918815 +0800
-@@ -112,7 +112,7 @@
- 	    $(@D)/.$(@F).1.o -o $@
- 	rm -f $(@D)/.$(@F).[0-9]*
- 
--EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
-+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
- EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
- EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
- EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)
---- xen/Makefile	2013-03-07 14:34:01.819453278 +0000
-+++ xen/Makefile	2013-03-07 15:56:44.753044655 +0000
-@@ -31,9 +31,15 @@
- _install: $(TARGET).gz
- 	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
- 	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
--	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
--	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
--	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
-+	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
-+		ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz; \
-+		ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz; \
-+		ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz; \
-+	else \
-+		cp $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz; \
-+		cp $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz; \
-+		cp $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz; \
-+	fi; \
- 	$(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
- 	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
- 		[ -d $(DESTDIR)$(EFI_DIR) ] || $(INSTALL_DIR) $(DESTDIR)$(EFI_DIR); \

diff --git a/app-emulation/xen/files/xen-4.5-efi.patch b/app-emulation/xen/files/xen-4.5-efi.patch
deleted file mode 100644
index 76ff44a..0000000
--- a/app-emulation/xen/files/xen-4.5-efi.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/xen/Makefile b/xen/Makefile
-index 39839a3..d2603f0 100644
---- a/xen/Makefile
-+++ b/xen/Makefile
-@@ -38,9 +38,15 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
- _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
- 	[ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot
- 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
-+	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z);\
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
-+	else \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z);\
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
-+	fi; \
- 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION)
- 	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
- 		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
-diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
-index d502bdf..a2121b0 100644
---- a/xen/arch/x86/Makefile
-+++ b/xen/arch/x86/Makefile
-@@ -112,7 +112,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
- 	    $(@D)/.$(@F).1.o -o $@
- 	rm -f $(@D)/.$(@F).[0-9]*
- 
--EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
-+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
- EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
- EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
- EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)
-

diff --git a/app-emulation/xen/xen-4.6.0-r10.ebuild b/app-emulation/xen/xen-4.6.0-r10.ebuild
deleted file mode 100644
index 9402472..0000000
--- a/app-emulation/xen/xen-4.6.0-r10.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=0
-	# var set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=10
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SEC_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.6.0-r9.ebuild b/app-emulation/xen/xen-4.6.0-r9.ebuild
deleted file mode 100644
index 04e2f63..0000000
--- a/app-emulation/xen/xen-4.6.0-r9.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=0
-	# var set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=0
-	SEC_VER=9
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SEC_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.6.1-r1.ebuild b/app-emulation/xen/xen-4.6.1-r1.ebuild
deleted file mode 100644
index ce56970..0000000
--- a/app-emulation/xen/xen-4.6.1-r1.ebuild
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=00
-	# var set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.6.1-r2.ebuild b/app-emulation/xen/xen-4.6.1-r2.ebuild
deleted file mode 100644
index 4461a53..0000000
--- a/app-emulation/xen/xen-4.6.1-r2.ebuild
+++ /dev/null
@@ -1,199 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=01
-	# var set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.6.1-r3.ebuild b/app-emulation/xen/xen-4.6.1-r3.ebuild
deleted file mode 100644
index 8a514ff..0000000
--- a/app-emulation/xen/xen-4.6.1-r3.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=0
-	SECURITY_VER=12
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.6.1.ebuild b/app-emulation/xen/xen-4.6.1.ebuild
deleted file mode 100644
index 6277f0c..0000000
--- a/app-emulation/xen/xen-4.6.1.ebuild
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm ~arm64 -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	# var set to reflect https://dev.gentoo.org/~idella4/
-	# first instance of UPS_VER (usptream ver)
-	UPS_VER=
-	SEC_VER=
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-upstream-patches-${UPS_VER}.tar.gz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~idella4/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz
-		https://dev.gentoo.org/~idella4/distfiles/${PN}-security-patches-${SEC_VER}.tar.gz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream \
-				"${WORKDIR}"/libexec.patch
-	fi
-
-	if [[ -n ${SECURITY_VER} ]]; then
-		einfo "Try to apply Xen Security patcheset"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-
-		for i in "${WORKDIR}"/xen-sec/xsa*.patch; do
-			epatch $i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.6.3.ebuild b/app-emulation/xen/xen-4.6.3.ebuild
deleted file mode 100644
index 97198be..0000000
--- a/app-emulation/xen/xen-4.6.3.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}

diff --git a/app-emulation/xen/xen-4.7.0.ebuild b/app-emulation/xen/xen-4.7.0.ebuild
deleted file mode 100644
index 97198be..0000000
--- a/app-emulation/xen/xen-4.7.0.ebuild
+++ /dev/null
@@ -1,193 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
-
-MY_PV=${PV/_/-}
-MY_P=${PN}-${PV/_/-}
-
-if [[ $PV == *9999 ]]; then
-	inherit git-r3
-	KEYWORDS=""
-	EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
-	SRC_URI=""
-else
-	KEYWORDS="~amd64 ~arm -x86"
-	UPSTREAM_VER=
-	SECURITY_VER=
-	GENTOO_VER=
-
-	[[ -n ${UPSTREAM_VER} ]] && \
-		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
-	[[ -n ${SECURITY_VER} ]] && \
-		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
-	[[ -n ${GENTOO_VER} ]] && \
-		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
-	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
-		${UPSTREAM_PATCHSET_URI}
-		${SECURITY_PATCHSET_URI}
-		${GENTOO_PATCHSET_URI}"
-fi
-
-DESCRIPTION="The Xen virtual machine monitor"
-HOMEPAGE="http://xen.org/"
-LICENSE="GPL-2"
-SLOT="0"
-IUSE="custom-cflags debug efi flask"
-
-DEPEND="${PYTHON_DEPS}
-	efi? ( >=sys-devel/binutils-2.22[multitarget] )
-	!efi? ( >=sys-devel/binutils-2.22 )"
-RDEPEND=""
-PDEPEND="~app-emulation/xen-tools-${PV}"
-
-# no tests are available for the hypervisor
-# prevent the silliness of /usr/lib/debug/usr/lib/debug files
-# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
-RESTRICT="test splitdebug strip"
-
-# Approved by QA team in bug #144032
-QA_WX_LOAD="boot/xen-syms-${PV}"
-
-REQUIRED_USE="arm? ( debug )"
-
-S="${WORKDIR}/${MY_P}"
-
-pkg_setup() {
-	python-any-r1_pkg_setup
-	if [[ -z ${XEN_TARGET_ARCH} ]]; then
-		if use amd64; then
-			export XEN_TARGET_ARCH="x86_64"
-		elif use arm; then
-			export XEN_TARGET_ARCH="arm32"
-		elif use arm64; then
-			export XEN_TARGET_ARCH="arm64"
-		else
-			die "Unsupported architecture!"
-		fi
-	fi
-
-	if use flask ; then
-		export "XSM_ENABLE=y"
-		export "FLASK_ENABLE=y"
-	fi
-}
-
-src_prepare() {
-	# Upstream's patchset
-	if [[ -n ${UPSTREAM_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-		EPATCH_OPTS="-p1" \
-			epatch "${WORKDIR}"/patches-upstream
-	fi
-
-	# Security patchset
-	if [[ -n ${SECURITY_VER} ]]; then
-	einfo "Try to apply Xen Security patch set"
-		# apply main xen patches
-		# Two parallel systems, both work side by side
-		# Over time they may concdense into one. This will suffice for now
-		EPATCH_SUFFIX="patch"
-		EPATCH_FORCE="yes"
-
-		source "${WORKDIR}"/patches-security/${PV}.conf
-
-		for i in ${XEN_SECURITY_MAIN}; do
-			epatch "${WORKDIR}"/patches-security/xen/$i
-		done
-	fi
-
-	# Gentoo's patchset
-	if [[ -n ${GENTOO_VER} ]]; then
-		EPATCH_SUFFIX="patch" \
-		EPATCH_FORCE="yes" \
-			epatch "${WORKDIR}"/patches-gentoo
-	fi
-
-	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
-
-	# Drop .config
-	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
-
-	if use efi; then
-		export EFI_VENDOR="gentoo"
-		export EFI_MOUNTPOINT="boot"
-	fi
-
-	# 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 {} \; || die "failed to re-set custom-cflags"
-	fi
-
-	# remove -Werror for gcc-4.6's sake
-	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
-		xargs sed -i 's/ *-Werror */ /'
-	# not strictly necessary to fix this
-	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
-
-	# Bug #575868 converted to a sed statement, typo of one char
-	sed -e "s:granter’s:granter's:" -i xen/include/public/grant_table.h || die
-
-	epatch_user
-}
-
-src_configure() {
-	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
-
-	use debug && myopt="${myopt} debug=y"
-
-	if use custom-cflags; then
-		filter-flags -fPIE -fstack-protector
-		replace-flags -O3 -O2
-	else
-		unset CFLAGS
-		unset LDFLAGS
-		unset ASFLAGS
-	fi
-}
-
-src_compile() {
-	# Send raw LDFLAGS so that --as-needed works
-	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
-}
-
-src_install() {
-	local myopt
-	use debug && myopt="${myopt} debug=y"
-
-	# The 'make install' doesn't 'mkdir -p' the subdirs
-	if use efi; then
-		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
-	fi
-
-	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
-
-	# make install likes to throw in some extra EFI bits if it built
-	use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
-}
-
-pkg_postinst() {
-	elog "Official Xen Guide and the unoffical wiki page:"
-	elog " https://wiki.gentoo.org/wiki/Xen"
-	elog " http://en.gentoo-wiki.com/wiki/Xen/"
-
-	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
-
-	elog "You can optionally block the installation of /boot/xen-syms by an entry"
-	elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
-	elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
-}


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/
@ 2015-10-09  3:37 Yixun Lan
  0 siblings, 0 replies; 8+ messages in thread
From: Yixun Lan @ 2015-10-09  3:37 UTC (permalink / raw
  To: gentoo-commits

commit:     0db3b3820b7dc744df8bb969f121b8922a3f6bd0
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Oct  9 03:07:41 2015 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Oct  9 03:29:16 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0db3b382

app-emulation/xen: version bump to 4.6.0

1) try to avoid conditional patch (which is bad)
2) clean un-needed patches

Package-Manager: portage-2.2.22

 app-emulation/xen/Manifest                         |   1 +
 .../xen/files/xen-4.3-fix_dotconfig-gcc.patch      | 220 ---------------------
 app-emulation/xen/files/xen-4.4-efi.patch          |  36 ----
 app-emulation/xen/files/xen-4.6-efi.patch          |  36 ++++
 app-emulation/xen/xen-4.6.0.ebuild                 | 177 +++++++++++++++++
 5 files changed, 214 insertions(+), 256 deletions(-)

diff --git a/app-emulation/xen/Manifest b/app-emulation/xen/Manifest
index 0f7dc98..62bc2ca 100644
--- a/app-emulation/xen/Manifest
+++ b/app-emulation/xen/Manifest
@@ -1,4 +1,5 @@
 DIST xen-4.2.5-upstream-patches-9.tar.xz 23208 SHA256 2206e9a8aeeed207abbae995c5d2baa14d5f0da4120ae44f2de733ecf7ea5af1 SHA512 8a2edaba48002449a521edf2ae078ffe1b3db4f491a85b063886a147a0be3ec7fdb819ce84c90cdae80ed34c10ab2d637506700be10052a67be6ef128fa40fb1 WHIRLPOOL 037820e0fad60d1f7ed054efa797585c992d08f1ffd533705c515ad289f8cdddc72b97f2a3d75ebd683c6bb6988d7285452b4f3cebbe9a879f701156e387ff3b
 DIST xen-4.2.5.tar.gz 15671925 SHA256 3cf440866315e8085050eb0586f0447b6b47a08dbed6a72226bf5ed5d89ec567 SHA512 42c0fc241952fc55fc44480fb6752b004b54ae40e946159ec047adf229b65cbfbd810271d01b064ad8fdbddb73c640dcdcb6bc19f91e8968829889c129920dac WHIRLPOOL 762a91c0111892b33e6bd3e7f7714709b04697ad7c2b0919fef6cc9570a343a77fd5a2b82833e75dac9d12d4e41acdcf0743b0d593595910ddd326f5cd721368
 DIST xen-4.5.1.tar.gz 18410400 SHA256 668c11d4fca67ac44329e369f810356eacd37b28d28fb96e66aac77f3c5e1371 SHA512 9436243e26bc64bc836a179abdc3a6b1b6fa9d3f2170453092c18be71fa62e18cd4465a9154c0f28a7ac8d69d08361ba1defef240a51197f058c012c3855ba04 WHIRLPOOL 71d8559f86683dd9fb3eb09d3f602de227f281fbd3c8cc258bfdb67c425d9e7c4d21cb0284c123e4263262c1b821fea6d28109861ce60d627f6426d352808d99
+DIST xen-4.6.0.tar.gz 19694350 SHA256 6fa1c2431df55aa5950d248e6093b8c8c0f11c357a0adbd348a2186478e80909 SHA512 b4b02f306ffea360f539dd8c231b2f58c00c3638fdb665cb659c7291b475b40f1075bc59d49a6144767729e57b8bc40a1cfd9030d61de2b8fa4ac97d43655c2b WHIRLPOOL d3f01183440ca1875b6e850bd116db0c382383433e50c0902d3268e9e36b39d184fc65e925bdb5363ef4ca7a232fee15b4749c89baf789137b8a8248565c75a8
 DIST xen-security-patches-3.tar.xz 17028 SHA256 fb6301beb9a5c2d1e5d4de8783d8670e382b1bef48ec61e73d2d9be6901d289f SHA512 787fee8f7822577c6de91c4cf4d56d0e73ce46bac5524537ff66a718b6d7eae9d362265515743e8577b2c75f2841baed9837f71467b3b7b91a3111220da5f236 WHIRLPOOL 5c136289e654776bf918fe125fbecba7dac0929b236f7ae8158026a6bd6be12bc786a5ec96cb4022c18a5e7ffde82155deb57eb9639600e4c42c9c209f4a2ed6

diff --git a/app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch b/app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch
deleted file mode 100644
index 588be74..0000000
--- a/app-emulation/xen/files/xen-4.3-fix_dotconfig-gcc.patch
+++ /dev/null
@@ -1,220 +0,0 @@
-# Fix gcc-4.6
-diff -ur xen-4.2.0.orig/extras/mini-os/minios.mk xen-4.2.0/extras/mini-os/minios.mk
---- extras/mini-os/minios.mk	2012-09-17 18:21:17.000000000 +0800
-+++ extras/mini-os/minios.mk	2012-12-05 14:01:10.653260260 +0800
-@@ -6,7 +6,7 @@
- 
- # Define some default flags.
- # NB. '-Wcast-qual' is nasty, so I omitted it.
--DEF_CFLAGS += -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls
-+DEF_CFLAGS += -fno-builtin -Wall -Wredundant-decls -Wno-format -Wno-redundant-decls
- DEF_CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
- DEF_CFLAGS += $(call cc-option,$(CC),-fgnu89-inline)
- DEF_CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline
-diff -ur xen-4.2.0.orig/tools/libxc/Makefile xen-4.2.0/tools/libxc/Makefile
---- tools/libxc/Makefile       2012-09-17 18:21:18.000000000 +0800
-+++ tools/libxc/Makefile       2012-12-05 14:01:10.653260260 +0800
-@@ -85,7 +85,7 @@
-
- -include $(XEN_TARGET_ARCH)/Makefile
-
--CFLAGS   += -Werror -Wmissing-prototypes
-+CFLAGS   += -Wmissing-prototypes
- CFLAGS   += -I. $(CFLAGS_xeninclude)
-
- # Needed for posix_fadvise64() in xc_linux.c
-# Drop .config
-diff -ur xen-4.2.0.orig/Config.mk xen-4.2.0/Config.mk
---- Config.mk	2012-09-17 18:23:12.000000000 +0800
-+++ Config.mk	2012-12-05 14:01:10.641260261 +0800
-@@ -7,7 +7,6 @@ Drop .config
- # fallback for older make
- realpath = $(wildcard $(foreach file,$(1),$(shell cd -P $(dir $(file)) && echo "$$PWD/$(notdir $(file))")))
- 
---include $(XEN_ROOT)/.config
- 
- # A debug build of Xen and tools?
- debug ?= n
-@@ -24,7 +24,7 @@
- 
- # Tools to run on system hosting the build
- HOSTCC      = gcc
--HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
-+HOSTCFLAGS  = -Wstrict-prototypes -O2 -fomit-frame-pointer
- HOSTCFLAGS += -fno-strict-aliasing
- 
- DISTDIR     ?= $(XEN_ROOT)/dist
-@@ -156,7 +156,7 @@
- 
- CFLAGS += -std=gnu99
- 
--CFLAGS += -Wall -Wstrict-prototypes
-+CFLAGS += -Wstrict-prototypes
- 
- # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
- # and is over-zealous with the printf format lint
-diff -ur xen-4.2.1.orig/tools/blktap2/drivers/Makefile xen-4.2.1/tools/blktap2/drivers/Makefile
---- tools/blktap2/drivers/Makefile	2012-12-17 23:00:11.000000000 +0800
-+++ tools/blktap2/drivers/Makefile	2013-01-30 12:31:43.539941099 +0800
-@@ -9,7 +9,7 @@
- LOCK_UTIL  = lock-util
- INST_DIR   = $(SBINDIR)
- 
--CFLAGS    += -Werror -g
-+CFLAGS    += -g
- CFLAGS    += -Wno-unused
- CFLAGS    += -fno-strict-aliasing
- CFLAGS    += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers
-diff -ur xen-4.2.1.orig/tools/debugger/gdbsx/Rules.mk xen-4.2.1/tools/debugger/gdbsx/Rules.mk
---- tools/debugger/gdbsx/Rules.mk	2012-12-17 23:00:22.000000000 +0800
-+++ tools/debugger/gdbsx/Rules.mk	2013-01-30 12:31:43.516941098 +0800
-@@ -1,4 +1,4 @@
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS   += -Werror -Wmissing-prototypes 
-+CFLAGS   += -Wmissing-prototypes 
- # (gcc 4.3x and later)   -Wconversion -Wno-sign-conversion
-diff -ur xen-4.2.1.orig/tools/libaio/harness/Makefile xen-4.2.1/tools/libaio/harness/Makefile
---- tools/libaio/harness/Makefile	2012-12-17 23:00:35.000000000 +0800
-+++ tools/libaio/harness/Makefile	2013-01-30 12:31:43.541941099 +0800
-@@ -4,7 +4,7 @@
- HARNESS_SRCS:=main.c
- # io_queue.c
- 
--CFLAGS=-Wall -Werror -g -O -laio
-+CFLAGS=-Wall -g -O -laio
- #-lpthread -lrt
- 
- all: $(PROGS)
-diff -ur xen-4.2.1.orig/tools/libfsimage/Rules.mk xen-4.2.1/tools/libfsimage/Rules.mk
---- tools/libfsimage/Rules.mk	2012-12-17 23:00:36.000000000 +0800
-+++ tools/libfsimage/Rules.mk	2013-01-30 12:31:43.515941097 +0800
-@@ -1,7 +1,7 @@
- include $(XEN_ROOT)/tools/Rules.mk
- 
- CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\"
--CFLAGS += -Werror -D_GNU_SOURCE
-+CFLAGS += -D_GNU_SOURCE
- LDFLAGS += -L../common/
- 
- PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
-diff -ur xen-4.2.1.orig/tools/libxl/Makefile xen-4.2.1/tools/libxl/Makefile
---- tools/libxl/Makefile	2012-12-17 23:01:08.000000000 +0800
-+++ tools/libxl/Makefile	2013-01-30 12:31:43.541941099 +0800
-@@ -11,7 +11,7 @@
- XLUMAJOR = 1.0
- XLUMINOR = 1
- 
--CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
-+CFLAGS += -Wno-format-zero-length -Wmissing-declarations \
- 	-Wno-declaration-after-statement -Wformat-nonliteral
- CFLAGS += -I. -fPIC
- 
-diff -ur xen-4.2.1.orig/tools/qemu-xen/pc-bios/optionrom/Makefile xen-4.2.1/tools/qemu-xen/pc-bios/optionrom/Makefile
---- tools/qemu-xen/pc-bios/optionrom/Makefile	2012-09-11 02:10:52.000000000 +0800
-+++ tools/qemu-xen/pc-bios/optionrom/Makefile	2013-01-30 12:31:43.528941098 +0800
-@@ -9,7 +9,7 @@
- 
- .PHONY : all clean build-all
- 
--CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
-+CFLAGS := -Wall -Wstrict-prototypes -fomit-frame-pointer -fno-builtin
- CFLAGS += -I$(SRC_PATH)
- CFLAGS += $(call cc-option, $(CFLAGS), -fno-stack-protector)
- QEMU_CFLAGS = $(CFLAGS)
-diff -ur xen-4.2.1.orig/tools/xenstat/xentop/Makefile xen-4.2.1/tools/xenstat/xentop/Makefile
---- tools/xenstat/xentop/Makefile	2012-12-17 23:01:35.000000000 +0800
-+++ tools/xenstat/xentop/Makefile	2013-01-30 12:31:43.535941098 +0800
-@@ -18,7 +18,7 @@
- all install xentop:
- else
- 
--CFLAGS += -DGCC_PRINTF -Wall -Werror $(CFLAGS_libxenstat)
-+CFLAGS += -DGCC_PRINTF -Wall $(CFLAGS_libxenstat)
- LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS)
- CFLAGS += -DHOST_$(XEN_OS)
- 
-diff -ur xen-4.2.1.orig/xen/arch/arm/Rules.mk xen-4.2.1/xen/arch/arm/Rules.mk
---- xen/arch/arm/Rules.mk	2012-12-17 23:01:37.000000000 +0800
-+++ xen/arch/arm/Rules.mk	2013-01-30 12:31:43.498941097 +0800
-@@ -9,7 +9,7 @@
- HAS_DEVICE_TREE := y
- 
- CFLAGS += -fno-builtin -fno-common -Wredundant-decls
--CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
-+CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe
- CFLAGS += -I$(BASEDIR)/include
- 
- # Prevent floating-point variables from creeping into Xen.
-diff -ur xen-4.2.1.orig/xen/arch/x86/Rules.mk xen-4.2.1/xen/arch/x86/Rules.mk
---- xen/arch/x86/Rules.mk	2012-12-17 23:01:37.000000000 +0800
-+++ xen/arch/x86/Rules.mk	2013-01-30 12:31:43.490941096 +0800
-@@ -24,7 +24,7 @@
- endif
- 
- CFLAGS += -fno-builtin -fno-common -Wredundant-decls
--CFLAGS += -iwithprefix include -Werror -Wno-pointer-arith -pipe
-+CFLAGS += -iwithprefix include -Wno-pointer-arith -pipe
- CFLAGS += -I$(BASEDIR)/include 
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
-diff -ur xen-4.2.1.orig/xen/include/Makefile xen-4.2.1/xen/include/Makefile
---- xen/include/Makefile	2012-12-17 23:01:55.000000000 +0800
-+++ xen/include/Makefile	2013-01-30 12:31:43.502941097 +0800
-@@ -78,7 +78,7 @@
- all: headers.chk
- 
- headers.chk: $(filter-out public/arch-% public/%ctl.h public/xsm/% public/%hvm/save.h, $(wildcard public/*.h public/*/*.h) $(public-y)) Makefile
--	for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -Werror -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
-+	for i in $(filter %.h,$^); do $(CC) -ansi -include stdint.h -Wall -W -S -o /dev/null -xc $$i || exit 1; echo $$i; done >$@.new
- 	mv $@.new $@
- 
- endif
-diff -ur xen-4.2.1.orig/tools/tests/mce-test/tools/Makefile xen-4.2.1/tools/tests/mce-test/tools/Makefile
---- tools/tests/mce-test/tools/Makefile  2012-12-17 23:01:35.000000000 +0800
-+++ tools/tests/mce-test/tools/Makefile       2013-01-30 13:01:44.890020152 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=$(CURDIR)/../../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS += -Werror
-+CFLAGS +=
- CFLAGS += $(CFLAGS_libxenctrl)
- CFLAGS += $(CFLAGS_libxenguest)
- CFLAGS += $(CFLAGS_libxenstore)
-diff -ur xen-4.2.1.orig/tools/tests/mem-sharing/Makefile xen-4.2.1/tools/tests/mem-sharing/Makefile
---- tools/tests/mem-sharing/Makefile     2012-12-17 23:01:35.000000000 +0800
-+++ tools/tests/mem-sharing/Makefile  2013-01-30 13:01:44.890020152 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=$(CURDIR)/../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS += -Werror
-+CFLAGS +=
- 
- CFLAGS += $(CFLAGS_libxenctrl)
- CFLAGS += $(CFLAGS_xeninclude)
-diff -ur xen-4.2.1.orig/tools/tests/xen-access/Makefile xen-4.2.1/tools/tests/xen-access/Makefile
---- tools/tests/xen-access/Makefile      2012-12-17 23:01:35.000000000 +0800
-+++ tools/tests/xen-access/Makefile   2013-01-30 13:01:44.891020152 +0800
-@@ -1,7 +1,7 @@
- XEN_ROOT=$(CURDIR)/../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS += -Werror
-+CFLAGS +=
- 
- CFLAGS += $(CFLAGS_libxenctrl)
- CFLAGS += $(CFLAGS_libxenguest)
-diff -ur xen-4.3.0.orig/tools/firmware/Rules.mk xen-4.3.0/tools/firmware/Rules.mk
---- tools/firmware/Rules.mk	2013-07-09 18:46:56.000000000 +0800
-+++ ttools/firmware/Rules.mk	2013-07-20 20:28:57.811836505 +0800
-@@ -11,8 +11,6 @@
- CFLAGS += -DNDEBUG
- endif
- 
--CFLAGS += -Werror
--
- $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
- 
- # Extra CFLAGS suitable for an embedded type of environment.

diff --git a/app-emulation/xen/files/xen-4.4-efi.patch b/app-emulation/xen/files/xen-4.4-efi.patch
deleted file mode 100644
index c584d14..0000000
--- a/app-emulation/xen/files/xen-4.4-efi.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/xen/Makefile b/xen/Makefile
-index 39839a3..d2603f0 100644
---- a/xen/Makefile
-+++ b/xen/Makefile
-@@ -38,9 +38,15 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
- _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
- 	[ -d $(D)/boot ] || $(INSTALL_DIR) $(D)/boot
- 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION)$(Z)
--	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)$(Z)
-+	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)-$(XEN_VERSION)$(Z);\
-+		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)/boot/$(T)$(Z); \
-+	else \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)-$(XEN_VERSION)$(Z);\
-+		$(INSTALL_DATA) $(TARGET)$(Z) $(D)/boot/$(T)$(Z); \
-+	fi; \
- 	$(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION)
- 	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
- 		[ -d $(D)$(EFI_DIR) ] || $(INSTALL_DIR) $(D)$(EFI_DIR); \
-diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
-index d502bdf..a2121b0 100644
---- a/xen/arch/x86/Makefile
-+++ b/xen/arch/x86/Makefile
-@@ -112,7 +112,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
- 	    $(@D)/.$(@F).1.o -o $@
- 	rm -f $(@D)/.$(@F).[0-9]*
- 
--EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
-+EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
- EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
- EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
- EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)

diff --git a/app-emulation/xen/files/xen-4.6-efi.patch b/app-emulation/xen/files/xen-4.6-efi.patch
new file mode 100644
index 0000000..bf888de
--- /dev/null
+++ b/app-emulation/xen/files/xen-4.6-efi.patch
@@ -0,0 +1,36 @@
+diff --git a/xen/Makefile b/xen/Makefile
+index 4c54e9b..a5cdccd 100644
+--- a/xen/Makefile
++++ b/xen/Makefile
+@@ -41,9 +41,15 @@ _install: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
+ _install: $(TARGET)$(CONFIG_XEN_INSTALL_SUFFIX)
+ 	[ -d $(D)$(BOOT_DIR) ] || $(INSTALL_DIR) $(D)$(BOOT_DIR)
+ 	$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
+-	ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z)
++	if [ 'x$(EFI_VENDOR)' == 'x' ]; then \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
++		ln -f -s $(T)-$(XEN_FULLVERSION)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
++	else \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z); \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z); \
++		$(INSTALL_DATA) $(TARGET)$(Z) $(D)$(BOOT_DIR)/$(T)$(Z); \
++	fi;
+ 	[ -d "$(D)$(DEBUG_DIR)" ] || $(INSTALL_DIR) $(D)$(DEBUG_DIR)
+ 	$(INSTALL_DATA) $(TARGET)-syms $(D)$(DEBUG_DIR)/$(T)-syms-$(XEN_FULLVERSION)
+ 	if [ -r $(TARGET).efi -a -n '$(EFI_DIR)' ]; then \
+diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
+index 5f24951..4ec0ee2 100644
+--- a/xen/arch/x86/Makefile
++++ b/xen/arch/x86/Makefile
+@@ -116,7 +116,7 @@ $(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o
+ 	    $(@D)/.$(@F).1.o -o $@
+ 	rm -f $(@D)/.$(@F).[0-9]*
+ 
+-EFI_LDFLAGS = $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
++EFI_LDFLAGS = -mi386pep $(patsubst -m%,-mi386pep,$(LDFLAGS)) --subsystem=10
+ EFI_LDFLAGS += --image-base=$(1) --stack=0,0 --heap=0,0 --strip-debug
+ EFI_LDFLAGS += --section-alignment=0x200000 --file-alignment=0x20
+ EFI_LDFLAGS += --major-image-version=$(XEN_VERSION)

diff --git a/app-emulation/xen/xen-4.6.0.ebuild b/app-emulation/xen/xen-4.6.0.ebuild
new file mode 100644
index 0000000..4deb661
--- /dev/null
+++ b/app-emulation/xen/xen-4.6.0.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${PV/_/-}
+
+if [[ $PV == *9999 ]]; then
+	KEYWORDS=""
+	EGIT_REPO_URI="git://xenbits.xen.org/${PN}.git"
+	live_eclass="git-2"
+else
+	KEYWORDS="~amd64 ~arm ~arm64 -x86"
+	UPSTREAM_VER=
+	SECURITY_VER=
+	GENTOO_VER=
+
+	[[ -n ${UPSTREAM_VER} ]] && \
+		UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
+	[[ -n ${SECURITY_VER} ]] && \
+		SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
+	[[ -n ${GENTOO_VER} ]] && \
+		GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
+	SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
+		${UPSTREAM_PATCHSET_URI}
+		${SECURITY_PATCHSET_URI}
+		${GENTOO_PATCHSET_URI}"
+
+fi
+
+inherit mount-boot flag-o-matic python-any-r1 toolchain-funcs eutils ${live_eclass}
+
+DESCRIPTION="The Xen virtual machine monitor"
+HOMEPAGE="http://xen.org/"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="custom-cflags debug efi flask xsm"
+
+DEPEND="${PYTHON_DEPS}
+	efi? ( >=sys-devel/binutils-2.22[multitarget] )
+	!efi? ( >=sys-devel/binutils-2.22[-multitarget] )"
+RDEPEND=""
+PDEPEND="~app-emulation/xen-tools-${PV}"
+
+RESTRICT="test"
+
+# Approved by QA team in bug #144032
+QA_WX_LOAD="boot/xen-syms-${PV}"
+
+REQUIRED_USE="flask? ( xsm )
+	arm? ( debug )"
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+	python-any-r1_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"
+		elif use arm; then
+			export XEN_TARGET_ARCH="arm32"
+		elif use arm64; then
+			export XEN_TARGET_ARCH="arm64"
+		else
+			die "Unsupported architecture!"
+		fi
+	fi
+
+	if use flask ; then
+		export "XSM_ENABLE=y"
+		export "FLASK_ENABLE=y"
+	elif use xsm ; then
+		export "XSM_ENABLE=y"
+	fi
+}
+
+src_prepare() {
+	# Upstream's patchset
+	if [[ -n ${UPSTREAM_VER} ]]; then
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}"/patches-upstream
+	fi
+
+	# Security patchset
+	if [[ -n ${SECURITY_VER} ]]; then
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+		EPATCH_OPTS="-p1" \
+			epatch "${WORKDIR}/patches-security/${PV}"
+	fi
+
+	# Gentoo's patchset
+	if [[ -n ${GENTOO_VER} ]]; then
+		EPATCH_SUFFIX="patch" \
+		EPATCH_FORCE="yes" \
+			epatch "${WORKDIR}"/patches-gentoo
+	fi
+
+	epatch "${FILESDIR}"/${PN}-4.6-efi.patch
+
+	# Drop .config
+	sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't	drop"
+
+	if use efi; then
+		export EFI_VENDOR="gentoo"
+		export EFI_MOUNTPOINT="boot"
+	fi
+
+	# 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 {} \; || die "failed to re-set custom-cflags"
+	fi
+
+	# remove -Werror for gcc-4.6's sake
+	find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
+		xargs sed -i 's/ *-Werror */ /'
+	# not strictly necessary to fix this
+	sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
+
+	epatch_user
+}
+
+src_configure() {
+	use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
+
+	use debug && myopt="${myopt} debug=y"
+
+	if use custom-cflags; then
+		filter-flags -fPIE -fstack-protector
+		replace-flags -O3 -O2
+	else
+		unset CFLAGS
+	fi
+}
+
+src_compile() {
+	# Send raw LDFLAGS so that --as-needed works
+	emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
+}
+
+src_install() {
+	local myopt
+	use debug && myopt="${myopt} debug=y"
+
+	# The 'make install' doesn't 'mkdir -p' the subdirs
+	if use efi; then
+		mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
+	fi
+
+	emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
+}
+
+pkg_postinst() {
+	elog "Official Xen Guide and the unoffical wiki page:"
+	elog " https://wiki.gentoo.org/wiki/Xen"
+	elog " http://en.gentoo-wiki.com/wiki/Xen/"
+
+	use efi && einfo "The efi executable is installed in boot/efi/gentoo"
+}


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-16 11:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-15  9:31 [gentoo-commits] repo/gentoo:master commit in: app-emulation/xen/files/, app-emulation/xen/ Joonas Niilola
  -- strict thread matches above, loose matches on Subject: below --
2022-07-16 11:15 Florian Schmaus
2022-02-19  3:06 Sam James
2021-12-21  1:37 Sam James
2021-05-11 15:47 Thomas Deutschmann
2019-05-17  8:48 Yixun Lan
2016-07-28 16:50 Yixun Lan
2015-10-09  3:37 Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox