Gentoo Archives: gentoo-commits

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