1 |
commit: 21b2340aff308620f996e7de4123908050f92fdd |
2 |
Author: Jonathan Davies <jpds <AT> protonmail <DOT> com> |
3 |
AuthorDate: Sat Sep 26 22:10:34 2020 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 1 23:46:25 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=21b2340a |
7 |
|
8 |
app-emulation/libvirt: Version updated to 6.7.0. |
9 |
|
10 |
Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com> |
11 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
12 |
|
13 |
app-emulation/libvirt/Manifest | 1 + |
14 |
.../files/libvirt-6.7.0-do-not-use-sysconfig.patch | 169 ++++++++++ |
15 |
.../libvirt/files/libvirt-6.7.0-doc-path.patch | 9 + |
16 |
.../libvirt-6.7.0-fix-paths-for-apparmor.patch | 26 ++ |
17 |
app-emulation/libvirt/libvirt-6.7.0.ebuild | 343 +++++++++++++++++++++ |
18 |
5 files changed, 548 insertions(+) |
19 |
|
20 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
21 |
index efead371cab..8abb22472ab 100644 |
22 |
--- a/app-emulation/libvirt/Manifest |
23 |
+++ b/app-emulation/libvirt/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST libvirt-6.2.0.tar.xz 8307248 BLAKE2B 9d449e041fc548a688f974d0801e625cf023ef0df49c40028e486e88fcf14181869e0dfd87f0eabcdd184df67dda5b5fbdc0c2375832f1534faff531779255dd SHA512 96bef701fd73aef93d1490f0bc331901a0ff6250a4f36a3e4844f76cc262dc0ae4cce8686a603c2a9c575ce489d8d5ed1521ebd22b92aff8301efdb74dee91e4 |
26 |
DIST libvirt-6.5.0.tar.xz 9407160 BLAKE2B 592aace555a3b72311cb430784587180fa7dbf74f75509cd8373a046339b9c4c0707bf530dd2d06146d78a85f8af3dba5d0b146ecec180d3cc4d3bf78c19da61 SHA512 30a032270304b97945ff2c5087c72c2f5510634186f2eaf7c3d834a72cddcaec97bbe5ccc86802728a59f4c80b5bb54757400683df5f20175757cfe07ce67453 |
27 |
+DIST libvirt-6.7.0.tar.xz 8362140 BLAKE2B d0afe33fcdaab3cc0f2ea8c552e7550bcece018b049a3b58e5c05ee85b39e2b3ebf42fa1b70ddb1d2a541d1114b6b49734f23a889b3589397a30a672f27a3a56 SHA512 cabfb6aa65a3a1412b0111654ad3a7d0a6dfc63399a892c540ca39ab4e56f87626a067037e4480bb55418a371d2b5e9ac74862c92a3cdea69822ec3d158d769f |
28 |
|
29 |
diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch b/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch |
30 |
new file mode 100644 |
31 |
index 00000000000..f3d2e3c3916 |
32 |
--- /dev/null |
33 |
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-do-not-use-sysconfig.patch |
34 |
@@ -0,0 +1,169 @@ |
35 |
+--- a/src/interface/virtinterfaced.service.in |
36 |
++++ b/src/interface/virtinterfaced.service.in |
37 |
+@@ -13,7 +13,6 @@ |
38 |
+ |
39 |
+ [Service] |
40 |
+ Type=notify |
41 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtinterfaced |
42 |
+ ExecStart=@sbindir@/virtinterfaced $VIRTINTERFACED_ARGS |
43 |
+ ExecReload=/bin/kill -HUP $MAINPID |
44 |
+ Restart=on-failure |
45 |
+--- a/src/libxl/virtxend.service.in |
46 |
++++ b/src/libxl/virtxend.service.in |
47 |
+@@ -17,7 +17,6 @@ |
48 |
+ |
49 |
+ [Service] |
50 |
+ Type=notify |
51 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtxend |
52 |
+ ExecStart=@sbindir@/virtxend $VIRTXEND_ARGS |
53 |
+ ExecReload=/bin/kill -HUP $MAINPID |
54 |
+ Restart=on-failure |
55 |
+--- a/src/locking/virtlockd.service.in |
56 |
++++ b/src/locking/virtlockd.service.in |
57 |
+@@ -7,8 +7,7 @@ |
58 |
+ Documentation=https://libvirt.org |
59 |
+ |
60 |
+ [Service] |
61 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtlockd |
62 |
+-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS |
63 |
++ExecStart=@sbindir@/virtlockd |
64 |
+ ExecReload=/bin/kill -USR1 $MAINPID |
65 |
+ # Loosing the locks is a really bad thing that will |
66 |
+ # cause the machine to be fenced (rebooted), so make |
67 |
+--- a/src/logging/virtlogd.service.in |
68 |
++++ b/src/logging/virtlogd.service.in |
69 |
+@@ -7,8 +7,7 @@ |
70 |
+ Documentation=https://libvirt.org |
71 |
+ |
72 |
+ [Service] |
73 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtlogd |
74 |
+-ExecStart=@sbindir@/virtlogd $VIRTLOGD_ARGS |
75 |
++ExecStart=@sbindir@/virtlogd |
76 |
+ ExecReload=/bin/kill -USR1 $MAINPID |
77 |
+ # Loosing the logs is a really bad thing that will |
78 |
+ # cause the machine to be fenced (rebooted), so make |
79 |
+--- a/src/lxc/virtlxcd.service.in |
80 |
++++ b/src/lxc/virtlxcd.service.in |
81 |
+@@ -18,7 +18,6 @@ |
82 |
+ |
83 |
+ [Service] |
84 |
+ Type=notify |
85 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtlxcd |
86 |
+ ExecStart=@sbindir@/virtlxcd $VIRTLXCD_ARGS |
87 |
+ ExecReload=/bin/kill -HUP $MAINPID |
88 |
+ KillMode=process |
89 |
+--- a/src/network/virtnetworkd.service.in |
90 |
++++ b/src/network/virtnetworkd.service.in |
91 |
+@@ -16,7 +16,6 @@ |
92 |
+ |
93 |
+ [Service] |
94 |
+ Type=notify |
95 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtnetworkd |
96 |
+ ExecStart=@sbindir@/virtnetworkd $VIRTNETWORKD_ARGS |
97 |
+ ExecReload=/bin/kill -HUP $MAINPID |
98 |
+ Restart=on-failure |
99 |
+--- a/src/node_device/virtnodedevd.service.in |
100 |
++++ b/src/node_device/virtnodedevd.service.in |
101 |
+@@ -13,7 +13,6 @@ |
102 |
+ |
103 |
+ [Service] |
104 |
+ Type=notify |
105 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtnodedevd |
106 |
+ ExecStart=@sbindir@/virtnodedevd $VIRTNODEDEVD_ARGS |
107 |
+ ExecReload=/bin/kill -HUP $MAINPID |
108 |
+ Restart=on-failure |
109 |
+--- a/src/nwfilter/virtnwfilterd.service.in |
110 |
++++ b/src/nwfilter/virtnwfilterd.service.in |
111 |
+@@ -13,7 +13,6 @@ |
112 |
+ |
113 |
+ [Service] |
114 |
+ Type=notify |
115 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtnwfilterd |
116 |
+ ExecStart=@sbindir@/virtnwfilterd $VIRTNWFILTERD_ARGS |
117 |
+ ExecReload=/bin/kill -HUP $MAINPID |
118 |
+ Restart=on-failure |
119 |
+--- a/src/qemu/virtqemud.service.in |
120 |
++++ b/src/qemu/virtqemud.service.in |
121 |
+@@ -18,7 +18,6 @@ |
122 |
+ |
123 |
+ [Service] |
124 |
+ Type=notify |
125 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtqemud |
126 |
+ ExecStart=@sbindir@/virtqemud $VIRTQEMUD_ARGS |
127 |
+ ExecReload=/bin/kill -HUP $MAINPID |
128 |
+ KillMode=process |
129 |
+--- a/src/remote/libvirtd.service.in |
130 |
++++ b/src/remote/libvirtd.service.in |
131 |
+@@ -28,8 +28,7 @@ |
132 |
+ |
133 |
+ [Service] |
134 |
+ Type=notify |
135 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/libvirtd |
136 |
+-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS |
137 |
++ExecStart=@sbindir@/libvirtd |
138 |
+ ExecReload=/bin/kill -HUP $MAINPID |
139 |
+ KillMode=process |
140 |
+ Restart=on-failure |
141 |
+--- a/src/remote/virtproxyd.service.in |
142 |
++++ b/src/remote/virtproxyd.service.in |
143 |
+@@ -13,7 +13,6 @@ |
144 |
+ |
145 |
+ [Service] |
146 |
+ Type=notify |
147 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtproxyd |
148 |
+ ExecStart=@sbindir@/virtproxyd $VIRTPROXYD_ARGS |
149 |
+ ExecReload=/bin/kill -HUP $MAINPID |
150 |
+ Restart=on-failure |
151 |
+--- a/src/secret/virtsecretd.service.in |
152 |
++++ b/src/secret/virtsecretd.service.in |
153 |
+@@ -13,7 +13,6 @@ |
154 |
+ |
155 |
+ [Service] |
156 |
+ Type=notify |
157 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtsecretd |
158 |
+ ExecStart=@sbindir@/virtsecretd $VIRTSECRETD_ARGS |
159 |
+ ExecReload=/bin/kill -HUP $MAINPID |
160 |
+ Restart=on-failure |
161 |
+--- a/src/storage/virtstoraged.service.in |
162 |
++++ b/src/storage/virtstoraged.service.in |
163 |
+@@ -15,7 +15,6 @@ |
164 |
+ |
165 |
+ [Service] |
166 |
+ Type=notify |
167 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtstoraged |
168 |
+ ExecStart=@sbindir@/virtstoraged $VIRTSTORAGED_ARGS |
169 |
+ ExecReload=/bin/kill -HUP $MAINPID |
170 |
+ Restart=on-failure |
171 |
+--- a/src/vbox/virtvboxd.service.in |
172 |
++++ b/src/vbox/virtvboxd.service.in |
173 |
+@@ -14,7 +14,6 @@ |
174 |
+ |
175 |
+ [Service] |
176 |
+ Type=notify |
177 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/virtvboxd |
178 |
+ ExecStart=@sbindir@/virtvboxd $VIRTVBOXD_ARGS |
179 |
+ ExecReload=/bin/kill -HUP $MAINPID |
180 |
+ Restart=on-failure |
181 |
+--- a/tools/libvirt-guests.service.in |
182 |
++++ b/tools/libvirt-guests.service.in |
183 |
+@@ -10,7 +10,7 @@ |
184 |
+ Documentation=https://libvirt.org |
185 |
+ |
186 |
+ [Service] |
187 |
+-EnvironmentFile=-@sysconfdir@/sysconfig/libvirt-guests |
188 |
++EnvironmentFile=-/etc/libvirt/libvirt-guests.conf |
189 |
+ # Hack just call traditional service until we factor |
190 |
+ # out the code |
191 |
+ ExecStart=@libexecdir@/libvirt-guests.sh start |
192 |
+--- a/tools/libvirt-guests.sysconf |
193 |
++++ b/tools/libvirt-guests.sysconf |
194 |
+@@ -1,3 +1,9 @@ |
195 |
++# |
196 |
++# Warning: This configuration file is only sourced by the systemd |
197 |
++# libvirt-guests.service unit. The coresponding openrc facility is in |
198 |
++# /etc/init.d/libvirtd and /etc/conf.d/libvirtd |
199 |
++# |
200 |
++ |
201 |
+ # Customizations for the libvirt-guests.service systemd unit |
202 |
+ |
203 |
+ # URIs to check for running guests |
204 |
|
205 |
diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch b/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch |
206 |
new file mode 100644 |
207 |
index 00000000000..65eb35f3e34 |
208 |
--- /dev/null |
209 |
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-doc-path.patch |
210 |
@@ -0,0 +1,9 @@ |
211 |
+--- a/meson.build 2020-09-26 21:25:08.557345415 +0000 |
212 |
++++ b/meson.build 2020-09-26 21:25:59.507348156 +0000 |
213 |
+@@ -84,7 +84,7 @@ sbindir = prefix / get_option('sbindir') |
214 |
+ sharedstatedir = prefix / get_option('sharedstatedir') |
215 |
+ |
216 |
+ confdir = sysconfdir / meson.project_name() |
217 |
+-docdir = datadir / 'doc' / meson.project_name() |
218 |
++docdir = datadir / 'doc' / '@0@-@1@'.format(meson.project_name(), meson.project_version()) |
219 |
+ pkgdatadir = datadir / meson.project_name() |
220 |
|
221 |
diff --git a/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch |
222 |
new file mode 100644 |
223 |
index 00000000000..1ca70030062 |
224 |
--- /dev/null |
225 |
+++ b/app-emulation/libvirt/files/libvirt-6.7.0-fix-paths-for-apparmor.patch |
226 |
@@ -0,0 +1,26 @@ |
227 |
+diff --git a/src/security/apparmor/libvirt-qemu b/src/security/apparmor/libvirt-qemu |
228 |
+index 80986ae..d550d8c 100644 |
229 |
+--- a/src/security/apparmor/libvirt-qemu |
230 |
++++ b/src/security/apparmor/libvirt-qemu |
231 |
+@@ -88,6 +88,7 @@ |
232 |
+ /usr/share/sgabios/** r, |
233 |
+ /usr/share/slof/** r, |
234 |
+ /usr/share/vgabios/** r, |
235 |
++ /usr/share/seavgabios/** r, |
236 |
+ |
237 |
+ # pki for libvirt-vnc and libvirt-spice (LP: #901272, #1690140) |
238 |
+ /etc/pki/CA/ r, |
239 |
+diff --git a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in b/src/security/apparmor/usr.libexec.virt-aa-helper.in |
240 |
+similarity index 97% |
241 |
+rename from src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in |
242 |
+rename to src/security/apparmor/usr.libexec.virt-aa-helper.in |
243 |
+index dd18c8a..d06f9cb 100644 |
244 |
+--- a/src/security/apparmor/usr.lib.libvirt.virt-aa-helper.in |
245 |
++++ b/src/security/apparmor/usr.libexec.virt-aa-helper.in |
246 |
+@@ -69,5 +69,5 @@ profile virt-aa-helper @libexecdir@/virt-aa-helper { |
247 |
+ /**.[iI][sS][oO] r, |
248 |
+ /**/disk{,.*} r, |
249 |
+ |
250 |
+- #include <local/usr.lib.libvirt.virt-aa-helper> |
251 |
++ #include <local/usr.libexec.virt-aa-helper> |
252 |
+ } |
253 |
|
254 |
diff --git a/app-emulation/libvirt/libvirt-6.7.0.ebuild b/app-emulation/libvirt/libvirt-6.7.0.ebuild |
255 |
new file mode 100644 |
256 |
index 00000000000..8b439d1e9b0 |
257 |
--- /dev/null |
258 |
+++ b/app-emulation/libvirt/libvirt-6.7.0.ebuild |
259 |
@@ -0,0 +1,343 @@ |
260 |
+# Copyright 1999-2020 Gentoo Authors |
261 |
+# Distributed under the terms of the GNU General Public License v2 |
262 |
+ |
263 |
+EAPI=7 |
264 |
+ |
265 |
+PYTHON_COMPAT=( python3_{6,7,8,9} ) |
266 |
+ |
267 |
+inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd |
268 |
+ |
269 |
+if [[ ${PV} = *9999* ]]; then |
270 |
+ inherit git-r3 |
271 |
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" |
272 |
+ SRC_URI="" |
273 |
+ SLOT="0" |
274 |
+else |
275 |
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz" |
276 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
277 |
+ SLOT="0/${PV}" |
278 |
+fi |
279 |
+ |
280 |
+DESCRIPTION="C toolkit to manipulate virtual machines" |
281 |
+HOMEPAGE="https://www.libvirt.org/" |
282 |
+LICENSE="LGPL-2.1" |
283 |
+IUSE=" |
284 |
+ apparmor audit +caps +dbus dtrace firewalld fuse glusterfs iscsi |
285 |
+ iscsi-direct +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz |
286 |
+ parted pcap policykit +qemu rbd sasl selinux +udev +vepa |
287 |
+ virtualbox virt-network wireshark-plugins xen zfs |
288 |
+" |
289 |
+ |
290 |
+REQUIRED_USE=" |
291 |
+ firewalld? ( virt-network ) |
292 |
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) |
293 |
+ lxc? ( caps libvirtd ) |
294 |
+ openvz? ( libvirtd ) |
295 |
+ policykit? ( dbus ) |
296 |
+ qemu? ( libvirtd ) |
297 |
+ vepa? ( macvtap ) |
298 |
+ virt-network? ( libvirtd ) |
299 |
+ virtualbox? ( libvirtd ) |
300 |
+ xen? ( libvirtd )" |
301 |
+ |
302 |
+# gettext.sh command is used by the libvirt command wrappers, and it's |
303 |
+# non-optional, so put it into RDEPEND. |
304 |
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
305 |
+# package will use 3 by default. Since we don't have slot pinning in an API, |
306 |
+# we must go with the most recent |
307 |
+RDEPEND=" |
308 |
+ acct-user/qemu |
309 |
+ policykit? ( acct-group/libvirt ) |
310 |
+ app-misc/scrub |
311 |
+ >=dev-libs/glib-2.48.0 |
312 |
+ dev-libs/libgcrypt:0 |
313 |
+ dev-libs/libnl:3 |
314 |
+ >=dev-libs/libxml2-2.7.6 |
315 |
+ >=net-analyzer/openbsd-netcat-1.105-r1 |
316 |
+ >=net-libs/gnutls-1.0.25:0= |
317 |
+ net-libs/libssh2 |
318 |
+ net-libs/libtirpc |
319 |
+ net-libs/rpcsvc-proto |
320 |
+ >=net-misc/curl-7.18.0 |
321 |
+ sys-apps/dmidecode |
322 |
+ >=sys-apps/util-linux-2.17 |
323 |
+ sys-devel/gettext |
324 |
+ sys-libs/ncurses:0= |
325 |
+ sys-libs/readline:= |
326 |
+ apparmor? ( sys-libs/libapparmor ) |
327 |
+ audit? ( sys-process/audit ) |
328 |
+ caps? ( sys-libs/libcap-ng ) |
329 |
+ dbus? ( sys-apps/dbus ) |
330 |
+ dtrace? ( dev-util/systemtap ) |
331 |
+ firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
332 |
+ fuse? ( sys-fs/fuse:0= ) |
333 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
334 |
+ iscsi? ( sys-block/open-iscsi ) |
335 |
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
336 |
+ libssh? ( net-libs/libssh ) |
337 |
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
338 |
+ nfs? ( net-fs/nfs-utils ) |
339 |
+ numa? ( |
340 |
+ >sys-process/numactl-2.0.2 |
341 |
+ sys-process/numad |
342 |
+ ) |
343 |
+ parted? ( |
344 |
+ >=sys-block/parted-1.8[device-mapper] |
345 |
+ sys-fs/lvm2[-device-mapper-only(-)] |
346 |
+ ) |
347 |
+ pcap? ( >=net-libs/libpcap-1.0.0 ) |
348 |
+ policykit? ( >=sys-auth/polkit-0.9 ) |
349 |
+ qemu? ( |
350 |
+ >=app-emulation/qemu-1.5.0 |
351 |
+ dev-libs/yajl |
352 |
+ ) |
353 |
+ rbd? ( sys-cluster/ceph ) |
354 |
+ sasl? ( dev-libs/cyrus-sasl ) |
355 |
+ selinux? ( >=sys-libs/libselinux-2.0.85 ) |
356 |
+ virt-network? ( |
357 |
+ net-dns/dnsmasq[script] |
358 |
+ net-firewall/ebtables |
359 |
+ >=net-firewall/iptables-1.4.10[ipv6] |
360 |
+ net-misc/radvd |
361 |
+ sys-apps/iproute2[-minimal] |
362 |
+ ) |
363 |
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
364 |
+ wireshark-plugins? ( net-analyzer/wireshark:= ) |
365 |
+ xen? ( |
366 |
+ >=app-emulation/xen-4.6.0 |
367 |
+ app-emulation/xen-tools:= |
368 |
+ ) |
369 |
+ udev? ( |
370 |
+ virtual/udev |
371 |
+ >=x11-libs/libpciaccess-0.10.9 |
372 |
+ ) |
373 |
+ zfs? ( sys-fs/zfs )" |
374 |
+ |
375 |
+DEPEND="${RDEPEND} |
376 |
+ ${PYTHON_DEPS} |
377 |
+ app-text/xhtml1 |
378 |
+ dev-lang/perl |
379 |
+ dev-libs/libxslt |
380 |
+ dev-perl/XML-XPath |
381 |
+ dev-python/docutils |
382 |
+ virtual/pkgconfig" |
383 |
+ |
384 |
+PATCHES=( |
385 |
+ "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch |
386 |
+ "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch |
387 |
+ "${FILESDIR}"/${PN}-6.7.0-doc-path.patch |
388 |
+ "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch |
389 |
+) |
390 |
+ |
391 |
+pkg_setup() { |
392 |
+ # Check kernel configuration: |
393 |
+ CONFIG_CHECK="" |
394 |
+ use fuse && CONFIG_CHECK+=" |
395 |
+ ~FUSE_FS" |
396 |
+ |
397 |
+ use lvm && CONFIG_CHECK+=" |
398 |
+ ~BLK_DEV_DM |
399 |
+ ~DM_MULTIPATH |
400 |
+ ~DM_SNAPSHOT" |
401 |
+ |
402 |
+ use lxc && CONFIG_CHECK+=" |
403 |
+ ~BLK_CGROUP |
404 |
+ ~CGROUP_CPUACCT |
405 |
+ ~CGROUP_DEVICE |
406 |
+ ~CGROUP_FREEZER |
407 |
+ ~CGROUP_NET_PRIO |
408 |
+ ~CGROUP_PERF |
409 |
+ ~CGROUPS |
410 |
+ ~CGROUP_SCHED |
411 |
+ ~CPUSETS |
412 |
+ ~IPC_NS |
413 |
+ ~MACVLAN |
414 |
+ ~NAMESPACES |
415 |
+ ~NET_CLS_CGROUP |
416 |
+ ~NET_NS |
417 |
+ ~PID_NS |
418 |
+ ~POSIX_MQUEUE |
419 |
+ ~SECURITYFS |
420 |
+ ~USER_NS |
421 |
+ ~UTS_NS |
422 |
+ ~VETH |
423 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
424 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
425 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
426 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
427 |
+ ~!GRKERNSEC_CHROOT_CAPS" |
428 |
+ |
429 |
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
430 |
+ ~DEVPTS_MULTIPLE_INSTANCES" |
431 |
+ |
432 |
+ use macvtap && CONFIG_CHECK+=" |
433 |
+ ~MACVTAP" |
434 |
+ |
435 |
+ use virt-network && CONFIG_CHECK+=" |
436 |
+ ~BRIDGE_EBT_MARK_T |
437 |
+ ~BRIDGE_NF_EBTABLES |
438 |
+ ~NETFILTER_ADVANCED |
439 |
+ ~NETFILTER_XT_CONNMARK |
440 |
+ ~NETFILTER_XT_MARK |
441 |
+ ~NETFILTER_XT_TARGET_CHECKSUM |
442 |
+ ~IP_NF_FILTER |
443 |
+ ~IP_NF_MANGLE |
444 |
+ ~IP_NF_NAT |
445 |
+ ~IP_NF_TARGET_MASQUERADE |
446 |
+ ~IP6_NF_FILTER |
447 |
+ ~IP6_NF_MANGLE |
448 |
+ ~IP6_NF_NAT" |
449 |
+ # Bandwidth Limiting Support |
450 |
+ use virt-network && CONFIG_CHECK+=" |
451 |
+ ~BRIDGE_EBT_T_NAT |
452 |
+ ~IP_NF_TARGET_REJECT |
453 |
+ ~NET_ACT_POLICE |
454 |
+ ~NET_CLS_FW |
455 |
+ ~NET_CLS_U32 |
456 |
+ ~NET_SCH_HTB |
457 |
+ ~NET_SCH_INGRESS |
458 |
+ ~NET_SCH_SFQ" |
459 |
+ |
460 |
+ # Handle specific kernel versions for different features |
461 |
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
462 |
+ if kernel_is ge 3 6; then |
463 |
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
464 |
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
465 |
+ fi |
466 |
+ |
467 |
+ ERROR_USER_NS="Optional depending on LXC configuration." |
468 |
+ |
469 |
+ if [[ -n ${CONFIG_CHECK} ]]; then |
470 |
+ linux-info_pkg_setup |
471 |
+ fi |
472 |
+} |
473 |
+ |
474 |
+src_prepare() { |
475 |
+ touch "${S}/.mailmap" |
476 |
+ |
477 |
+ default |
478 |
+ |
479 |
+ # Tweak the init script: |
480 |
+ cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die |
481 |
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
482 |
+ -i "${S}/libvirtd.init" || die "sed failed" |
483 |
+} |
484 |
+ |
485 |
+src_configure() { |
486 |
+ local emesonargs=( |
487 |
+ $(meson_feature apparmor) |
488 |
+ $(meson_use apparmor apparmor_profiles) |
489 |
+ $(meson_feature audit) |
490 |
+ $(meson_feature caps capng) |
491 |
+ $(meson_feature dbus) |
492 |
+ $(meson_feature dtrace) |
493 |
+ $(meson_feature firewalld) |
494 |
+ $(meson_feature fuse) |
495 |
+ $(meson_feature glusterfs) |
496 |
+ $(meson_feature glusterfs storage_gluster) |
497 |
+ $(meson_feature iscsi storage_iscsi) |
498 |
+ $(meson_feature iscsi-direct storage_iscsi_direct) |
499 |
+ $(meson_feature libvirtd driver_libvirtd) |
500 |
+ $(meson_feature libssh) |
501 |
+ $(meson_feature lvm storage_lvm) |
502 |
+ $(meson_feature lvm storage_mpath) |
503 |
+ $(meson_feature lxc driver_lxc) |
504 |
+ $(meson_feature macvtap) |
505 |
+ $(meson_feature nls) |
506 |
+ $(meson_feature numa numactl) |
507 |
+ $(meson_feature numa numad) |
508 |
+ $(meson_feature openvz driver_openvz) |
509 |
+ $(meson_feature parted storage_disk) |
510 |
+ $(meson_feature pcap libpcap) |
511 |
+ $(meson_feature policykit polkit) |
512 |
+ $(meson_feature qemu driver_qemu) |
513 |
+ $(meson_feature qemu yajl) |
514 |
+ $(meson_feature rbd storage_rbd) |
515 |
+ $(meson_feature sasl) |
516 |
+ $(meson_feature selinux) |
517 |
+ $(meson_feature udev) |
518 |
+ $(meson_feature vepa virtualport) |
519 |
+ $(meson_feature virt-network driver_network) |
520 |
+ $(meson_feature virtualbox driver_vbox) |
521 |
+ $(meson_feature wireshark-plugins wireshark_dissector) |
522 |
+ $(meson_feature xen driver_libxl) |
523 |
+ $(meson_feature zfs storage_zfs) |
524 |
+ |
525 |
+ -Dhal=disabled |
526 |
+ -Dnetcf=disabled |
527 |
+ -Dsanlock=disabled |
528 |
+ |
529 |
+ -Ddriver_esx=enabled |
530 |
+ -Dinit_script=systemd |
531 |
+ -Dqemu_user=$(usex caps qemu root) |
532 |
+ -Dqemu_group=$(usex caps qemu root) |
533 |
+ -Ddriver_remote=enabled |
534 |
+ -Dstorage_fs=enabled |
535 |
+ -Ddriver_vmware=enabled |
536 |
+ |
537 |
+ --localstatedir="${EPREFIX}/var" |
538 |
+ -Drunstatedir="${EPREFIX}/run" |
539 |
+ ) |
540 |
+ |
541 |
+ meson_src_configure |
542 |
+} |
543 |
+ |
544 |
+src_test() { |
545 |
+ # remove problematic tests, bug #591416, bug #591418 |
546 |
+ sed -i -e 's#commandtest$(EXEEXT) # #' \ |
547 |
+ -e 's#virfirewalltest$(EXEEXT) # #' \ |
548 |
+ -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ |
549 |
+ -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ |
550 |
+ tests/Makefile |
551 |
+ |
552 |
+ export VIR_TEST_DEBUG=1 |
553 |
+ meson_src_test |
554 |
+} |
555 |
+ |
556 |
+src_install() { |
557 |
+ meson_src_install |
558 |
+ |
559 |
+ # Remove bogus, empty directories. They are either not used, or |
560 |
+ # libvirtd is able to create them on demand |
561 |
+ rm -rf "${D}"/etc/sysconfig |
562 |
+ rm -rf "${D}"/var |
563 |
+ rm -rf "${D}"/run |
564 |
+ |
565 |
+ newbashcomp "${S}/tools/bash-completion/vsh" virsh |
566 |
+ bashcomp_alias virsh virt-admin |
567 |
+ |
568 |
+ use libvirtd || return 0 |
569 |
+ # From here, only libvirtd-related instructions, be warned! |
570 |
+ |
571 |
+ systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
572 |
+ |
573 |
+ newinitd "${S}/libvirtd.init" libvirtd |
574 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
575 |
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd |
576 |
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd |
577 |
+ |
578 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
579 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
580 |
+ |
581 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") |
582 |
+ DISABLE_AUTOFORMATTING=true |
583 |
+ readme.gentoo_create_doc |
584 |
+} |
585 |
+ |
586 |
+pkg_preinst() { |
587 |
+ # we only ever want to generate this once |
588 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
589 |
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
590 |
+ fi |
591 |
+} |
592 |
+ |
593 |
+pkg_postinst() { |
594 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
595 |
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
596 |
+ fi |
597 |
+ |
598 |
+ use libvirtd || return 0 |
599 |
+ # From here, only libvirtd-related instructions, be warned! |
600 |
+ |
601 |
+ readme.gentoo_print_elog |
602 |
+} |