diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb index 811eb7e3..8a7b5ad3 100644 --- a/recipes-containers/criu/criu_git.bb +++ b/recipes-containers/criu/criu_git.bb @@ -13,15 +13,17 @@ EXCLUDE_FROM_WORLD = "1" LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" -SRCREV = "f8b14286b092853a4485813e1efd564109df9123" -PV = "3.19.0+git" +SRCREV = "b6059ff193a9b0dff98e997134d662c3ccfd1600" +PV = "4.1+git" SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \ file://0001-criu-Skip-documentation-install.patch \ file://0002-criu-Change-libraries-install-directory.patch \ file://0003-crit-pycriu-build-and-install-wheels.patch \ file://0004-pycriu-attr-pycriu.version.__version__.patch \ - file://0005-pycriu-skip-dependency-check-during-build.patch \ + file://0005-pycriu-skip-dependency-check-during-build.patch \ + file://0001-crit-explicity-set-PEP517_SOURCE_PATH.patch \ + file://0001-plugins-cuda-pass-DEBUG_PREFIX_MAP.patch \ " COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" @@ -75,6 +77,7 @@ do_compile:prepend() { } do_compile () { + export DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}" oe_runmake FULL_PYTHON=${PYTHON} PYTHON=nativepython3 } @@ -83,6 +86,7 @@ do_install () { export PEP517_WHEEL_PATH="${PEP517_WHEEL_PATH}" export USRBINPATH="${USRBINPATH}" export PEP517_INSTALL_PYTHON="${PEP517_INSTALL_PYTHON}" + oe_runmake PREFIX=${exec_prefix} LIBDIR=${libdir} DESTDIR="${D}" PLUGINDIR="${localstatedir}/lib" FULL_PYTHON=${PYTHON} PYTHON=nativepython3 install # python3's distutils has a feature of rewriting the interpeter on setup installed diff --git a/recipes-containers/criu/files/0001-crit-explicity-set-PEP517_SOURCE_PATH.patch b/recipes-containers/criu/files/0001-crit-explicity-set-PEP517_SOURCE_PATH.patch new file mode 100644 index 00000000..ee37bc81 --- /dev/null +++ b/recipes-containers/criu/files/0001-crit-explicity-set-PEP517_SOURCE_PATH.patch @@ -0,0 +1,32 @@ +From 0af358f8ae5e671d78e3de32a2d26bb3cf2c23f8 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Thu, 3 Apr 2025 17:08:01 +0000 +Subject: [PATCH] crit: explicity set PEP517_SOURCE_PATH + +Similarly to the ./lib build, we need to explicitly set +this to avoid pyproject.toml errors during the build (the +project file cannot be found) + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Bruce Ashfield +--- + crit/Makefile | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/crit/Makefile b/crit/Makefile +index 90f0ee635..329c7e85c 100644 +--- a/crit/Makefile ++++ b/crit/Makefile +@@ -1,5 +1,8 @@ + VERSION_FILE := $(if $(obj),$(addprefix $(obj)/,crit/version.py),crit/version.py) + ++PEP517_SOURCE_PATH := ./crit ++PEP517_BUILD_OPTS := ++ + all-y += ${VERSION_FILE} + cleanup-y += ${VERSION_FILE} + +-- +2.43.0 + diff --git a/recipes-containers/criu/files/0001-criu-Skip-documentation-install.patch b/recipes-containers/criu/files/0001-criu-Skip-documentation-install.patch index dd33b1bd..39cbd1ef 100644 --- a/recipes-containers/criu/files/0001-criu-Skip-documentation-install.patch +++ b/recipes-containers/criu/files/0001-criu-Skip-documentation-install.patch @@ -12,12 +12,12 @@ Signed-off-by: Jianchuan Wang Makefile.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile.install b/Makefile.install -index aafb95469..1b02b70af 100644 ---- a/Makefile.install -+++ b/Makefile.install -@@ -30,7 +30,7 @@ export PREFIX BINDIR SBINDIR MANDIR RUNDIR - export LIBDIR INCLUDEDIR LIBEXECDIR PLUGINDIR +Index: git/Makefile.install +=================================================================== +--- git.orig/Makefile.install ++++ git/Makefile.install +@@ -53,7 +53,7 @@ + export SKIP_PIP_INSTALL PIPFLAGS install-man: - $(Q) $(MAKE) -C Documentation install @@ -25,6 +25,3 @@ index aafb95469..1b02b70af 100644 .PHONY: install-man install-lib: lib --- -2.25.1 - diff --git a/recipes-containers/criu/files/0001-plugins-cuda-pass-DEBUG_PREFIX_MAP.patch b/recipes-containers/criu/files/0001-plugins-cuda-pass-DEBUG_PREFIX_MAP.patch new file mode 100644 index 00000000..0ccd6989 --- /dev/null +++ b/recipes-containers/criu/files/0001-plugins-cuda-pass-DEBUG_PREFIX_MAP.patch @@ -0,0 +1,31 @@ +From 816cad363c3c17636d8c6424578c3c70f0e87624 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield +Date: Thu, 3 Apr 2025 17:48:44 +0000 +Subject: [PATCH] plugins/cuda: pass DEBUG_PREFIX_MAP + +If we don't explicitly pass the debug prefix map to the build +QA errors result in the debug package (host path). + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Bruce Ashfield +--- + plugins/cuda/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/cuda/Makefile b/plugins/cuda/Makefile +index cc3d98ac9..aac9027a7 100644 +--- a/plugins/cuda/Makefile ++++ b/plugins/cuda/Makefile +@@ -19,7 +19,7 @@ all: $(DEPS_CUDA) + + cuda_plugin.so: cuda_plugin.c + $(call msg-gen, $@) +- $(Q) $(CC) $(PLUGIN_CFLAGS) $(shell $(COMPEL) includes) $^ -o $@ $(PLUGIN_INCLUDE) $(PLUGIN_LDFLAGS) ++ $(Q) $(CC) $(PLUGIN_CFLAGS) $(DEBUG_PREFIX_MAP) $(shell $(COMPEL) includes) $^ -o $@ $(PLUGIN_INCLUDE) $(PLUGIN_LDFLAGS) + + clean: + $(call msg-clean, $@) +-- +2.43.0 + diff --git a/recipes-containers/criu/files/0003-crit-pycriu-build-and-install-wheels.patch b/recipes-containers/criu/files/0003-crit-pycriu-build-and-install-wheels.patch index 0796bb24..c9c4b9b9 100644 --- a/recipes-containers/criu/files/0003-crit-pycriu-build-and-install-wheels.patch +++ b/recipes-containers/criu/files/0003-crit-pycriu-build-and-install-wheels.patch @@ -15,38 +15,26 @@ Signed-off-by: Tim Orling lib/Makefile | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) -diff --git a/crit/Makefile b/crit/Makefile -index 9a856db6d..9b36f4be1 100644 ---- a/crit/Makefile -+++ b/crit/Makefile -@@ -1,5 +1,7 @@ - PYTHON_EXTERNALLY_MANAGED := $(shell $(PYTHON) -c 'import os, sysconfig; print(int(os.path.isfile(os.path.join(sysconfig.get_path("stdlib"), "EXTERNALLY-MANAGED"))))') - PIP_BREAK_SYSTEM_PACKAGES := 0 -+PEP517_SOURCE_PATH := ./crit -+PEP517_BUILD_OPTS := +Index: git/crit/Makefile +=================================================================== +--- git.orig/crit/Makefile ++++ git/crit/Makefile +@@ -8,8 +8,10 @@ - VERSION_FILE := $(if $(obj),$(addprefix $(obj)/,crit/version.py),crit/version.py) - -@@ -16,11 +18,13 @@ ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0) - $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install" - else - $(E) " INSTALL " crit -- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit -+ $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) - endif - else + install: ${VERSION_FILE} + ifeq ($(SKIP_PIP_INSTALL),0) + $(E) " BUILD " crit + $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) $(E) " INSTALL " crit -- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit +- $(Q) $(PYTHON) -m pip install $(PIPFLAGS) --prefix=$(DESTDIR)$(PREFIX) ./crit + $(Q) $(PYTHON) -m installer $(INSTALL_WHEEL_COMPILE_BYTECODE) --interpreter "$(USRBINPATH)/env $(PEP517_INSTALL_PYTHON)" --destdir=$(DESTDIR) $(PEP517_WHEEL_PATH)/crit-*.whl + else + $(E) " SKIP INSTALL crit" endif - .PHONY: install - -diff --git a/lib/Makefile b/lib/Makefile -index ae371e78e..b5f147482 100644 ---- a/lib/Makefile -+++ b/lib/Makefile +Index: git/lib/Makefile +=================================================================== +--- git.orig/lib/Makefile ++++ git/lib/Makefile @@ -1,6 +1,9 @@ CRIU_SO := libcriu.so CRIU_A := libcriu.a @@ -57,21 +45,15 @@ index ae371e78e..b5f147482 100644 all-y += lib-c lib-a lib-py -@@ -63,11 +66,15 @@ ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0) - $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install" - else - $(E) " INSTALL " pycriu -- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./lib -+ $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) - endif - else +@@ -55,8 +58,10 @@ + $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)/criu/),' lib/c/criu.pc.in > lib/c/criu.pc + $(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig + ifeq ($(SKIP_PIP_INSTALL),0) + $(E) " BUILD " pycriu + $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) $(E) " INSTALL " pycriu -- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./lib -+ #nativepython3 -m installer ${INSTALL_WHEEL_COMPILE_BYTECODE} --interpreter "${USRBINPATH}/env ${PEP517_INSTALL_PYTHON}" --destdir=${D} ${PEP517_WHEEL_PATH}/*.whl -+ -+ $(Q) $(PYTHON) -m installer $(INSTALL_WHEEL_COMPILE_BYTECODE) --interpreter "$(USRBINPATH)/env $(PEP517_INSTALL_PYTHON)" --destdir=$(DESTDIR) $(PEP517_WHEEL_PATH)/pycriu-*.whl +- $(Q) $(PYTHON) -m pip install $(PIPFLAGS) --prefix=$(DESTDIR)$(PREFIX) ./lib ++ $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) + else + $(E) " SKIP INSTALL pycriu" endif - .PHONY: install - diff --git a/recipes-containers/criu/files/0005-pycriu-skip-dependency-check-during-build.patch b/recipes-containers/criu/files/0005-pycriu-skip-dependency-check-during-build.patch index 88872911..77c6c3e6 100644 --- a/recipes-containers/criu/files/0005-pycriu-skip-dependency-check-during-build.patch +++ b/recipes-containers/criu/files/0005-pycriu-skip-dependency-check-during-build.patch @@ -12,21 +12,19 @@ Signed-off-by: Tim Orling lib/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -diff --git a/lib/Makefile b/lib/Makefile -index b5f147482..e3faa7a06 100644 ---- a/lib/Makefile -+++ b/lib/Makefile -@@ -66,11 +66,11 @@ ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0) - $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install" - else - $(E) " INSTALL " pycriu -- $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) -+ $(Q) $(PYTHON) -m build --no-isolation --wheel --skip-dependency-check --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) - endif - else +Index: git/lib/Makefile +=================================================================== +--- git.orig/lib/Makefile ++++ git/lib/Makefile +@@ -59,9 +59,9 @@ + $(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig + ifeq ($(SKIP_PIP_INSTALL),0) $(E) " BUILD " pycriu - $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) + $(Q) $(PYTHON) -m build --no-isolation --wheel --skip-dependency-check --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) $(E) " INSTALL " pycriu - #nativepython3 -m installer ${INSTALL_WHEEL_COMPILE_BYTECODE} --interpreter "${USRBINPATH}/env ${PEP517_INSTALL_PYTHON}" --destdir=${D} ${PEP517_WHEEL_PATH}/*.whl - +- $(Q) $(PYTHON) -m build --no-isolation --wheel --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) ++ $(Q) $(PYTHON) -m build --no-isolation --wheel --skip-dependency-check --outdir $(PEP517_WHEEL_PATH) $(PEP517_SOURCE_PATH) $(PEP517_BUILD_OPTS) + else + $(E) " SKIP INSTALL pycriu" + endif