Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/ganeti/
Date: Mon, 11 Jul 2016 22:50:17
Message-Id: 1468277400.bb887914ca73cb1cfa062d2e60f862fd66fb921c.robbat2@gentoo
1 commit: bb887914ca73cb1cfa062d2e60f862fd66fb921c
2 Author: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 11 22:49:48 2016 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 11 22:50:00 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb887914
7
8 app-emulation/ganeti: add Debian patch series, including haskell dep tweaks
9
10 Package-Manager: portage-2.2.28
11
12 app-emulation/ganeti/Manifest | 1 +
13 app-emulation/ganeti/ganeti-2.15.2-r5.ebuild | 324 +++++++++++++++++++++++++++
14 2 files changed, 325 insertions(+)
15
16 diff --git a/app-emulation/ganeti/Manifest b/app-emulation/ganeti/Manifest
17 index 1f02394..7936b35 100644
18 --- a/app-emulation/ganeti/Manifest
19 +++ b/app-emulation/ganeti/Manifest
20 @@ -3,3 +3,4 @@ DIST ganeti-2.12.3.tar.gz 4373350 SHA256 e66fc4c3dde1e90d85749ceb5c1c90bd6eaed1d
21 DIST ganeti-2.13.0.tar.gz 4573781 SHA256 30ccfa971b15d49b45a4bfb75bb9631c0993adbd7feac0562c11305ae8c13753 SHA512 bd847ae7e12cb978fae59a458a4d0e33fee470c51748964453b5d0ea6615e6d959519c84922e92229e942a88f1ad88a6d1cb655f58391d033d5f5dfc249ef941 WHIRLPOOL 925159e36fde1cd36214b4fe54b4e06958cc8bd3ded28e32bc4f99842aafcb4c53c701c8a651421559dc13b4d18ae2cc11f1b9d1d2da1e862561cca81d009bda
22 DIST ganeti-2.14.1.tar.gz 4655994 SHA256 ae90c69f0c02d2ee558363a1c021dfaaaf4ccb59b662a72fa6485b406766e133 SHA512 2d3927bf888ea56df6b6275a869979c53d4b01e2e527e2dddea2a4835c90e85831e9e7691162999e5c58e9d214e03a37690e84f8fde9f1a0631897b06db348c3 WHIRLPOOL 3554161afd646af41e587fffa9dc85788f6ef13102121c636802946b64161cdeaeea326103171b70577b06635eebf6988b2f3942024a944612642aefd92b89bb
23 DIST ganeti-2.15.2.tar.gz 4723007 SHA256 1e09d29cae5020142d20a96165b23f3b62b5511b875051b6374d09c4c13c0b83 SHA512 e0707aa535857779622e0eb18cccb89bc34fe4acf373628c30524e3f7e572c4b3d628946ad219149c14615d6471c4d72dbd0c6e3e1855a9f3644b4605544df85 WHIRLPOOL a09a13d64e7c6fa7823072d767fa6495cd814bb22e7a5fc708c8b339103a41da4e45f38574a2c665fe89c8774f220a2715c3aba180eb674eae603730dd2d25ad
24 +DIST ganeti_2.15.2-4.debian.tar.xz 42440 SHA256 d2b907ad54b6fad8bc9c023c718c6f1a35cbc487fa065291f465f1e518df6d02 SHA512 e405f54996236fe5166c89190c529256899458594d30e4daee85a9381400e618bc8cc578c43a166ed6d868ed3c5118e4bddc5103b596db89a504de3ba3a1f403 WHIRLPOOL 16acab23919541bfd1748ff9f5e243c483ed4b5b10bcd5c233821c06968671ce0fcdab86ec95a30f6162a308df1eca16424e94b80ea095dfc90931a4be930b26
25
26 diff --git a/app-emulation/ganeti/ganeti-2.15.2-r5.ebuild b/app-emulation/ganeti/ganeti-2.15.2-r5.ebuild
27 new file mode 100644
28 index 0000000..74f768e
29 --- /dev/null
30 +++ b/app-emulation/ganeti/ganeti-2.15.2-r5.ebuild
31 @@ -0,0 +1,324 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI=6
37 +PYTHON_COMPAT=(python2_7)
38 +PYTHON_REQ_USE="ipv6(+)?"
39 +
40 +inherit user autotools bash-completion-r1 python-single-r1 versionator
41 +
42 +MY_PV="${PV/_rc/~rc}"
43 +MY_PV="${MY_PV/_beta/~beta}"
44 +MY_P="${PN}-${MY_PV}"
45 +SERIES="$(get_version_component_range 1-2)"
46 +
47 +if [[ ${PV} =~ [9]{4,} ]] ; then
48 + EGIT_REPO_URI="git://git.ganeti.org/ganeti.git"
49 + inherit git-2
50 + KEYWORDS=""
51 + PATCHES=()
52 +else
53 + DEBIAN_PATCH=4
54 + SRC_URI="
55 + http://downloads.ganeti.org/releases/${SERIES}/${MY_P}.tar.gz
56 + mirror://ubuntu/pool/universe/${PN:0:1}/${PN}/${PN}_${PV}-${DEBIAN_PATCH}.debian.tar.xz
57 + "
58 + KEYWORDS="~amd64 ~x86"
59 + PATCHES=(
60 + "${WORKDIR}"/debian/patches/do-not-backup-export-dir.patch
61 + "${WORKDIR}"/debian/patches/Makefile.am-use-C.UTF-8
62 + "${WORKDIR}"/debian/patches/relax-deps
63 + "${WORKDIR}"/debian/patches/ghc-7.10-compatibility.patch
64 + "${WORKDIR}"/debian/patches/zlib-0.6-compatibility
65 + "${WORKDIR}"/debian/patches/fix_FTBFS_with_sphinx-1.3.5
66 + "${WORKDIR}"/debian/patches/fix_ftbfs_with_sphinx_1.4
67 + )
68 +fi
69 +
70 +DESCRIPTION="Ganeti is a virtual server management software tool"
71 +HOMEPAGE="http://www.ganeti.org/"
72 +
73 +LICENSE="GPL-2"
74 +SLOT="0"
75 +IUSE="drbd haskell-daemons htools ipv6 kvm lxc monitoring multiple-users rbd syslog test xen"
76 +
77 +REQUIRED_USE="|| ( kvm xen lxc )
78 + test? ( ipv6 )
79 + kvm? ( || ( amd64 x86 ) )
80 + ${PYTHON_REQUIRED_USE}"
81 +
82 +USER_PREFIX="${GANETI_USER_PREFIX:-"gnt-"}"
83 +GROUP_PREFIX="${GANETI_GROUP_PREFIX:-"${USER_PREFIX}"}"
84 +
85 +DEPEND="
86 + dev-libs/openssl:0
87 + dev-python/paramiko[${PYTHON_USEDEP}]
88 + dev-python/pyopenssl[${PYTHON_USEDEP}]
89 + dev-python/simplejson[${PYTHON_USEDEP}]
90 + dev-python/pyparsing[${PYTHON_USEDEP}]
91 + dev-python/pyinotify[${PYTHON_USEDEP}]
92 + dev-python/pycurl[${PYTHON_USEDEP}]
93 + dev-python/ipaddr[${PYTHON_USEDEP}]
94 + dev-python/bitarray[${PYTHON_USEDEP}]
95 + dev-python/docutils[${PYTHON_USEDEP}]
96 + net-analyzer/arping
97 + net-analyzer/fping
98 + net-misc/bridge-utils
99 + net-misc/curl[ssl]
100 + net-misc/openssh
101 + net-misc/socat
102 + sys-apps/iproute2
103 + sys-fs/lvm2
104 + >=sys-apps/baselayout-2.0
105 + dev-lang/ghc:0=
106 + dev-haskell/cabal:0=
107 + dev-haskell/cabal-install:0=
108 + >=dev-haskell/mtl-2.1.1:0=
109 + >=dev-haskell/old-time-1.1.0.0:0=
110 + >=dev-haskell/random-1.0.1.1:0=
111 + haskell-daemons? ( >=dev-haskell/text-0.11.1.13:0= )
112 + >=dev-haskell/transformers-0.3.0.0:0=
113 +
114 + >=dev-haskell/attoparsec-0.10.1.1:0=
115 + <dev-haskell/attoparsec-0.14:0
116 + >=dev-haskell/base64-bytestring-1.0.0.1:0=
117 + <dev-haskell/base64-bytestring-1.1:0=
118 + >=dev-haskell/crypto-4.2.4:0=
119 + <dev-haskell/crypto-4.3:0=
120 + >=dev-haskell/curl-1.3.7:0=
121 + <dev-haskell/curl-1.4:0=
122 + >=dev-haskell/hinotify-0.3.2:0=
123 + <dev-haskell/hinotify-0.4:0=
124 + >=dev-haskell/hslogger-1.1.4:0=
125 + <dev-haskell/hslogger-1.3:0=
126 + >=dev-haskell/json-0.5:0=
127 + >=dev-haskell/lens-3.10:0=
128 + >=dev-haskell/lifted-base-0.2.0.3:0=
129 + <dev-haskell/lifted-base-0.3:0=
130 + >=dev-haskell/monad-control-0.3.1.3:0=
131 + <dev-haskell/monad-control-1.1:0=
132 + >=dev-haskell/network-2.3.0.13:0=
133 + <dev-haskell/network-2.7:0=
134 + >=dev-haskell/parallel-3.2.0.2:3=
135 + <dev-haskell/parallel-3.3:3=
136 + >=dev-haskell/temporary-1.1.2.3:0=
137 + <dev-haskell/temporary-1.3:0=
138 + >=dev-haskell/regex-pcre-0.94.2:0=
139 + <dev-haskell/regex-pcre-0.95:0=
140 + >=dev-haskell/transformers-base-0.4.1:0=
141 + <dev-haskell/transformers-base-0.5:0=
142 + >=dev-haskell/utf8-string-0.3.7:0=
143 + >=dev-haskell/zlib-0.5.3.3:0=
144 + <dev-haskell/zlib-0.7:0=
145 +
146 + >=dev-haskell/psqueue-1.1:0=
147 + <dev-haskell/psqueue-1.2:0=
148 + >=dev-haskell/snap-core-0.8.1:0=
149 + <dev-haskell/snap-core-0.10:0=
150 + >=dev-haskell/snap-server-0.8.1:0=
151 + <dev-haskell/snap-server-0.10:0=
152 + >=dev-haskell/case-insensitive-0.4.0.1
153 +
154 + dev-haskell/vector:0=
155 + <dev-haskell/semigroupoids-4.1:0=
156 + <dev-haskell/contravariant-0.6
157 + <dev-haskell/transformers-compat-0.4[three]
158 + xen? ( >=app-emulation/xen-3.0 )
159 + kvm? (
160 + dev-python/psutil
161 + app-emulation/qemu
162 + )
163 + lxc? ( app-emulation/lxc )
164 + drbd? (
165 + || (
166 + <sys-cluster/drbd-8.5
167 + sys-cluster/drbd-utils
168 + )
169 + )
170 + rbd? ( sys-cluster/ceph )
171 + ipv6? ( net-misc/ndisc6 )
172 + ${PYTHON_DEPS}"
173 +RDEPEND="${DEPEND}
174 + !app-emulation/ganeti-htools"
175 +DEPEND+="
176 + sys-devel/m4
177 + app-text/pandoc
178 + <dev-python/sphinx-1.3[${PYTHON_USEDEP}]
179 + media-fonts/urw-fonts
180 + media-gfx/graphviz
181 + >=dev-haskell/test-framework-0.6:0=
182 + <dev-haskell/test-framework-0.9:0=
183 + >=dev-haskell/test-framework-hunit-0.2.7:0=
184 + <dev-haskell/test-framework-hunit-0.4:0=
185 + >=dev-haskell/test-framework-quickcheck2-0.2.12.1:0=
186 + <dev-haskell/test-framework-quickcheck2-0.4:0=
187 + test? (
188 + dev-python/mock
189 + dev-python/pyyaml
190 + dev-haskell/haddock:0=
191 + >=dev-haskell/hunit-1.2.4.2:0=
192 + <dev-haskell/hunit-1.3:0=
193 + >=dev-haskell/quickcheck-2.4.2:2=
194 + <dev-haskell/quickcheck-2.8:2=
195 + sys-apps/fakeroot
196 + net-misc/socat
197 + dev-util/shelltestrunner
198 + )"
199 +
200 +PATCHES+=(
201 + "${FILESDIR}/${PN}-2.12-start-stop-daemon-args.patch"
202 + "${FILESDIR}/${PN}-2.11-add-pgrep.patch"
203 + "${FILESDIR}/${PN}-2.15-daemon-util.patch"
204 + "${FILESDIR}/${PN}-2.9-disable-root-tests.patch"
205 + "${FILESDIR}/${PN}-2.9-skip-cli-test.patch"
206 + "${FILESDIR}/${PN}-2.10-rundir.patch"
207 + "${FILESDIR}/${PN}-2.12-qemu-enable-kvm.patch"
208 + "${FILESDIR}/${PN}-2.11-tests.patch"
209 + "${FILESDIR}/${PN}-lockdir.patch"
210 + "${FILESDIR}/${PN}-2.11-dont-nest-libdir.patch"
211 + "${FILESDIR}/${PN}-2.11-dont-print-man-help.patch"
212 + "${FILESDIR}/${PN}-2.11-daemon-util-tests.patch"
213 + "${FILESDIR}/${PN}-2.13-process_unittest.patch"
214 + "${FILESDIR}/${PN}-2.15-python-mock.patch"
215 + "${FILESDIR}/${PN}-2.15.2-remove-sandbox-failing-tests.patch"
216 + "${FILESDIR}/${PN}-2.15-noded-must-run-as-root.patch"
217 + "${FILESDIR}/${PN}-2.15-kvmd-run-as-daemon-user.patch"
218 + "${FILESDIR}/${PN}-2.15-dont-invert-return-values-for-man-warnings.patch"
219 +)
220 +
221 +S="${WORKDIR}/${MY_P}"
222 +
223 +QA_WX_LOAD="
224 + usr/lib*/${PN}/${SERIES}/usr/sbin/ganeti-*d
225 + usr/lib*/${PN}/${SERIES}/usr/bin/htools
226 +"
227 +
228 +pkg_setup () {
229 + local user
230 + python-single-r1_pkg_setup
231 +
232 + if use multiple-users; then
233 + for user in gnt-{masterd,confd,luxid,rapi,daemons,admin}; do
234 + enewgroup ${user}
235 + enewuser ${user} -1 -1 -1 ${user}
236 + done
237 + fi
238 +}
239 +
240 +src_prepare() {
241 + local testfile
242 + eapply "${PATCHES[@]}"
243 +
244 + # not sure why these tests are failing
245 + # should remove this on next version bump if possible
246 + for testfile in test/py/import-export_unittest.bash; do
247 + printf '#!/bin/bash\ntrue\n' > "${testfile}"
248 + done
249 +
250 + # take the sledgehammer approach to bug #526270
251 + grep -lr '/bin/sh' "${S}" | xargs -r -- sed -i 's:/bin/sh:/bin/bash:g'
252 +
253 + eapply_user
254 +
255 + [[ ${PV} =~ [9]{4,} ]] && ./autogen.sh
256 + rm autotools/missing
257 + eautoreconf
258 +}
259 +
260 +src_configure () {
261 + # this is kind of a hack to work around the removal of the qemu-kvm wrapper
262 + local kvm_arch
263 +
264 + if use amd64; then
265 + kvm_arch=x86_64
266 + elif use x86; then
267 + kvm_arch=i386
268 + elif use kvm; then
269 + die "Could not determine qemu system to use for kvm"
270 + fi
271 +
272 + econf --localstatedir=/var \
273 + --sharedstatedir=/var \
274 + --disable-symlinks \
275 + --with-ssh-initscript=/etc/init.d/sshd \
276 + --with-export-dir=/var/lib/ganeti-storage/export \
277 + --with-os-search-path=/usr/share/${PN}/os \
278 + $(use_enable test haskell-tests) \
279 + $(usex multiple-users "--with-default-user=" "" "gnt-daemons" "") \
280 + $(usex multiple-users "--with-user-prefix=" "" "${USER_PREFIX}" "") \
281 + $(usex multiple-users "--with-default-group=" "" "gnt-daemons" "") \
282 + $(usex multiple-users "--with-group-prefix=" "" "${GROUP_PREFIX}" "") \
283 + $(use_enable syslog) \
284 + $(use_enable monitoring) \
285 + $(usex kvm '--with-kvm-path=' '' "/usr/bin/qemu-system-${kvm_arch}" '') \
286 + $(usex haskell-daemons "--enable-confd=haskell" '' '' '')
287 +}
288 +
289 +src_install () {
290 + emake V=1 DESTDIR="${D}" install
291 +
292 + newinitd "${FILESDIR}"/ganeti.initd-r3 ${PN}
293 + newconfd "${FILESDIR}"/ganeti.confd-r2 ${PN}
294 +
295 + if use kvm; then
296 + newinitd "${FILESDIR}"/ganeti-kvm-poweroff.initd ganeti-kvm-poweroff
297 + newconfd "${FILESDIR}"/ganeti-kvm-poweroff.confd ganeti-kvm-poweroff
298 + fi
299 +
300 + # ganeti installs it's own docs in a generic location
301 + rm -rf "${D}"/{usr/share/doc/${PN},run}
302 +
303 + sed -i "s:/usr/$(get_libdir)/${PN}/tools/burnin:burnin:" doc/examples/bash_completion
304 + newbashcomp doc/examples/bash_completion gnt-instance
305 + bashcomp_alias gnt-instance burnin ganeti-{cleaner,confd} \
306 + h{space,check,scan,info,ail,arep,roller,squeeze,bal} \
307 + gnt-{os,job,filter,debug,storage,group,node,network,backup,cluster}
308 +
309 + use monitoring && bashcomp_alias gnt-instance mon-collector
310 +
311 + dodoc INSTALL UPGRADE NEWS README doc/*.rst
312 +
313 + docinto html
314 + dodoc -r doc/html/* doc/css/*.css
315 +
316 + docinto examples
317 + dodoc doc/examples/{ganeti.cron,gnt-config-backup} doc/examples/*.ocf
318 +
319 + docinto examples/hooks
320 + dodoc doc/examples/hooks/{ipsec,ethers}
321 +
322 + insinto /etc/cron.d
323 + newins doc/examples/ganeti.cron ${PN}
324 +
325 + insinto /etc/logrotate.d
326 + newins doc/examples/ganeti.logrotate ${PN}
327 +
328 + # need to dodir rather than keepdir here (bug #552482)
329 + dodir /var/lib/${PN}
330 +
331 + keepdir /var/log/${PN}/
332 + keepdir /usr/share/${PN}/${SERIES}/os/
333 + keepdir /var/lib/ganeti-storage/{export,file,shared}/
334 +
335 + dosym ${SERIES} "/usr/share/${PN}/default"
336 + dosym ${SERIES} "/usr/$(get_libdir)/${PN}/default"
337 +
338 + python_fix_shebang "${ED}" "${D}"/usr/"$(get_libdir)"/${PN}/${SERIES}
339 +}
340 +
341 +pkg_postinst() {
342 + if use multiple-users; then
343 + elog "You have enable multiple user support, the users for this must"
344 + elog "be created. You can use the provided tool for this, which is"
345 + elog "located at:"
346 + elog " /usr/$(get_libdir)/${PN}/tools/users-setup"
347 + fi
348 +}
349 +
350 +src_test () {
351 + PATH="${S}/scripts:${S}/src:${PATH}" \
352 + TMPDIR="/tmp" \
353 + GANETI_MASTER="$(hostname -f)" \
354 + emake check || die "emake check failed"
355 +}