summaryrefslogtreecommitdiffstats
path: root/recipes-containers/criu
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/criu')
-rw-r--r--recipes-containers/criu/criu_git.bb12
-rw-r--r--recipes-containers/criu/files/0006-images-Makefile-fix-cross-compilation-protobuf-paths.patch34
2 files changed, 38 insertions, 8 deletions
diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb
index bcb0ddb6..c27ca56e 100644
--- a/recipes-containers/criu/criu_git.bb
+++ b/recipes-containers/criu/criu_git.bb
@@ -13,8 +13,8 @@ EXCLUDE_FROM_WORLD = "1"
13 13
14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" 14LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2"
15 15
16SRCREV = "a44aa6d985472d995d04fef7eae22d63c7500f8c" 16SRCREV = "3c7d4fa013297b431da48eff821db7f2e8b90c27"
17PV = "4.1.1+git" 17PV = "4.2+git"
18 18
19SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \ 19SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \
20 file://0001-criu-Skip-documentation-install.patch \ 20 file://0001-criu-Skip-documentation-install.patch \
@@ -24,6 +24,7 @@ SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=h
24 file://0005-pycriu-skip-dependency-check-during-build.patch \ 24 file://0005-pycriu-skip-dependency-check-during-build.patch \
25 file://0001-crit-explicity-set-PEP517_SOURCE_PATH.patch \ 25 file://0001-crit-explicity-set-PEP517_SOURCE_PATH.patch \
26 file://0001-plugins-cuda-pass-DEBUG_PREFIX_MAP.patch \ 26 file://0001-plugins-cuda-pass-DEBUG_PREFIX_MAP.patch \
27 file://0006-images-Makefile-fix-cross-compilation-protobuf-paths.patch \
27 " 28 "
28 29
29COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" 30COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux"
@@ -40,7 +41,7 @@ EXTRA_OEMAKE:arm += "ARCH=arm UNAME-M=${CRIU_BUILD_ARCH} WERROR=0"
40EXTRA_OEMAKE:x86-64 += "ARCH=x86 WERROR=0" 41EXTRA_OEMAKE:x86-64 += "ARCH=x86 WERROR=0"
41EXTRA_OEMAKE:aarch64 += "ARCH=aarch64 WERROR=0" 42EXTRA_OEMAKE:aarch64 += "ARCH=aarch64 WERROR=0"
42 43
43EXTRA_OEMAKE:append = " SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no" 44EXTRA_OEMAKE:append = " SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no PROTOBUF_INCLUDEDIR=${PKG_CONFIG_SYSROOT_DIR}/usr/include"
44EXTRA_OEMAKE:append = " LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" 45EXTRA_OEMAKE:append = " LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}"
45 46
46CFLAGS += "-D__USE_GNU -D_GNU_SOURCE " 47CFLAGS += "-D__USE_GNU -D_GNU_SOURCE "
@@ -69,11 +70,6 @@ CLEANBROKEN = "1"
69# WARNING: criu-3.17.1 do_package_qa: QA Issue: criu: ELF binary /usr/sbin/criu has relocations in .text [textrel] 70# WARNING: criu-3.17.1 do_package_qa: QA Issue: criu: ELF binary /usr/sbin/criu has relocations in .text [textrel]
70INSANE_SKIP:${PN} += "textrel" 71INSANE_SKIP:${PN} += "textrel"
71 72
72do_compile:prepend() {
73 rm -rf ${S}/images/google/protobuf/descriptor.proto
74 ln -s ${PKG_CONFIG_SYSROOT_DIR}/usr/include/google/protobuf/descriptor.proto ${S}/images/google/protobuf/descriptor.proto
75}
76
77do_compile () { 73do_compile () {
78 export DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}" 74 export DEBUG_PREFIX_MAP="${DEBUG_PREFIX_MAP}"
79 oe_runmake FULL_PYTHON=${PYTHON} PYTHON=nativepython3 75 oe_runmake FULL_PYTHON=${PYTHON} PYTHON=nativepython3
diff --git a/recipes-containers/criu/files/0006-images-Makefile-fix-cross-compilation-protobuf-paths.patch b/recipes-containers/criu/files/0006-images-Makefile-fix-cross-compilation-protobuf-paths.patch
new file mode 100644
index 00000000..da3eced3
--- /dev/null
+++ b/recipes-containers/criu/files/0006-images-Makefile-fix-cross-compilation-protobuf-paths.patch
@@ -0,0 +1,34 @@
1From: Bruce Ashfield <bruce.ashfield@gmail.com>
2Subject: [PATCH] images/Makefile: fix cross-compilation protobuf paths
3
4pkg-config --variable=includedir returns the host path (e.g.
5/usr/include) without applying PKG_CONFIG_SYSROOT_DIR, since sysroot
6prefixing only applies to -I flags from --cflags, not raw --variable
7queries. The protoc --proto_path was also hardcoded to /usr/include.
8
9Make the include dir overridable via PROTOBUF_INCLUDEDIR so cross-build
10systems can pass the correct sysroot path through EXTRA_OEMAKE.
11
12Upstream-Status: Pending
13
14Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
15---
16 images/Makefile | 5 +++--
17 1 file changed, 3 insertions(+), 2 deletions(-)
18
19diff --git a/images/Makefile b/images/Makefile
20--- a/images/Makefile
21+++ b/images/Makefile
22@@ -93,10 +93,11 @@ makefile-deps := Makefile $(obj)/Makefile
23 #
24 # Generate descriptor.pb-c.c and descriptor.pb-c.h to compile opts.proto.
25 DESCRIPTOR_DIR := images/google/protobuf
26-GOOGLE_INCLUDE=$(shell pkg-config protobuf --variable=includedir)/google/protobuf
27+PROTOBUF_INCLUDEDIR ?= $(shell pkg-config protobuf --variable=includedir)
28+GOOGLE_INCLUDE=$(PROTOBUF_INCLUDEDIR)/google/protobuf
29 $(DESCRIPTOR_DIR)/descriptor.pb-c.c: $(GOOGLE_INCLUDE)/descriptor.proto
30 $(call msg-gen, $@)
31- $(Q) protoc --proto_path=/usr/include --proto_path=$(obj)/ --c_out=$(obj)/ $<
32+ $(Q) protoc --proto_path=$(PROTOBUF_INCLUDEDIR) --proto_path=$(obj)/ --c_out=$(obj)/ $<
33
34 cleanup-y += $(DESCRIPTOR_DIR)/descriptor.pb-c.d