mirror of
git://git.yoctoproject.org/meta-virtualization.git
synced 2025-07-19 12:50:22 +02:00
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>
This commit is contained in:
parent
52e67d4e63
commit
67b237d9a9
|
@ -13,15 +13,14 @@ EXCLUDE_FROM_WORLD = "1"
|
|||
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
|
||||
|
||||
SRCREV = "437561d2bbc09d734ae276dbfca337569f454d54"
|
||||
PV = "3.12+git${SRCPV}"
|
||||
SRCREV = "c703e3fd8404e506cc6156719b953ea0580d59a4"
|
||||
PV = "3.13+git${SRCPV}"
|
||||
|
||||
SRC_URI = "git://github.com/xemul/criu.git;protocol=git \
|
||||
SRC_URI = "git://github.com/checkpoint-restore/criu.git \
|
||||
file://0001-criu-Fix-toolchain-hardcode.patch \
|
||||
file://0002-criu-Skip-documentation-install.patch \
|
||||
file://0001-criu-Change-libraries-install-directory.patch \
|
||||
file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \
|
||||
file://0001-x86-crtools-do-not-error-when-YMM-is-missing.patch \
|
||||
"
|
||||
|
||||
COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
|
||||
|
@ -56,7 +55,9 @@ export BUILD_SYS
|
|||
export HOST_SYS
|
||||
export HOSTCFLAGS = "${BUILD_CFLAGS}"
|
||||
|
||||
inherit setuptools
|
||||
inherit setuptools3
|
||||
|
||||
B = "${S}"
|
||||
|
||||
PACKAGECONFIG ??= ""
|
||||
PACKAGECONFIG[selinux] = ",,libselinux"
|
||||
|
@ -69,18 +70,24 @@ do_compile_prepend() {
|
|||
}
|
||||
|
||||
do_compile () {
|
||||
oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python2
|
||||
oe_runmake FULL_PYTHON=${PYTHON} PYTHON=python3
|
||||
}
|
||||
|
||||
do_install () {
|
||||
export INSTALL_LIB="${libdir}/${PYTHON_DIR}/site-packages"
|
||||
oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python2 install
|
||||
oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" FULL_PYTHON=${PYTHON} PYTHON=python3 install
|
||||
|
||||
# python3's distutils has a feature of rewriting the interpeter on setup installed
|
||||
# scripts. 'crit' is one of those scripts. The "executable" or "e" option to the
|
||||
# setup call should fix it, but it is being ignored. So to avoid getting our native
|
||||
# intepreter replaced in the script, we'll do an explicit update ourselves.
|
||||
sed -i 's%^\#\!.*%\#\!/usr/bin/env python3%g' ${D}/usr/bin/crit
|
||||
}
|
||||
|
||||
FILES_${PN} += "${systemd_unitdir}/ \
|
||||
${libdir}/python2.7/site-packages/ \
|
||||
${libdir}/python3*/site-packages/ \
|
||||
${libdir}/pycriu/ \
|
||||
${libdir}/crit-0.0.1-py2.7.egg-info \
|
||||
${libdir}/crit-0.0.1-py3*.egg-info \
|
||||
"
|
||||
|
||||
FILES_${PN}-staticdev += " \
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
From 6072c23dbd3bbdc9fead4d90fd2ea2212f2ae0cd Mon Sep 17 00:00:00 2001
|
||||
From: Zhang Ning <ning.a.zhang@intel.com>
|
||||
Date: Tue, 16 Apr 2019 15:45:05 +0800
|
||||
Subject: [PATCH] x86/crtools: do not error when YMM is missing
|
||||
|
||||
for Intel Apollo Lake SOC, its cpuinfo and fpu features:
|
||||
cpu: x86_family 6 x86_vendor_id GenuineIntel x86_model_id Intel(R) Celeron(R) CPU J3455 @ 1.50GHz
|
||||
cpu: fpu: xfeatures_mask 0x11 xsave_size 1088 xsave_size_max 1088 xsaves_size 704
|
||||
cpu: fpu: x87 floating point registers xstate_offsets 0 / 0 xstate_sizes 160 / 160
|
||||
|
||||
this CPU doesn't have AVX registers, YMM feature.
|
||||
|
||||
when CRIU runs on this CPU, it will report dump error:
|
||||
Dumping GP/FPU registers for 4888
|
||||
Error (criu/arch/x86/crtools.c:362): x86: Corruption in XFEATURE_YMM area (expected 64 but 0 obtained)
|
||||
Error (criu/cr-dump.c:1278): Can't infect (pid: 4888) with parasite
|
||||
|
||||
that's because x86/crtools.c will still valid YMM xsave frame, thus fail to dump.
|
||||
|
||||
bypass unsupported feature, to make CRIU runs this kinds of CPUs.
|
||||
|
||||
Cc: Chen Hu <hu1.chen@intel.com>
|
||||
Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
|
||||
Acked-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
||||
Signed-off-by: Andrei Vagin <avagin@gmail.com>
|
||||
|
||||
Upstream-Status: Backport [https://github.com/checkpoint-restore/criu/commit/5a52e34655636a8f00a664cf42716e1439ea2ef0]
|
||||
Signed-off-by: Dengke Du <dengke.du@windriver.com>
|
||||
---
|
||||
criu/arch/x86/crtools.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/criu/arch/x86/crtools.c b/criu/arch/x86/crtools.c
|
||||
index ee016da..efc23e5 100644
|
||||
--- a/criu/arch/x86/crtools.c
|
||||
+++ b/criu/arch/x86/crtools.c
|
||||
@@ -354,7 +354,7 @@ static bool valid_xsave_frame(CoreEntry *core)
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(features); i++) {
|
||||
- if (!features[i].ptr && i > 0)
|
||||
+ if (!features[i].ptr)
|
||||
continue;
|
||||
|
||||
if (features[i].expected > features[i].obtained) {
|
||||
--
|
||||
2.7.4
|
||||
|
Loading…
Reference in New Issue
Block a user