xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] xen: use BOOT_DIR as xen.gz install location
@ 2014-04-23 10:22 Olaf Hering
  2014-04-23 11:34 ` Ian Campbell
  2014-04-23 12:19 ` Jan Beulich
  0 siblings, 2 replies; 3+ messages in thread
From: Olaf Hering @ 2014-04-23 10:22 UTC (permalink / raw)
  To: xen-devel; +Cc: Olaf Hering, keir, ian.campbell, tim, ian.jackson, jbeulich

Xen is currently installed into /boot, which is a hardcoded path. This
makes it impossible to install two xen.rpm packages from 'make rpmball'
in parallel because rpm complains about conflicting files.
Use BOOT_DIR to define the install path to make it possible to install
xen.gz below --prefix=.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
---

v2:
 use BOOT_DIR instead of XEN_BOOT_DIR
 add variable to config/StdGNU.mk instead of xen/Makefile

 config/StdGNU.mk |  2 ++
 xen/Makefile     | 24 ++++++++++++------------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index 25fc594..c6439f6 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -51,6 +51,8 @@ SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR)
 XEN_CONFIG_DIR = $(CONFIG_DIR)/xen
 XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts
 
+BOOT_DIR ?= /boot
+
 SOCKET_LIBS =
 UTIL_LIBS = -lutil
 DLOPEN_LIBS = -ldl
diff --git a/xen/Makefile b/xen/Makefile
index 79fa8f2..c0cf0c3 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -12,7 +12,7 @@ export XEN_DOMAIN	?= $(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) |
 export BASEDIR := $(CURDIR)
 export XEN_ROOT := $(BASEDIR)/..
 
-EFI_MOUNTPOINT ?= /boot/efi
+EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
 
 .PHONY: default
 default: build
@@ -36,12 +36,12 @@ _install: D=$(DESTDIR)
 _install: T=$(notdir $(TARGET))
 _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)
-	$(INSTALL_DATA) $(TARGET)-syms $(D)/boot/$(T)-syms-$(XEN_FULLVERSION)
+	[ -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)-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); \
 		$(INSTALL_DATA) $(TARGET).efi $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi; \
@@ -60,11 +60,11 @@ _uninstall: D=$(DESTDIR)
 _uninstall: T=$(notdir $(TARGET))
 _uninstall: Z=$(CONFIG_XEN_INSTALL_SUFFIX)
 _uninstall:
-	rm -f $(D)/boot/$(T)-$(XEN_FULLVERSION)$(Z)
-	rm -f $(D)/boot/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
-	rm -f $(D)/boot/$(T)-$(XEN_VERSION)$(Z)
-	rm -f $(D)/boot/$(T)$(Z)
-	rm -f $(D)/boot/$(T)-syms-$(XEN_FULLVERSION)
+	rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_FULLVERSION)$(Z)
+	rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION)$(Z)
+	rm -f $(D)$(BOOT_DIR)/$(T)-$(XEN_VERSION)$(Z)
+	rm -f $(D)$(BOOT_DIR)/$(T)$(Z)
+	rm -f $(D)$(BOOT_DIR)/$(T)-syms-$(XEN_FULLVERSION)
 	rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_FULLVERSION).efi
 	rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).$(XEN_SUBVERSION).efi
 	rm -f $(D)$(EFI_DIR)/$(T)-$(XEN_VERSION).efi

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

* Re: [PATCH v2] xen: use BOOT_DIR as xen.gz install location
  2014-04-23 10:22 [PATCH v2] xen: use BOOT_DIR as xen.gz install location Olaf Hering
@ 2014-04-23 11:34 ` Ian Campbell
  2014-04-23 12:19 ` Jan Beulich
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2014-04-23 11:34 UTC (permalink / raw)
  To: Olaf Hering; +Cc: keir, tim, ian.jackson, jbeulich, xen-devel

On Wed, 2014-04-23 at 12:22 +0200, Olaf Hering wrote:
> Xen is currently installed into /boot, which is a hardcoded path. This
> makes it impossible to install two xen.rpm packages from 'make rpmball'
> in parallel because rpm complains about conflicting files.
> Use BOOT_DIR to define the install path to make it possible to install
> xen.gz below --prefix=.
> 
> Signed-off-by: Olaf Hering <olaf@aepfle.de>

Reviewed-by: Ian Campbell <ian.campbell@citrix.com>

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

* Re: [PATCH v2] xen: use BOOT_DIR as xen.gz install location
  2014-04-23 10:22 [PATCH v2] xen: use BOOT_DIR as xen.gz install location Olaf Hering
  2014-04-23 11:34 ` Ian Campbell
@ 2014-04-23 12:19 ` Jan Beulich
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2014-04-23 12:19 UTC (permalink / raw)
  To: Olaf Hering; +Cc: keir, tim, ian.jackson, ian.campbell, xen-devel

>>> On 23.04.14 at 12:22, <olaf@aepfle.de> wrote:
> --- a/config/StdGNU.mk
> +++ b/config/StdGNU.mk
> @@ -51,6 +51,8 @@ SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR)
>  XEN_CONFIG_DIR = $(CONFIG_DIR)/xen
>  XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts
>  
> +BOOT_DIR ?= /boot
> +
>  SOCKET_LIBS =
>  UTIL_LIBS = -lutil
>  DLOPEN_LIBS = -ldl

That's what Linux and *BSD consume, but Solaris uses SunOS.mk,
which doesn't include StdGNU.mk, yet you don't modify it.

Jan

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

end of thread, other threads:[~2014-04-23 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-23 10:22 [PATCH v2] xen: use BOOT_DIR as xen.gz install location Olaf Hering
2014-04-23 11:34 ` Ian Campbell
2014-04-23 12:19 ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).