diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-03-17 19:14:53 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-03-18 03:32:54 +0000 |
| commit | 15012558d8db5e5d99a9f9e04d993cf3757c1ae5 (patch) | |
| tree | 5dd9b6a2c855447c2d848a0f7416b82c75f7d04b /recipes-containers/criu | |
| parent | 2e42bda408ec68eb1bb331e25b3545b1c5e36dfd (diff) | |
| download | meta-virtualization-15012558d8db5e5d99a9f9e04d993cf3757c1ae5.tar.gz | |
criu: update to v4.2
** CRIU 4.2 fails to cross-compile with:
No rule to make target '/usr/include/google/protobuf/descriptor.proto'
Upstream commit 7fbf7b2be removed the build-time symlink for
descriptor.proto and replaced it with a Makefile rule that resolves
the path via pkg-config and passes it to protoc. Both the pkg-config
query and the protoc --proto_path are hardcoded to host paths.
This breaks cross-compilation because pkg-config --variable=includedir
returns the raw host path (/usr/include) without applying
PKG_CONFIG_SYSROOT_DIR. The sysroot prefix is only applied to -I
flags from --cflags, not to raw --variable queries.
Add a patch introducing an overridable PROTOBUF_INCLUDEDIR make
variable and pass the sysroot-prefixed path via EXTRA_OEMAKE. Remove
the old do_compile:prepend symlink workaround which no longer applies.
And then we pickup the following changes:
3c7d4fa01 criu: Version 4.2 (CRIUTIBILITY)
0a7e7d09d log: use sizeof(*hdr) instead of sizeof(hdr)
e689d902b criu/log: properly handle truncated length from vsnprintf
6344e8d71 cr-servce: move kerndat_init after log_init
a525b3c32 test/vdso-proxy: handle merged vma-s
ce680fc6c Revert "plugins/amdgpu: Implement parallel restore"
1d08ff8ca coredump: fix handling of num_pages
cb8e1da3f coredump: use compat_nr_pages as fallback
0fa6ff3d1 test/others: add tests for check() with pycriu
567f70ce1 test/others: add test for check() with libcriu
a1dc88502 test/rpc: update errno check
3c841af2c pycriu: use explicit imports for __init__
f7ccb63bd pycriu: set RPC opts for CHECK
9371c4a78 cr-service: refactor RPC opts parsing for check()
72ca94db4 cr-service: refactor logging setup
5966ffe8a cr-service: refactor images_dir path resolution
60a731ab3 cr-service: drop images_dir from setproctitle
ee4100c09 cr-service: refactor images/workdir setup
71a637923 pycriu: set default value for sk_name
d2c46b92b pycriu: better socket error handling
7aad7317b lib/pycriu: changing the default behavior to use the system binary
3f97cfe87 test/libcriu: check setting of RPC config file
2878faa74 libcriu: enable setting of RPC config file
07ad2473f Use command -v instead of which
afcfcd3bf ci: add which dependency in dnf packages
686018147 ci: add wheel and setuptools in dnf packages
d3dfb663b make: don't install external dependencies
f74e68daf ci: verify call order of action-script hooks
f824dc735 ci: consolidate action-script tests
d5c81f810 pycriu: prevent always appending "Unknown" to error messages
540c631dd pycriu: add missing protobuf dependency
a5ae3c184 pycriu: set licence to LGPLv2.1
697c31abe zdtm: shstk: add SHSTK_ENABLE test build option
6fd71b9ee x86/criu: shstk: restore SHSTK via premap loops
abf4a71d9 x86/criu: shstk: add shstk_vma_restore()
02462c19c restorer: shstk: allocate restorer shadow stack
b18c07d8a restorer: shstk: add shstk_min_mmap_addr()
f29cb750d x86/criu: shstk restorer memory accounting functions
3365c7c02 restorer: shstk: add restorer shadow stack stubs
bb9a7202a test/others/rpc: show logs on error
9d072222e test/others/rpc: parse action-script via config
c03c08d1b cr-service: refactor rpc config parsing
dcce9bd0e zdtm: add a test for --allow-uprobes option
f548d3af4 crtools: remove "consult documentation"
aeec40bf0 docs: add documentation for --allow-uprobes
bab72af9a vma: introduce --allow-uprobes option
74bf40fee crit: add VMA_AREA_UPROBES flag
0ff2e0a66 criu-coredump: add VMA_AREA_UPROBES flag
7bf402f6b vma: introduce VMA_AREA_UPROBES flag
520266d89 zdtm: add sk-unix-restore-fs-share test
790b3cf42 ci: run alpine tests on arm64
77553f07d make: prevent redefinition of 'struct sigcontext'
3379c122e page-xfer: fix incompatible pointer type on armv7
7a4b35a91 contributing: update links to mailing list
76394e93a ci: consolidate aarch64 tests on GitHub runners
0a81dc8bb ci/java: update base image from focal to jammy
b25ff1d33 Remove travis-ci leftovers
25f8be0f6 ci: use package-manager dependency install scripts
67751bc11 docs: add developer overviews for AI assistants
91758a68e zdtm: Remove junit_xml leftovers
2d2168fc9 vdso: relax EI_OSABI check to support linux in ELF header
2e26b36d4 pagemap: print page regions in the format `start - end`
7e0da4d97 pagemap: use unsigned long for page counts
afb2e6c3f pagemap: change PagemapEntry.nr_pages to uint64 to support huge mappings
c7395f4cb files: fork helpers without CLONE_FILES | CLONE_FS
a8c5e1171 lsm: use attr/apparmor/current to get apparmor label
80c280610 compel/mips: Relax ELF magic check to support MIPS libraries
053a22a23 pagemap: prevent integer overflow in pagemap_len
a779417a3 zdtm: stop importing junit_xml
254ba3e8c ci: avoid Docker 28 due to regression
4b7398595 criu/sockets: Restrict SO_PASSCRED and SO_PASSSEC to supported families
fa1b39906 zdtm/static/sock_opts00: use unix socket to test SO_PASSCRED and SO_PASSSEC
2ba343010 test/zdtm/static/maps12: fix pointer-to-int cast
dcee5bd6f make: Disable branch-protection for PIE code on ARM64
98f2bd525 ci/vagrant: install vanilla kernel for Fedora Rawhide test
01265cfc6 test/zdtm/static/maps12: add madv guards test
9c0f725a6 criu/mem: dump: note MADV_GUARD pages as VMA_AREA_GUARD VMAs
59b4d662a criu/pie/restorer: add madvise(MADV_GUARD_INSTALL) restore logic
63c702968 criu/{mem, vdso, cr-restore}: introduce VMA_AREA_GUARD fake VMAs
cc047d595 criu/mem: dump: skip MADV_GUARD pages content dump
5843cbf97 criu/mem: refactor should_dump_page helper
42580fcb1 criu/pagemap-cache: pagescan: look for PAGE_IS_GUARD pages
1873e8f50 cr-dump: warn if MADV_GUARD is supported but isn't shown in pagemap
4fc07a8a4 kerndat: add pagemap_scan_guard_pages feature check logic
2bb77daa9 kerndat: add madvise(MADV_GUARD_INSTALL) feature-detection
fce491113 criu/include/mman: define MADV_GUARD_INSTALL
5f94dd71e CI: Consolidate arm64 tests on GitHub runners
c6c6f6f23 zdtm/socket-tcp-closing: fill socket buffers effectivly
d586b30c6 vagrant: fix tar including archive in itself
2762b21e4 vagrant: update image to fedora 42
0d1e280d0 vagrant: fix 'qemu' install
64276874d restore: flush caches during restore
95d5e2e59 compel: flush caches after parasite injection
22c83e3eb images/Makefile: use msg-gen
066bf7bf3 Keep images/google/protobuf directory
21c3b9c00 images/Makefile: fix using $(Q)
7fbf7b2be images: remove symlink for descriptor.proto
455c67739 zdtm: Add ztatic/mnt_ext_file_bind_auto test
e31828ed8 mount: Fix trailing / when a file is bind-mounted
3dc865bc8 test: add static tests for ICMP socket
a80c54484 sk-inet: Add support for checkpoint/restore of ICMP sockets
677a56891 zdtm/netns_sub_sysctl: skip unsupported sysctls
87bd09a0d net/sysctl: make ipv4/ping_group_range work in user namespaces
45d09ae17 net/sysctl: fix broken ipv4_sysctls_op
4f057a6ae net/sysctl: fix missprint in an error message
4c7d42f67 ipc/sysctl: fix CTL_FLAGS_IPC_EACCES_SKIP by making it a flag
922754dff rpc/log: return first error always
a79b33d0c cpuinfo: show error when image is missing
99ba6db89 crtools: do a few minor cleanups
fcbaac059 crtools: simplify check for cpuinfo subcommands
fbfed312e feat: introduce Nix flake
5f18ca1bb test/zdtm/static: add maps11 test for MAP_DROPPABLE/MADV_WIPEONFORK
dfa0ce180 test/zdtm/static/maps02: add MAP_DROPPABLE testcase
4f9dcfb9c pycriu/images/pb2dict: add MAP_DROPPABLE flag
b90cfc1a8 criu/proc_parse: support MAP_DROPPABLE mappings
6476488a5 test/zdtm/static/maps02: add MADV_WIPEONFORK testcase
af5412a43 criu/proc_parse: support MADV_WIPEONFORK/VM_WIPEONFORK
2b8951a9c image: use `protoc` instead of `protoc-c`
1fdff7c7a zdtm: fix check for criu binary
ae1395de1 zdtm.py: add an option to change pycriu import path
7a5b3d1f4 plugins/amdgpu: Update `README.md` and `criu-amdgpu-plugin.txt`
a61116fd9 plugins/amdgpu: Implement parallel restore
e8ba7c103 plugins/amdgpu: Add parallel restore command
1fd1b670c plugins/amdgpu: Add socket operations
e257d0497 pstree: Add `has_children` function
497109eb4 cr-restore: Move `cr_plugin_init` after `fdstore_init`
427c0dc27 criu: Introduce a new device plugin hook for restore
d57d40a5a sk-inet: add MPTCP definition
fddca67cc seize: fix pause devices for frozen containers
366d73a4c make: remove checks and warnings for bsd strlcat and strlcpy
1eaa870cc kerndat: check that hardware breakpoints work
b458a5c1a sk-inet: add message how to disable MPTCP in Go
5a725266a zdtm: add mnt_ro_root test
6b3826a6f zdtm/lib: add "bind" desc option
88cb552f6 mount: restore root mount flags
b6dca3116 aarch64/crtools: fix define for missing constants
5de61a721 net: nftables: avoid restore failure if the CRIU nft table already exist
b9da95b0b s390: Fix FP reg restore after parasite code runs
74799ae02 aarch64: fix build with missing NT_ARM_PAC_ENABLED_KEYS
680584166 cuda: remove redundant goto label
e7aee3c5c cuda: use pr_perror for libc function errors
5ff52326e restore: use the new kernel interface to restore timers
9a1e97966 compel: fix the stack test
daa548bbf criu: Do not print failed message when there is no late stage hook
34226fd24 ci: try GitHub arm runners
a44aa6d98 criu: Version 4.1.1
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/criu')
| -rw-r--r-- | recipes-containers/criu/criu_git.bb | 12 | ||||
| -rw-r--r-- | recipes-containers/criu/files/0006-images-Makefile-fix-cross-compilation-protobuf-paths.patch | 34 |
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 | ||
| 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=412de458544c1cb6a2b512cd399286e2" |
| 15 | 15 | ||
| 16 | SRCREV = "a44aa6d985472d995d04fef7eae22d63c7500f8c" | 16 | SRCREV = "3c7d4fa013297b431da48eff821db7f2e8b90c27" |
| 17 | PV = "4.1.1+git" | 17 | PV = "4.2+git" |
| 18 | 18 | ||
| 19 | SRC_URI = "git://github.com/checkpoint-restore/criu.git;branch=master;protocol=https \ | 19 | SRC_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 | ||
| 29 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" | 30 | COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" |
| @@ -40,7 +41,7 @@ EXTRA_OEMAKE:arm += "ARCH=arm UNAME-M=${CRIU_BUILD_ARCH} WERROR=0" | |||
| 40 | EXTRA_OEMAKE:x86-64 += "ARCH=x86 WERROR=0" | 41 | EXTRA_OEMAKE:x86-64 += "ARCH=x86 WERROR=0" |
| 41 | EXTRA_OEMAKE:aarch64 += "ARCH=aarch64 WERROR=0" | 42 | EXTRA_OEMAKE:aarch64 += "ARCH=aarch64 WERROR=0" |
| 42 | 43 | ||
| 43 | EXTRA_OEMAKE:append = " SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no" | 44 | EXTRA_OEMAKE:append = " SBINDIR=${sbindir} LIBDIR=${libdir} INCLUDEDIR=${includedir} PIEGEN=no PROTOBUF_INCLUDEDIR=${PKG_CONFIG_SYSROOT_DIR}/usr/include" |
| 44 | EXTRA_OEMAKE:append = " LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" | 45 | EXTRA_OEMAKE:append = " LOGROTATEDIR=${sysconfdir} SYSTEMDUNITDIR=${systemd_unitdir}" |
| 45 | 46 | ||
| 46 | CFLAGS += "-D__USE_GNU -D_GNU_SOURCE " | 47 | CFLAGS += "-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] |
| 70 | INSANE_SKIP:${PN} += "textrel" | 71 | INSANE_SKIP:${PN} += "textrel" |
| 71 | 72 | ||
| 72 | do_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 | |||
| 77 | do_compile () { | 73 | do_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 @@ | |||
| 1 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 2 | Subject: [PATCH] images/Makefile: fix cross-compilation protobuf paths | ||
| 3 | |||
| 4 | pkg-config --variable=includedir returns the host path (e.g. | ||
| 5 | /usr/include) without applying PKG_CONFIG_SYSROOT_DIR, since sysroot | ||
| 6 | prefixing only applies to -I flags from --cflags, not raw --variable | ||
| 7 | queries. The protoc --proto_path was also hardcoded to /usr/include. | ||
| 8 | |||
| 9 | Make the include dir overridable via PROTOBUF_INCLUDEDIR so cross-build | ||
| 10 | systems can pass the correct sysroot path through EXTRA_OEMAKE. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | |||
| 14 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
| 15 | --- | ||
| 16 | images/Makefile | 5 +++-- | ||
| 17 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 18 | |||
| 19 | diff --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 | ||
