1 |
commit: 1a07768ab93de7b1744d73304c5c1d92d6ff7d6d |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 8 00:28:48 2018 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 8 00:29:05 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a07768a |
7 |
|
8 |
app-emulation/ganeti: Revbump, update debian patches, update deps |
9 |
|
10 |
Package-Manager: Portage-2.3.49, Repoman-2.3.10 |
11 |
|
12 |
app-emulation/ganeti/Manifest | 1 + |
13 |
.../ganeti/files/ganeti-2.15.2-bdev_py.patch | 16 + |
14 |
app-emulation/ganeti/ganeti-2.15.2-r7.ebuild | 365 +++++++++++++++++++++ |
15 |
3 files changed, 382 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/ganeti/Manifest b/app-emulation/ganeti/Manifest |
18 |
index 88ce5ff98b4..df3d85b7bc5 100644 |
19 |
--- a/app-emulation/ganeti/Manifest |
20 |
+++ b/app-emulation/ganeti/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST ganeti-2.15.2.tar.gz 4723007 BLAKE2B d49d2ed9df515514a99d42303799e5ffc751eb8e6b397f86174cb3d48ec846fd3d146737240eea9ec0ce6fd9d07e04a27831a45a4354d3d49597b9f5cff33d7b SHA512 e0707aa535857779622e0eb18cccb89bc34fe4acf373628c30524e3f7e572c4b3d628946ad219149c14615d6471c4d72dbd0c6e3e1855a9f3644b4605544df85 |
23 |
+DIST ganeti-2.15_2.15.2-11.debian.tar.xz 67652 BLAKE2B d10f83a59a1c2d05fa6704dfdc46867f0e3eed276086de9ad2e86def1e7894012b89f3f9c111076c37ef37b857967e4bae5cf769eaabf5907b3a42bc806b4472 SHA512 1c992b9842f1a8492eeaaab8950939c96cc03abf679234211753b92f4753278b086a0a77e2e32b912d4a69635c11e8305d350cda8285734d706cce741d897aa3 |
24 |
DIST ganeti-2.16.0~rc1.tar.gz 4794934 BLAKE2B 867d7d48e98d4490db8279b83b44006e0afc1a421592d523db2d04b4b04636090686773ef890c89df41f0311cbf3c4d5a2c314c39c4429f50b07a7a6d1a9616f SHA512 a4bed40e48ecd8ee1f3f8137faf28aea38ffb8955f48bbd233be17660035679fa27d0ef6f8fe20507d34ca9e1dd594e564c9c53412364b6cc05dc8ed2f5602be |
25 |
DIST ganeti-2.17.0~beta1.tar.gz 4880091 BLAKE2B bd094ac421b8b49abcd7643641aa4c2d62aa2f8a4ab55289711cef8c47cc32634bf06b99adbf9383de3945766112a1838d2191dfb51013dc4fba81676e264e64 SHA512 d836444ea5696c9689ee0fae56192720ef79b2a4a8962c031abacc7ef02ebbb9e9cdadd15aa5d315c2d3da6cbe5043b6c22b9ed94fd13883b5dfa23e08a2867e |
26 |
DIST ganeti_2.15.2-4.debian.tar.xz 42440 BLAKE2B 5c329baa90bd801a3e4b550da0a4c8bb59f3d17801ff0d66a35ae0383f34a5c1cc7f3d6d67a5e07157085290019b22c6b5349224ed43b5ec40fbdc37ded77e88 SHA512 e405f54996236fe5166c89190c529256899458594d30e4daee85a9381400e618bc8cc578c43a166ed6d868ed3c5118e4bddc5103b596db89a504de3ba3a1f403 |
27 |
|
28 |
diff --git a/app-emulation/ganeti/files/ganeti-2.15.2-bdev_py.patch b/app-emulation/ganeti/files/ganeti-2.15.2-bdev_py.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..a1fea166580 |
31 |
--- /dev/null |
32 |
+++ b/app-emulation/ganeti/files/ganeti-2.15.2-bdev_py.patch |
33 |
@@ -0,0 +1,16 @@ |
34 |
+--- a/lib/storage/bdev.py 2018-09-06 19:20:03.970318746 +0000 |
35 |
++++ b/lib/storage/bdev.py 2018-09-06 19:18:59.799346241 +0000 |
36 |
+@@ -413,6 +413,16 @@ |
37 |
+ if not self.minor and not self.Attach(): |
38 |
+ # the LV does not exist |
39 |
+ return |
40 |
++ |
41 |
++ import glob |
42 |
++ |
43 |
++ for partdev in glob.glob("/dev/mapper/%s-%sp*" % (self._vg_name, self._lv_name.replace("-", "--"))): |
44 |
++ result = utils.RunCmd(["dmsetup", "remove", partdev]) |
45 |
++ |
46 |
++ if result.failed: |
47 |
++ base.ThrowError("Can't dmsetup remove %s: %s-%s", |
48 |
++ partdev, result.fail_reason, result.output) |
49 |
++ |
50 |
|
51 |
diff --git a/app-emulation/ganeti/ganeti-2.15.2-r7.ebuild b/app-emulation/ganeti/ganeti-2.15.2-r7.ebuild |
52 |
new file mode 100644 |
53 |
index 00000000000..22e58cde08e |
54 |
--- /dev/null |
55 |
+++ b/app-emulation/ganeti/ganeti-2.15.2-r7.ebuild |
56 |
@@ -0,0 +1,365 @@ |
57 |
+# Copyright 1999-2018 Gentoo Foundation |
58 |
+# Distributed under the terms of the GNU General Public License v2 |
59 |
+ |
60 |
+EAPI=7 |
61 |
+PYTHON_COMPAT=(python2_7) |
62 |
+PYTHON_REQ_USE="ipv6(+)?" |
63 |
+ |
64 |
+inherit user autotools bash-completion-r1 python-single-r1 |
65 |
+ |
66 |
+MY_PV="${PV/_rc/~rc}" |
67 |
+MY_PV="${MY_PV/_beta/~beta}" |
68 |
+MY_P="${PN}-${MY_PV}" |
69 |
+SERIES="$(ver_cut 1-2)" |
70 |
+ |
71 |
+DEBIAN_PATCH=11 |
72 |
+SRC_URI=" |
73 |
+ http://downloads.ganeti.org/releases/${SERIES}/${MY_P}.tar.gz |
74 |
+ mirror://debian/pool/main/g/ganeti-${SERIES}/ganeti-${SERIES}_${PV}-${DEBIAN_PATCH}.debian.tar.xz |
75 |
+" |
76 |
+KEYWORDS="~amd64 ~x86" |
77 |
+PATCHES=( |
78 |
+ "${WORKDIR}"/debian/patches/do-not-backup-export-dir.patch |
79 |
+ "${WORKDIR}"/debian/patches/Makefile.am-use-C.UTF-8 |
80 |
+ "${WORKDIR}"/debian/patches/relax-deps |
81 |
+ "${WORKDIR}"/debian/patches/zlib-0.6-compatibility |
82 |
+ "${WORKDIR}"/debian/patches/fix_FTBFS_with_sphinx-1.3.5 |
83 |
+ "${WORKDIR}"/debian/patches/fix_ftbfs_with_sphinx_1.4 |
84 |
+ "${WORKDIR}"/debian/patches/use-proper-cabal-dev.patch |
85 |
+ "${WORKDIR}"/debian/patches/0001-Drop-dependency-on-MonadCatchIO-transformers.patch |
86 |
+ "${WORKDIR}"/debian/patches/0001-GHC-8-support.patch |
87 |
+ "${WORKDIR}"/debian/patches/ghc8-fixes |
88 |
+ "${WORKDIR}"/debian/patches/snap-server-1.0-compat |
89 |
+ "${WORKDIR}"/debian/patches/non-DSA-SSH-key-support.patch |
90 |
+ "${WORKDIR}"/debian/patches/fix-ssh-key-renewal-on-single-node-clusters.patch |
91 |
+ "${WORKDIR}"/debian/patches/set-defaults-for-ssh-type-bits.patch |
92 |
+ "${WORKDIR}"/debian/patches/use-hv-class-to-check-for-migration.patch |
93 |
+ "${WORKDIR}"/debian/patches/do-not-specify-socat-ssl-method.patch |
94 |
+ "${WORKDIR}"/debian/patches/fix-ftbfs-with-sphinx-1.5.patch |
95 |
+ "${WORKDIR}"/debian/patches/fix-failover-from-dead-node.patch |
96 |
+ "${WORKDIR}"/debian/patches/fix-cpu-affinity.patch |
97 |
+ "${WORKDIR}"/debian/patches/fix-fcntl-i386.patch |
98 |
+ "${WORKDIR}"/debian/patches/fix-ovf-test-path.patch |
99 |
+ "${WORKDIR}"/debian/patches/fix-qa-ssconf-race.patch |
100 |
+ "${WORKDIR}"/debian/patches/relax-sphinx-version-check.patch |
101 |
+ #"${WORKDIR}"/debian/patches/THH-2.12.patch |
102 |
+ "${WORKDIR}"/debian/patches/sphinx-1.7.patch |
103 |
+ "${WORKDIR}"/debian/patches/ca-use-sha256-md.patch |
104 |
+ "${WORKDIR}"/debian/patches/impexpd-fix-certificate-verification-with-new-socat.patch |
105 |
+ "${WORKDIR}"/debian/patches/impexpd-fix-certificate-verification-with-new-socat-2.patch |
106 |
+) |
107 |
+ |
108 |
+DESCRIPTION="Ganeti is a virtual server management software tool" |
109 |
+HOMEPAGE="http://www.ganeti.org/" |
110 |
+ |
111 |
+LICENSE="GPL-2" |
112 |
+SLOT="0" |
113 |
+IUSE="drbd experimental haskell-daemons htools ipv6 kvm lxc monitoring multiple-users rbd syslog test xen restricted-commands" |
114 |
+ |
115 |
+REQUIRED_USE="|| ( kvm xen lxc ) |
116 |
+ test? ( ipv6 ) |
117 |
+ kvm? ( || ( amd64 x86 ) ) |
118 |
+ ${PYTHON_REQUIRED_USE}" |
119 |
+ |
120 |
+USER_PREFIX="${GANETI_USER_PREFIX:-"gnt-"}" |
121 |
+GROUP_PREFIX="${GANETI_GROUP_PREFIX:-"${USER_PREFIX}"}" |
122 |
+ |
123 |
+DEPEND=" |
124 |
+ dev-libs/openssl:0 |
125 |
+ dev-python/paramiko[${PYTHON_USEDEP}] |
126 |
+ dev-python/pyopenssl[${PYTHON_USEDEP}] |
127 |
+ dev-python/simplejson[${PYTHON_USEDEP}] |
128 |
+ dev-python/pyparsing[${PYTHON_USEDEP}] |
129 |
+ dev-python/pyinotify[${PYTHON_USEDEP}] |
130 |
+ dev-python/pycurl[${PYTHON_USEDEP}] |
131 |
+ dev-python/ipaddr[${PYTHON_USEDEP}] |
132 |
+ dev-python/bitarray[${PYTHON_USEDEP}] |
133 |
+ dev-python/docutils[${PYTHON_USEDEP}] |
134 |
+ dev-python/fdsend[${PYTHON_USEDEP}] |
135 |
+ || ( |
136 |
+ net-misc/iputils[arping] |
137 |
+ net-analyzer/arping |
138 |
+ ) |
139 |
+ net-analyzer/fping |
140 |
+ net-misc/bridge-utils |
141 |
+ net-misc/curl[ssl] |
142 |
+ net-misc/openssh |
143 |
+ net-misc/socat |
144 |
+ sys-apps/iproute2 |
145 |
+ >=sys-fs/lvm2-2.02.181 |
146 |
+ >=sys-apps/baselayout-2.0 |
147 |
+ >=dev-lang/ghc-8.0:0= |
148 |
+ <dev-lang/ghc-8.1:0= |
149 |
+ dev-haskell/cabal:0= |
150 |
+ dev-haskell/cabal-install:0= |
151 |
+ !<app-emulation/ganeti-instance-image-0.6-r1 |
152 |
+ >=dev-haskell/mtl-2.1.1:0= |
153 |
+ >=dev-haskell/old-time-1.1.0.0:0= |
154 |
+ >=dev-haskell/random-1.0.1.1:0= |
155 |
+ haskell-daemons? ( >=dev-haskell/text-0.11.1.13:0= ) |
156 |
+ >=dev-haskell/transformers-0.3.0.0:0= |
157 |
+ |
158 |
+ >=dev-haskell/attoparsec-0.10.1.1:0= |
159 |
+ <dev-haskell/attoparsec-0.14:0 |
160 |
+ >=dev-haskell/base64-bytestring-1.0.0.1:0= |
161 |
+ <dev-haskell/base64-bytestring-1.1:0= |
162 |
+ >=dev-haskell/crypto-4.2.4:0= |
163 |
+ <dev-haskell/crypto-4.3:0= |
164 |
+ >=dev-haskell/curl-1.3.7:0= |
165 |
+ <dev-haskell/curl-1.4:0= |
166 |
+ >=dev-haskell/hinotify-0.3.2:0= |
167 |
+ <dev-haskell/hinotify-0.4:0= |
168 |
+ >=dev-haskell/hslogger-1.1.4:0= |
169 |
+ <dev-haskell/hslogger-1.3:0= |
170 |
+ >=dev-haskell/json-0.5:0= |
171 |
+ >=dev-haskell/lens-3.10:0= |
172 |
+ >=dev-haskell/lifted-base-0.2.0.3:0= |
173 |
+ <dev-haskell/lifted-base-0.3:0= |
174 |
+ >=dev-haskell/monad-control-1.0.1.0:0= |
175 |
+ <dev-haskell/monad-control-1.0.2:0= |
176 |
+ >=dev-haskell/network-2.3.0.13:0= |
177 |
+ <dev-haskell/network-2.7:0= |
178 |
+ >=dev-haskell/parallel-3.2.0.2:3= |
179 |
+ <dev-haskell/parallel-3.3:3= |
180 |
+ >=dev-haskell/temporary-1.1.2.3:0= |
181 |
+ <dev-haskell/temporary-1.3:0= |
182 |
+ >=dev-haskell/regex-pcre-0.94.2:0= |
183 |
+ <dev-haskell/regex-pcre-0.95:0= |
184 |
+ >=dev-haskell/transformers-base-0.4:0= |
185 |
+ <dev-haskell/transformers-base-0.5:0= |
186 |
+ >=dev-haskell/utf8-string-0.3.7:0= |
187 |
+ >=dev-haskell/zlib-0.5.3.3:0= |
188 |
+ <dev-haskell/zlib-0.7:0= |
189 |
+ |
190 |
+ >=dev-haskell/psqueue-1.1:0= |
191 |
+ <dev-haskell/psqueue-1.2:0= |
192 |
+ >=dev-haskell/snap-core-1.0.1:0= |
193 |
+ <dev-haskell/snap-core-1.1:0= |
194 |
+ >=dev-haskell/snap-server-1.0.1:0= |
195 |
+ <dev-haskell/snap-server-1.1:0= |
196 |
+ >=dev-haskell/case-insensitive-0.4.0.1 |
197 |
+ |
198 |
+ dev-haskell/vector:0= |
199 |
+ xen? ( >=app-emulation/xen-3.0 ) |
200 |
+ kvm? ( |
201 |
+ dev-python/psutil |
202 |
+ app-emulation/qemu |
203 |
+ ) |
204 |
+ lxc? ( app-emulation/lxc ) |
205 |
+ drbd? ( sys-cluster/drbd-utils ) |
206 |
+ rbd? ( sys-cluster/ceph ) |
207 |
+ ipv6? ( net-misc/ndisc6 ) |
208 |
+ ${PYTHON_DEPS}" |
209 |
+RDEPEND="${DEPEND} |
210 |
+ !app-emulation/ganeti-htools" |
211 |
+DEPEND+=" |
212 |
+ sys-devel/m4 |
213 |
+ app-text/pandoc |
214 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
215 |
+ media-fonts/urw-fonts |
216 |
+ media-gfx/graphviz |
217 |
+ >=dev-haskell/test-framework-0.6:0= |
218 |
+ <dev-haskell/test-framework-0.9:0= |
219 |
+ >=dev-haskell/test-framework-hunit-0.2.7:0= |
220 |
+ <dev-haskell/test-framework-hunit-0.4:0= |
221 |
+ >=dev-haskell/test-framework-quickcheck2-0.2.12.1:0= |
222 |
+ <dev-haskell/test-framework-quickcheck2-0.4:0= |
223 |
+ test? ( |
224 |
+ dev-python/mock |
225 |
+ dev-python/pyyaml |
226 |
+ dev-haskell/haddock:0= |
227 |
+ >=dev-haskell/hunit-1.2.4.2:0= |
228 |
+ <dev-haskell/hunit-1.3:0= |
229 |
+ >=dev-haskell/quickcheck-2.4.2:2= |
230 |
+ <dev-haskell/quickcheck-2.8.3:2= |
231 |
+ sys-apps/fakeroot |
232 |
+ >=net-misc/socat-1.7 |
233 |
+ dev-util/shelltestrunner |
234 |
+ )" |
235 |
+ |
236 |
+PATCHES+=( |
237 |
+ "${FILESDIR}/${PN}-2.12-start-stop-daemon-args.patch" |
238 |
+ "${FILESDIR}/${PN}-2.11-add-pgrep.patch" |
239 |
+ "${FILESDIR}/${PN}-2.15-daemon-util.patch" |
240 |
+ "${FILESDIR}/${PN}-2.9-disable-root-tests.patch" |
241 |
+ "${FILESDIR}/${PN}-2.9-skip-cli-test.patch" |
242 |
+ "${FILESDIR}/${PN}-2.10-rundir.patch" |
243 |
+ "${FILESDIR}/${PN}-2.12-qemu-enable-kvm.patch" |
244 |
+ "${FILESDIR}/${PN}-2.11-tests.patch" |
245 |
+ "${FILESDIR}/${PN}-lockdir.patch" |
246 |
+ "${FILESDIR}/${PN}-2.11-dont-nest-libdir.patch" |
247 |
+ "${FILESDIR}/${PN}-2.11-dont-print-man-help.patch" |
248 |
+ "${FILESDIR}/${PN}-2.11-daemon-util-tests.patch" |
249 |
+ "${FILESDIR}/${PN}-2.13-process_unittest.patch" |
250 |
+ "${FILESDIR}/${PN}-2.15-python-mock.patch" |
251 |
+ "${FILESDIR}/${PN}-2.15.2-remove-sandbox-failing-tests.patch" |
252 |
+ "${FILESDIR}/${PN}-2.15-noded-must-run-as-root.patch" |
253 |
+ "${FILESDIR}/${PN}-2.15-kvmd-run-as-daemon-user.patch" |
254 |
+ "${FILESDIR}/${PN}-2.15-dont-invert-return-values-for-man-warnings.patch" |
255 |
+ "${FILESDIR}/${PN}-2.15-respect-HFLAGS.patch" |
256 |
+ "${FILESDIR}/ganeti-2.15.2-bdev_py.patch" |
257 |
+) |
258 |
+ |
259 |
+S="${WORKDIR}/${MY_P}" |
260 |
+ |
261 |
+QA_WX_LOAD=" |
262 |
+ usr/lib*/${PN}/${SERIES}/usr/sbin/ganeti-*d |
263 |
+ usr/lib*/${PN}/${SERIES}/usr/bin/htools |
264 |
+" |
265 |
+ |
266 |
+pkg_setup () { |
267 |
+ local user |
268 |
+ python-single-r1_pkg_setup |
269 |
+ |
270 |
+ if use multiple-users; then |
271 |
+ for user in gnt-{masterd,confd,luxid,rapi,daemons,admin}; do |
272 |
+ enewgroup ${user} |
273 |
+ enewuser ${user} -1 -1 -1 ${user} |
274 |
+ done |
275 |
+ fi |
276 |
+} |
277 |
+ |
278 |
+src_prepare() { |
279 |
+ local testfile |
280 |
+ if has_version '>=dev-lang/ghc-7.10'; then |
281 |
+ # Breaks the build on 7.8 |
282 |
+ PATCHES+=( |
283 |
+ "${WORKDIR}"/debian/patches/ghc-7.10-compatibility.patch |
284 |
+ ) |
285 |
+ fi |
286 |
+ if use experimental; then |
287 |
+ ewarn "Experimental patches have been applied! RPC between daemons with different patches applied may cause breakage!" |
288 |
+ PATCHES+=( |
289 |
+ # QEMU Agent accepted upstream for 2.16, not yet in a tagged release |
290 |
+ # backport available for 2.15, but refused upstream due to RPC breakage. |
291 |
+ "${FILESDIR}"/0001-kvm-use_guest_agent-QEMU-Guest-Agent-sup.stable-2.15.patch |
292 |
+ ) |
293 |
+ fi |
294 |
+ eapply "${PATCHES[@]}" |
295 |
+ # Upstream commits: |
296 |
+ # 4c3c2ca2a97a69c0287a3d23e064bc17978105eb |
297 |
+ # 24618882737fd7c189adf99f4acc767d48f572c3 |
298 |
+ sed -i \ |
299 |
+ -e '/QuickCheck/s,< 2.8,< 2.8.3,g' \ |
300 |
+ cabal/ganeti.template.cabal |
301 |
+ # Neuter -Werror |
302 |
+ sed -i \ |
303 |
+ -e '/^if DEVELOPER_MODE/,/^endif/s/-Werror//' \ |
304 |
+ Makefile.am |
305 |
+ |
306 |
+ # not sure why these tests are failing |
307 |
+ # should remove this on next version bump if possible |
308 |
+ for testfile in test/py/import-export_unittest.bash; do |
309 |
+ printf '#!/bin/bash\ntrue\n' > "${testfile}" |
310 |
+ done |
311 |
+ |
312 |
+ # take the sledgehammer approach to bug #526270 |
313 |
+ grep -lr '/bin/sh' "${S}" | xargs -r -- sed -i 's:/bin/sh:/bin/bash:g' |
314 |
+ |
315 |
+ eapply_user |
316 |
+ |
317 |
+ [[ ${PV} =~ [9]{4,} ]] && ./autogen.sh |
318 |
+ rm autotools/missing |
319 |
+ eautoreconf |
320 |
+} |
321 |
+ |
322 |
+src_configure () { |
323 |
+ # this is kind of a hack to work around the removal of the qemu-kvm wrapper |
324 |
+ local kvm_arch |
325 |
+ |
326 |
+ if use amd64; then |
327 |
+ kvm_arch=x86_64 |
328 |
+ elif use x86; then |
329 |
+ kvm_arch=i386 |
330 |
+ elif use kvm; then |
331 |
+ die "Could not determine qemu system to use for kvm" |
332 |
+ fi |
333 |
+ |
334 |
+ econf --localstatedir=/var \ |
335 |
+ --sharedstatedir=/var \ |
336 |
+ --disable-symlinks \ |
337 |
+ --with-ssh-initscript=/etc/init.d/sshd \ |
338 |
+ --with-export-dir=/var/lib/ganeti-storage/export \ |
339 |
+ --with-os-search-path=/usr/share/${PN}/os \ |
340 |
+ $(use_enable restricted-commands) \ |
341 |
+ $(use_enable test haskell-tests) \ |
342 |
+ $(usex multiple-users "--with-default-user=" "" "gnt-daemons" "") \ |
343 |
+ $(usex multiple-users "--with-user-prefix=" "" "${USER_PREFIX}" "") \ |
344 |
+ $(usex multiple-users "--with-default-group=" "" "gnt-daemons" "") \ |
345 |
+ $(usex multiple-users "--with-group-prefix=" "" "${GROUP_PREFIX}" "") \ |
346 |
+ $(use_enable syslog) \ |
347 |
+ $(use_enable monitoring) \ |
348 |
+ $(usex kvm '--with-kvm-path=' '' "/usr/bin/qemu-system-${kvm_arch}" '') \ |
349 |
+ $(usex haskell-daemons "--enable-confd=haskell" '' '' '') \ |
350 |
+ --with-haskell-flags="-optl -Wl,-z,relro -optl -Wl,--as-needed" \ |
351 |
+ --enable-socat-escape \ |
352 |
+ --enable-socat-compress |
353 |
+} |
354 |
+ |
355 |
+src_install () { |
356 |
+ emake V=1 DESTDIR="${D}" install |
357 |
+ |
358 |
+ newinitd "${FILESDIR}"/ganeti.initd-r3 ${PN} |
359 |
+ newconfd "${FILESDIR}"/ganeti.confd-r2 ${PN} |
360 |
+ |
361 |
+ if use kvm; then |
362 |
+ newinitd "${FILESDIR}"/ganeti-kvm-poweroff.initd ganeti-kvm-poweroff |
363 |
+ newconfd "${FILESDIR}"/ganeti-kvm-poweroff.confd ganeti-kvm-poweroff |
364 |
+ fi |
365 |
+ |
366 |
+ # ganeti installs it's own docs in a generic location |
367 |
+ rm -rf "${D}"/{usr/share/doc/${PN},run} |
368 |
+ |
369 |
+ sed -i "s:/usr/$(get_libdir)/${PN}/tools/burnin:burnin:" doc/examples/bash_completion |
370 |
+ newbashcomp doc/examples/bash_completion gnt-instance |
371 |
+ bashcomp_alias gnt-instance burnin ganeti-{cleaner,confd} \ |
372 |
+ h{space,check,scan,info,ail,arep,roller,squeeze,bal} \ |
373 |
+ gnt-{os,job,filter,debug,storage,group,node,network,backup,cluster} |
374 |
+ |
375 |
+ use monitoring && bashcomp_alias gnt-instance mon-collector |
376 |
+ |
377 |
+ dodoc INSTALL UPGRADE NEWS README doc/*.rst |
378 |
+ |
379 |
+ docinto html |
380 |
+ dodoc -r doc/html/* doc/css/*.css |
381 |
+ |
382 |
+ docinto examples |
383 |
+ dodoc doc/examples/{ganeti.cron,gnt-config-backup} doc/examples/*.ocf |
384 |
+ |
385 |
+ docinto examples/hooks |
386 |
+ dodoc doc/examples/hooks/{ipsec,ethers} |
387 |
+ |
388 |
+ insinto /etc/cron.d |
389 |
+ newins doc/examples/ganeti.cron ${PN} |
390 |
+ |
391 |
+ insinto /etc/logrotate.d |
392 |
+ newins doc/examples/ganeti.logrotate ${PN} |
393 |
+ |
394 |
+ # need to dodir rather than keepdir here (bug #552482) |
395 |
+ dodir /var/lib/${PN} |
396 |
+ |
397 |
+ keepdir /var/log/${PN}/ |
398 |
+ keepdir /usr/share/${PN}/${SERIES}/os/ |
399 |
+ keepdir /var/lib/ganeti-storage/{export,file,shared}/ |
400 |
+ |
401 |
+ dosym ${SERIES} "/usr/share/${PN}/default" |
402 |
+ dosym ${SERIES} "/usr/$(get_libdir)/${PN}/default" |
403 |
+ |
404 |
+ python_fix_shebang "${ED}" "${D}"/usr/"$(get_libdir)"/${PN}/${SERIES} |
405 |
+} |
406 |
+ |
407 |
+pkg_postinst() { |
408 |
+ if use multiple-users; then |
409 |
+ elog "You have enable multiple user support, the users for this must" |
410 |
+ elog "be created. You can use the provided tool for this, which is" |
411 |
+ elog "located at:" |
412 |
+ elog " /usr/$(get_libdir)/${PN}/tools/users-setup" |
413 |
+ fi |
414 |
+} |
415 |
+ |
416 |
+src_test () { |
417 |
+ PATH="${S}/scripts:${S}/src:${PATH}" \ |
418 |
+ TMPDIR="/tmp" \ |
419 |
+ GANETI_MASTER="$(hostname -f)" \ |
420 |
+ emake check || die "emake check failed" |
421 |
+} |