diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-01-22 15:46:08 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-01-22 15:53:49 +0000 |
commit | 67b237d9a98ada1e31a67a1f19ed39accac52953 (patch) | |
tree | d808b7e9b06057a4fb382cdf126c718c51166a64 /recipes-containers | |
parent | 52e67d4e6307a161491825bdfca01dd36b2228e1 (diff) | |
download | meta-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>
Diffstat (limited to 'recipes-containers')
-rw-r--r-- | recipes-containers/criu/criu_git.bb | 25 | ||||
-rw-r--r-- | recipes-containers/criu/files/0001-x86-crtools-do-not-error-when-YMM-is-missing.patch | 48 |
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 | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" |
15 | 15 | ||
16 | SRCREV = "437561d2bbc09d734ae276dbfca337569f454d54" | 16 | SRCREV = "c703e3fd8404e506cc6156719b953ea0580d59a4" |
17 | PV = "3.12+git${SRCPV}" | 17 | PV = "3.13+git${SRCPV}" |
18 | 18 | ||
19 | SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ | 19 | SRC_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 | ||
27 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" | 26 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" |
@@ -56,7 +55,9 @@ export BUILD_SYS | |||
56 | export HOST_SYS | 55 | export HOST_SYS |
57 | export HOSTCFLAGS = "${BUILD_CFLAGS}" | 56 | export HOSTCFLAGS = "${BUILD_CFLAGS}" |
58 | 57 | ||
59 | inherit setuptools | 58 | inherit setuptools3 |
59 | |||
60 | B = "${S}" | ||
60 | 61 | ||
61 | PACKAGECONFIG ??= "" | 62 | PACKAGECONFIG ??= "" |
62 | PACKAGECONFIG[selinux] = ",,libselinux" | 63 | PACKAGECONFIG[selinux] = ",,libselinux" |
@@ -69,18 +70,24 @@ do_compile_prepend() { | |||
69 | } | 70 | } |
70 | 71 | ||
71 | do_compile () { | 72 | do_compile () { |
72 | oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python2 | 73 | oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python3 |
73 | } | 74 | } |
74 | 75 | ||
75 | do_install () { | 76 | do_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 | ||
80 | FILES_${PN} += "${systemd_unitdir}/ \ | 87 | FILES_${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 | ||
86 | FILES_${PN}-staticdev += " \ | 93 | FILES_${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 @@ | |||
1 | From 6072c23dbd3bbdc9fead4d90fd2ea2212f2ae0cd Mon Sep 17 00:00:00 2001 | ||
2 | From: Zhang Ning <ning.a.zhang@intel.com> | ||
3 | Date: Tue, 16 Apr 2019 15:45:05 +0800 | ||
4 | Subject: [PATCH] x86/crtools: do not error when YMM is missing | ||
5 | |||
6 | for Intel Apollo Lake SOC, its cpuinfo and fpu features: | ||
7 | cpu: x86_family 6 x86_vendor_id GenuineIntel x86_model_id Intel(R) Celeron(R) CPU J3455 @ 1.50GHz | ||
8 | cpu: fpu: xfeatures_mask 0x11 xsave_size 1088 xsave_size_max 1088 xsaves_size 704 | ||
9 | cpu: fpu: x87 floating point registers xstate_offsets 0 / 0 xstate_sizes 160 / 160 | ||
10 | |||
11 | this CPU doesn't have AVX registers, YMM feature. | ||
12 | |||
13 | when CRIU runs on this CPU, it will report dump error: | ||
14 | Dumping GP/FPU registers for 4888 | ||
15 | Error (criu/arch/x86/crtools.c:362): x86: Corruption in XFEATURE_YMM area (expected 64 but 0 obtained) | ||
16 | Error (criu/cr-dump.c:1278): Can't infect (pid: 4888) with parasite | ||
17 | |||
18 | that's because x86/crtools.c will still valid YMM xsave frame, thus fail to dump. | ||
19 | |||
20 | bypass unsupported feature, to make CRIU runs this kinds of CPUs. | ||
21 | |||
22 | Cc: Chen Hu <hu1.chen@intel.com> | ||
23 | Signed-off-by: Zhang Ning <ning.a.zhang@intel.com> | ||
24 | Acked-by: Cyrill Gorcunov <gorcunov@gmail.com> | ||
25 | Signed-off-by: Andrei Vagin <avagin@gmail.com> | ||
26 | |||
27 | Upstream-Status: Backport [https://github.com/checkpoint-restore/criu/commit/5a52e34655636a8f00a664cf42716e1439ea2ef0] | ||
28 | Signed-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 | |||
33 | diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c | ||
34 | index 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 | -- | ||
47 | 2.7.4 | ||
48 | |||