summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Mózes <hydrapolic@gmail.com>2021-12-23 19:35:40 +0000
committerJoonas Niilola <juippis@gentoo.org>2022-01-15 11:31:18 +0200
commit8a3df79bc9bdd024fb463382ad35c8339c856306 (patch)
tree4cc8bc261bfe2e7684735807396c404b3ff8eb8c /app-emulation/xen
parentdev-java/mchange-commons: eapi8, switched to tar.gz, min java 1.8 (diff)
downloadgentoo-8a3df79bc9bdd024fb463382ad35c8339c856306.tar.gz
gentoo-8a3df79bc9bdd024fb463382ad35c8339c856306.tar.bz2
gentoo-8a3df79bc9bdd024fb463382ad35c8339c856306.zip
app-emulation/xen: add USE to disable boot symlinks
Closes: https://bugs.gentoo.org/829765 Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/23484 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-emulation/xen')
-rw-r--r--app-emulation/xen/files/xen-4.16-efi.patch38
-rw-r--r--app-emulation/xen/files/xen-4.16-no-symlink.patch17
-rw-r--r--app-emulation/xen/metadata.xml1
-rw-r--r--app-emulation/xen/xen-4.16.0-r1.ebuild (renamed from app-emulation/xen/xen-4.16.0.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
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