Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/2.0/, sys-process/criu/
Date: Fri, 01 Sep 2017 21:57:36
Message-Id: 1504303047.b29089547c85046ff7e411853e077553b3b55f92.slyfox@gentoo
1 commit: b29089547c85046ff7e411853e077553b3b55f92
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 1 21:57:18 2017 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 1 21:57:27 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2908954
7
8 sys-process/criu: bump up to 3.4
9
10 Package-Manager: Portage-2.3.8, Repoman-2.3.3
11
12 sys-process/criu/Manifest | 1 +
13 sys-process/criu/criu-3.4.ebuild | 95 +++++++++++++++++++++++
14 sys-process/criu/files/2.0/criu-2.0-sysroot.patch | 8 +-
15 3 files changed, 97 insertions(+), 7 deletions(-)
16
17 diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
18 index 09eee815d90..3a5845f0c3c 100644
19 --- a/sys-process/criu/Manifest
20 +++ b/sys-process/criu/Manifest
21 @@ -4,3 +4,4 @@ DIST criu-2.11.tar.bz2 645048 SHA256 5f270222ba5e98b33aab7cef61363a11167fec96cf2
22 DIST criu-2.12.1.tar.bz2 646855 SHA256 33e4f575a533b66e0571fff0c2b6ced51612789fa3b944b841ec6fc79ed4a0a2 SHA512 7a168bc20665ed3ca9931e6f2fa6d58b87faee38eee30dcdda8dad041ffd90ea7e1bad17d4dcf5c5d8de563eacc64ecbd579b7f4b959a654182a688e94024ba2 WHIRLPOOL 9889ea1e37da4a4425aede6c0408ea8dd0f315d5575d76709f055dc5b054aba4ee96107fa2417ff4a9d4028f5e009b085ef6884ead4f10cc2263ddf06cd13308
23 DIST criu-2.12.tar.bz2 646770 SHA256 b707eee3410a833b2d5d7534557c7a21f800f10d8660966d1efdd6396f1a1e4b SHA512 e021772c5d42dd93fe0d6c10a7aa731b600871ba78772169323c661c59d00f4d78ceda3ddfbda76123947f6ff6d2c19e443bb73e018a649e7f3872b73d28763a WHIRLPOOL 19017b586cf5a490393c8b3b3d9ca98f6aa5442812cf4eb8bca45efa7f04c2360d7cbd46c40f1abf84ee6ba82ff2ecc6256f54d553259783a2ba4c36aa7dbaad
24 DIST criu-2.5.tar.bz2 605226 SHA256 d2a9ffec0b659c3d3a71e1d473e95e36b208b2563f136ce8f471ff9600fcc51a SHA512 ccf942005ff3b2a567726ddb8aa44048c130f1adf6e2cbdf48e919043c84a4e1c03ad0ec34b44263e5764bea62807a2cc0fa1135b929ad3166fb9486c2880570 WHIRLPOOL 9896fe45d4516a73e6b7c403a044d25902ed4a9000b0a0a053ff9d52c053adfb58c8ce0225b9841bc7e2f38de6a8e4fc6d3073d878ea5b09b81cc89cba91de62
25 +DIST criu-3.4.tar.bz2 701680 SHA256 876bf32b9351c0034ff8f7064a6e63487f6639aedec115356cc76c436fa437c2 SHA512 71fc700d19b46381873b2d0fa90e7fa253b00beb5e4e6065bbf510766acbcc14b35d58fa8073801112f897d2320b7decca1115fb6853d5fe64f3c52aa40a9f32 WHIRLPOOL 39be8e58635f21868f152a50f163875812d1325212b0c0c5a360152869e03358eb449b86700ee6f242cb890fcf5217c2aceaf3b2781e3b2d7c70ecc1a6c933df
26
27 diff --git a/sys-process/criu/criu-3.4.ebuild b/sys-process/criu/criu-3.4.ebuild
28 new file mode 100644
29 index 00000000000..982954a66c3
30 --- /dev/null
31 +++ b/sys-process/criu/criu-3.4.ebuild
32 @@ -0,0 +1,95 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +PYTHON_COMPAT=( python2_7 )
39 +
40 +inherit eutils toolchain-funcs linux-info flag-o-matic python-r1 python-utils-r1
41 +
42 +DESCRIPTION="utility to checkpoint/restore a process tree"
43 +HOMEPAGE="http://criu.org/"
44 +SRC_URI="http://download.openvz.org/criu/${P}.tar.bz2"
45 +
46 +LICENSE="GPL-2"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~arm64"
49 +IUSE="python setproctitle"
50 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
51 +
52 +RDEPEND="dev-libs/protobuf-c
53 + dev-libs/libnl:3
54 + net-libs/libnet:1.1
55 + sys-libs/libcap
56 + python? ( ${PYTHON_DEPS} )
57 + setproctitle? ( dev-libs/libbsd )"
58 +DEPEND="${RDEPEND}
59 + app-text/asciidoc
60 + app-text/xmlto"
61 +RDEPEND="${RDEPEND}
62 + python? (
63 + dev-libs/protobuf[python,${PYTHON_USEDEP}]
64 + dev-python/ipaddr[${PYTHON_USEDEP}]
65 + )"
66 +
67 +CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER
68 + ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG"
69 +
70 +RESTRICT="test"
71 +
72 +PATCHES=(
73 + "${FILESDIR}"/2.2/${PN}-2.2-flags.patch
74 + "${FILESDIR}"/2.3/${PN}-2.3-no-git.patch
75 + "${FILESDIR}"/${PN}-2.8-automagic-libbsd.patch
76 + "${FILESDIR}"/2.0/${PN}-2.0-sysroot.patch
77 +)
78 +
79 +criu_arch() {
80 + # criu infers the arch from $(uname -m). We never want this to happen.
81 + case ${ARCH} in
82 + amd64) echo "x86";;
83 + arm64) echo "aarch64";;
84 + *) echo "${ARCH}";;
85 + esac
86 +}
87 +
88 +src_compile() {
89 + RAW_LDFLAGS="$(raw-ldflags)" emake \
90 + CC="$(tc-getCC)" \
91 + LD="$(tc-getLD)" \
92 + OBJCOPY="$(tc-getOBJCOPY)" \
93 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
94 + ARCH="$(criu_arch)" \
95 + V=1 WERROR=0 DEBUG=0 \
96 + SETPROCTITLE=$(usex setproctitle) \
97 + PYCRIU=$(usex python) \
98 + all docs
99 +}
100 +
101 +src_test() {
102 + # root privileges are required to dump all necessary info
103 + if [[ ${EUID} -eq 0 ]] ; then
104 + emake -j1 CC="$(tc-getCC)" ARCH="$(criu_arch)" V=1 WERROR=0 test
105 + fi
106 +}
107 +
108 +install_crit() {
109 + "${PYTHON:-python}" ../scripts/crit-setup.py install --root="${D}" --prefix="${EPREFIX}/usr/"
110 +}
111 +
112 +src_install() {
113 + emake \
114 + ARCH="$(criu_arch)" \
115 + PREFIX="${EPREFIX}"/usr \
116 + LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
117 + DESTDIR="${D}" \
118 + LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
119 + install
120 +
121 + dodoc CREDITS README.md
122 +
123 + if use python ; then
124 + cd lib
125 + python_foreach_impl install_crit
126 + fi
127 +}
128
129 diff --git a/sys-process/criu/files/2.0/criu-2.0-sysroot.patch b/sys-process/criu/files/2.0/criu-2.0-sysroot.patch
130 index 333c564c19e..4dcb0fb2c95 100644
131 --- a/sys-process/criu/files/2.0/criu-2.0-sysroot.patch
132 +++ b/sys-process/criu/files/2.0/criu-2.0-sysroot.patch
133 @@ -4,12 +4,6 @@ Index: criu-2.0/criu/Makefile
134 ===================================================================
135 --- criu-2.0.orig/criu/Makefile
136 +++ criu-2.0/criu/Makefile
137 -@@ -51,7 +51,7 @@ ccflags-y += -iquote $(SRC_DIR)/criu/pi
138 - ccflags-y += -iquote $(SRC_DIR)/criu/$(ARCH_DIR)
139 - ccflags-y += -iquote $(SRC_DIR)/criu/$(ARCH_DIR)/include
140 - ccflags-y += -iquote $(SRC_DIR)/
141 +@@ -51,1 +51,1 @@ ccflags-y += -iquote $(SRC_DIR)/criu/pi
142 -ccflags-y += -I/usr/include/libnl3
143 +ccflags-y += -I${SYSROOT}/usr/include/libnl3
144 -
145 - export ccflags-y
146 -