summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Pijanowski <maciej.pijanowski@3mdeb.com>2018-10-19 11:28:01 +0200
committerBruce Ashfield <bruce.ashfield@windriver.com>2018-10-22 04:37:01 -0400
commitce8f6fe10682d85f7e26ceb3e8ccbc6e01d2b869 (patch)
tree43bd3675119217056e10a115f8af82c934c08b33
parent2672520983841a4e933774e58965f7d15a4d95ad (diff)
downloadmeta-virtualization-ce8f6fe10682d85f7e26ceb3e8ccbc6e01d2b869.tar.gz
xen: fix building with BASELIB=lib64
Many "real" (other then genericx86-64) x86-64 target machine configurations set BASELIB to lib64. For example the intel-corei7-64 or the AMD machines. In such case packaging xen-python fails because items are installed to /usr/lib/, but FILES_xen-python points to package /usr/lib64/ items. Exposing the DISTUTILS variables from OE build makes the python installation somewhat similar to what happens in the distutils class and python items are installed to the /usr/lib64 as expected. Another issue was that the xen-efi package was picking up too much stuff from the /usr/lib64 path on such machines. Being more explicit at least allows to package things correctly. Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r--recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-env-vars-as-setup.py-ar.patch63
-rw-r--r--recipes-extended/xen/xen.inc9
-rw-r--r--recipes-extended/xen/xen_4.11.0.bb1
-rw-r--r--recipes-extended/xen/xen_git.bb1
4 files changed, 70 insertions, 4 deletions
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-env-vars-as-setup.py-ar.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-env-vars-as-setup.py-ar.patch
new file mode 100644
index 00000000..03c39fe7
--- /dev/null
+++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-env-vars-as-setup.py-ar.patch
@@ -0,0 +1,63 @@
1From d79dcc2002008c58683de82f06c168d6eea57991 Mon Sep 17 00:00:00 2001
2From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
3Date: Fri, 19 Oct 2018 11:01:37 +0200
4Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args
5
6Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR)
7as well as other parameters set by the OpenEmbedded build system.
8This is especially useful when the target libdir is not the default one
9(/usr/lib), but for example /usr/lib64.
10
11Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
12---
13 tools/pygrub/Makefile | 5 +++--
14 tools/python/Makefile | 4 ++--
15 2 files changed, 5 insertions(+), 4 deletions(-)
16
17diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
18index 536af07932b4..e1c773101412 100644
19--- a/tools/pygrub/Makefile
20+++ b/tools/pygrub/Makefile
21@@ -10,14 +10,15 @@ INSTALL_LOG = build/installed_files.txt
22 all: build
23 .PHONY: build
24 build:
25- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build
26+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
27
28 .PHONY: install
29 install: all
30 $(INSTALL_DIR) $(DESTDIR)/$(bindir)
31 CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
32 setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
33- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
34+ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \
35+ $(DISTUTILS_INSTALL_ARGS)
36 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
37 "`readlink -f $(DESTDIR)/$(bindir)`" != \
38 "`readlink -f $(LIBEXEC_BIN)`" ]; then \
39diff --git a/tools/python/Makefile b/tools/python/Makefile
40index 541858e2f886..4d4a344f1d33 100644
41--- a/tools/python/Makefile
42+++ b/tools/python/Makefile
43@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt
44
45 .PHONY: build
46 build:
47- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build
48+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
49
50 .PHONY: install
51 install:
52@@ -18,7 +18,7 @@ install:
53
54 CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) \
55 setup.py install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
56- --root="$(DESTDIR)" --force
57+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
58
59 $(INSTALL_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
60 $(INSTALL_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
61--
622.7.4
63
diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
index 7efc8df1..26504138 100644
--- a/recipes-extended/xen/xen.inc
+++ b/recipes-extended/xen/xen.inc
@@ -402,8 +402,7 @@ FILES_${PN}-hypervisor = "\
402FILES_${PN}-init-xenstore-dom = "${libdir}/xen/bin/init-xenstore-domain" 402FILES_${PN}-init-xenstore-dom = "${libdir}/xen/bin/init-xenstore-domain"
403 403
404FILES_${PN}-efi = "\ 404FILES_${PN}-efi = "\
405 ${exec_prefix}/lib64 \ 405 ${exec_prefix}/lib64/efi/xen* \
406 ${exec_prefix}/lib64/xen* \
407 " 406 "
408 407
409FILES_${PN}-base = "\ 408FILES_${PN}-base = "\
@@ -826,6 +825,8 @@ export XEN_OS = "Linux"
826# this is used for the header (#!${bindir}/python) of the install python scripts 825# this is used for the header (#!${bindir}/python) of the install python scripts
827export PYTHONPATH="${bindir}/python" 826export PYTHONPATH="${bindir}/python"
828export ac_cv_path_PYTHONPATH="${bindir}/python" 827export ac_cv_path_PYTHONPATH="${bindir}/python"
828export DISTUTILS_BUILD_ARGS
829export DISTUTILS_INSTALL_ARGS
829 830
830# xen and seabios require HOSTCC and HOSTCXX set to cross-compile 831# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
831export HOSTCC="${BUILD_CC}" 832export HOSTCC="${BUILD_CC}"
@@ -849,8 +850,8 @@ CPP_append = " ${CPPFLAGS}"
849CXX_append = " ${CXXFLAGS}" 850CXX_append = " ${CXXFLAGS}"
850 851
851EXTRA_OECONF += " \ 852EXTRA_OECONF += " \
852 --exec-prefix=/usr \ 853 --exec-prefix=${prefix} \
853 --prefix=/usr \ 854 --prefix=${prefix} \
854 --host=${HOST_SYS} \ 855 --host=${HOST_SYS} \
855 --with-systemd=${systemd_unitdir}/system \ 856 --with-systemd=${systemd_unitdir}/system \
856 --with-systemd-modules-load=${systemd_unitdir}/modules-load.d \ 857 --with-systemd-modules-load=${systemd_unitdir}/modules-load.d \
diff --git a/recipes-extended/xen/xen_4.11.0.bb b/recipes-extended/xen/xen_4.11.0.bb
index b2750667..870caa72 100644
--- a/recipes-extended/xen/xen_4.11.0.bb
+++ b/recipes-extended/xen/xen_4.11.0.bb
@@ -7,6 +7,7 @@ SRC_URI = " \
7 file://xen-4.11-arm-acpi-fix-string-lengths.patch \ 7 file://xen-4.11-arm-acpi-fix-string-lengths.patch \
8 file://xen-tools-xenpmd-snprintf.patch \ 8 file://xen-tools-xenpmd-snprintf.patch \
9 file://xen-disable-sse-before-inlines.patch \ 9 file://xen-disable-sse-before-inlines.patch \
10 file://0001-python-pygrub-pass-DISTUTILS-env-vars-as-setup.py-ar.patch \
10 " 11 "
11 12
12SRC_URI[md5sum] = "cbec0600284921744bc14119f4ed3fff" 13SRC_URI[md5sum] = "cbec0600284921744bc14119f4ed3fff"
diff --git a/recipes-extended/xen/xen_git.bb b/recipes-extended/xen/xen_git.bb
index 81ee1002..0ebd81ce 100644
--- a/recipes-extended/xen/xen_git.bb
+++ b/recipes-extended/xen/xen_git.bb
@@ -13,6 +13,7 @@ S = "${WORKDIR}/git"
13SRC_URI = " \ 13SRC_URI = " \
14 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ 14 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
15 file://xen-disable-sse-before-inlines.patch \ 15 file://xen-disable-sse-before-inlines.patch \
16 file://0001-python-pygrub-pass-DISTUTILS-env-vars-as-setup.py-ar.patch \
16 " 17 "
17 18
18DEFAULT_PREFERENCE = "-1" 19DEFAULT_PREFERENCE = "-1"