Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/, dev-python/libvirt-python/
Date: Fri, 02 Oct 2020 17:05:09
Message-Id: 1601656741.6e783633710d2749ee0787dc1291708d3b1f1aa2.tamiko@gentoo
1 commit: 6e783633710d2749ee0787dc1291708d3b1f1aa2
2 Author: Jonathan Davies <jpds <AT> protonmail <DOT> com>
3 AuthorDate: Fri Oct 2 10:51:31 2020 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri Oct 2 16:39:01 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e783633
7
8 libvirt: Version updated to 6.8.0.
9
10 Bug: https://bugs.gentoo.org/746119
11
12 Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com>
13 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
14
15 app-emulation/libvirt/Manifest | 1 +
16 app-emulation/libvirt/libvirt-6.8.0.ebuild | 344 +++++++++++++++++++++
17 dev-python/libvirt-python/Manifest | 1 +
18 .../libvirt-python/libvirt-python-6.8.0.ebuild | 46 +++
19 4 files changed, 392 insertions(+)
20
21 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
22 index 8abb22472ab..d0484121929 100644
23 --- a/app-emulation/libvirt/Manifest
24 +++ b/app-emulation/libvirt/Manifest
25 @@ -1,3 +1,4 @@
26 DIST libvirt-6.2.0.tar.xz 8307248 BLAKE2B 9d449e041fc548a688f974d0801e625cf023ef0df49c40028e486e88fcf14181869e0dfd87f0eabcdd184df67dda5b5fbdc0c2375832f1534faff531779255dd SHA512 96bef701fd73aef93d1490f0bc331901a0ff6250a4f36a3e4844f76cc262dc0ae4cce8686a603c2a9c575ce489d8d5ed1521ebd22b92aff8301efdb74dee91e4
27 DIST libvirt-6.5.0.tar.xz 9407160 BLAKE2B 592aace555a3b72311cb430784587180fa7dbf74f75509cd8373a046339b9c4c0707bf530dd2d06146d78a85f8af3dba5d0b146ecec180d3cc4d3bf78c19da61 SHA512 30a032270304b97945ff2c5087c72c2f5510634186f2eaf7c3d834a72cddcaec97bbe5ccc86802728a59f4c80b5bb54757400683df5f20175757cfe07ce67453
28 DIST libvirt-6.7.0.tar.xz 8362140 BLAKE2B d0afe33fcdaab3cc0f2ea8c552e7550bcece018b049a3b58e5c05ee85b39e2b3ebf42fa1b70ddb1d2a541d1114b6b49734f23a889b3589397a30a672f27a3a56 SHA512 cabfb6aa65a3a1412b0111654ad3a7d0a6dfc63399a892c540ca39ab4e56f87626a067037e4480bb55418a371d2b5e9ac74862c92a3cdea69822ec3d158d769f
29 +DIST libvirt-6.8.0.tar.xz 8412092 BLAKE2B c118ca6b263054bb6941c62f3d1415f7ed1a3f29a35294272d04bc726643247ee5691e0310a1bf013faeba856d7aadd00a90fe8dbdca6ff4c7eb480e94d92fa2 SHA512 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9
30
31 diff --git a/app-emulation/libvirt/libvirt-6.8.0.ebuild b/app-emulation/libvirt/libvirt-6.8.0.ebuild
32 new file mode 100644
33 index 00000000000..0ac6ec64feb
34 --- /dev/null
35 +++ b/app-emulation/libvirt/libvirt-6.8.0.ebuild
36 @@ -0,0 +1,344 @@
37 +# Copyright 1999-2020 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=7
41 +
42 +PYTHON_COMPAT=( python3_{7,8,9} )
43 +
44 +inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd
45 +
46 +if [[ ${PV} = *9999* ]]; then
47 + inherit git-r3
48 + EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
49 + SRC_URI=""
50 + SLOT="0"
51 +else
52 + SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
53 + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
54 + SLOT="0/${PV}"
55 +fi
56 +
57 +DESCRIPTION="C toolkit to manipulate virtual machines"
58 +HOMEPAGE="https://www.libvirt.org/"
59 +LICENSE="LGPL-2.1"
60 +IUSE="
61 + apparmor audit +caps +dbus dtrace firewalld fuse glusterfs iscsi
62 + iscsi-direct +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz
63 + parted pcap policykit +qemu rbd sasl selinux +udev +vepa
64 + virtualbox virt-network wireshark-plugins xen zfs
65 +"
66 +
67 +REQUIRED_USE="
68 + firewalld? ( virt-network )
69 + libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
70 + lxc? ( caps libvirtd )
71 + openvz? ( libvirtd )
72 + policykit? ( dbus )
73 + qemu? ( libvirtd )
74 + vepa? ( macvtap )
75 + virt-network? ( libvirtd )
76 + virtualbox? ( libvirtd )
77 + xen? ( libvirtd )"
78 +
79 +BDEPEND="
80 + acct-user/qemu
81 + policykit? ( acct-group/libvirt )
82 + app-text/xhtml1
83 + dev-lang/perl
84 + dev-libs/libxslt
85 + dev-perl/XML-XPath
86 + dev-python/docutils
87 + virtual/pkgconfig"
88 +
89 +# gettext.sh command is used by the libvirt command wrappers, and it's
90 +# non-optional, so put it into RDEPEND.
91 +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
92 +# package will use 3 by default. Since we don't have slot pinning in an API,
93 +# we must go with the most recent
94 +RDEPEND="
95 + app-misc/scrub
96 + >=dev-libs/glib-2.48.0
97 + dev-libs/libgcrypt:0
98 + dev-libs/libnl:3
99 + >=dev-libs/libxml2-2.7.6
100 + >=net-analyzer/openbsd-netcat-1.105-r1
101 + >=net-libs/gnutls-1.0.25:0=
102 + net-libs/libssh2
103 + net-libs/libtirpc
104 + net-libs/rpcsvc-proto
105 + >=net-misc/curl-7.18.0
106 + sys-apps/dmidecode
107 + sys-devel/gettext
108 + sys-libs/ncurses:0=
109 + sys-libs/readline:=
110 + apparmor? ( sys-libs/libapparmor )
111 + audit? ( sys-process/audit )
112 + caps? ( sys-libs/libcap-ng )
113 + dbus? ( sys-apps/dbus )
114 + dtrace? ( dev-util/systemtap )
115 + firewalld? ( >=net-firewall/firewalld-0.6.3 )
116 + fuse? ( sys-fs/fuse:0= )
117 + glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
118 + iscsi? ( sys-block/open-iscsi )
119 + iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
120 + libssh? ( net-libs/libssh )
121 + lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
122 + nfs? ( net-fs/nfs-utils )
123 + numa? (
124 + >sys-process/numactl-2.0.2
125 + sys-process/numad
126 + )
127 + parted? (
128 + >=sys-block/parted-1.8[device-mapper]
129 + sys-fs/lvm2[-device-mapper-only(-)]
130 + )
131 + pcap? ( >=net-libs/libpcap-1.0.0 )
132 + policykit? ( >=sys-auth/polkit-0.9 )
133 + qemu? (
134 + >=app-emulation/qemu-1.5.0
135 + dev-libs/yajl
136 + )
137 + rbd? ( sys-cluster/ceph )
138 + sasl? ( dev-libs/cyrus-sasl )
139 + selinux? ( >=sys-libs/libselinux-2.0.85 )
140 + virt-network? (
141 + net-dns/dnsmasq[script]
142 + net-firewall/ebtables
143 + >=net-firewall/iptables-1.4.10[ipv6]
144 + net-misc/radvd
145 + sys-apps/iproute2[-minimal]
146 + )
147 + wireshark-plugins? ( net-analyzer/wireshark:= )
148 + xen? (
149 + >=app-emulation/xen-4.6.0
150 + app-emulation/xen-tools:=
151 + )
152 + udev? (
153 + virtual/libudev
154 + >=x11-libs/libpciaccess-0.10.9
155 + )
156 + zfs? ( sys-fs/zfs )"
157 +
158 +DEPEND="${BDEPEND}
159 + ${RDEPEND}
160 + ${PYTHON_DEPS}"
161 +
162 +PATCHES=(
163 + "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
164 + "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
165 + "${FILESDIR}"/${PN}-6.7.0-doc-path.patch
166 + "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
167 +)
168 +
169 +pkg_setup() {
170 + # Check kernel configuration:
171 + CONFIG_CHECK=""
172 + use fuse && CONFIG_CHECK+="
173 + ~FUSE_FS"
174 +
175 + use lvm && CONFIG_CHECK+="
176 + ~BLK_DEV_DM
177 + ~DM_MULTIPATH
178 + ~DM_SNAPSHOT"
179 +
180 + use lxc && CONFIG_CHECK+="
181 + ~BLK_CGROUP
182 + ~CGROUP_CPUACCT
183 + ~CGROUP_DEVICE
184 + ~CGROUP_FREEZER
185 + ~CGROUP_NET_PRIO
186 + ~CGROUP_PERF
187 + ~CGROUPS
188 + ~CGROUP_SCHED
189 + ~CPUSETS
190 + ~IPC_NS
191 + ~MACVLAN
192 + ~NAMESPACES
193 + ~NET_CLS_CGROUP
194 + ~NET_NS
195 + ~PID_NS
196 + ~POSIX_MQUEUE
197 + ~SECURITYFS
198 + ~USER_NS
199 + ~UTS_NS
200 + ~VETH
201 + ~!GRKERNSEC_CHROOT_MOUNT
202 + ~!GRKERNSEC_CHROOT_DOUBLE
203 + ~!GRKERNSEC_CHROOT_PIVOT
204 + ~!GRKERNSEC_CHROOT_CHMOD
205 + ~!GRKERNSEC_CHROOT_CAPS"
206 +
207 + kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
208 + ~DEVPTS_MULTIPLE_INSTANCES"
209 +
210 + use macvtap && CONFIG_CHECK+="
211 + ~MACVTAP"
212 +
213 + use virt-network && CONFIG_CHECK+="
214 + ~BRIDGE_EBT_MARK_T
215 + ~BRIDGE_NF_EBTABLES
216 + ~NETFILTER_ADVANCED
217 + ~NETFILTER_XT_CONNMARK
218 + ~NETFILTER_XT_MARK
219 + ~NETFILTER_XT_TARGET_CHECKSUM
220 + ~IP_NF_FILTER
221 + ~IP_NF_MANGLE
222 + ~IP_NF_NAT
223 + ~IP_NF_TARGET_MASQUERADE
224 + ~IP6_NF_FILTER
225 + ~IP6_NF_MANGLE
226 + ~IP6_NF_NAT"
227 + # Bandwidth Limiting Support
228 + use virt-network && CONFIG_CHECK+="
229 + ~BRIDGE_EBT_T_NAT
230 + ~IP_NF_TARGET_REJECT
231 + ~NET_ACT_POLICE
232 + ~NET_CLS_FW
233 + ~NET_CLS_U32
234 + ~NET_SCH_HTB
235 + ~NET_SCH_INGRESS
236 + ~NET_SCH_SFQ"
237 +
238 + # Handle specific kernel versions for different features
239 + kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
240 + if kernel_is ge 3 6; then
241 + CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
242 + kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
243 + fi
244 +
245 + ERROR_USER_NS="Optional depending on LXC configuration."
246 +
247 + if [[ -n ${CONFIG_CHECK} ]]; then
248 + linux-info_pkg_setup
249 + fi
250 +}
251 +
252 +src_prepare() {
253 + touch "${S}/.mailmap" || die
254 +
255 + default
256 +
257 + # Tweak the init script:
258 + cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
259 + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
260 + -i "${S}/libvirtd.init" || die "sed failed"
261 +}
262 +
263 +src_configure() {
264 + local emesonargs=(
265 + $(meson_feature apparmor)
266 + $(meson_use apparmor apparmor_profiles)
267 + $(meson_feature audit)
268 + $(meson_feature caps capng)
269 + $(meson_feature dbus)
270 + $(meson_feature dtrace)
271 + $(meson_feature firewalld)
272 + $(meson_feature fuse)
273 + $(meson_feature glusterfs)
274 + $(meson_feature glusterfs storage_gluster)
275 + $(meson_feature iscsi storage_iscsi)
276 + $(meson_feature iscsi-direct storage_iscsi_direct)
277 + $(meson_feature libvirtd driver_libvirtd)
278 + $(meson_feature libssh)
279 + $(meson_feature lvm storage_lvm)
280 + $(meson_feature lvm storage_mpath)
281 + $(meson_feature lxc driver_lxc)
282 + $(meson_feature macvtap)
283 + $(meson_feature nls)
284 + $(meson_feature numa numactl)
285 + $(meson_feature numa numad)
286 + $(meson_feature openvz driver_openvz)
287 + $(meson_feature parted storage_disk)
288 + $(meson_feature pcap libpcap)
289 + $(meson_feature policykit polkit)
290 + $(meson_feature qemu driver_qemu)
291 + $(meson_feature qemu yajl)
292 + $(meson_feature rbd storage_rbd)
293 + $(meson_feature sasl)
294 + $(meson_feature selinux)
295 + $(meson_feature udev)
296 + $(meson_feature vepa virtualport)
297 + $(meson_feature virt-network driver_network)
298 + $(meson_feature virtualbox driver_vbox)
299 + $(meson_feature wireshark-plugins wireshark_dissector)
300 + $(meson_feature xen driver_libxl)
301 + $(meson_feature zfs storage_zfs)
302 +
303 + -Dhal=disabled
304 + -Dnetcf=disabled
305 + -Dsanlock=disabled
306 +
307 + -Ddriver_esx=enabled
308 + -Dinit_script=systemd
309 + -Dqemu_user=$(usex caps qemu root)
310 + -Dqemu_group=$(usex caps qemu root)
311 + -Ddriver_remote=enabled
312 + -Dstorage_fs=enabled
313 + -Ddriver_vmware=enabled
314 +
315 + --localstatedir="${EPREFIX}/var"
316 + -Drunstatedir="${EPREFIX}/run"
317 + )
318 +
319 + meson_src_configure
320 +}
321 +
322 +src_test() {
323 + # remove problematic tests, bug #591416, bug #591418
324 + sed -i -e 's#commandtest$(EXEEXT) # #' \
325 + -e 's#virfirewalltest$(EXEEXT) # #' \
326 + -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
327 + -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
328 + tests/Makefile
329 +
330 + export VIR_TEST_DEBUG=1
331 + meson_src_test
332 +}
333 +
334 +src_install() {
335 + meson_src_install
336 +
337 + # Remove bogus, empty directories. They are either not used, or
338 + # libvirtd is able to create them on demand
339 + rm -rf "${D}"/etc/sysconfig || die
340 + rm -rf "${D}"/var || die
341 + rm -rf "${D}"/run || die
342 +
343 + newbashcomp "${S}/tools/bash-completion/vsh" virsh
344 + bashcomp_alias virsh virt-admin
345 +
346 + use libvirtd || return 0
347 + # From here, only libvirtd-related instructions, be warned!
348 +
349 + systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
350 +
351 + newinitd "${S}/libvirtd.init" libvirtd
352 + newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
353 + newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
354 + newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
355 +
356 + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
357 + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
358 +
359 + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
360 + DISABLE_AUTOFORMATTING=true
361 + readme.gentoo_create_doc
362 +}
363 +
364 +pkg_preinst() {
365 + # we only ever want to generate this once
366 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
367 + rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die
368 + fi
369 +}
370 +
371 +pkg_postinst() {
372 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
373 + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
374 + fi
375 +
376 + use libvirtd || return 0
377 + # From here, only libvirtd-related instructions, be warned!
378 +
379 + readme.gentoo_print_elog
380 +}
381
382 diff --git a/dev-python/libvirt-python/Manifest b/dev-python/libvirt-python/Manifest
383 index 84a153a4715..a5ae81b192f 100644
384 --- a/dev-python/libvirt-python/Manifest
385 +++ b/dev-python/libvirt-python/Manifest
386 @@ -1,3 +1,4 @@
387 DIST libvirt-python-6.2.0.tar.gz 196971 BLAKE2B e11c82bd98c62072c14992c485339337bcc3639bbd56154185834c145f76984ced9f09f7f05c302609ce6629a8d13db77debd6f3d85e8fdb00c818bbe51cc552 SHA512 91f6940f60670221c914ee7ffc8d89a74222bcacbbf1afd5f679479f1e1bcec563f297a8e8359d6f51a1eee29162e39e2a276f5277fcec551d50f112e304a947
388 DIST libvirt-python-6.5.0.tar.gz 198753 BLAKE2B 90951af538c664f5da20cfced6b81dc2b06d36e723b3c41a0b2763bf0d73d3036d7e84a2db57f20fa2bd1ede8fb01c45dad9e5097a9f6008579dae319f825898 SHA512 a69c75b615f674bbb89fdb3e5cfc3dddfde68adffd0599e9d03f1552bb765823dc003859fe713ac0a324835c61f909bd43518571ddde8f99c37bee2416f094eb
389 DIST libvirt-python-6.7.0.tar.gz 208597 BLAKE2B 335bd89133b688586a55193635b4b75dabe6dd4a741a450e49067ac8a9b9d9da54787b50c23bc6d5322a7fecbe513422f02450e09d541cb112ccfd499ce18101 SHA512 7d5a7f87abc01285c2030c9408838d4e1496d0d0316b9ab775749e49719fa66c20114aad2bd281d6783e2cb4d47ceac5ac60ac584e881288d0b0d9cc76d5b2cb
390 +DIST libvirt-python-6.8.0.tar.gz 210034 BLAKE2B 667c2713bf9c0936f444c5b621f5af4e5273deda31496bc01c8834286a0ec0eb1c056006549cc5d129ef597264f8582acee62db3a2fd375daa4ebbceacb8fcc1 SHA512 6d2f82fafd414047cff16f0ad655fefd69c8c0da04be07d27da44e3ab17dd03e4e4ff102be1c30948c361268f57ea312978f9198fd128bfb54a3c1a07150e6af
391
392 diff --git a/dev-python/libvirt-python/libvirt-python-6.8.0.ebuild b/dev-python/libvirt-python/libvirt-python-6.8.0.ebuild
393 new file mode 100644
394 index 00000000000..234224f5717
395 --- /dev/null
396 +++ b/dev-python/libvirt-python/libvirt-python-6.8.0.ebuild
397 @@ -0,0 +1,46 @@
398 +# Copyright 1999-2020 Gentoo Authors
399 +# Distributed under the terms of the GNU General Public License v2
400 +
401 +EAPI=7
402 +
403 +PYTHON_COMPAT=( python3_{7..9} )
404 +
405 +DISTUTILS_USE_SETUPTOOLS=no
406 +
407 +MY_P="${P/_rc/-rc}"
408 +
409 +inherit distutils-r1
410 +
411 +if [[ ${PV} = *9999* ]]; then
412 + inherit git-r3
413 + EGIT_REPO_URI="https://libvirt.org/git/libvirt-python.git"
414 + RDEPEND="app-emulation/libvirt:=[-python(-)]"
415 +else
416 + SRC_URI="https://libvirt.org/sources/python/${MY_P}.tar.gz"
417 + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
418 + RDEPEND="app-emulation/libvirt:0/${PV}"
419 +fi
420 +S="${WORKDIR}/${P%_rc*}"
421 +
422 +DESCRIPTION="libvirt Python bindings"
423 +HOMEPAGE="https://www.libvirt.org"
424 +LICENSE="LGPL-2"
425 +SLOT="0"
426 +IUSE="examples test"
427 +RESTRICT="!test? ( test )"
428 +
429 +DEPEND="virtual/pkgconfig"
430 +BDEPEND="test? (
431 + dev-python/lxml[${PYTHON_USEDEP}]
432 + dev-python/nose[${PYTHON_USEDEP}]
433 +)"
434 +
435 +distutils_enable_tests setup.py
436 +
437 +python_install_all() {
438 + if use examples; then
439 + dodoc -r examples
440 + docompress -x /usr/share/doc/${PF}/examples
441 + fi
442 + distutils-r1_python_install_all
443 +}