public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Yixun Lan" <dlan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/2.2/, sys-process/criu/
Date: Fri, 27 May 2016 07:17:46 +0000 (UTC)	[thread overview]
Message-ID: <1464333394.81c43e8ea9a5561629e34e1030ea835a655eb62b.dlan@gentoo> (raw)

commit:     81c43e8ea9a5561629e34e1030ea835a655eb62b
Author:     Yixun Lan <dlan <AT> gentoo <DOT> org>
AuthorDate: Fri May 27 06:43:57 2016 +0000
Commit:     Yixun Lan <dlan <AT> gentoo <DOT> org>
CommitDate: Fri May 27 07:16:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81c43e8e

sys-process/criu: version bump 2.2

Package-Manager: portage-2.2.28

 sys-process/criu/Manifest                          |  1 +
 sys-process/criu/criu-2.2.ebuild                   | 93 ++++++++++++++++++++++
 sys-process/criu/files/2.2/criu-2.2-flags.patch    | 13 +++
 sys-process/criu/files/2.2/criu-2.2-makefile.patch | 77 ++++++++++++++++++
 4 files changed, 184 insertions(+)

diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 8eb6929..a0138aa 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -3,3 +3,4 @@ DIST criu-1.7.2.tar.bz2 508012 SHA256 f5d377fd2a3c8824c592f6c27147cb4d37333ca0ce
 DIST criu-1.8.tar.bz2 534200 SHA256 d1d6693d23181b1cd7378d77c142e41bcac3cb2ae5c71ea4c5b7de01f65575bb SHA512 de3f63613124606be08e5323f465c63811c35c457f4b1a311434aeb02590ebf652845b727b9e10b8a9eb9402c97e772ff044135bec7797cc6e4ad972efc9172d WHIRLPOOL 2f2d18f5fbd1608acfd6ce9e1283cf05a1574b2a141cd4cf29bcacc370ed0bfce488187e40250edeb396daf8fc38f2a2e960ffd8773511a82eebce3a74663e9f
 DIST criu-2.0.tar.bz2 548581 SHA256 e80726cc54f74751ae6f63a5b0cf9a2882ffc3fd2aa11b311da0384635d418ff SHA512 ebe785c3da9d54ba517254f7851f0283ccf3826cba30a07c6c74a7253f2d7235f32bb921623a23e6103a3c3e4461e1bc5dc06484270c8e25929c8e981a8b036f WHIRLPOOL 7999a2aeb40f9a932a8b1d11c842f78c710718f08ca1f29b373c69d34b82ebc7ab9b6a659460a058333d6591b64ef76215cdc2d70760cbd57c4d1444d9abe622
 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

diff --git a/sys-process/criu/criu-2.2.ebuild b/sys-process/criu/criu-2.2.ebuild
new file mode 100644
index 0000000..f971fd4
--- /dev/null
+++ b/sys-process/criu/criu-2.2.ebuild
@@ -0,0 +1,93 @@
+# 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"
+
+src_prepare() {
+	epatch "${FILESDIR}"/${PV}/${P}-flags.patch
+	epatch "${FILESDIR}"/${PV}/${P}-makefile.patch
+	epatch "${FILESDIR}"/2.0/${PN}-2.0-automagic-libbsd.patch
+	epatch "${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.2/criu-2.2-flags.patch b/sys-process/criu/files/2.2/criu-2.2-flags.patch
new file mode 100644
index 0000000..97a806b
--- /dev/null
+++ b/sys-process/criu/files/2.2/criu-2.2-flags.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile b/Makefile
+index 037d38f..7c85403 100644
+--- a/Makefile
++++ b/Makefile
+@@ -97,8 +97,6 @@ endif
+ ifeq ($(DEBUG),1)
+         DEFINES		+= -DCR_DEBUG
+         CFLAGS		+= -O0 -ggdb3
+-else
+-        CFLAGS		+= -O2 -g
+ endif
+ 
+ ifeq ($(GMON),1)

diff --git a/sys-process/criu/files/2.2/criu-2.2-makefile.patch b/sys-process/criu/files/2.2/criu-2.2-makefile.patch
new file mode 100644
index 0000000..e4e856d
--- /dev/null
+++ b/sys-process/criu/files/2.2/criu-2.2-makefile.patch
@@ -0,0 +1,77 @@
+diff --git a/Makefile.install b/Makefile.install
+index b3f5551..2349107 100644
+--- a/Makefile.install
++++ b/Makefile.install
+@@ -6,23 +6,10 @@ 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
+ 
+-#
+-# 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
+ 
+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.


             reply	other threads:[~2016-05-27  7:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27  7:17 Yixun Lan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-06-14 14:23 [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/2.2/, sys-process/criu/ Yixun Lan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464333394.81c43e8ea9a5561629e34e1030ea835a655eb62b.dlan@gentoo \
    --to=dlan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox