Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 627300 - app-emulation/xen: USE=efi xen-4.6-efi.patch installs copies not links of xen.gz in /boot
Summary: app-emulation/xen: USE=efi xen-4.6-efi.patch installs copies not links of xen...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Xen Devs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-08 09:09 UTC by Spooky Ghost
Modified: 2019-04-04 14:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Spooky Ghost 2017-08-08 09:09:35 UTC
This patch contains the following hunk:

--- 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 \


So when EFI_VENDOR (USE=efi) is set the instead of installing symlinks for /boot/xen.gz, /boot/xen-<major_version>.gz and /boot/xen-<major_version>.<minor_version>.gz but full copies.  This causes the grub2 grub-mkconfig command to build 4 xen submenus all for the same xen version.  Upstream does not have this condition and it seems to be redundant.  With this hunk removed from the patch xen-4.8.1-r2.ebuild continues to build.

I'm not sure if this is supposed to be an allowance for the ESP being mounted at /boot instead of a typical (in my experience) Linux filesystem at /boot and then the ESP at /boot/efi?

With original patch:
# ls -l /boot/xen*
-rw-r--r-- 1 root root   1106 Aug  8 09:45 /boot/xen-4.8.1.config
-rw-r--r-- 1 root root 936492 Aug  8 09:51 /boot/xen-4.8.1.gz
-rw-r--r-- 1 root root 936492 Aug  8 09:51 /boot/xen-4.8.gz
-rw-r--r-- 1 root root 936492 Aug  8 09:51 /boot/xen-4.gz
-rw-r--r-- 1 root root 936492 Aug  8 09:51 /boot/xen.gz

With modified patch:
# ls -l /boot/xen*
-rw-r--r-- 1 root root   1106 Aug  8 09:59 /boot/xen-4.8.1.config
-rw-r--r-- 1 root root 936492 Aug  8 10:04 /boot/xen-4.8.1.gz
lrwxrwxrwx 1 root root     12 Aug  8 10:05 /boot/xen-4.8.gz -> xen-4.8.1.gz
lrwxrwxrwx 1 root root     12 Aug  8 10:05 /boot/xen-4.gz -> xen-4.8.1.gz
lrwxrwxrwx 1 root root     12 Aug  8 10:05 /boot/xen.gz -> xen-4.8.1.gz
Comment 1 Tomáš Mózes 2019-04-04 14:04:55 UTC
Isn't this because an efi boot partition on vfat is unable to handle symlinks?