summaryrefslogtreecommitdiff
path: root/sys-process/criu
diff options
context:
space:
mode:
Diffstat (limited to 'sys-process/criu')
-rw-r--r--sys-process/criu/Manifest5
-rw-r--r--sys-process/criu/criu-3.16.1.ebuild2
-rw-r--r--sys-process/criu/criu-3.17-r1.ebuild166
-rw-r--r--sys-process/criu/files/criu-3.17-amdgpu-build-fixes.patch98
4 files changed, 269 insertions, 2 deletions
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 1c858b9fd9a2..a14a8a9416f3 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -4,11 +4,14 @@ AUX criu-3.12-automagic-libbsd.patch 457 BLAKE2B bd16c9e84ba67d0968371844c7b8121
AUX criu-3.15-pkg-config.patch 5131 BLAKE2B 3b4cc0a2ae3dac24eb5f76a20478844e10b601a9584e8ae7bdd6a0167add2ba715c606fd7ee00aea9893c9e99a9ee42f031b85b37c7f4fc5d4b1fcf9ecff78e7 SHA512 e424d3ee684463dfab504da234c7e178a8060a83efd743d940ad8c8ebc58f5c07de7a48cd3fc333fcc67a0947ad8c9b838e48163045a2093afe5923ca6ff1399
AUX criu-3.15-protobuf-c-1.4.0.patch 6377 BLAKE2B bbfce0a7feecf2886cb5fbfff3d79ac47e28e1cd6d5d5133323c5d89be005120e38de5378f31faaf83f0698170ca4b8d5d795faaca190802d2102539032b193a SHA512 50f1e6a5cb2b69d0fbbbe1013d4d2b91af6800dfcfc2d73d83cd389118ab85dea1d2b32fb4152b56ef58373da3e8cd6e962f9c111359e6e76e399c3e84f3030e
AUX criu-3.16.1-buildsystem.patch 2164 BLAKE2B aaa5e47ca5c822407693c795015e25b9db5208bf0c25026030c5b776769d27c4513707865fdd37eb4acd14beca4eecdcb83fe77c6c9479df2519dc0c49e912b5 SHA512 a36932081ed1aa058a60f93ec4a2c434a3ec6cad6ac221f2db22f3d01025e7de074ef3f3feda206ed50b1ed921b87cfa5e3d07e6cfc50ab1c527a2821ad33e1d
+AUX criu-3.17-amdgpu-build-fixes.patch 3069 BLAKE2B 21bf7ce7bfa8a1d07e2160a7dd8b6e4d638499add115d66b40811d095f622cdf93f51aaacf16afb48bcc8cd0084839982ebe3e9c3c149d8303f12468959c0d00 SHA512 9c4d94d937ce4802531456d2a1679dcaa7f726fc96d80b0892b3c17ae6653ae94090f1f23f8c9ae6450782d74f5de05151b277aef826349cfc510c70e459c2ca
DIST criu-3.14.tar.bz2 881407 BLAKE2B 418412681baf7ec9d3a03afe3860590c857bffcb6c57d01e60b77e85dd5ba2b30deee280c884ba1574665be5fcfd03f3cc058a4b7ae08f66aabe63a80373089b SHA512 97d064c5ffc41daf6e89edd6208b30e4198f313afc6d621d0dc74dadf94c303be70ba448d4e1ced9500f1c65f1bd12206eb88883be398911cc2c995310b17cc6
DIST criu-3.15.tar.bz2 913904 BLAKE2B 2a3c7ad7ac32a407493e8908886d2929606e1dd0a1dd499be75cb954c1c4d60d0c59f0524d173dcdd89fa638e1edcc0c31886262069e3478173648ef09b4c159 SHA512 7bfd32053e47b95d10cdd5e99494bff6a21aa3179518179f8c72e870f0aab960dd76c9f6cb6982e5b881472cf6962eefee3cf7d8ae9128b3379bcaecc937ebbc
DIST criu-3.16.1.tar.gz 1228535 BLAKE2B 45aa87ee00a18b91474e767dc0326cce6c0942af7771a0c5536751361c171c86ba2065c54587e82b51fd6d7ab116e659324369955086c5237cd7fd26b60d6ce6 SHA512 a558af41f1927a1b1d87f8d11163a5f3d2e4f83a74aba00619b45a6d464d5477a6a0aac3c1b9d9a17e3343a4bf21a3fd6b279b51fa0c347c86c307381a4d0739
+DIST criu-3.17.tar.gz 1321713 BLAKE2B 3bc13a7df0da0a17c74e0c12f07b81fe7f294be4d1980647b64c74e35383416ffbc10e7c04398f307bc68ff701f76a9586ea58825057b0df16b40f6aab3cbd0e SHA512 febae66a7820345c0f335f4a49e64c0af5c8ae5d3a394cc0770881b64eab11ca03ad5872f06b0c4ccd1da844c519268dad3b4f8b260267e6d3f582e80d80f804
EBUILD criu-3.14-r2.ebuild 3196 BLAKE2B 27115869838fc33eb2d97c2d79e190e43e8a55505c2573be498847f588bc2fa0c6435a54c43ed839707adbd07b943b0b2c6c63234eeb634b4deab2c755861173 SHA512 9e2a6de2226438b56b9c6132232d0447daeb05afca5a998bfc9e0976d90ec03205a3341610d71f736da7e35b5769fec49d4ef4f982214b918572b49567b69188
EBUILD criu-3.15-r3.ebuild 3305 BLAKE2B 9e0e7f1d60b25433d6169f685d7fac59473689c6c62dc66e0a0916df0bc3bfbfce4527199f7941e95e96bdc8aacf44b2de9a661d699f26daf5e50d33e8cef418 SHA512 0cd8eb9044f7cd8392ad10fea98ef0cefa29d2244fe062c067ae8b01d97b5b73ace6c205679ccd9c2970d120e08879c652cb74c7c20fdec2b6886d5d7e50ccb4
EBUILD criu-3.15.ebuild 3238 BLAKE2B c574df329b38459491173e3b460d624709b94a23afc08dba6c2516261c96cd2c0b07a8d45c7ae512da4a15b515d3c067db6a61e84eca4152d8306f68605f3792 SHA512 8904ba6f2b5631f5dbf7b14de2842ab3d309354a1249a3197b39c11c1ef17703176f61ef24a0898f44eb3e1f5401b1dc475f3fd92e602ce4bb0a86c5b511031a
-EBUILD criu-3.16.1.ebuild 3559 BLAKE2B e24097d9514ed0c79b9808a28f1ec52c2d24ebd5f26c13ffe91188ccd00cb3dd454d66a78ca415fe40b7860c08937697b4678496b16591a56cf9eb36fe187e60 SHA512 5153dcca109edf1a30bd1425fe2924693cbc07e81ccd0765c6002d15fe14870a234ad472b47c3e102a6c920ef32ac354948e37bdb5c957536b1c906ef258e77a
+EBUILD criu-3.16.1.ebuild 3557 BLAKE2B f109d5a76613e6ab57c692f451f9bf3832dee136f76feb960de02793ef3fe53f5c35510d7a8d53beb6af6bbbfb1b44b258277b2b9cef4bea496d525e87463044 SHA512 3f4ab1db8333b399b483c10de57a1df6efda79012872e854dc10375233102d4f71827c3d48d25c892b1fbfba2d562aa663f369ea0d965e66aa357ec449fff087
+EBUILD criu-3.17-r1.ebuild 3721 BLAKE2B 1c85aa11194db2025670af8062a1192ae125d633945c56231734ea572fef8f43743fbfa5b7918fe50a1539676b3cf19913da94fdbf69729e587461f22214dec9 SHA512 157e09261a05454f99b47f2451078c3c8bcf6607366b56a94cc9db89b3d2c0e69c3ee378f6ac203d49178b65d237f33b9f0ce830732dffcda4a1e2d7e1093cbd
MISC metadata.xml 690 BLAKE2B d39aa87ec4e0470cb5864776d802cc06be21866123a8db69ace61af3f686cf9b034cf6790d2a5fd5777bb02531db78ea72eb03c0f3f18195b56ea4b85205c87e SHA512 385296a53d274252d796563346bd999dbe4afa5c02b5f00ce42459ad995ce004f593a039c54f1e91fb572b849199e2669077ffda3affd031e23f4b4d1db9ff0e
diff --git a/sys-process/criu/criu-3.16.1.ebuild b/sys-process/criu/criu-3.16.1.ebuild
index 3d7905d61eb3..3c3a81fab99f 100644
--- a/sys-process/criu/criu-3.16.1.ebuild
+++ b/sys-process/criu/criu-3.16.1.ebuild
@@ -16,7 +16,7 @@ SRC_URI="https://github.com/checkpoint-restore/${PN}/archive/v${PV}/${P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 -riscv"
+KEYWORDS="amd64 ~arm arm64 ~ppc64 -riscv"
IUSE="bpf doc gnutls nftables selinux setproctitle static-libs test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
diff --git a/sys-process/criu/criu-3.17-r1.ebuild b/sys-process/criu/criu-3.17-r1.ebuild
new file mode 100644
index 000000000000..66993d5ce406
--- /dev/null
+++ b/sys-process/criu/criu-3.17-r1.ebuild
@@ -0,0 +1,166 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit toolchain-funcs linux-info python-r1
+
+DESCRIPTION="utility to checkpoint/restore a process tree"
+HOMEPAGE="
+ https://criu.org/
+ https://github.com/checkpoint-restore/
+"
+SRC_URI="https://github.com/checkpoint-restore/${PN}/archive/v${PV}/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 -riscv"
+IUSE="bpf doc gnutls nftables selinux setproctitle static-libs test video_cards_amdgpu"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+COMMON_DEPEND="
+ ${PYTHON_DEPS}
+ >=dev-libs/protobuf-c-1.4.0:=
+ dev-libs/libnl:3=
+ net-libs/libnet:1.1=
+ sys-libs/libcap:=
+ bpf? ( dev-libs/libbpf:= )
+ gnutls? ( net-libs/gnutls:= )
+ nftables? ( net-libs/gnutls:= )
+ selinux? ( sys-libs/libselinux:= )
+ setproctitle? ( dev-libs/libbsd:= )
+ video_cards_amdgpu? ( x11-libs/libdrm[video_cards_amdgpu] )
+"
+DEPEND="${COMMON_DEPEND}"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ )
+"
+RDEPEND="
+ ${COMMON_DEPEND}
+ dev-python/protobuf-python[${PYTHON_USEDEP}]
+"
+
+CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER
+ ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG ~TUN ~NETFILTER_XT_MARK"
+
+# root access required for tests
+RESTRICT="!test? ( test )"
+
+PATCHES=(
+ "${FILESDIR}/2.2/criu-2.2-flags.patch"
+ "${FILESDIR}/2.3/criu-2.3-no-git.patch"
+ "${FILESDIR}/criu-3.12-automagic-libbsd.patch"
+ "${FILESDIR}/criu-3.16.1-buildsystem.patch"
+
+ "${FILESDIR}/${P}-amdgpu-build-fixes.patch"
+)
+
+criu_arch() {
+ # criu infers the arch from $(uname -m). We never want this to happen.
+ case ${ARCH} in
+ amd64) echo "x86";;
+ arm64) echo "aarch64";;
+ ppc64*) echo "ppc64";;
+ *) echo "${ARCH}";;
+ esac
+}
+
+pkg_setup() {
+ use amd64 && CONFIG_CHECK+=" ~IA32_EMULATION"
+ linux-info_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ use doc || sed -i 's_\(install: \)install-man _\1_g' Makefile.install
+}
+
+criu_use() {
+ if ! use "${1}"; then
+ sed \
+ -e "s:${2:-${1}}:no_${2:-lib${1}}:g" \
+ -i Makefile.config || die
+ fi
+}
+
+src_configure() {
+ # Gold linker generates invalid object file when used with criu's custom
+ # linker script. Use the bfd linker instead. See https://crbug.com/839665#c3
+ tc-ld-disable-gold
+
+ # Build system uses this variable as a trigger to append coverage flags
+ # we'd like to avoid it. https://bugs.gentoo.org/744244
+ unset GCOV
+
+ # we have to sed the Makefile.config to disable automagic deps
+ criu_use selinux
+ criu_use bpf
+ criu_use nftables
+ criu_use video_cards_amdgpu libdrm
+
+ emake_opts=(
+ SETPROCTITLE="$(usex setproctitle)"
+ NO_GNUTLS="$(usex gnutls '' '1')"
+ )
+
+ python_setup
+}
+
+criu_emake() {
+ emake \
+ AR="$(tc-getAR)" \
+ ARCH="$(criu_arch)" \
+ CC="$(tc-getCC)" \
+ FULL_PYTHON="${PYTHON%.*}" \
+ HOSTCC="$(tc-getBUILD_CC)" \
+ LD="$(tc-getLD)" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
+ PREFIX="${EPREFIX}"/usr \
+ PYTHON="${EPYTHON%.*}" \
+ V=1 WERROR=0 DEBUG=0 \
+ "${emake_opts[@]}" \
+ "${@}"
+}
+
+build_crit() {
+ "${EPYTHON}" scripts/crit-setup.py build || die
+}
+
+src_compile() {
+ local -a targets=(
+ all
+ $(usex doc 'docs' '')
+ )
+ criu_emake ${targets}
+}
+
+src_test() {
+ criu_emake unittest
+}
+
+install_crit() {
+ "${EPYTHON}" scripts/crit-setup.py install --root="${D}" --prefix="${EPREFIX}/usr/" || die
+ python_optimize
+}
+
+src_install() {
+ criu_emake DESTDIR="${D}" install
+ python_foreach_impl install_crit
+
+ dodoc CREDITS README.md
+
+ if ! use static-libs; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+}
diff --git a/sys-process/criu/files/criu-3.17-amdgpu-build-fixes.patch b/sys-process/criu/files/criu-3.17-amdgpu-build-fixes.patch
new file mode 100644
index 000000000000..913737215e49
--- /dev/null
+++ b/sys-process/criu/files/criu-3.17-amdgpu-build-fixes.patch
@@ -0,0 +1,98 @@
+https://github.com/checkpoint-restore/criu/commit/cd0ed7e5491c7c827b887b2d80cf35e87819278b.patch
+https://github.com/checkpoint-restore/criu/commit/2b3763fe6a39033d4e3d3d80e28911d1737ac23b.patch
+
+From cd0ed7e5491c7c827b887b2d80cf35e87819278b Mon Sep 17 00:00:00 2001
+From: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+Date: Sun, 15 May 2022 17:08:18 +0100
+Subject: [PATCH] amdgpu/Makefile: Fix include path
+
+When building packages for CRIU the source directory might have a
+name different than 'criu'.
+
+Fixes: #1877
+
+Reported-by: @siris
+Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+--- a/plugins/amdgpu/Makefile
++++ b/plugins/amdgpu/Makefile
+@@ -2,7 +2,7 @@ PLUGIN_NAME := amdgpu_plugin
+ PLUGIN_SOBJ := amdgpu_plugin.so
+
+
+-PLUGIN_INCLUDE := -iquote../../../criu/include
++PLUGIN_INCLUDE := -iquote../../include
+ PLUGIN_INCLUDE += -iquote../../criu/include
+ PLUGIN_INCLUDE += -iquote../../criu/arch/$(ARCH)/include/
+ PLUGIN_INCLUDE += -iquote../../
+
+
+From 2b3763fe6a39033d4e3d3d80e28911d1737ac23b Mon Sep 17 00:00:00 2001
+From: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+Date: Sun, 8 May 2022 11:07:25 +0100
+Subject: [PATCH] amdgpu: Set PLUGINDIR to /usr/lib/criu
+
+Building the criu packages for Ubuntu/Debian fails with:
+
+ mkdir: cannot create directory '/var/lib/criu': Permission denied
+
+This patch updates PLUGINDIR with the value /usr/lib/criu
+
+Fixes: #1877
+
+Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+--- a/Makefile.install
++++ b/Makefile.install
+@@ -7,7 +7,7 @@ MANDIR ?= $(PREFIX)/share/man
+ INCLUDEDIR ?= $(PREFIX)/include
+ LIBEXECDIR ?= $(PREFIX)/libexec
+ RUNDIR ?= /run
+-PLUGINDIR ?= /var/lib/criu
++PLUGINDIR ?= $(PREFIX)/lib/criu
+
+ #
+ # For recent Debian/Ubuntu with multiarch support.
+--- a/criu/include/plugin.h
++++ b/criu/include/plugin.h
+@@ -5,7 +5,9 @@
+ #include "common/compiler.h"
+ #include "common/list.h"
+
+-#define CR_PLUGIN_DEFAULT "/var/lib/criu/"
++#ifndef CR_PLUGIN_DEFAULT
++#define CR_PLUGIN_DEFAULT "/usr/lib/criu/"
++#endif
+
+ void cr_plugin_fini(int stage, int err);
+ int cr_plugin_init(int stage);
+--- a/plugins/amdgpu/Makefile
++++ b/plugins/amdgpu/Makefile
+@@ -15,7 +15,7 @@ DEPS_NOK := ;
+ include $(__nmk_dir)msg.mk
+
+ CC := gcc
+-PLUGIN_CFLAGS := -g -Wall -Werror -D _GNU_SOURCE -shared -nostartfiles -fPIC
++PLUGIN_CFLAGS := -g -Wall -Werror -D _GNU_SOURCE -shared -nostartfiles -fPIC -DCR_PLUGIN_DEFAULT="$(PLUGINDIR)"
+ PLUGIN_LDFLAGS := -lpthread -lrt -ldrm -ldrm_amdgpu
+
+ ifeq ($(CONFIG_AMDGPU),y)
+@@ -50,16 +50,16 @@ clean: amdgpu_plugin_clean amdgpu_plugin_test_clean
+ mrproper: clean
+
+ install:
+- $(Q) mkdir -p $(PLUGINDIR)
+ ifeq ($(CONFIG_AMDGPU),y)
++ $(Q) mkdir -p $(DESTDIR)$(PLUGINDIR)
+ $(E) " INSTALL " $(PLUGIN_NAME)
+- $(Q) install -m 644 $(PLUGIN_SOBJ) $(PLUGINDIR)
++ $(Q) install -m 644 $(PLUGIN_SOBJ) $(DESTDIR)$(PLUGINDIR)
+ endif
+ .PHONY: install
+
+ uninstall:
+ ifeq ($(CONFIG_AMDGPU),y)
+ $(E) " UNINSTALL" $(PLUGIN_NAME)
+- $(Q) $(RM) $(PLUGINDIR)/$(PLUGIN_SOBJ)
++ $(Q) $(RM) $(DESTDIR)$(PLUGINDIR)/$(PLUGIN_SOBJ)
+ endif
+ .PHONY: uninstall
+