* [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/
@ 2015-10-09 4:33 Yixun Lan
0 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2015-10-09 4:33 UTC (permalink / raw
To: gentoo-commits
commit: 5e480fbea3092065653bd04cdbf0c257f687985f
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 9 04:20:54 2015 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri Oct 9 04:24:44 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e480fbe
sys-process/criu: version bump 1.7, drop 1.6-r1
Package-Manager: portage-2.2.22
sys-process/criu/Manifest | 2 +-
.../criu/{criu-1.6-r1.ebuild => criu-1.7.ebuild} | 2 +-
.../criu/files/criu-1.7-automagic-libbsd.patch | 29 ++++++++++++++++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 4fda2d0..02bfa5e 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -1,3 +1,3 @@
DIST criu-1.5.2.tar.bz2 457573 SHA256 e8226018ac6c4094d61a1c002543e2b2253b4041a8edb24d4c1eaa41ce5ab345 SHA512 c7916fde1f63cb66a89e71867c204a251dfa2b9de703ac467bc460c6f0d895947996fd466c17cb529d2502aba7b75b8b30162baf3944fefebb71625fb88e5458 WHIRLPOOL c951692e684bd1b032bde1b534a4f4bd4b769a1e73afc56c74711ac943da907f638489205e8be2c68bbc345c1da8b641a7175dccd34aad907ca3251c3f2156a0
DIST criu-1.6.1.tar.bz2 484598 SHA256 c74810383b7e524be0d909b9a6c1805e0887ac93cf1bfa28f00a87f395879e18 SHA512 59de498035970decc5181c3e464ccf686fce34e9fa5285d0c6777849013b8441a4338ef7f89339953ff83dcaf1b7e95dbbd54432f61a28665fbde979df5e31e8 WHIRLPOOL 07fa8490bca046a17476b59e375a287dacbb13c1a99ac0a05166c5925d997748ca506c1cf3bab2bdae832010f6d87e7aa6f4b4371ce7c7d630120a0f47f1ae23
-DIST criu-1.6.tar.bz2 484513 SHA256 35ba6f5df90bfb8a25ae5e53459272bb37b8a69790e084f86d7a9ffa0df35993 SHA512 0672c7342ffed7c23fdb747b7bd3b08f205a4bf3965577991d007f71e70be5243247e52ad823f0099713f7977f6f4be5403ea2073a840b5024b6a0f240f65bdc WHIRLPOOL da5a767b3f89efdd2cda21331cc60e60e0cdbab163a55ef1a3080d3601df924688d612c7e76000c3d383cdb22002b16c28ad2740b7bc6aba784021f31ebc54c4
+DIST criu-1.7.tar.bz2 507224 SHA256 977cf03d94415c2858581bb9894cfb90ac0c0b4b045e9bfa7c04c230aae01a21 SHA512 2d270ae68daa7ff96e5765220ee43b42f8cbbc7e6e2013209dbf69f6bcfba6ca89a632f70734e30fbc9d2985566913d0cae7b28ef6fb4f8aacb3badef2f8e69c WHIRLPOOL 66324e4161bbe879c5cf1e7e94868bfa65007556aa5c24b8d1dcb09b6ac4731190cf178b70ef66e090e774492f3c8e465277a744b0a61a2ef6c1f30217ea76b3
diff --git a/sys-process/criu/criu-1.6-r1.ebuild b/sys-process/criu/criu-1.7.ebuild
similarity index 96%
rename from sys-process/criu/criu-1.6-r1.ebuild
rename to sys-process/criu/criu-1.7.ebuild
index 3806853..23070e8 100644
--- a/sys-process/criu/criu-1.6-r1.ebuild
+++ b/sys-process/criu/criu-1.7.ebuild
@@ -29,7 +29,7 @@ RESTRICT="test"
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.3.1-flags.patch
epatch "${FILESDIR}"/${PN}-1.3.1-makefile.patch
- epatch "${FILESDIR}"/${PN}-1.5-automagic-libbsd.patch
+ epatch "${FILESDIR}"/${PN}-1.7-automagic-libbsd.patch
}
criu_arch() {
diff --git a/sys-process/criu/files/criu-1.7-automagic-libbsd.patch b/sys-process/criu/files/criu-1.7-automagic-libbsd.patch
new file mode 100644
index 0000000..4dadf95
--- /dev/null
+++ b/sys-process/criu/files/criu-1.7-automagic-libbsd.patch
@@ -0,0 +1,29 @@
+diff --git a/Makefile.config b/Makefile.config
+index ce4b8d8..2ef64d3 100644
+--- a/Makefile.config
++++ b/Makefile.config
+@@ -3,10 +3,12 @@ include scripts/feature-tests.mak
+
+ CONFIG := include/config.h
+
++ifeq ($(SETPROCTITLE),yes)
+ ifeq ($(call try-cc,$(LIBBSD_DEV_TEST),-lbsd),y)
+ LIBS += -lbsd
+ DEFINES += -DCONFIG_HAS_LIBBSD
+ endif
++endif
+
+ ifeq ($(call pkg-config-check,libselinux),y)
+ LIBS := -lselinux $(LIBS)
+@@ -38,9 +40,11 @@ endif
+ ifeq ($(VDSO),y)
+ $(Q) @echo '#define CONFIG_VDSO' >> $@
+ endif
++ifeq ($(SETPROCTITLE),yes)
+ ifeq ($(call try-cc,$(SETPROCTITLE_INIT_TEST),-lbsd),y)
+ $(Q) @echo '#define CONFIG_HAS_SETPROCTITLE_INIT' >> $@
+ endif
++endif
+ ifeq ($(piegen-y),y)
+ $(Q) @echo '#define CONFIG_PIEGEN' >> $@
+ endif
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/
@ 2015-11-05 8:22 Yixun Lan
0 siblings, 0 replies; 6+ messages in thread
From: Yixun Lan @ 2015-11-05 8:22 UTC (permalink / raw
To: gentoo-commits
commit: a3349d9b0e53ec36aaa031d1fa41195ab7a1dd27
Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 5 08:11:15 2015 +0000
Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Thu Nov 5 08:12:53 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3349d9b
sys-process/criu: version bump & drop old, 1.7.2
Package-Manager: portage-2.2.23
sys-process/criu/Manifest | 3 +-
sys-process/criu/criu-1.5.2.ebuild | 50 ----------------------
.../criu/{criu-1.7.ebuild => criu-1.7.2.ebuild} | 0
.../criu/files/criu-1.5.1-arm64-ptrace.patch | 12 ------
4 files changed, 1 insertion(+), 64 deletions(-)
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 02bfa5e..03a83ef 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -1,3 +1,2 @@
-DIST criu-1.5.2.tar.bz2 457573 SHA256 e8226018ac6c4094d61a1c002543e2b2253b4041a8edb24d4c1eaa41ce5ab345 SHA512 c7916fde1f63cb66a89e71867c204a251dfa2b9de703ac467bc460c6f0d895947996fd466c17cb529d2502aba7b75b8b30162baf3944fefebb71625fb88e5458 WHIRLPOOL c951692e684bd1b032bde1b534a4f4bd4b769a1e73afc56c74711ac943da907f638489205e8be2c68bbc345c1da8b641a7175dccd34aad907ca3251c3f2156a0
DIST criu-1.6.1.tar.bz2 484598 SHA256 c74810383b7e524be0d909b9a6c1805e0887ac93cf1bfa28f00a87f395879e18 SHA512 59de498035970decc5181c3e464ccf686fce34e9fa5285d0c6777849013b8441a4338ef7f89339953ff83dcaf1b7e95dbbd54432f61a28665fbde979df5e31e8 WHIRLPOOL 07fa8490bca046a17476b59e375a287dacbb13c1a99ac0a05166c5925d997748ca506c1cf3bab2bdae832010f6d87e7aa6f4b4371ce7c7d630120a0f47f1ae23
-DIST criu-1.7.tar.bz2 507224 SHA256 977cf03d94415c2858581bb9894cfb90ac0c0b4b045e9bfa7c04c230aae01a21 SHA512 2d270ae68daa7ff96e5765220ee43b42f8cbbc7e6e2013209dbf69f6bcfba6ca89a632f70734e30fbc9d2985566913d0cae7b28ef6fb4f8aacb3badef2f8e69c WHIRLPOOL 66324e4161bbe879c5cf1e7e94868bfa65007556aa5c24b8d1dcb09b6ac4731190cf178b70ef66e090e774492f3c8e465277a744b0a61a2ef6c1f30217ea76b3
+DIST criu-1.7.2.tar.bz2 508012 SHA256 f5d377fd2a3c8824c592f6c27147cb4d37333ca0ce8b9c6e85a8b7cd8479b21d SHA512 3e35d90b8cd66b96df193b37907825fbf785eea332146c767b267cbda5b6e1ae6a0d5570945990e4288f6406d8507f6c33a792c5db232cbaf396342a65b53de3 WHIRLPOOL 164cbc9d6a4969e6116644bded88b9aec8a9bc0fb737e69eaacd641376db7d274598ff3647a912ab19155d4097de8a1eaa5ea82642b4f3ba93c01b4a6725493d
diff --git a/sys-process/criu/criu-1.5.2.ebuild b/sys-process/criu/criu-1.5.2.ebuild
deleted file mode 100644
index 55dad0c..0000000
--- a/sys-process/criu/criu-1.5.2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-inherit eutils toolchain-funcs linux-info flag-o-matic
-
-DESCRIPTION="utility to checkpoint/restore a process tree"
-HOMEPAGE="http://criu.org/"
-SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64"
-IUSE="setproctitle"
-
-RDEPEND="dev-libs/protobuf-c
- setproctitle? ( dev-libs/libbsd )"
-DEPEND="${RDEPEND}
- app-text/asciidoc
- app-text/xmlto"
-
-CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER
- ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG"
-
-RESTRICT="test"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-1.3.1-flags.patch
- epatch "${FILESDIR}"/${PN}-1.3.1-makefile.patch
- epatch "${FILESDIR}"/${PN}-1.5-automagic-libbsd.patch
-}
-
-src_compile() {
- unset ARCH
- emake CC="$(tc-getCC)" LD="$(tc-getLD)" V=1 SETPROCTITLE=$(usex setproctitle) WERROR=0 all docs
-}
-
-src_test() {
- # root privileges are required to dump all necessary info
- if [[ ${EUID} -eq 0 ]] ; then
- emake -j1 CC="$(tc-getCC)" V=1 WERROR=0 test
- fi
-}
-
-src_install() {
- emake SYSCONFDIR="${EPREFIX}"/etc PREFIX="${EPREFIX}"/usr DESTDIR="${D}" install
- dodoc CREDITS README
-}
diff --git a/sys-process/criu/criu-1.7.ebuild b/sys-process/criu/criu-1.7.2.ebuild
similarity index 100%
rename from sys-process/criu/criu-1.7.ebuild
rename to sys-process/criu/criu-1.7.2.ebuild
diff --git a/sys-process/criu/files/criu-1.5.1-arm64-ptrace.patch b/sys-process/criu/files/criu-1.5.1-arm64-ptrace.patch
deleted file mode 100644
index 4978381..0000000
--- a/sys-process/criu/files/criu-1.5.1-arm64-ptrace.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/arch/aarch64/include/asm/types.h b/arch/aarch64/include/asm/types.h
-index 8dd336e..6657279 100644
---- a/arch/aarch64/include/asm/types.h
-+++ b/arch/aarch64/include/asm/types.h
-@@ -3,6 +3,7 @@
-
- #include <stdbool.h>
- #include <signal.h>
-+#include <asm/ptrace.h>
- #include "protobuf/core.pb-c.h"
-
- #include "asm-generic/page.h"
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/
@ 2017-09-01 7:35 Sergei Trofimovich
0 siblings, 0 replies; 6+ messages in thread
From: Sergei Trofimovich @ 2017-09-01 7:35 UTC (permalink / raw
To: gentoo-commits
commit: 6b9c2bf74ae78ff90e7ab87393210acfab1e5b71
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 1 07:35:20 2017 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Sep 1 07:35:31 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6b9c2bf7
sys-process/criu: fix build failure against glibc-2.26
Package-Manager: Portage-2.3.8, Repoman-2.3.3
sys-process/criu/criu-2.12.1.ebuild | 1 +
.../criu/files/criu-2.12.1-glibc-2.26.patch | 49 ++++++++++++++++++++++
2 files changed, 50 insertions(+)
diff --git a/sys-process/criu/criu-2.12.1.ebuild b/sys-process/criu/criu-2.12.1.ebuild
index fd0c92becf6..76b63750a52 100644
--- a/sys-process/criu/criu-2.12.1.ebuild
+++ b/sys-process/criu/criu-2.12.1.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-2.8-automagic-libbsd.patch
"${FILESDIR}"/2.0/${PN}-2.0-sysroot.patch
"${FILESDIR}"/2.3/${PN}-2.3-aarch64.patch
+ "${FILESDIR}"/${PN}-2.12.1-glibc-2.26.patch
)
criu_arch() {
diff --git a/sys-process/criu/files/criu-2.12.1-glibc-2.26.patch b/sys-process/criu/files/criu-2.12.1-glibc-2.26.patch
new file mode 100644
index 00000000000..d378cc88cff
--- /dev/null
+++ b/sys-process/criu/files/criu-2.12.1-glibc-2.26.patch
@@ -0,0 +1,49 @@
+From d77d8cc402e597bb38edfb4e81db89fd7d96d0b6 Mon Sep 17 00:00:00 2001
+From: Adrian Reber <areber@redhat.com>
+Date: Thu, 29 Jun 2017 14:19:32 +0000
+Subject: [PATCH] fix building with newer glibc
+
+Newer glibc releases have removed SIGUNUSED from bits/signum.h which
+breaks building criu on those systems:
+
+https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8082d91e1c449e0cb137468b731004a5e605c8c6
+
+SIGSYS returns the same value as SIGUNUSED and testing has shown
+that criu still successfully completes zdtm with this patch.
+
+Signed-off-by: Adrian Reber <areber@redhat.com>
+Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
+Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
+---
+ criu/cr-restore.c | 1 -
+ test/zdtm/static/pthread01.c | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/criu/cr-restore.c b/criu/cr-restore.c
+index e8fb4adf..6ba50f18 100644
+--- a/criu/cr-restore.c
++++ b/criu/cr-restore.c
+@@ -880,7 +880,6 @@ static void zombie_prepare_signals(void)
+ (1 << SIGPOLL) |\
+ (1 << SIGIO) |\
+ (1 << SIGSYS) |\
+- (1 << SIGUNUSED)|\
+ (1 << SIGSTKFLT)|\
+ (1 << SIGPWR) \
+ )
+diff --git a/test/zdtm/static/pthread01.c b/test/zdtm/static/pthread01.c
+index 52f849c0..2520fcfe 100644
+--- a/test/zdtm/static/pthread01.c
++++ b/test/zdtm/static/pthread01.c
+@@ -43,7 +43,7 @@ static char *decode_signal(const sigset_t *s, char *buf)
+ COLLECT(SIGTERM); COLLECT(SIGSTKFLT); COLLECT(SIGCHLD); COLLECT(SIGCONT); COLLECT(SIGSTOP);
+ COLLECT(SIGTSTP); COLLECT(SIGTTIN); COLLECT(SIGTTOU); COLLECT(SIGURG); COLLECT(SIGXCPU);
+ COLLECT(SIGXFSZ); COLLECT(SIGVTALRM); COLLECT(SIGPROF); COLLECT(SIGWINCH); COLLECT(SIGIO);
+- COLLECT(SIGPOLL); COLLECT(SIGPWR); COLLECT(SIGSYS); COLLECT(SIGUNUSED);
++ COLLECT(SIGPOLL); COLLECT(SIGPWR); COLLECT(SIGSYS);
+ #undef COLLECT
+
+ return buf;
+--
+2.14.1
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/
@ 2021-06-16 20:10 Mike Frysinger
0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2021-06-16 20:10 UTC (permalink / raw
To: gentoo-commits
commit: d79e10b274201dad47a013ed29a1420877a37ba7
Author: Mike Frysinger <vapier <AT> chromium <DOT> org>
AuthorDate: Wed Jun 16 19:50:43 2021 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Wed Jun 16 20:09:07 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d79e10b2
sys-process/criu: fix $PKG_CONFIG usage
Needed to properly cross-compile.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
sys-process/criu/criu-3.15.ebuild | 2 +
sys-process/criu/files/criu-3.15-pkg-config.patch | 141 ++++++++++++++++++++++
2 files changed, 143 insertions(+)
diff --git a/sys-process/criu/criu-3.15.ebuild b/sys-process/criu/criu-3.15.ebuild
index b9e42cf4fa5..065124a7e5d 100644
--- a/sys-process/criu/criu-3.15.ebuild
+++ b/sys-process/criu/criu-3.15.ebuild
@@ -45,6 +45,7 @@ PATCHES=(
"${FILESDIR}"/2.2/${PN}-2.2-flags.patch
"${FILESDIR}"/2.3/${PN}-2.3-no-git.patch
"${FILESDIR}"/${PN}-3.12-automagic-libbsd.patch
+ "${FILESDIR}"/${PN}-3.15-pkg-config.patch
)
criu_arch() {
@@ -93,6 +94,7 @@ src_compile() {
CC="$(tc-getCC)" \
LD="$(tc-getLD)" \
AR="$(tc-getAR)" \
+ PKG_CONFIG="$(tc-getPKG_CONFIG)" \
PYTHON="${EPYTHON%.?}" \
FULL_PYTHON="${PYTHON%.?}" \
OBJCOPY="$(tc-getOBJCOPY)" \
diff --git a/sys-process/criu/files/criu-3.15-pkg-config.patch b/sys-process/criu/files/criu-3.15-pkg-config.patch
new file mode 100644
index 00000000000..69d83bfc399
--- /dev/null
+++ b/sys-process/criu/files/criu-3.15-pkg-config.patch
@@ -0,0 +1,141 @@
+https://github.com/checkpoint-restore/criu/pull/1517
+
+From d72536d9a821f9ff64f5dd62c9f8a282e3e5ec85 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Wed, 16 Jun 2021 15:43:04 -0400
+Subject: [PATCH] build: respect $PKG_CONFIG settings
+
+The build needs to respect $PKG_CONFIG env var like other standard
+build systems and the the upstream pkg-config project itself. This
+allows the package builder to point it to the right tool when doing
+a cross-compile build. Otherwise the host pkg-config tool is used
+which won't have access to the packages in the cross sysroot.
+
+Signed-off-by: Mike Frysinger <vapier@chromium.org>
+---
+ Makefile.config | 2 +-
+ criu/Makefile | 2 +-
+ scripts/nmk/scripts/tools.mk | 1 +
+ scripts/nmk/scripts/utils.mk | 2 +-
+ test/zdtm/Makefile.inc | 8 +++++---
+ test/zdtm/lib/Makefile | 2 +-
+ test/zdtm/static/Makefile | 2 +-
+ 7 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile.config b/Makefile.config
+index 3d99e680be7f..6e3e1b062256 100644
+--- a/Makefile.config
++++ b/Makefile.config
+@@ -30,7 +30,7 @@ else
+ endif
+
+ ifeq ($(call pkg-config-check,libnftables),y)
+- LIB_NFTABLES := $(shell pkg-config --libs libnftables)
++ LIB_NFTABLES := $(shell $(PKG_CONFIG) --libs libnftables)
+ ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(LIB_NFTABLES)),true)
+ LIBS_FEATURES += $(LIB_NFTABLES)
+ FEATURE_DEFINES += -DCONFIG_HAS_NFTABLES_LIB_API_0
+diff --git a/criu/Makefile b/criu/Makefile
+index ceb49ce09925..11d454c81026 100644
+--- a/criu/Makefile
++++ b/criu/Makefile
+@@ -27,7 +27,7 @@ CFLAGS += -iquote include
+ CFLAGS += -iquote images
+ CFLAGS += -iquote $(ARCH_DIR)/include
+ CFLAGS += -iquote .
+-CFLAGS += $(shell pkg-config --cflags libnl-3.0)
++CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0)
+ CFLAGS += $(CONFIG-DEFINES)
+
+ ifeq ($(GMON),1)
+diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
+index c5794401c734..1681d4e9092b 100644
+--- a/scripts/nmk/scripts/tools.mk
++++ b/scripts/nmk/scripts/tools.mk
+@@ -17,6 +17,7 @@ AR := $(CROSS_COMPILE)ar
+ STRIP := $(CROSS_COMPILE)strip
+ OBJCOPY := $(CROSS_COMPILE)objcopy
+ OBJDUMP := $(CROSS_COMPILE)objdump
++PKG_CONFIG ?= pkg-config
+ NM := $(CROSS_COMPILE)nm
+ MAKE := make
+ MKDIR := mkdir -p
+diff --git a/scripts/nmk/scripts/utils.mk b/scripts/nmk/scripts/utils.mk
+index b9790615ca7f..f93fdf911cef 100644
+--- a/scripts/nmk/scripts/utils.mk
++++ b/scripts/nmk/scripts/utils.mk
+@@ -16,7 +16,7 @@ try-asm = $(call try-compile,assembler-with-cpp,$(1),$(2),$(3))
+
+ # pkg-config-check
+ # Usage: ifeq ($(call pkg-config-check, library),y)
+-pkg-config-check = $(shell sh -c 'pkg-config $(1) && echo y')
++pkg-config-check = $(shell sh -c '$(PKG_CONFIG) $(1) && echo y')
+
+ #
+ # Remove duplicates.
+diff --git a/test/zdtm/Makefile.inc b/test/zdtm/Makefile.inc
+index 43763321f956..e4af9c51e9e4 100644
+--- a/test/zdtm/Makefile.inc
++++ b/test/zdtm/Makefile.inc
+@@ -37,6 +37,7 @@ HOSTCC ?= gcc
+ ifeq ($(origin CC), default)
+ CC := $(CROSS_COMPILE)$(HOSTCC)
+ endif
++PKG_CONFIG ?= pkg-config
+ CFLAGS += -g -O2 -Wall -Werror -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+ CFLAGS += -Wdeclaration-after-statement -Wstrict-prototypes
+ CFLAGS += $(USERCFLAGS)
+@@ -54,8 +55,9 @@ endif
+ RM := rm -f --one-file-system
+
+ ifeq ($(COMPAT_TEST),y)
++$(error bad juju)
+ # Firstly look for 32-bit libs and then in standard path.
+- PKG_CONFIG_PATH := $(shell pkg-config --variable pc_path pkg-config)
++ PKG_CONFIG_PATH := $(shell $(PKG_CONFIG) --variable pc_path pkg-config)
+ PKG_CONFIG_PATH := /usr/lib32/pkgconfig:$(PKG_CONFIG_PATH)
+ ifeq ($(ARCH),x86)
+ export CFLAGS += -m32
+@@ -66,11 +68,11 @@ endif
+ endif
+
+ define pkg-libs
+- $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --libs $(1))
++ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(PKG_CONFIG) --libs $(1))
+ endef
+
+ define pkg-cflags
+- $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config --cflags $(1))
++ $(shell PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" $(PKG_CONFIG) --cflags $(1))
+ endef
+
+ %.d: %.c
+diff --git a/test/zdtm/lib/Makefile b/test/zdtm/lib/Makefile
+index 05fe64e91703..5ecf8bccf27b 100644
+--- a/test/zdtm/lib/Makefile
++++ b/test/zdtm/lib/Makefile
+@@ -6,7 +6,7 @@ LIB := libzdtmtst.a
+
+ LIBSRC := datagen.c msg.c parseargs.c test.c streamutil.c lock.c ns.c tcp.c unix.c fs.c sysctl.c
+
+-pkg-config-check = $(shell sh -c 'pkg-config $(1) && echo y')
++pkg-config-check = $(shell sh -c '$(PKG_CONFIG) $(1) && echo y')
+ ifeq ($(call pkg-config-check,libbpf),y)
+ LIBSRC += bpfmap_zdtm.c
+ endif
+diff --git a/test/zdtm/static/Makefile b/test/zdtm/static/Makefile
+index e60fe6dc2d66..c5f3c98be3ed 100644
+--- a/test/zdtm/static/Makefile
++++ b/test/zdtm/static/Makefile
+@@ -241,7 +241,7 @@ TST_NOFILE := \
+ sigtrap01 \
+ # jobctl00 \
+
+-pkg-config-check = $(shell sh -c 'pkg-config $(1) && echo y')
++pkg-config-check = $(shell sh -c '$(PKG_CONFIG) $(1) && echo y')
+ ifeq ($(call pkg-config-check,libbpf),y)
+ TST_NOFILE += \
+ bpf_hash \
+--
+2.31.1
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/
@ 2022-08-05 1:04 Sam James
0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2022-08-05 1:04 UTC (permalink / raw
To: gentoo-commits
commit: 97d4262f6c82af3f9c1c73e7d2345198114d92ed
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 5 01:02:36 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Aug 5 01:02:36 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d4262f
sys-process/criu: fix build w/ glibc 2.36
Closes: https://bugs.gentoo.org/863683
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-process/criu/criu-3.17-r1.ebuild | 1 +
sys-process/criu/files/criu-3.17-glibc-2.36.patch | 242 ++++++++++++++++++++++
2 files changed, 243 insertions(+)
diff --git a/sys-process/criu/criu-3.17-r1.ebuild b/sys-process/criu/criu-3.17-r1.ebuild
index 66993d5ce406..ac5e1722d999 100644
--- a/sys-process/criu/criu-3.17-r1.ebuild
+++ b/sys-process/criu/criu-3.17-r1.ebuild
@@ -60,6 +60,7 @@ PATCHES=(
"${FILESDIR}/criu-3.16.1-buildsystem.patch"
"${FILESDIR}/${P}-amdgpu-build-fixes.patch"
+ "${FILESDIR}/${PN}-3.17-glibc-2.36.patch"
)
criu_arch() {
diff --git a/sys-process/criu/files/criu-3.17-glibc-2.36.patch b/sys-process/criu/files/criu-3.17-glibc-2.36.patch
new file mode 100644
index 000000000000..5387c5a5b97c
--- /dev/null
+++ b/sys-process/criu/files/criu-3.17-glibc-2.36.patch
@@ -0,0 +1,242 @@
+https://bugs.gentoo.org/863683
+https://github.com/checkpoint-restore/criu/pull/1943
+
+From 8cd5fccd6cf3d03afb5abe463134d31f54d42258 Mon Sep 17 00:00:00 2001
+From: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+Date: Sun, 31 Jul 2022 16:07:30 +0000
+Subject: [PATCH 2/2] criu: fix conflicting headers
+
+There are several changes in glibc 2.36 that make sys/mount.h header
+incompatible with kernel headers:
+
+https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E
+
+This patch removes conflicting includes for `<linux/mount.h>` and
+updates the content of `criu/include/linux/mount.h` to match
+`/usr/include/sys/mount.h`. In addition, inline definitions sys_*()
+functions have been moved from "linux/mount.h" to "syscall.h" to
+avoid conflicts with `uapi/compel/plugins/std/syscall.h` and
+`<unistd.h>`. The include for `<linux/aio_abi.h>` has been replaced
+with local include to avoid conflicts with `<sys/mount.h>`.
+
+Fixes: #1949
+
+Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+--- a/criu/cgroup.c
++++ b/criu/cgroup.c
+@@ -27,6 +27,7 @@
+ #include "images/cgroup.pb-c.h"
+ #include "kerndat.h"
+ #include "linux/mount.h"
++#include "syscall.h"
+
+ /*
+ * This structure describes set of controller groups
+--- a/criu/cr-check.c
++++ b/criu/cr-check.c
+@@ -21,7 +21,6 @@
+ #include <sys/prctl.h>
+ #include <sched.h>
+ #include <sys/mount.h>
+-#include <linux/aio_abi.h>
+
+ #include "../soccr/soccr.h"
+
+@@ -52,6 +51,7 @@
+ #include "net.h"
+ #include "restorer.h"
+ #include "uffd.h"
++#include "linux/aio_abi.h"
+
+ #include "images/inventory.pb-c.h"
+
+--- a/criu/cr-restore.c
++++ b/criu/cr-restore.c
+@@ -22,7 +22,6 @@
+ #include <compel/ptrace.h>
+ #include "common/compiler.h"
+
+-#include "linux/mount.h"
+ #include "linux/rseq.h"
+
+ #include "clone-noasan.h"
+@@ -86,6 +85,8 @@
+ #include <compel/plugins/std/syscall-codes.h>
+ #include "compel/include/asm/syscall.h"
+
++#include "linux/mount.h"
++
+ #include "protobuf.h"
+ #include "images/sa.pb-c.h"
+ #include "images/timer.pb-c.h"
+--- a/criu/include/aio.h
++++ b/criu/include/aio.h
+@@ -1,7 +1,7 @@
+ #ifndef __CR_AIO_H__
+ #define __CR_AIO_H__
+
+-#include <linux/aio_abi.h>
++#include "linux/aio_abi.h"
+ #include "images/mm.pb-c.h"
+ unsigned int aio_estimate_nr_reqs(unsigned int size);
+ int dump_aio_ring(MmEntry *mme, struct vma_area *vma);
+--- /dev/null
++++ b/criu/include/linux/aio_abi.h
+@@ -0,0 +1,14 @@
++#ifndef __LINUX__AIO_ABI_H
++#define __LINUX__AIO_ABI_H
++
++typedef __kernel_ulong_t aio_context_t;
++
++/* read() from /dev/aio returns these structures. */
++struct io_event {
++ __u64 data; /* the data field from the iocb */
++ __u64 obj; /* what iocb this event came from */
++ __s64 res; /* result code for this event */
++ __s64 res2; /* secondary result */
++};
++
++#endif /* __LINUX__AIO_ABI_H */
+--- a/criu/include/linux/mount.h
++++ b/criu/include/linux/mount.h
+@@ -4,32 +4,34 @@
+ #include "common/config.h"
+ #include "compel/plugins/std/syscall-codes.h"
+
+-#ifdef CONFIG_HAS_FSCONFIG
+-#include <linux/mount.h>
+-#else
++/* Copied from /usr/include/sys/mount.h */
++
++#ifndef FSCONFIG_CMD_CREATE
++/* The type of fsconfig call made. */
+ enum fsconfig_command {
+- FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+- FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
+- FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
+- FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
+- FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
+- FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
+- FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
++ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
++#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
++ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
++#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
++ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
++#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
++ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
++#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
++ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
++#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
++ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
++#define FSCONFIG_SET_FD FSCONFIG_SET_FD
++ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
++#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
++#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
+ };
+-#endif
++#endif // FSCONFIG_CMD_CREATE
+
+-static inline int sys_fsopen(const char *fsname, unsigned int flags)
+-{
+- return syscall(__NR_fsopen, fsname, flags);
+-}
+-static inline int sys_fsconfig(int fd, unsigned int cmd, const char *key, const char *value, int aux)
+-{
+- return syscall(__NR_fsconfig, fd, cmd, key, value, aux);
+-}
+-static inline int sys_fsmount(int fd, unsigned int flags, unsigned int attr_flags)
+-{
+- return syscall(__NR_fsmount, fd, flags, attr_flags);
+-}
++#ifndef MS_MGC_VAL
++/* Magic mount flag number. Has to be or-ed to the flag values. */
++#define MS_MGC_VAL 0xc0ed0000 /* Magic flag number to indicate "new" flags */
++#define MS_MGC_MSK 0xffff0000 /* Magic flag number mask */
++#endif
+
+ #endif
+--- /dev/null
++++ b/criu/include/syscall.h
+@@ -0,0 +1,17 @@
++#ifndef __CR_SYSCALL_H__
++#define __CR_SYSCALL_H__
++
++static inline int sys_fsopen(const char *fsname, unsigned int flags)
++{
++ return syscall(__NR_fsopen, fsname, flags);
++}
++static inline int sys_fsconfig(int fd, unsigned int cmd, const char *key, const char *value, int aux)
++{
++ return syscall(__NR_fsconfig, fd, cmd, key, value, aux);
++}
++static inline int sys_fsmount(int fd, unsigned int flags, unsigned int attr_flags)
++{
++ return syscall(__NR_fsmount, fd, flags, attr_flags);
++}
++
++#endif /* __CR_SYSCALL_H__ */
+\ No newline at end of file
+--- a/criu/pie/parasite.c
++++ b/criu/pie/parasite.c
+@@ -3,7 +3,6 @@
+ #include <signal.h>
+ #include <linux/limits.h>
+ #include <linux/capability.h>
+-#include <sys/mount.h>
+ #include <stdarg.h>
+ #include <sys/ioctl.h>
+ #include <sys/uio.h>
+@@ -14,6 +13,7 @@
+ #include "int.h"
+ #include "types.h"
+ #include <compel/plugins/std/syscall.h>
++#include "linux/mount.h"
+ #include "parasite.h"
+ #include "fcntl.h"
+ #include "prctl.h"
+--- a/criu/util.c
++++ b/criu/util.c
+@@ -40,6 +40,7 @@
+ #include "mem.h"
+ #include "namespaces.h"
+ #include "criu-log.h"
++#include "syscall.h"
+
+ #include "clone-noasan.h"
+ #include "cr_options.h"
+--- a/scripts/feature-tests.mak
++++ b/scripts/feature-tests.mak
+@@ -137,19 +137,6 @@ ENTRY(main)
+ END(main)
+ endef
+
+-define FEATURE_TEST_FSCONFIG
+-
+-#include <linux/mount.h>
+-
+-int main(void)
+-{
+- if (FSCONFIG_CMD_CREATE > 0)
+- return 0;
+- return 0;
+-}
+-
+-endef
+-
+ define FEATURE_TEST_NFTABLES_LIB_API_0
+
+ #include <string.h>
+
+--- a/Makefile.config
++++ b/Makefile.config
+@@ -70,7 +70,7 @@ export DEFINES += $(FEATURE_DEFINES)
+ export CFLAGS += $(FEATURE_DEFINES)
+
+ FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
+- SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW FSCONFIG MEMFD_CREATE OPENAT2
++ SETPROCTITLE_INIT MEMFD TCP_REPAIR_WINDOW MEMFD_CREATE OPENAT2
+
+ # $1 - config name
+ define gen-feature-test
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/
@ 2023-05-06 0:01 Patrick McLean
0 siblings, 0 replies; 6+ messages in thread
From: Patrick McLean @ 2023-05-06 0:01 UTC (permalink / raw
To: gentoo-commits
commit: 120aaef2153b8f40bd902888dbbf0cf71efb86e9
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
AuthorDate: Sat May 6 00:01:12 2023 +0000
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
CommitDate: Sat May 6 00:01:20 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=120aaef2
sys-process/criu: add 3.18
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
sys-process/criu/Manifest | 1 +
sys-process/criu/criu-3.18.ebuild | 183 +++++++++++++++++++++
sys-process/criu/files/criu-3.18-buildsystem.patch | 57 +++++++
3 files changed, 241 insertions(+)
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 17a9661b07b3..8c033e463e65 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -1 +1,2 @@
DIST criu-3.17.tar.gz 1321713 BLAKE2B 3bc13a7df0da0a17c74e0c12f07b81fe7f294be4d1980647b64c74e35383416ffbc10e7c04398f307bc68ff701f76a9586ea58825057b0df16b40f6aab3cbd0e SHA512 febae66a7820345c0f335f4a49e64c0af5c8ae5d3a394cc0770881b64eab11ca03ad5872f06b0c4ccd1da844c519268dad3b4f8b260267e6d3f582e80d80f804
+DIST criu-3.18.tar.gz 1354367 BLAKE2B 3e6613bc44355d4544541ec399ca462eed12203327f832e3c72ea2ccc772afbe2947f760de452b776299af36576880b189ce7583ce7f74c12225d86d1247c2ab SHA512 3d15554ebd2d08c8904c23b0aba00d505891c14caa4790c2fd12ad6b20bf4058fd210f1d03fd63aacc5ad8bc47e341396b48abbeb474f1fd43c3023fd1ff9171
diff --git a/sys-process/criu/criu-3.18.ebuild b/sys-process/criu/criu-3.18.ebuild
new file mode 100644
index 000000000000..a87a2907ba4a
--- /dev/null
+++ b/sys-process/criu/criu-3.18.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+DISTUTILS_USE_PEP517=setuptools
+inherit toolchain-funcs linux-info distutils-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="
+ 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.18-buildsystem.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() {
+ distutils-r1_src_prepare
+ 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
+}
+
+criu_python() {
+ local -x \
+ CRIU_VERSION_MAJOR="$(ver_cut 1)" \
+ CRIU_VERSION_MINOR=$(ver_cut 2) \
+ CRIU_VERSION_SUBLEVEL=$(ver_cut 3)
+
+ "${@}"
+}
+
+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
+ pushd crit >/dev/null || die
+ criu_python distutils-r1_src_configure
+ popd >/dev/null || die
+}
+
+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[@]}" \
+ "${@}"
+}
+
+src_compile() {
+ local -a targets=(
+ all
+ $(usex doc 'docs' '')
+ )
+ criu_emake ${targets}
+
+ pushd crit >/dev/null || die
+ criu_python distutils-r1_src_compile
+ popd >/dev/null || die
+}
+
+src_test() {
+ criu_emake unittest
+}
+
+python_install() {
+ local -x \
+ CRIU_VERSION_MAJOR="$(ver_cut 1)" \
+ CRIU_VERSION_MINOR=$(ver_cut 2) \
+ CRIU_VERSION_SUBLEVEL=$(ver_cut 3)
+
+ distutils-r1_python_install
+}
+
+src_install() {
+ criu_emake DESTDIR="${D}" install
+
+ pushd crit >/dev/null || die
+ criu_python distutils-r1_src_install
+ popd >/dev/null || die
+
+ 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.18-buildsystem.patch b/sys-process/criu/files/criu-3.18-buildsystem.patch
new file mode 100644
index 000000000000..5a4d41a3840d
--- /dev/null
+++ b/sys-process/criu/files/criu-3.18-buildsystem.patch
@@ -0,0 +1,57 @@
+diff --git a/Makefile.config b/Makefile.config
+index 270ec61c0..eed38626e 100644
+--- a/Makefile.config
++++ b/Makefile.config
+@@ -5,9 +5,6 @@ include scripts/feature-tests.mak
+ ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
+ LIBS_FEATURES += -lbsd
+ FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD
+-else
+- $(info Note: Building without setproctitle() and strlcpy() support.)
+- $(info $(info) To enable these features, please install libbsd-devel (RPM) / libbsd-dev (DEB).)
+ endif
+
+ ifeq ($(call pkg-config-check,libselinux),y)
+@@ -33,8 +30,6 @@ ifeq ($(NO_GNUTLS)x$(call pkg-config-check,gnutls),xy)
+ LIBS_FEATURES += -lgnutls
+ export CONFIG_GNUTLS := y
+ FEATURE_DEFINES += -DCONFIG_GNUTLS
+-else
+- $(info Note: Building without GnuTLS support)
+ endif
+
+ ifeq ($(call pkg-config-check,libnftables),y)
+@@ -49,9 +44,6 @@ ifeq ($(call pkg-config-check,libnftables),y)
+ $(warning Warn: you have libnftables installed but it has incompatible API)
+ $(warning Warn: Building without nftables support)
+ endif
+-else
+- $(warning Warn: you have no libnftables installed)
+- $(warning Warn: Building without nftables support)
+ endif
+
+ export LIBS += $(LIBS_FEATURES)
+diff --git a/lib/Makefile b/lib/Makefile
+index ff540fb75..dcac4b1ac 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -54,10 +54,6 @@ install: lib-c lib-a lib-py crit/crit lib/c/criu.pc.in
+ $(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
+ $(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 ($(PYTHON),python3)
+- $(E) " INSTALL " crit
+- $(Q) $(PYTHON) -m pip install --upgrade --force-reinstall --prefix=$(DESTDIR)$(PREFIX) ./crit
+-endif
+ .PHONY: install
+
+ uninstall:
+@@ -69,8 +65,4 @@ uninstall:
+ $(Q) $(RM) $(addprefix $(DESTDIR)$(INCLUDEDIR)/criu/,$(notdir $(UAPI_HEADERS)))
+ $(E) " UNINSTALL" pkgconfig/criu.pc
+ $(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/pkgconfig/,criu.pc)
+-ifeq ($(PYTHON),python3)
+- $(E) " UNINSTALL" crit
+- $(Q) $(PYTHON) ./scripts/uninstall_module.py --prefix=$(DESTDIR)$(PREFIX) crit
+-endif
+ .PHONY: uninstall
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-05-06 0:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-16 20:10 [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/ Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2023-05-06 0:01 Patrick McLean
2022-08-05 1:04 Sam James
2017-09-01 7:35 Sergei Trofimovich
2015-11-05 8:22 Yixun Lan
2015-10-09 4:33 Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox