1 |
commit: ae058b1c7d4424f2f2cc4051b3ccb93932ac8ea2 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Feb 11 16:57:04 2021 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Feb 11 18:01:04 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae058b1c |
7 |
|
8 |
app-emulation/libvirt: drop old |
9 |
|
10 |
Package-Manager: Portage-3.0.14, Repoman-3.0.2 |
11 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
12 |
|
13 |
app-emulation/libvirt/Manifest | 2 - |
14 |
app-emulation/libvirt/libvirt-6.10.0-r2.ebuild | 330 ----------------------- |
15 |
app-emulation/libvirt/libvirt-6.9.0-r1.ebuild | 345 ------------------------- |
16 |
3 files changed, 677 deletions(-) |
17 |
|
18 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
19 |
index 1206b444fc7..123787d8413 100644 |
20 |
--- a/app-emulation/libvirt/Manifest |
21 |
+++ b/app-emulation/libvirt/Manifest |
22 |
@@ -1,4 +1,2 @@ |
23 |
-DIST libvirt-6.10.0.tar.xz 8462796 BLAKE2B f1188cc869768682bdcb7ab763465705413ebc4fe418e37d4f5ef6a861507c4104a1844cd533fce905e24847918eba6e4e4f054f66b112e9fb54ee19a3653dfc SHA512 42e77a3542e9f15c3aeaab1639a80ee6539cb0f09a1e8324aa0059a8f6041acf20263a9556ac65c9a7a14693b0756020231085e4556ff54cf8329110018a2485 |
24 |
DIST libvirt-6.8.0.tar.xz 8412092 BLAKE2B c118ca6b263054bb6941c62f3d1415f7ed1a3f29a35294272d04bc726643247ee5691e0310a1bf013faeba856d7aadd00a90fe8dbdca6ff4c7eb480e94d92fa2 SHA512 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9 |
25 |
-DIST libvirt-6.9.0.tar.xz 8432360 BLAKE2B 5cf577017158bab3ec5ad55e8e5944f4efd88cb3eb5460355ad0bfc1a30dba5c607b5b3523b8f9095552c494129ccb19bb89a6a0791469d5d47052c2375fa940 SHA512 ca9aed93589e91d383f9a5bddf5ba9fa20b849ba3b302017d625ba4910a0f942d1531006ddeaaa2622d121808105dec6e9bcb0c867f62e2fc546ce043675e175 |
26 |
DIST libvirt-7.0.0.tar.xz 8567648 BLAKE2B 0c0b360c371a14b6d82dc6bef4b228bf7a4a17db1a8425d1354128b0705365a04440217ed0862761b2a8eaf81d81494177d777e734a9045bbc87fc613b56eb05 SHA512 dd6db5ec4971cf4c6059795fd81d5a3a889b10740e34c3c92271eda1c683c99df2c8f923398065d8a7c4f987a20eb1da617d5297ba8ea5a31f154412af50c343 |
27 |
|
28 |
diff --git a/app-emulation/libvirt/libvirt-6.10.0-r2.ebuild b/app-emulation/libvirt/libvirt-6.10.0-r2.ebuild |
29 |
deleted file mode 100644 |
30 |
index d49fae5f1c0..00000000000 |
31 |
--- a/app-emulation/libvirt/libvirt-6.10.0-r2.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,330 +0,0 @@ |
34 |
-# Copyright 1999-2020 Gentoo Authors |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=7 |
38 |
- |
39 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
40 |
- |
41 |
-inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd |
42 |
- |
43 |
-if [[ ${PV} = *9999* ]]; then |
44 |
- inherit git-r3 |
45 |
- EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" |
46 |
- SRC_URI="" |
47 |
- SLOT="0" |
48 |
-else |
49 |
- SRC_URI="https://libvirt.org/sources/${P}.tar.xz" |
50 |
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
51 |
- SLOT="0/${PV}" |
52 |
-fi |
53 |
- |
54 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
55 |
-HOMEPAGE="https://www.libvirt.org/" |
56 |
-LICENSE="LGPL-2.1" |
57 |
-IUSE=" |
58 |
- apparmor audit +caps dtrace firewalld fuse glusterfs iscsi |
59 |
- iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz |
60 |
- parted pcap policykit +qemu rbd sasl selinux +udev |
61 |
- virtualbox +virt-network wireshark-plugins xen zfs |
62 |
-" |
63 |
- |
64 |
-REQUIRED_USE=" |
65 |
- firewalld? ( virt-network ) |
66 |
- libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) |
67 |
- lxc? ( caps libvirtd ) |
68 |
- openvz? ( libvirtd ) |
69 |
- qemu? ( libvirtd ) |
70 |
- virt-network? ( libvirtd ) |
71 |
- virtualbox? ( libvirtd ) |
72 |
- xen? ( libvirtd )" |
73 |
- |
74 |
-BDEPEND=" |
75 |
- acct-user/qemu |
76 |
- policykit? ( acct-group/libvirt ) |
77 |
- app-text/xhtml1 |
78 |
- dev-lang/perl |
79 |
- dev-libs/libxslt |
80 |
- dev-perl/XML-XPath |
81 |
- dev-python/docutils |
82 |
- virtual/pkgconfig" |
83 |
- |
84 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
85 |
-# non-optional, so put it into RDEPEND. |
86 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
87 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
88 |
-# we must go with the most recent |
89 |
-RDEPEND=" |
90 |
- app-misc/scrub |
91 |
- >=dev-libs/glib-2.48.0 |
92 |
- dev-libs/libgcrypt:0 |
93 |
- dev-libs/libnl:3 |
94 |
- >=dev-libs/libxml2-2.7.6 |
95 |
- >=net-analyzer/openbsd-netcat-1.105-r1 |
96 |
- >=net-libs/gnutls-1.0.25:0= |
97 |
- net-libs/libssh2 |
98 |
- net-libs/libtirpc |
99 |
- net-libs/rpcsvc-proto |
100 |
- >=net-misc/curl-7.18.0 |
101 |
- sys-apps/dbus |
102 |
- sys-apps/dmidecode |
103 |
- sys-devel/gettext |
104 |
- sys-libs/ncurses:0= |
105 |
- sys-libs/readline:= |
106 |
- apparmor? ( sys-libs/libapparmor ) |
107 |
- audit? ( sys-process/audit ) |
108 |
- caps? ( sys-libs/libcap-ng ) |
109 |
- dtrace? ( dev-util/systemtap ) |
110 |
- firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
111 |
- fuse? ( sys-fs/fuse:0= ) |
112 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
113 |
- iscsi? ( sys-block/open-iscsi ) |
114 |
- iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
115 |
- libssh? ( net-libs/libssh ) |
116 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
117 |
- lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] ) |
118 |
- nfs? ( net-fs/nfs-utils ) |
119 |
- numa? ( |
120 |
- >sys-process/numactl-2.0.2 |
121 |
- sys-process/numad |
122 |
- ) |
123 |
- parted? ( |
124 |
- >=sys-block/parted-1.8[device-mapper] |
125 |
- sys-fs/lvm2[-device-mapper-only(-)] |
126 |
- ) |
127 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
128 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
129 |
- qemu? ( |
130 |
- >=app-emulation/qemu-1.5.0 |
131 |
- dev-libs/yajl |
132 |
- ) |
133 |
- rbd? ( sys-cluster/ceph ) |
134 |
- sasl? ( dev-libs/cyrus-sasl ) |
135 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
136 |
- virt-network? ( |
137 |
- net-dns/dnsmasq[script] |
138 |
- net-firewall/ebtables |
139 |
- >=net-firewall/iptables-1.4.10[ipv6] |
140 |
- net-misc/radvd |
141 |
- sys-apps/iproute2[-minimal] |
142 |
- ) |
143 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
144 |
- xen? ( |
145 |
- >=app-emulation/xen-4.6.0 |
146 |
- app-emulation/xen-tools:= |
147 |
- ) |
148 |
- udev? ( |
149 |
- virtual/libudev |
150 |
- >=x11-libs/libpciaccess-0.10.9 |
151 |
- ) |
152 |
- zfs? ( sys-fs/zfs )" |
153 |
- |
154 |
-DEPEND="${BDEPEND} |
155 |
- ${RDEPEND} |
156 |
- ${PYTHON_DEPS}" |
157 |
- |
158 |
-PATCHES=( |
159 |
- "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch |
160 |
- "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch |
161 |
- "${FILESDIR}"/${PN}-6.7.0-doc-path.patch |
162 |
- "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch |
163 |
- "${FILESDIR}"/${PN}-6.10.0-Fix-segfault-when-parsing-mdev-types.patch |
164 |
-) |
165 |
- |
166 |
-pkg_setup() { |
167 |
- # Check kernel configuration: |
168 |
- CONFIG_CHECK="" |
169 |
- use fuse && CONFIG_CHECK+=" |
170 |
- ~FUSE_FS" |
171 |
- |
172 |
- use lvm && CONFIG_CHECK+=" |
173 |
- ~BLK_DEV_DM |
174 |
- ~DM_MULTIPATH |
175 |
- ~DM_SNAPSHOT" |
176 |
- |
177 |
- use lxc && CONFIG_CHECK+=" |
178 |
- ~BLK_CGROUP |
179 |
- ~CGROUP_CPUACCT |
180 |
- ~CGROUP_DEVICE |
181 |
- ~CGROUP_FREEZER |
182 |
- ~CGROUP_NET_PRIO |
183 |
- ~CGROUP_PERF |
184 |
- ~CGROUPS |
185 |
- ~CGROUP_SCHED |
186 |
- ~CPUSETS |
187 |
- ~IPC_NS |
188 |
- ~MACVLAN |
189 |
- ~NAMESPACES |
190 |
- ~NET_CLS_CGROUP |
191 |
- ~NET_NS |
192 |
- ~PID_NS |
193 |
- ~POSIX_MQUEUE |
194 |
- ~SECURITYFS |
195 |
- ~USER_NS |
196 |
- ~UTS_NS |
197 |
- ~VETH |
198 |
- ~!GRKERNSEC_CHROOT_MOUNT |
199 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
200 |
- ~!GRKERNSEC_CHROOT_PIVOT |
201 |
- ~!GRKERNSEC_CHROOT_CHMOD |
202 |
- ~!GRKERNSEC_CHROOT_CAPS" |
203 |
- |
204 |
- kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
205 |
- ~DEVPTS_MULTIPLE_INSTANCES" |
206 |
- |
207 |
- use virt-network && CONFIG_CHECK+=" |
208 |
- ~BRIDGE_EBT_MARK_T |
209 |
- ~BRIDGE_NF_EBTABLES |
210 |
- ~NETFILTER_ADVANCED |
211 |
- ~NETFILTER_XT_CONNMARK |
212 |
- ~NETFILTER_XT_MARK |
213 |
- ~NETFILTER_XT_TARGET_CHECKSUM |
214 |
- ~IP_NF_FILTER |
215 |
- ~IP_NF_MANGLE |
216 |
- ~IP_NF_NAT |
217 |
- ~IP_NF_TARGET_MASQUERADE |
218 |
- ~IP6_NF_FILTER |
219 |
- ~IP6_NF_MANGLE |
220 |
- ~IP6_NF_NAT" |
221 |
- # Bandwidth Limiting Support |
222 |
- use virt-network && CONFIG_CHECK+=" |
223 |
- ~BRIDGE_EBT_T_NAT |
224 |
- ~IP_NF_TARGET_REJECT |
225 |
- ~NET_ACT_POLICE |
226 |
- ~NET_CLS_FW |
227 |
- ~NET_CLS_U32 |
228 |
- ~NET_SCH_HTB |
229 |
- ~NET_SCH_INGRESS |
230 |
- ~NET_SCH_SFQ" |
231 |
- |
232 |
- # Handle specific kernel versions for different features |
233 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
234 |
- if kernel_is ge 3 6; then |
235 |
- CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
236 |
- kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
237 |
- fi |
238 |
- |
239 |
- ERROR_USER_NS="Optional depending on LXC configuration." |
240 |
- |
241 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
242 |
- linux-info_pkg_setup |
243 |
- fi |
244 |
-} |
245 |
- |
246 |
-src_prepare() { |
247 |
- touch "${S}/.mailmap" || die |
248 |
- |
249 |
- default |
250 |
- |
251 |
- # Tweak the init script: |
252 |
- cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die |
253 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
254 |
- -i "${S}/libvirtd.init" || die "sed failed" |
255 |
-} |
256 |
- |
257 |
-src_configure() { |
258 |
- local emesonargs=( |
259 |
- $(meson_feature apparmor) |
260 |
- $(meson_use apparmor apparmor_profiles) |
261 |
- $(meson_feature audit) |
262 |
- $(meson_feature caps capng) |
263 |
- $(meson_feature dtrace) |
264 |
- $(meson_feature firewalld) |
265 |
- $(meson_feature fuse) |
266 |
- $(meson_feature glusterfs) |
267 |
- $(meson_feature glusterfs storage_gluster) |
268 |
- $(meson_feature iscsi storage_iscsi) |
269 |
- $(meson_feature iscsi-direct storage_iscsi_direct) |
270 |
- $(meson_feature libvirtd driver_libvirtd) |
271 |
- $(meson_feature libssh) |
272 |
- $(meson_feature lvm storage_lvm) |
273 |
- $(meson_feature lvm storage_mpath) |
274 |
- $(meson_feature lxc driver_lxc) |
275 |
- $(meson_feature nls) |
276 |
- $(meson_feature numa numactl) |
277 |
- $(meson_feature numa numad) |
278 |
- $(meson_feature openvz driver_openvz) |
279 |
- $(meson_feature parted storage_disk) |
280 |
- $(meson_feature pcap libpcap) |
281 |
- $(meson_feature policykit polkit) |
282 |
- $(meson_feature qemu driver_qemu) |
283 |
- $(meson_feature qemu yajl) |
284 |
- $(meson_feature rbd storage_rbd) |
285 |
- $(meson_feature sasl) |
286 |
- $(meson_feature selinux) |
287 |
- $(meson_feature udev) |
288 |
- $(meson_feature virt-network driver_network) |
289 |
- $(meson_feature virtualbox driver_vbox) |
290 |
- $(meson_feature wireshark-plugins wireshark_dissector) |
291 |
- $(meson_feature xen driver_libxl) |
292 |
- $(meson_feature zfs storage_zfs) |
293 |
- |
294 |
- -Dnetcf=disabled |
295 |
- -Dsanlock=disabled |
296 |
- |
297 |
- -Ddriver_esx=enabled |
298 |
- -Dinit_script=systemd |
299 |
- -Dqemu_user=$(usex caps qemu root) |
300 |
- -Dqemu_group=$(usex caps qemu root) |
301 |
- -Ddriver_remote=enabled |
302 |
- -Dstorage_fs=enabled |
303 |
- -Ddriver_vmware=enabled |
304 |
- |
305 |
- --localstatedir="${EPREFIX}/var" |
306 |
- -Drunstatedir="${EPREFIX}/run" |
307 |
- ) |
308 |
- |
309 |
- meson_src_configure |
310 |
-} |
311 |
- |
312 |
-src_test() { |
313 |
- export VIR_TEST_DEBUG=1 |
314 |
- meson_src_test |
315 |
-} |
316 |
- |
317 |
-src_install() { |
318 |
- meson_src_install |
319 |
- |
320 |
- # Remove bogus, empty directories. They are either not used, or |
321 |
- # libvirtd is able to create them on demand |
322 |
- rm -rf "${D}"/etc/sysconfig || die |
323 |
- rm -rf "${D}"/var || die |
324 |
- rm -rf "${D}"/run || die |
325 |
- |
326 |
- newbashcomp "${S}/tools/bash-completion/vsh" virsh |
327 |
- bashcomp_alias virsh virt-admin |
328 |
- |
329 |
- use libvirtd || return 0 |
330 |
- # From here, only libvirtd-related instructions, be warned! |
331 |
- |
332 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
333 |
- |
334 |
- newinitd "${S}/libvirtd.init" libvirtd |
335 |
- newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
336 |
- newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd |
337 |
- newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd |
338 |
- |
339 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
340 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
341 |
- |
342 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") |
343 |
- DISABLE_AUTOFORMATTING=true |
344 |
- readme.gentoo_create_doc |
345 |
-} |
346 |
- |
347 |
-pkg_preinst() { |
348 |
- # we only ever want to generate this once |
349 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
350 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die |
351 |
- fi |
352 |
-} |
353 |
- |
354 |
-pkg_postinst() { |
355 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
356 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die |
357 |
- fi |
358 |
- |
359 |
- use libvirtd || return 0 |
360 |
- # From here, only libvirtd-related instructions, be warned! |
361 |
- |
362 |
- readme.gentoo_print_elog |
363 |
-} |
364 |
|
365 |
diff --git a/app-emulation/libvirt/libvirt-6.9.0-r1.ebuild b/app-emulation/libvirt/libvirt-6.9.0-r1.ebuild |
366 |
deleted file mode 100644 |
367 |
index 32c72d4990b..00000000000 |
368 |
--- a/app-emulation/libvirt/libvirt-6.9.0-r1.ebuild |
369 |
+++ /dev/null |
370 |
@@ -1,345 +0,0 @@ |
371 |
-# Copyright 1999-2020 Gentoo Authors |
372 |
-# Distributed under the terms of the GNU General Public License v2 |
373 |
- |
374 |
-EAPI=7 |
375 |
- |
376 |
-PYTHON_COMPAT=( python3_{7,8,9} ) |
377 |
- |
378 |
-inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd |
379 |
- |
380 |
-if [[ ${PV} = *9999* ]]; then |
381 |
- inherit git-r3 |
382 |
- EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" |
383 |
- SRC_URI="" |
384 |
- SLOT="0" |
385 |
-else |
386 |
- SRC_URI="https://libvirt.org/sources/${P}.tar.xz" |
387 |
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
388 |
- SLOT="0/${PV}" |
389 |
-fi |
390 |
- |
391 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
392 |
-HOMEPAGE="https://www.libvirt.org/" |
393 |
-LICENSE="LGPL-2.1" |
394 |
-IUSE=" |
395 |
- apparmor audit +caps +dbus dtrace firewalld fuse glusterfs iscsi |
396 |
- iscsi-direct +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz |
397 |
- parted pcap policykit +qemu rbd sasl selinux +udev +vepa |
398 |
- virtualbox +virt-network wireshark-plugins xen zfs |
399 |
-" |
400 |
- |
401 |
-REQUIRED_USE=" |
402 |
- firewalld? ( virt-network ) |
403 |
- libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) |
404 |
- lxc? ( caps libvirtd ) |
405 |
- openvz? ( libvirtd ) |
406 |
- policykit? ( dbus ) |
407 |
- qemu? ( libvirtd ) |
408 |
- vepa? ( macvtap ) |
409 |
- virt-network? ( libvirtd ) |
410 |
- virtualbox? ( libvirtd ) |
411 |
- xen? ( libvirtd )" |
412 |
- |
413 |
-BDEPEND=" |
414 |
- acct-user/qemu |
415 |
- policykit? ( acct-group/libvirt ) |
416 |
- app-text/xhtml1 |
417 |
- dev-lang/perl |
418 |
- dev-libs/libxslt |
419 |
- dev-perl/XML-XPath |
420 |
- dev-python/docutils |
421 |
- virtual/pkgconfig" |
422 |
- |
423 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
424 |
-# non-optional, so put it into RDEPEND. |
425 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
426 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
427 |
-# we must go with the most recent |
428 |
-RDEPEND=" |
429 |
- app-misc/scrub |
430 |
- >=dev-libs/glib-2.48.0 |
431 |
- dev-libs/libgcrypt:0 |
432 |
- dev-libs/libnl:3 |
433 |
- >=dev-libs/libxml2-2.7.6 |
434 |
- >=net-analyzer/openbsd-netcat-1.105-r1 |
435 |
- >=net-libs/gnutls-1.0.25:0= |
436 |
- net-libs/libssh2 |
437 |
- net-libs/libtirpc |
438 |
- net-libs/rpcsvc-proto |
439 |
- >=net-misc/curl-7.18.0 |
440 |
- sys-apps/dmidecode |
441 |
- sys-devel/gettext |
442 |
- sys-libs/ncurses:0= |
443 |
- sys-libs/readline:= |
444 |
- apparmor? ( sys-libs/libapparmor ) |
445 |
- audit? ( sys-process/audit ) |
446 |
- caps? ( sys-libs/libcap-ng ) |
447 |
- dbus? ( sys-apps/dbus ) |
448 |
- dtrace? ( dev-util/systemtap ) |
449 |
- firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
450 |
- fuse? ( sys-fs/fuse:0= ) |
451 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
452 |
- iscsi? ( sys-block/open-iscsi ) |
453 |
- iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
454 |
- libssh? ( net-libs/libssh ) |
455 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
456 |
- nfs? ( net-fs/nfs-utils ) |
457 |
- numa? ( |
458 |
- >sys-process/numactl-2.0.2 |
459 |
- sys-process/numad |
460 |
- ) |
461 |
- parted? ( |
462 |
- >=sys-block/parted-1.8[device-mapper] |
463 |
- sys-fs/lvm2[-device-mapper-only(-)] |
464 |
- ) |
465 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
466 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
467 |
- qemu? ( |
468 |
- >=app-emulation/qemu-1.5.0 |
469 |
- dev-libs/yajl |
470 |
- ) |
471 |
- rbd? ( sys-cluster/ceph ) |
472 |
- sasl? ( dev-libs/cyrus-sasl ) |
473 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
474 |
- virt-network? ( |
475 |
- net-dns/dnsmasq[script] |
476 |
- net-firewall/ebtables |
477 |
- >=net-firewall/iptables-1.4.10[ipv6] |
478 |
- net-misc/radvd |
479 |
- sys-apps/iproute2[-minimal] |
480 |
- ) |
481 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
482 |
- xen? ( |
483 |
- >=app-emulation/xen-4.6.0 |
484 |
- app-emulation/xen-tools:= |
485 |
- ) |
486 |
- udev? ( |
487 |
- virtual/libudev |
488 |
- >=x11-libs/libpciaccess-0.10.9 |
489 |
- ) |
490 |
- zfs? ( sys-fs/zfs )" |
491 |
- |
492 |
-DEPEND="${BDEPEND} |
493 |
- ${RDEPEND} |
494 |
- ${PYTHON_DEPS}" |
495 |
- |
496 |
-PATCHES=( |
497 |
- "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch |
498 |
- "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch |
499 |
- "${FILESDIR}"/${PN}-6.7.0-doc-path.patch |
500 |
- "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch |
501 |
- "${FILESDIR}"/${PN}-6.8.0-fix-libvirt-lxc-dbus.patch |
502 |
-) |
503 |
- |
504 |
-pkg_setup() { |
505 |
- # Check kernel configuration: |
506 |
- CONFIG_CHECK="" |
507 |
- use fuse && CONFIG_CHECK+=" |
508 |
- ~FUSE_FS" |
509 |
- |
510 |
- use lvm && CONFIG_CHECK+=" |
511 |
- ~BLK_DEV_DM |
512 |
- ~DM_MULTIPATH |
513 |
- ~DM_SNAPSHOT" |
514 |
- |
515 |
- use lxc && CONFIG_CHECK+=" |
516 |
- ~BLK_CGROUP |
517 |
- ~CGROUP_CPUACCT |
518 |
- ~CGROUP_DEVICE |
519 |
- ~CGROUP_FREEZER |
520 |
- ~CGROUP_NET_PRIO |
521 |
- ~CGROUP_PERF |
522 |
- ~CGROUPS |
523 |
- ~CGROUP_SCHED |
524 |
- ~CPUSETS |
525 |
- ~IPC_NS |
526 |
- ~MACVLAN |
527 |
- ~NAMESPACES |
528 |
- ~NET_CLS_CGROUP |
529 |
- ~NET_NS |
530 |
- ~PID_NS |
531 |
- ~POSIX_MQUEUE |
532 |
- ~SECURITYFS |
533 |
- ~USER_NS |
534 |
- ~UTS_NS |
535 |
- ~VETH |
536 |
- ~!GRKERNSEC_CHROOT_MOUNT |
537 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
538 |
- ~!GRKERNSEC_CHROOT_PIVOT |
539 |
- ~!GRKERNSEC_CHROOT_CHMOD |
540 |
- ~!GRKERNSEC_CHROOT_CAPS" |
541 |
- |
542 |
- kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
543 |
- ~DEVPTS_MULTIPLE_INSTANCES" |
544 |
- |
545 |
- use macvtap && CONFIG_CHECK+=" |
546 |
- ~MACVTAP" |
547 |
- |
548 |
- use virt-network && CONFIG_CHECK+=" |
549 |
- ~BRIDGE_EBT_MARK_T |
550 |
- ~BRIDGE_NF_EBTABLES |
551 |
- ~NETFILTER_ADVANCED |
552 |
- ~NETFILTER_XT_CONNMARK |
553 |
- ~NETFILTER_XT_MARK |
554 |
- ~NETFILTER_XT_TARGET_CHECKSUM |
555 |
- ~IP_NF_FILTER |
556 |
- ~IP_NF_MANGLE |
557 |
- ~IP_NF_NAT |
558 |
- ~IP_NF_TARGET_MASQUERADE |
559 |
- ~IP6_NF_FILTER |
560 |
- ~IP6_NF_MANGLE |
561 |
- ~IP6_NF_NAT" |
562 |
- # Bandwidth Limiting Support |
563 |
- use virt-network && CONFIG_CHECK+=" |
564 |
- ~BRIDGE_EBT_T_NAT |
565 |
- ~IP_NF_TARGET_REJECT |
566 |
- ~NET_ACT_POLICE |
567 |
- ~NET_CLS_FW |
568 |
- ~NET_CLS_U32 |
569 |
- ~NET_SCH_HTB |
570 |
- ~NET_SCH_INGRESS |
571 |
- ~NET_SCH_SFQ" |
572 |
- |
573 |
- # Handle specific kernel versions for different features |
574 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
575 |
- if kernel_is ge 3 6; then |
576 |
- CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
577 |
- kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
578 |
- fi |
579 |
- |
580 |
- ERROR_USER_NS="Optional depending on LXC configuration." |
581 |
- |
582 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
583 |
- linux-info_pkg_setup |
584 |
- fi |
585 |
-} |
586 |
- |
587 |
-src_prepare() { |
588 |
- touch "${S}/.mailmap" || die |
589 |
- |
590 |
- default |
591 |
- |
592 |
- # Tweak the init script: |
593 |
- cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die |
594 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
595 |
- -i "${S}/libvirtd.init" || die "sed failed" |
596 |
-} |
597 |
- |
598 |
-src_configure() { |
599 |
- local emesonargs=( |
600 |
- $(meson_feature apparmor) |
601 |
- $(meson_use apparmor apparmor_profiles) |
602 |
- $(meson_feature audit) |
603 |
- $(meson_feature caps capng) |
604 |
- $(meson_feature dbus) |
605 |
- $(meson_feature dtrace) |
606 |
- $(meson_feature firewalld) |
607 |
- $(meson_feature fuse) |
608 |
- $(meson_feature glusterfs) |
609 |
- $(meson_feature glusterfs storage_gluster) |
610 |
- $(meson_feature iscsi storage_iscsi) |
611 |
- $(meson_feature iscsi-direct storage_iscsi_direct) |
612 |
- $(meson_feature libvirtd driver_libvirtd) |
613 |
- $(meson_feature libssh) |
614 |
- $(meson_feature lvm storage_lvm) |
615 |
- $(meson_feature lvm storage_mpath) |
616 |
- $(meson_feature lxc driver_lxc) |
617 |
- $(meson_feature macvtap) |
618 |
- $(meson_feature nls) |
619 |
- $(meson_feature numa numactl) |
620 |
- $(meson_feature numa numad) |
621 |
- $(meson_feature openvz driver_openvz) |
622 |
- $(meson_feature parted storage_disk) |
623 |
- $(meson_feature pcap libpcap) |
624 |
- $(meson_feature policykit polkit) |
625 |
- $(meson_feature qemu driver_qemu) |
626 |
- $(meson_feature qemu yajl) |
627 |
- $(meson_feature rbd storage_rbd) |
628 |
- $(meson_feature sasl) |
629 |
- $(meson_feature selinux) |
630 |
- $(meson_feature udev) |
631 |
- $(meson_feature vepa virtualport) |
632 |
- $(meson_feature virt-network driver_network) |
633 |
- $(meson_feature virtualbox driver_vbox) |
634 |
- $(meson_feature wireshark-plugins wireshark_dissector) |
635 |
- $(meson_feature xen driver_libxl) |
636 |
- $(meson_feature zfs storage_zfs) |
637 |
- |
638 |
- -Dhal=disabled |
639 |
- -Dnetcf=disabled |
640 |
- -Dsanlock=disabled |
641 |
- |
642 |
- -Ddriver_esx=enabled |
643 |
- -Dinit_script=systemd |
644 |
- -Dqemu_user=$(usex caps qemu root) |
645 |
- -Dqemu_group=$(usex caps qemu root) |
646 |
- -Ddriver_remote=enabled |
647 |
- -Dstorage_fs=enabled |
648 |
- -Ddriver_vmware=enabled |
649 |
- |
650 |
- --localstatedir="${EPREFIX}/var" |
651 |
- -Drunstatedir="${EPREFIX}/run" |
652 |
- ) |
653 |
- |
654 |
- meson_src_configure |
655 |
-} |
656 |
- |
657 |
-src_test() { |
658 |
- # remove problematic tests, bug #591416, bug #591418 |
659 |
- sed -i -e 's#commandtest$(EXEEXT) # #' \ |
660 |
- -e 's#virfirewalltest$(EXEEXT) # #' \ |
661 |
- -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ |
662 |
- -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ |
663 |
- tests/Makefile |
664 |
- |
665 |
- export VIR_TEST_DEBUG=1 |
666 |
- meson_src_test |
667 |
-} |
668 |
- |
669 |
-src_install() { |
670 |
- meson_src_install |
671 |
- |
672 |
- # Remove bogus, empty directories. They are either not used, or |
673 |
- # libvirtd is able to create them on demand |
674 |
- rm -rf "${D}"/etc/sysconfig || die |
675 |
- rm -rf "${D}"/var || die |
676 |
- rm -rf "${D}"/run || die |
677 |
- |
678 |
- newbashcomp "${S}/tools/bash-completion/vsh" virsh |
679 |
- bashcomp_alias virsh virt-admin |
680 |
- |
681 |
- use libvirtd || return 0 |
682 |
- # From here, only libvirtd-related instructions, be warned! |
683 |
- |
684 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
685 |
- |
686 |
- newinitd "${S}/libvirtd.init" libvirtd |
687 |
- newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
688 |
- newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd |
689 |
- newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd |
690 |
- |
691 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
692 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
693 |
- |
694 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") |
695 |
- DISABLE_AUTOFORMATTING=true |
696 |
- readme.gentoo_create_doc |
697 |
-} |
698 |
- |
699 |
-pkg_preinst() { |
700 |
- # we only ever want to generate this once |
701 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
702 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die |
703 |
- fi |
704 |
-} |
705 |
- |
706 |
-pkg_postinst() { |
707 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
708 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die |
709 |
- fi |
710 |
- |
711 |
- use libvirtd || return 0 |
712 |
- # From here, only libvirtd-related instructions, be warned! |
713 |
- |
714 |
- readme.gentoo_print_elog |
715 |
-} |