summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2016-07-26 14:15:12 +0800
committerYixun Lan <dlan@gentoo.org>2016-07-26 14:15:12 +0800
commit960a994558dfd82011f8cd6db61d75b269cf4a79 (patch)
tree19e97f07dd4ec7b58be6736f898aea0f94ab327e /sys-process/criu
parentapp-office/lyx: version bump 2.2.1 (diff)
downloadgentoo-960a994558dfd82011f8cd6db61d75b269cf4a79.tar.gz
gentoo-960a994558dfd82011f8cd6db61d75b269cf4a79.tar.bz2
gentoo-960a994558dfd82011f8cd6db61d75b269cf4a79.zip
sys-process/criu: version bump 2.4
Package-Manager: portage-2.3.0
Diffstat (limited to 'sys-process/criu')
-rw-r--r--sys-process/criu/Manifest1
-rw-r--r--sys-process/criu/criu-2.4.ebuild95
-rw-r--r--sys-process/criu/files/2.4/criu-2.4-makefile.patch78
3 files changed, 174 insertions, 0 deletions
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index ba7798976457..23ee5a15f11c 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -2,3 +2,4 @@ DIST criu-1.8.tar.bz2 534200 SHA256 d1d6693d23181b1cd7378d77c142e41bcac3cb2ae5c7
DIST criu-2.1.tar.bz2 556820 SHA256 7a9fe6f2858a3086e652e17ffb85174f72cf19e87e776fc5ddab66013f16d4c4 SHA512 19fd57464a757a3b668ebf5ba70ea80d591d0df70a325ad5929408239f3439ef1cabe68367c778e386e5b818adf4fc4b98dccf729d2b5d656f12389e3f6d9439 WHIRLPOOL 4c193d96ff83ec08e8cb2de1ea1a2b11ceb6980d64cfc71bb2f9e1b518aa7b15ab7a2838fb2559aaa82c1e72378c5d0c5175bb437fff1040d0e95a60e5c8525c
DIST criu-2.2.tar.bz2 558926 SHA256 f893938f72d2c0693a9430e7dd39dc3d32a40187de5edbd65830c6ade0f34e53 SHA512 3e03dcd3531641e93f88354515b902390a9d83fd79eec36848ded5a28e987cd5ae8e81d7ed645960a86f4dfa5176f17de02f5a9b19723a8aaa2bf15057fe46dd WHIRLPOOL 62bf41089f0028926622ba69c5c6f44f0ee8288a38b2d6ce82e9c727c9ee9ccd1f65a6a8654c9faa06597316e8b00b6076b4cddf6d7af06b85f8de334de9afa7
DIST criu-2.3.tar.bz2 572580 SHA256 acbdfeb2b6c5b72dbc849e014eecd4d166f0c05c76fc40424eedec0761b60bfe SHA512 b058d4a917363190f5196256ecff23fab7c11e259807d8cef954690e9bc03751095529da5774e687ff6a1a506382aec92275771b031d790d6a0bd7cebde2916a WHIRLPOOL a32809d05d01781b3241f4c6766f8d17acc8de275af01d934e849a47f8857d4479147dc127cc02e32ebb6358720536e1596b6e063fdc88ee1c0b0725e126220f
+DIST criu-2.4.tar.bz2 602896 SHA256 2a38119d7baae2cad8496f98dfc461c9685e67f12131abc5f44d764d4b87e9f0 SHA512 04f1ba472ea9189250f1eedbf377b2607f8425cc660b37e1ca8b47310eec84331551f5c3db1b7341779176aaeaaab67662545dad2ffbcf212548c67a991b0c72 WHIRLPOOL 9447a3e542beced07636269c7c6612080ecd6d4edb2bb09459440fc8a517bb08dd385bde6c80d5cc61dbf90948b740aa80bdae6bcd79b8415ae3d4fdec4413cd
diff --git a/sys-process/criu/criu-2.4.ebuild b/sys-process/criu/criu-2.4.ebuild
new file mode 100644
index 000000000000..e17b58a17df7
--- /dev/null
+++ b/sys-process/criu/criu-2.4.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils toolchain-funcs linux-info flag-o-matic python-r1 python-utils-r1
+
+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="python setproctitle"
+
+RDEPEND="dev-libs/protobuf-c
+ dev-libs/libnl:3
+ python? ( ${PYTHON_DEPS} )
+ setproctitle? ( dev-libs/libbsd )"
+DEPEND="${RDEPEND}
+ app-text/asciidoc
+ app-text/xmlto"
+RDEPEND="${RDEPEND}
+ python? (
+ dev-libs/protobuf[python,${PYTHON_USEDEP}]
+ dev-python/ipaddr[${PYTHON_USEDEP}]
+ )"
+
+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"
+
+PATCHES=(
+ "${FILESDIR}"/2.2/${PN}-2.2-flags.patch
+ "${FILESDIR}"/2.4/${PN}-2.4-makefile.patch
+ "${FILESDIR}"/2.3/${PN}-2.3-no-git.patch
+ "${FILESDIR}"/2.0/${PN}-2.0-automagic-libbsd.patch
+ "${FILESDIR}"/2.0/${PN}-2.0-sysroot.patch
+ "${FILESDIR}"/2.3/${PN}-2.3-aarch64.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";;
+ *) echo "${ARCH}";;
+ esac
+}
+
+src_compile() {
+ RAW_LDFLAGS="$(raw-ldflags)" emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ ARCH="$(criu_arch)" \
+ V=1 WERROR=0 DEBUG=0 \
+ SETPROCTITLE=$(usex setproctitle) \
+ PYCRIU=$(usex python) \
+ 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
+}
+
+install_crit() {
+ "${PYTHON:-python}" ../scripts/crit-setup.py install --root="${D}" --prefix="${EPREFIX}/usr/"
+}
+
+src_install() {
+ emake \
+ ARCH="$(criu_arch)" \
+ PREFIX="${EPREFIX}"/usr \
+ LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+
+ dodoc CREDITS README.md
+
+ if use python ; then
+ cd lib
+ python_foreach_impl install_crit
+ fi
+}
diff --git a/sys-process/criu/files/2.4/criu-2.4-makefile.patch b/sys-process/criu/files/2.4/criu-2.4-makefile.patch
new file mode 100644
index 000000000000..8a0fb6d940fc
--- /dev/null
+++ b/sys-process/criu/files/2.4/criu-2.4-makefile.patch
@@ -0,0 +1,78 @@
+diff --git a/Makefile.install b/Makefile.install
+index e3dd551..495ad39 100644
+--- a/Makefile.install
++++ b/Makefile.install
+@@ -6,24 +6,11 @@ BINDIR ?= $(PREFIX)/bin
+ SBINDIR ?= $(PREFIX)/sbin
+ MANDIR ?= $(PREFIX)/share/man
+ SYSTEMDUNITDIR ?= $(PREFIX)/lib/systemd/system/
+-LOGROTATEDIR ?= $(PREFIX)/etc/logrotate.d/
++LOGROTATEDIR ?= $(SYSCONFDIR)/etc/logrotate.d/
+ LIBDIR ?= $(PREFIX)/lib
+ INCLUDEDIR ?= $(PREFIX)/include/criu
+ LIBEXECDIR ?= $(PREFIX)/libexec
+
+-#
+-# 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)
+-else
+- #
+- # For most other systems
+- ifeq "$(shell uname -m)" "x86_64"
+- LIBDIR ?= $(PREFIX)/lib64
+- endif
+-endif
+-
+ export BINDIR SBINDIR MANDIR SYSTEMDUNITDIR LOGROTATEDIR
+ export INCLUDEDIR LIBDIR DESTDIR PREFIX LIBEXECDIR
+
+diff --git a/lib/Makefile b/lib/Makefile
+index f1c0821..3bef265 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -25,8 +25,12 @@ lib-c: c/$(CRIU_SO)
+ #
+ # Python bindings.
+ lib-py:
++ifeq ($(PYCRIU),yes)
+ $(call msg-gen, $@)
+ $(Q) $(MAKE) -C py all
++else
++ $(Q) echo "no py criu"
++endif
+ .PHONY: lib-py
+
+ all: lib-c lib-py
+@@ -43,7 +47,7 @@ clean:
+ $(Q) $(RM) -r build usr
+ .PHONY: clean
+
+-install: lib-c lib-py ../crit/crit c/criu.pc.in
++install: lib-c ../crit/crit c/criu.pc.in
+ $(E) " INSTALL " $(CRIU_SO)
+ $(Q) mkdir -p $(DESTDIR)$(LIBDIR)
+ $(Q) install -m 755 c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR)
+@@ -55,8 +59,6 @@ install: lib-c lib-py ../crit/crit 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)),' c/criu.pc.in > c/criu.pc
+ $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
+- $(E) " INSTALL " crit
+- $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
+ .PHONY: install
+
+ uninstall:
+diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
+index bd40944..3cfbffa 100644
+--- a/scripts/nmk/scripts/build.mk
++++ b/scripts/nmk/scripts/build.mk
+@@ -87,7 +87,7 @@ builtin-name := $(strip $(builtin-name))
+
+ #
+ # Link flags.
+-ld_flags := $(strip $(LDFLAGS) $(ldflags-y))
++ld_flags := $(strip $(RAW_LDFLAGS) $(ldflags-y))
+
+ #
+ # $(obj) related rules.