[gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/2.0/, sys-process/criu/

2017-09-01 Thread Sergei Trofimovich
commit: b29089547c85046ff7e411853e077553b3b55f92
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Sep  1 21:57:18 2017 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Sep  1 21:57:27 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2908954

sys-process/criu: bump up to 3.4

Package-Manager: Portage-2.3.8, Repoman-2.3.3

 sys-process/criu/Manifest |  1 +
 sys-process/criu/criu-3.4.ebuild  | 95 +++
 sys-process/criu/files/2.0/criu-2.0-sysroot.patch |  8 +-
 3 files changed, 97 insertions(+), 7 deletions(-)

diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 09eee815d90..3a5845f0c3c 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -4,3 +4,4 @@ DIST criu-2.11.tar.bz2 645048 SHA256 
5f270222ba5e98b33aab7cef61363a11167fec96cf2
 DIST criu-2.12.1.tar.bz2 646855 SHA256 
33e4f575a533b66e0571fff0c2b6ced51612789fa3b944b841ec6fc79ed4a0a2 SHA512 
7a168bc20665ed3ca9931e6f2fa6d58b87faee38eee30dcdda8dad041ffd90ea7e1bad17d4dcf5c5d8de563eacc64ecbd579b7f4b959a654182a688e94024ba2
 WHIRLPOOL 
9889ea1e37da4a4425aede6c0408ea8dd0f315d5575d76709f055dc5b054aba4ee96107fa2417ff4a9d4028f5e009b085ef6884ead4f10cc2263ddf06cd13308
 DIST criu-2.12.tar.bz2 646770 SHA256 
b707eee3410a833b2d5d7534557c7a21f800f10d8660966d1efdd6396f1a1e4b SHA512 
e021772c5d42dd93fe0d6c10a7aa731b600871ba78772169323c661c59d00f4d78ceda3ddfbda76123947f6ff6d2c19e443bb73e018a649e7f3872b73d28763a
 WHIRLPOOL 
19017b586cf5a490393c8b3b3d9ca98f6aa5442812cf4eb8bca45efa7f04c2360d7cbd46c40f1abf84ee6ba82ff2ecc6256f54d553259783a2ba4c36aa7dbaad
 DIST criu-2.5.tar.bz2 605226 SHA256 
d2a9ffec0b659c3d3a71e1d473e95e36b208b2563f136ce8f471ff9600fcc51a SHA512 
ccf942005ff3b2a567726ddb8aa44048c130f1adf6e2cbdf48e919043c84a4e1c03ad0ec34b44263e5764bea62807a2cc0fa1135b929ad3166fb9486c2880570
 WHIRLPOOL 
9896fe45d4516a73e6b7c403a044d25902ed4a9000b0a0a053ff9d52c053adfb58c8ce0225b9841bc7e2f38de6a8e4fc6d3073d878ea5b09b81cc89cba91de62
+DIST criu-3.4.tar.bz2 701680 SHA256 
876bf32b9351c0034ff8f7064a6e63487f6639aedec115356cc76c436fa437c2 SHA512 
71fc700d19b46381873b2d0fa90e7fa253b00beb5e4e6065bbf510766acbcc14b35d58fa8073801112f897d2320b7decca1115fb6853d5fe64f3c52aa40a9f32
 WHIRLPOOL 
39be8e58635f21868f152a50f163875812d1325212b0c0c5a360152869e03358eb449b86700ee6f242cb890fcf5217c2aceaf3b2781e3b2d7c70ecc1a6c933df

diff --git a/sys-process/criu/criu-3.4.ebuild b/sys-process/criu/criu-3.4.ebuild
new file mode 100644
index 000..982954a66c3
--- /dev/null
+++ b/sys-process/criu/criu-3.4.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="dev-libs/protobuf-c
+   dev-libs/libnl:3
+   net-libs/libnet:1.1
+   sys-libs/libcap
+   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.3/${PN}-2.3-no-git.patch
+   "${FILESDIR}"/${PN}-2.8-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/"
+}

[gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/2.0/, sys-process/criu/

2016-03-15 Thread Alexis Ballier
commit: 5fcb6dedbe1b7a139ff1951f9964baaebb2ba3ef
Author: Alexis Ballier  gentoo  org>
AuthorDate: Tue Mar 15 15:01:08 2016 +
Commit: Alexis Ballier  gentoo  org>
CommitDate: Tue Mar 15 15:12:55 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fcb6ded

sys-process/criu: Add python useflag and fix build with LDFLAGS not matching 
default.

Adapt makefile patch to use RAW_LDFLAGS for ld which we feed from ebuild.
Patch makefile to allow disabling python and make it optional with proper deps, 
bug #576716.

Package-Manager: portage-2.2.28
Signed-off-by: Alexis Ballier  gentoo.org>

 sys-process/criu/criu-2.0.ebuild   | 24 +++--
 sys-process/criu/files/2.0/criu-2.0-makefile.patch | 58 +-
 2 files changed, 67 insertions(+), 15 deletions(-)

diff --git a/sys-process/criu/criu-2.0.ebuild b/sys-process/criu/criu-2.0.ebuild
index 90689a6..2d4b80a 100644
--- a/sys-process/criu/criu-2.0.ebuild
+++ b/sys-process/criu/criu-2.0.ebuild
@@ -4,7 +4,9 @@
 
 EAPI=5
 
-inherit eutils toolchain-funcs linux-info flag-o-matic
+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/;
@@ -13,13 +15,19 @@ SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2;
 LICENSE="GPL-2"
 SLOT="0"
 KEYWORDS="~amd64 ~arm ~arm64"
-IUSE="setproctitle"
+IUSE="python setproctitle"
 
 RDEPEND="dev-libs/protobuf-c
+   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"
@@ -42,13 +50,14 @@ criu_arch() {
 }
 
 src_compile() {
-   emake \
+   RAW_LDFLAGS="$(raw-ldflags)" emake \
CC="$(tc-getCC)" \
LD="$(tc-getLD)" \
OBJCOPY="$(tc-getOBJCOPY)" \
ARCH="$(criu_arch)" \
V=1 WERROR=0 DEBUG=0 \
SETPROCTITLE=$(usex setproctitle) \
+   PYCRIU=$(usex python) \
all docs
 }
 
@@ -59,6 +68,10 @@ src_test() {
fi
 }
 
+install_crit() {
+   "${PYTHON:-python}" ../scripts/crit-setup.py install --root=${D} 
--prefix="${EPREFIX}/usr/"
+}
+
 src_install() {
emake \
ARCH="$(criu_arch)" \
@@ -68,4 +81,9 @@ src_install() {
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.0/criu-2.0-makefile.patch 
b/sys-process/criu/files/2.0/criu-2.0-makefile.patch
index 4c7d67f..b9c9cb4 100644
--- a/sys-process/criu/files/2.0/criu-2.0-makefile.patch
+++ b/sys-process/criu/files/2.0/criu-2.0-makefile.patch
@@ -1,7 +1,7 @@
-diff --git a/Makefile.install b/Makefile.install
-index 6fcf25e..0d12ff9 100644
 a/Makefile.install
-+++ b/Makefile.install
+Index: criu-2.0/Makefile.install
+===
+--- criu-2.0.orig/Makefile.install
 criu-2.0/Makefile.install
 @@ -5,13 +5,12 @@ PREFIX   ?= /usr/local
  SBINDIR   ?= $(PREFIX)/sbin
  MANDIR?= $(PREFIX)/share/man
@@ -18,17 +18,51 @@ index 6fcf25e..0d12ff9 100644
  ifneq "$(DEB_HOST_MULTIARCH)" ""
  LIBDIR?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
  else
-diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
-index 10a5d44..6b20569 100644
 a/scripts/nmk/scripts/build.mk
-+++ b/scripts/nmk/scripts/build.mk
-@@ -43,7 +43,9 @@ builtin-name := $(strip $(builtin-name))
+Index: criu-2.0/scripts/nmk/scripts/build.mk
+===
+--- criu-2.0.orig/scripts/nmk/scripts/build.mk
 criu-2.0/scripts/nmk/scripts/build.mk
+@@ -43,7 +43,7 @@ builtin-name := $(strip $(builtin-name))
  
  #
  # Link flags.
-+ld_filter_flags = -Wl,-O1 -Wl,--as-needed
- ld_flags  := $(strip $(LDFLAGS) $(ldflags-y))
-+ld_flags  := $(filter-out $(ld_filter_flags),$(ld_flags))
+-ld_flags  := $(strip $(LDFLAGS) $(ldflags-y))
++ld_flags  := $(strip $(RAW_LDFLAGS) $(ldflags-y))
  
  #
  # Prepare targets.
+Index: criu-2.0/lib/Makefile
+===
+--- criu-2.0.orig/lib/Makefile
 criu-2.0/lib/Makefile
+@@ -20,10 +20,12 @@ PHONY += lib-c
+ 
+ #
+ # Python bindings.
++ifeq ($(PYCRIU),yes)
+ lib-py:
+   $(call msg-gen, $@)
+   $(Q) $(MAKE) -C py all
+ PHONY += lib-py
++endif
+ 
+ clean:
+   $(call msg-clean, lib-c)