summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2020-01-22 15:46:08 +0000
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-01-22 15:53:49 +0000
commit67b237d9a98ada1e31a67a1f19ed39accac52953 (patch)
treed808b7e9b06057a4fb382cdf126c718c51166a64
parent52e67d4e6307a161491825bdfca01dd36b2228e1 (diff)
downloadmeta-virtualization-67b237d9a98ada1e31a67a1f19ed39accac52953.tar.gz
criu: python3 update
Updating the version of criu and the install rules to be python3 safe. Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
-rw-r--r--recipes-containers/criu/criu_git.bb25
-rw-r--r--recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch48
2 files changed, 16 insertions, 57 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index 6bbbed6c..704a0f9e 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -13,15 +13,14 @@ EXCLUDE_FROM_WORLD = "1"
13 13
14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" 14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
15 15
16SRCREV = "437561d2bbc09d734ae276dbfca337569f454d54" 16SRCREV = "c703e3fd8404e506cc6156719b953ea0580d59a4"
17PV = "3.12+git${SRCPV}" 17PV = "3.13+git${SRCPV}"
18 18
19SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ 19SRC_URI = "git://github.com/checkpoint-restore/criu.git \
20 file://0001-criu-Fix-toolchain-hardcode.patch \ 20 file://0001-criu-Fix-toolchain-hardcode.patch \
21 file://0002-criu-Skip-documentation-install.patch \ 21 file://0002-criu-Skip-documentation-install.patch \
22 file://0001-criu-Change-libraries-install-directory.patch \ 22 file://0001-criu-Change-libraries-install-directory.patch \
23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \ 23 file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
24 file://0001-x86-crtools-do-not-error-when-YMM-is-missing.patch \
25 " 24 "
26 25
27COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 26COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
@@ -56,7 +55,9 @@ export BUILD_SYS
56export HOST_SYS 55export HOST_SYS
57export HOSTCFLAGS = "${BUILD_CFLAGS}" 56export HOSTCFLAGS = "${BUILD_CFLAGS}"
58 57
59inherit setuptools 58inherit setuptools3
59
60B = "${S}"
60 61
61PACKAGECONFIG ??= "" 62PACKAGECONFIG ??= ""
62PACKAGECONFIG[selinux] = ",,libselinux" 63PACKAGECONFIG[selinux] = ",,libselinux"
@@ -69,18 +70,24 @@ do_compile_prepend() {
69} 70}
70 71
71do_compile () { 72do_compile () {
72 oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python2 73 oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python3
73} 74}
74 75
75do_install () { 76do_install () {
76 export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages" 77 export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
77 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python2 install 78 oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python3 install
79
80 # python3's distutils has a feature of rewriting the interpeter on setup installed
81 # scripts. 'crit' is one of those scripts. The "executable" or "e" option to the
82 # setup call should fix it, but it is being ignored. So to avoid getting our native
83 # intepreter replaced in the script, we'll do an explicit update ourselves.
84 sed -i 's%^\#\!.*%\#\!/usr/bin/env python3%g' ${D}/usr/bin/crit
78} 85}
79 86
80FILES_${PN} += "${systemd_unitdir}/ \ 87FILES_${PN} += "${systemd_unitdir}/ \
81 ${libdir}/python2.7/site-packages/ \ 88 ${libdir}/python3*/site-packages/ \
82 ${libdir}/pycriu/ \ 89 ${libdir}/pycriu/ \
83 ${libdir}/crit-0.0.1-py2.7.egg-info \ 90 ${libdir}/crit-0.0.1-py3*.egg-info \
84 " 91 "
85 92
86FILES_${PN}-staticdev += " \ 93FILES_${PN}-staticdev += " \
diff --git a/recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch b/recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch
deleted file mode 100644
index 795ef4cf..00000000
--- a/recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From 6072c23dbd3bbdc9fead4d90fd2ea2212f2ae0cd Mon Sep 17 00:00:00 2001
2From: Zhang Ning <ning.a.zhang@intel.com>
3Date: Tue, 16 Apr 2019 15:45:05 +0800
4Subject: [PATCH] x86/crtools: do not error when YMM is missing
5
6for Intel Apollo Lake SOC, its cpuinfo and fpu features:
7cpu: x86_family 6 x86_vendor_id GenuineIntel x86_model_id Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
8cpu: fpu: xfeatures_mask 0x11 xsave_size 1088 xsave_size_max 1088 xsaves_size 704
9cpu: fpu: x87 floating point registers xstate_offsets 0 / 0 xstate_sizes 160 / 160
10
11this CPU doesn't have AVX registers, YMM feature.
12
13when CRIU runs on this CPU, it will report dump error:
14Dumping GP/FPU registers for 4888
15Error (criu/arch/x86/crtools.c:362): x86: Corruption in XFEATURE_YMM area (expected 64 but 0 obtained)
16Error (criu/cr-dump.c:1278): Can't infect (pid: 4888) with parasite
17
18that's because x86/crtools.c will still valid YMM xsave frame, thus fail to dump.
19
20bypass unsupported feature, to make CRIU runs this kinds of CPUs.
21
22Cc: Chen Hu <hu1.chen@intel.com>
23Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
24Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
25Signed-off-by: Andrei Vagin <avagin@gmail.com>
26
27Upstream-Status: Backport [https://github.com/checkpoint-restore/criu/commit/5a52e34655636a8f00a664cf42716e1439ea2ef0]
28Signed-off-by: Dengke Du <dengke.du@windriver.com>
29---
30 criu/arch/x86/crtools.c | 2 +-
31 1 file changed, 1 insertion(+), 1 deletion(-)
32
33diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
34index ee016da..efc23e5 100644
35--- a/criu/arch/x86/crtools.c
36+++ b/criu/arch/x86/crtools.c
37@@ -354,7 +354,7 @@ static bool valid_xsave_frame(CoreEntry *core)
38 };
39
40 for (i = 0; i < ARRAY_SIZE(features); i++) {
41- if (!features[i].ptr && i > 0)
42+ if (!features[i].ptr)
43 continue;
44
45 if (features[i].expected > features[i].obtained) {
46--
472.7.4
48