From 7e8fcadffb8f78e9a2c4f32543373e096990850a Mon Sep 17 00:00:00 2001 From: Yixun Lan Date: Fri, 24 Jun 2016 18:06:38 +0800 Subject: sys-process/criu: version bump 2.3 Package-Manager: portage-2.3.0_rc1 --- sys-process/criu/Manifest | 1 + sys-process/criu/criu-2.3.ebuild | 94 ++++++++++++++++++++++++ sys-process/criu/files/2.3/criu-2.3-no-git.patch | 16 ++++ 3 files changed, 111 insertions(+) create mode 100644 sys-process/criu/criu-2.3.ebuild create mode 100644 sys-process/criu/files/2.3/criu-2.3-no-git.patch (limited to 'sys-process/criu') diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest index 5e8218093b3e..ba7798976457 100644 --- a/sys-process/criu/Manifest +++ b/sys-process/criu/Manifest @@ -1,3 +1,4 @@ DIST criu-1.8.tar.bz2 534200 SHA256 d1d6693d23181b1cd7378d77c142e41bcac3cb2ae5c71ea4c5b7de01f65575bb SHA512 de3f63613124606be08e5323f465c63811c35c457f4b1a311434aeb02590ebf652845b727b9e10b8a9eb9402c97e772ff044135bec7797cc6e4ad972efc9172d WHIRLPOOL 2f2d18f5fbd1608acfd6ce9e1283cf05a1574b2a141cd4cf29bcacc370ed0bfce488187e40250edeb396daf8fc38f2a2e960ffd8773511a82eebce3a74663e9f 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 diff --git a/sys-process/criu/criu-2.3.ebuild b/sys-process/criu/criu-2.3.ebuild new file mode 100644 index 000000000000..971a67044fb9 --- /dev/null +++ b/sys-process/criu/criu-2.3.ebuild @@ -0,0 +1,94 @@ +# 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.2/${PN}-2.2-makefile.patch + "${FILESDIR}"/${PV}/${P}-no-git.patch + "${FILESDIR}"/2.0/${PN}-2.0-automagic-libbsd.patch + "${FILESDIR}"/2.0/${PN}-2.0-sysroot.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.3/criu-2.3-no-git.patch b/sys-process/criu/files/2.3/criu-2.3-no-git.patch new file mode 100644 index 000000000000..86360cdf1a55 --- /dev/null +++ b/sys-process/criu/files/2.3/criu-2.3-no-git.patch @@ -0,0 +1,16 @@ +diff --git a/Makefile b/Makefile +index 97f63eb..0e2636b 100644 +--- a/Makefile ++++ b/Makefile +@@ -245,9 +245,9 @@ test: zdtm + # Generating tar requires tag matched CRIU_VERSION. + # If not found then simply use GIT's describe with + # "v" prefix stripped. +-head-name := $(shell git tag -l v$(CRIU_VERSION)) ++head-name := $(shell if [ -d ".git" ]; then git tag -l v$(CRIU_VERSION); fi) + ifeq ($(head-name),) +- head-name := $(shell git describe 2>/dev/null) ++ head-name := $(shell if [ -d ".git" ]; then git describe 2>/dev/null; fi) + endif + # If no git tag could describe current commit, + # use pre-defined CRIU_VERSION with GITID (if any). -- cgit v1.2.3-65-gdbad