Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/, sys-process/criu/files/2.5/
Date: Thu, 25 Aug 2016 05:28:45
Message-Id: 1472102894.47f05b40812efe00118e59167b158084b2ecd34c.dlan@gentoo
1 commit: 47f05b40812efe00118e59167b158084b2ecd34c
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 25 01:29:43 2016 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 25 05:28:14 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47f05b40
7
8 sys-process/criu: version bump
9
10 Package-Manager: portage-2.3.0
11
12 sys-process/criu/Manifest | 1 +
13 sys-process/criu/criu-2.5.ebuild | 96 ++++++++++++++++++++++
14 .../criu/files/2.5/criu-2.5-automagic-libbsd.patch | 17 ++++
15 3 files changed, 114 insertions(+)
16
17 diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
18 index 0066ee7..0037ca2 100644
19 --- a/sys-process/criu/Manifest
20 +++ b/sys-process/criu/Manifest
21 @@ -1,3 +1,4 @@
22 DIST criu-2.2.tar.bz2 558926 SHA256 f893938f72d2c0693a9430e7dd39dc3d32a40187de5edbd65830c6ade0f34e53 SHA512 3e03dcd3531641e93f88354515b902390a9d83fd79eec36848ded5a28e987cd5ae8e81d7ed645960a86f4dfa5176f17de02f5a9b19723a8aaa2bf15057fe46dd WHIRLPOOL 62bf41089f0028926622ba69c5c6f44f0ee8288a38b2d6ce82e9c727c9ee9ccd1f65a6a8654c9faa06597316e8b00b6076b4cddf6d7af06b85f8de334de9afa7
23 DIST criu-2.3.tar.bz2 572580 SHA256 acbdfeb2b6c5b72dbc849e014eecd4d166f0c05c76fc40424eedec0761b60bfe SHA512 b058d4a917363190f5196256ecff23fab7c11e259807d8cef954690e9bc03751095529da5774e687ff6a1a506382aec92275771b031d790d6a0bd7cebde2916a WHIRLPOOL a32809d05d01781b3241f4c6766f8d17acc8de275af01d934e849a47f8857d4479147dc127cc02e32ebb6358720536e1596b6e063fdc88ee1c0b0725e126220f
24 DIST criu-2.4.tar.bz2 602896 SHA256 2a38119d7baae2cad8496f98dfc461c9685e67f12131abc5f44d764d4b87e9f0 SHA512 04f1ba472ea9189250f1eedbf377b2607f8425cc660b37e1ca8b47310eec84331551f5c3db1b7341779176aaeaaab67662545dad2ffbcf212548c67a991b0c72 WHIRLPOOL 9447a3e542beced07636269c7c6612080ecd6d4edb2bb09459440fc8a517bb08dd385bde6c80d5cc61dbf90948b740aa80bdae6bcd79b8415ae3d4fdec4413cd
25 +DIST criu-2.5.tar.bz2 605226 SHA256 d2a9ffec0b659c3d3a71e1d473e95e36b208b2563f136ce8f471ff9600fcc51a SHA512 ccf942005ff3b2a567726ddb8aa44048c130f1adf6e2cbdf48e919043c84a4e1c03ad0ec34b44263e5764bea62807a2cc0fa1135b929ad3166fb9486c2880570 WHIRLPOOL 9896fe45d4516a73e6b7c403a044d25902ed4a9000b0a0a053ff9d52c053adfb58c8ce0225b9841bc7e2f38de6a8e4fc6d3073d878ea5b09b81cc89cba91de62
26
27 diff --git a/sys-process/criu/criu-2.5.ebuild b/sys-process/criu/criu-2.5.ebuild
28 new file mode 100644
29 index 00000000..3f163d5
30 --- /dev/null
31 +++ b/sys-process/criu/criu-2.5.ebuild
32 @@ -0,0 +1,96 @@
33 +# Copyright 1999-2016 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=6
38 +
39 +PYTHON_COMPAT=( python2_7 )
40 +
41 +inherit eutils toolchain-funcs linux-info flag-o-matic python-r1 python-utils-r1
42 +
43 +DESCRIPTION="utility to checkpoint/restore a process tree"
44 +HOMEPAGE="http://criu.org/"
45 +SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2"
46 +
47 +LICENSE="GPL-2"
48 +SLOT="0"
49 +KEYWORDS="~amd64 ~arm ~arm64"
50 +IUSE="python setproctitle"
51 +
52 +RDEPEND="dev-libs/protobuf-c
53 + dev-libs/libnl:3
54 + sys-libs/libcap
55 + python? ( ${PYTHON_DEPS} )
56 + setproctitle? ( dev-libs/libbsd )"
57 +DEPEND="${RDEPEND}
58 + app-text/asciidoc
59 + app-text/xmlto"
60 +RDEPEND="${RDEPEND}
61 + python? (
62 + dev-libs/protobuf[python,${PYTHON_USEDEP}]
63 + dev-python/ipaddr[${PYTHON_USEDEP}]
64 + )"
65 +
66 +CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER
67 + ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG"
68 +
69 +RESTRICT="test"
70 +
71 +PATCHES=(
72 + "${FILESDIR}"/2.2/${PN}-2.2-flags.patch
73 + "${FILESDIR}"/2.4/${PN}-2.4-makefile.patch
74 + "${FILESDIR}"/2.3/${PN}-2.3-no-git.patch
75 + "${FILESDIR}"/2.5/${PN}-2.5-automagic-libbsd.patch
76 + "${FILESDIR}"/2.0/${PN}-2.0-sysroot.patch
77 + "${FILESDIR}"/2.3/${PN}-2.3-aarch64.patch
78 +)
79 +
80 +criu_arch() {
81 + # criu infers the arch from $(uname -m). We never want this to happen.
82 + case ${ARCH} in
83 + amd64) echo "x86";;
84 + arm64) echo "aarch64";;
85 + *) echo "${ARCH}";;
86 + esac
87 +}
88 +
89 +src_compile() {
90 + RAW_LDFLAGS="$(raw-ldflags)" emake \
91 + CC="$(tc-getCC)" \
92 + LD="$(tc-getLD)" \
93 + OBJCOPY="$(tc-getOBJCOPY)" \
94 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
95 + ARCH="$(criu_arch)" \
96 + V=1 WERROR=0 DEBUG=0 \
97 + SETPROCTITLE=$(usex setproctitle) \
98 + PYCRIU=$(usex python) \
99 + all docs
100 +}
101 +
102 +src_test() {
103 + # root privileges are required to dump all necessary info
104 + if [[ ${EUID} -eq 0 ]] ; then
105 + emake -j1 CC="$(tc-getCC)" ARCH="$(criu_arch)" V=1 WERROR=0 test
106 + fi
107 +}
108 +
109 +install_crit() {
110 + "${PYTHON:-python}" ../scripts/crit-setup.py install --root="${D}" --prefix="${EPREFIX}/usr/"
111 +}
112 +
113 +src_install() {
114 + emake \
115 + ARCH="$(criu_arch)" \
116 + PREFIX="${EPREFIX}"/usr \
117 + LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
118 + DESTDIR="${D}" \
119 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
120 + install
121 +
122 + dodoc CREDITS README.md
123 +
124 + if use python ; then
125 + cd lib
126 + python_foreach_impl install_crit
127 + fi
128 +}
129
130 diff --git a/sys-process/criu/files/2.5/criu-2.5-automagic-libbsd.patch b/sys-process/criu/files/2.5/criu-2.5-automagic-libbsd.patch
131 new file mode 100644
132 index 00000000..de6509a
133 --- /dev/null
134 +++ b/sys-process/criu/files/2.5/criu-2.5-automagic-libbsd.patch
135 @@ -0,0 +1,17 @@
136 +diff --git a/criu/Makefile.config b/criu/Makefile.config
137 +index f531b3b..23a3b23 100644
138 +--- a/criu/Makefile.config
139 ++++ b/criu/Makefile.config
140 +@@ -2,10 +2,12 @@ include $(__nmk_dir)/utils.mk
141 + include $(__nmk_dir)msg.mk
142 + include $(SRC_DIR)/scripts/feature-tests.mak
143 +
144 ++ifeq ($(SETPROCTITLE),yes)
145 + ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
146 + LIBS += -lbsd
147 + FEATURE_DEFINES += -DCONFIG_HAS_LIBBSD
148 + endif
149 ++endif
150 +
151 + ifeq ($(call pkg-config-check,libselinux),y)
152 + LIBS += -lselinux