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