summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2015-12-08 19:38:26 +0800
committerYixun Lan <dlan@gentoo.org>2015-12-08 19:38:26 +0800
commit99e2622db706cdda6a4e23b18bc5fb0d2a665fef (patch)
tree203a0302ee703cafd2f52dd8ba915c2b4c46f40c /sys-process
parentdev-java/glassfish-deployment-api: EAPI 5 bump && version bump. (diff)
downloadgentoo-99e2622db706cdda6a4e23b18bc5fb0d2a665fef.tar.gz
gentoo-99e2622db706cdda6a4e23b18bc5fb0d2a665fef.tar.bz2
gentoo-99e2622db706cdda6a4e23b18bc5fb0d2a665fef.zip
sys-process/criu: version bump to 1.8
Package-Manager: portage-2.2.24
Diffstat (limited to 'sys-process')
-rw-r--r--sys-process/criu/Manifest1
-rw-r--r--sys-process/criu/criu-1.8.ebuild72
-rw-r--r--sys-process/criu/files/criu-1.8-makefile.patch25
3 files changed, 98 insertions, 0 deletions
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 03a83ef96cdb..6e51d1a3f689 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -1,2 +1,3 @@
DIST criu-1.6.1.tar.bz2 484598 SHA256 c74810383b7e524be0d909b9a6c1805e0887ac93cf1bfa28f00a87f395879e18 SHA512 59de498035970decc5181c3e464ccf686fce34e9fa5285d0c6777849013b8441a4338ef7f89339953ff83dcaf1b7e95dbbd54432f61a28665fbde979df5e31e8 WHIRLPOOL 07fa8490bca046a17476b59e375a287dacbb13c1a99ac0a05166c5925d997748ca506c1cf3bab2bdae832010f6d87e7aa6f4b4371ce7c7d630120a0f47f1ae23
DIST criu-1.7.2.tar.bz2 508012 SHA256 f5d377fd2a3c8824c592f6c27147cb4d37333ca0ce8b9c6e85a8b7cd8479b21d SHA512 3e35d90b8cd66b96df193b37907825fbf785eea332146c767b267cbda5b6e1ae6a0d5570945990e4288f6406d8507f6c33a792c5db232cbaf396342a65b53de3 WHIRLPOOL 164cbc9d6a4969e6116644bded88b9aec8a9bc0fb737e69eaacd641376db7d274598ff3647a912ab19155d4097de8a1eaa5ea82642b4f3ba93c01b4a6725493d
+DIST criu-1.8.tar.bz2 534200 SHA256 d1d6693d23181b1cd7378d77c142e41bcac3cb2ae5c71ea4c5b7de01f65575bb SHA512 de3f63613124606be08e5323f465c63811c35c457f4b1a311434aeb02590ebf652845b727b9e10b8a9eb9402c97e772ff044135bec7797cc6e4ad972efc9172d WHIRLPOOL 2f2d18f5fbd1608acfd6ce9e1283cf05a1574b2a141cd4cf29bcacc370ed0bfce488187e40250edeb396daf8fc38f2a2e960ffd8773511a82eebce3a74663e9f
diff --git a/sys-process/criu/criu-1.8.ebuild b/sys-process/criu/criu-1.8.ebuild
new file mode 100644
index 000000000000..120c6daccaa8
--- /dev/null
+++ b/sys-process/criu/criu-1.8.ebuild
@@ -0,0 +1,72 @@
+# 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.8-makefile.patch
+ epatch "${FILESDIR}"/${PN}-1.7-automagic-libbsd.patch
+}
+
+criu_arch() {
+ # criu infers the arch from $(uname -m). We never want this to happen.
+ case ${ARCH} in
+ amd64) echo "x86_64";;
+ arm64) echo "aarch64";;
+ x86) echo "i386";;
+ *) echo "${ARCH}";;
+ esac
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ ARCH="$(criu_arch)" \
+ V=1 WERROR=0 \
+ SETPROCTITLE=$(usex setproctitle) \
+ all docs
+}
+
+src_test() {
+ # root privileges are required to dump all necessary info
+ if [[ ${EUID} -eq 0 ]] ; then
+ emake -j1 CC="$(tc-getCC)" ARCH="$(criu_arch)" V=1 WERROR=0 test
+ fi
+}
+
+src_install() {
+ emake \
+ ARCH="$(criu_arch)" \
+ PREFIX="${EPREFIX}"/usr \
+ LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
+ DESTDIR="${D}" \
+ install
+
+ dodoc CREDITS README.md
+}
diff --git a/sys-process/criu/files/criu-1.8-makefile.patch b/sys-process/criu/files/criu-1.8-makefile.patch
new file mode 100644
index 000000000000..2c1921f55f58
--- /dev/null
+++ b/sys-process/criu/files/criu-1.8-makefile.patch
@@ -0,0 +1,25 @@
+diff --git a/Makefile.inc b/Makefile.inc
+index 5f0a552..4abc9ab 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -15,16 +15,11 @@ PREFIX ?= /usr/local
+ SBINDIR ?= $(PREFIX)/sbin
+ MANDIR ?= $(PREFIX)/share/man
+ SYSTEMDUNITDIR ?= $(PREFIX)/lib/systemd/system/
+-LOGROTATEDIR ?= $(PREFIX)/etc/logrotate.d/
+-LIBDIR ?= $(PREFIX)/lib
+-# For recent Debian/Ubuntu with multiarch support
+-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \
+- -qDEB_HOST_MULTIARCH 2>/dev/null)
+-ifneq "$(DEB_HOST_MULTIARCH)" ""
+-LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
+-# For most other systems
+-else ifeq "$(shell uname -m)" "x86_64"
++LOGROTATEDIR ?= $(SYSCONFDIR)/etc/logrotate.d/
++ifeq "$(shell uname -m)" "x86_64"
+ LIBDIR ?= $(PREFIX)/lib64
++else
++LIBDIR ?= $(PREFIX)/lib
+ endif
+
+ INCLUDEDIR ?= $(PREFIX)/include/criu