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/
Date: Wed, 13 Oct 2021 02:55:02
Message-Id: 1634093695.47a39bb9234e96e4eb7c1e9385c4097156066935.tamiko@gentoo
1 commit: 47a39bb9234e96e4eb7c1e9385c4097156066935
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 13 02:49:17 2021 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 13 02:54:55 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47a39bb9
7
8 app-emulation/libvirt: version bump to 7.8.0
9
10 Package-Manager: Portage-3.0.23, Repoman-3.0.3
11 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
12
13 app-emulation/libvirt/Manifest | 2 +
14 app-emulation/libvirt/libvirt-7.8.0.ebuild | 327 +++++++++++++++++++++++++++++
15 2 files changed, 329 insertions(+)
16
17 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
18 index 20c81af0a58..64d3b21ae74 100644
19 --- a/app-emulation/libvirt/Manifest
20 +++ b/app-emulation/libvirt/Manifest
21 @@ -12,3 +12,5 @@ DIST libvirt-7.5.0.tar.xz 8642788 BLAKE2B 467dbd2a337beee5d9f10de7bc37ca988e85fa
22 DIST libvirt-7.5.0.tar.xz.asc 833 BLAKE2B ab9ba2a02e4af90002fffbcd0bc04f9faa1d5a23ab815d6b9b6ef1410d9d114fc07c1b29850b59d1ab4ea3a186f4b7d65f5a5ca37d65f3034146617445849dcb SHA512 ebcc1fcce10e19e0a4ae43fbf9bfd5b1b7732829eeb3543c84ba24e0a5d9872be692e7b6c105cdcd730d1c26b895b306387ab380623acf6bba242bd2c62ec7b2
23 DIST libvirt-7.7.0.tar.xz 8670212 BLAKE2B 93c72117941b0a74484c7510c8437054e66fc3ad20c02cead3ce917a38868da2acff9b1e70bbb823122ba647763a3682aaa0da04d82fa75e1acc67449301ae8c SHA512 a0d585c9ac46be08d2865d66456d681b7233291d17f6e0ed2564d0f29dc38ea7afc846ab382f58a193d3cd9acaf25fcc526feb3c98e12a6b4b8ae5aa4aec2f3e
24 DIST libvirt-7.7.0.tar.xz.asc 833 BLAKE2B 86a77bf461e353776d79f31f1d0c82fa13e28348bd9c6ae7cb653b98886c7e070d67ed0db55f5e1f3b5e5bd2a3861a5cb08dbf95799b14df1037139f8001b030 SHA512 d5f8cd6accd3bfaebfb7c8761e321aaa9a090c7705256785c5507aa88d985f78a788047dc881f37ea6f64a4634c65c9718d8b1ee0a24744acc3ad5ed6e517bdf
25 +DIST libvirt-7.8.0.tar.xz 8735184 BLAKE2B 44ad9465a0bcb683777677de87e422741fe88d604297297f859ba94378b91b80855b9d4cd91de60a1c140c6dc2b4cb61020296933f68526605945e8accfadbcb SHA512 0fe31b70178d662a5c8019ef424568b95d9d4c2eb74113c1b697ccf4eef1e110c3095e19835cef2c9459a694a5f4785b0761c19ec78062af88c39651291fa040
26 +DIST libvirt-7.8.0.tar.xz.asc 833 BLAKE2B 10d315ec715a9ede62103276631ca4ac95feb543faea984e108f4d74857dbc3929d799a7b28d1816a3a6736fa388489a0c44ec01c6eef27528a94f997e8b2d65 SHA512 283c486ca9a56442f9aaead20e71e496a169f902ea33ad7ffe2a830630a50b4314abdd477727c502d3c273506f2a0014079420079907b568da449aaf546f3b60
27
28 diff --git a/app-emulation/libvirt/libvirt-7.8.0.ebuild b/app-emulation/libvirt/libvirt-7.8.0.ebuild
29 new file mode 100644
30 index 00000000000..34cffee8629
31 --- /dev/null
32 +++ b/app-emulation/libvirt/libvirt-7.8.0.ebuild
33 @@ -0,0 +1,327 @@
34 +# Copyright 1999-2021 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 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig
42 +
43 +if [[ ${PV} = *9999* ]]; then
44 + inherit git-r3
45 + EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
46 + EGIT_BRANCH="master"
47 + SRC_URI=""
48 + SLOT="0"
49 +else
50 + SRC_URI="https://libvirt.org/sources/${P}.tar.xz
51 + verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )"
52 + KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
53 + SLOT="0/${PV}"
54 +fi
55 +
56 +DESCRIPTION="C toolkit to manipulate virtual machines"
57 +HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/"
58 +LICENSE="LGPL-2.1"
59 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libvirt.org.asc
60 +IUSE="
61 + apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs
62 + iscsi iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz
63 + parted pcap policykit +qemu rbd sasl selinux +udev
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 + qemu? ( libvirtd )
73 + virt-network? ( libvirtd )
74 + virtualbox? ( libvirtd )
75 + xen? ( libvirtd )"
76 +
77 +BDEPEND="
78 + app-text/xhtml1
79 + dev-lang/perl
80 + dev-libs/libxslt
81 + dev-perl/XML-XPath
82 + dev-python/docutils
83 + virtual/pkgconfig
84 + bash-completion? ( >=app-shells/bash-completion-2.0 )
85 + verify-sig? ( app-crypt/openpgp-keys-libvirt )"
86 +
87 +# gettext.sh command is used by the libvirt command wrappers, and it's
88 +# non-optional, so put it into RDEPEND.
89 +# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
90 +# package will use 3 by default. Since we don't have slot pinning in an API,
91 +# we must go with the most recent
92 +RDEPEND="
93 + acct-user/qemu
94 + app-misc/scrub
95 + >=dev-libs/glib-2.48.0
96 + dev-libs/libgcrypt:0
97 + dev-libs/libnl:3
98 + >=dev-libs/libxml2-2.7.6
99 + >=net-analyzer/openbsd-netcat-1.105-r1
100 + >=net-libs/gnutls-1.0.25:0=
101 + net-libs/libssh2
102 + net-libs/libtirpc
103 + net-libs/rpcsvc-proto
104 + >=net-misc/curl-7.18.0
105 + sys-apps/dbus
106 + sys-apps/dmidecode
107 + sys-devel/gettext
108 + sys-libs/ncurses:0=
109 + sys-libs/readline:=
110 + virtual/acl
111 + apparmor? ( sys-libs/libapparmor )
112 + audit? ( sys-process/audit )
113 + caps? ( sys-libs/libcap-ng )
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 + lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] )
123 + nfs? ( net-fs/nfs-utils )
124 + numa? (
125 + >sys-process/numactl-2.0.2
126 + sys-process/numad
127 + )
128 + parted? (
129 + >=sys-block/parted-1.8[device-mapper]
130 + sys-fs/lvm2[-device-mapper-only(-)]
131 + )
132 + pcap? ( >=net-libs/libpcap-1.0.0 )
133 + policykit? (
134 + acct-group/libvirt
135 + >=sys-auth/polkit-0.9
136 + )
137 + qemu? (
138 + >=app-emulation/qemu-2.11
139 + dev-libs/yajl
140 + )
141 + rbd? ( sys-cluster/ceph )
142 + sasl? ( dev-libs/cyrus-sasl )
143 + selinux? ( >=sys-libs/libselinux-2.0.85 )
144 + virt-network? (
145 + net-dns/dnsmasq[dhcp,ipv6,script]
146 + net-firewall/ebtables
147 + >=net-firewall/iptables-1.4.10[ipv6]
148 + net-misc/radvd
149 + sys-apps/iproute2[-minimal]
150 + )
151 + wireshark-plugins? ( net-analyzer/wireshark:= )
152 + xen? (
153 + >=app-emulation/xen-4.9.0
154 + app-emulation/xen-tools:=
155 + )
156 + udev? (
157 + virtual/libudev
158 + >=x11-libs/libpciaccess-0.10.9
159 + )
160 + zfs? ( sys-fs/zfs )"
161 +
162 +DEPEND="${BDEPEND}
163 + ${RDEPEND}
164 + ${PYTHON_DEPS}"
165 +
166 +PATCHES=(
167 + "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
168 + "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
169 + "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
170 +)
171 +
172 +pkg_setup() {
173 + # Check kernel configuration:
174 + CONFIG_CHECK=""
175 + use fuse && CONFIG_CHECK+="
176 + ~FUSE_FS"
177 +
178 + use lvm && CONFIG_CHECK+="
179 + ~BLK_DEV_DM
180 + ~DM_MULTIPATH
181 + ~DM_SNAPSHOT"
182 +
183 + use lxc && CONFIG_CHECK+="
184 + ~BLK_CGROUP
185 + ~CGROUP_CPUACCT
186 + ~CGROUP_DEVICE
187 + ~CGROUP_FREEZER
188 + ~CGROUP_NET_PRIO
189 + ~CGROUP_PERF
190 + ~CGROUPS
191 + ~CGROUP_SCHED
192 + ~CPUSETS
193 + ~IPC_NS
194 + ~MACVLAN
195 + ~NAMESPACES
196 + ~NET_CLS_CGROUP
197 + ~NET_NS
198 + ~PID_NS
199 + ~POSIX_MQUEUE
200 + ~SECURITYFS
201 + ~USER_NS
202 + ~UTS_NS
203 + ~VETH
204 + ~!GRKERNSEC_CHROOT_MOUNT
205 + ~!GRKERNSEC_CHROOT_DOUBLE
206 + ~!GRKERNSEC_CHROOT_PIVOT
207 + ~!GRKERNSEC_CHROOT_CHMOD
208 + ~!GRKERNSEC_CHROOT_CAPS"
209 +
210 + kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
211 + ~DEVPTS_MULTIPLE_INSTANCES"
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 + ERROR_USER_NS="Optional depending on LXC configuration."
239 +
240 + if [[ -n ${CONFIG_CHECK} ]]; then
241 + linux-info_pkg_setup
242 + fi
243 +
244 + python-any-r1_pkg_setup
245 +}
246 +
247 +src_prepare() {
248 + touch "${S}/.mailmap" || die
249 +
250 + default
251 + python_fix_shebang .
252 +
253 + # Tweak the init script:
254 + cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
255 + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
256 + -i "${S}/libvirtd.init" || die "sed failed"
257 +}
258 +
259 +src_configure() {
260 + local emesonargs=(
261 + $(meson_feature apparmor)
262 + $(meson_feature apparmor apparmor_profiles)
263 + $(meson_feature audit)
264 + $(meson_feature caps capng)
265 + $(meson_feature dtrace)
266 + $(meson_feature firewalld)
267 + $(meson_feature fuse)
268 + $(meson_feature glusterfs)
269 + $(meson_feature glusterfs storage_gluster)
270 + $(meson_feature iscsi storage_iscsi)
271 + $(meson_feature iscsi-direct storage_iscsi_direct)
272 + $(meson_feature libvirtd driver_libvirtd)
273 + $(meson_feature libssh)
274 + $(meson_feature lvm storage_lvm)
275 + $(meson_feature lvm storage_mpath)
276 + $(meson_feature lxc driver_lxc)
277 + $(meson_feature nls)
278 + $(meson_feature numa numactl)
279 + $(meson_feature numa numad)
280 + $(meson_feature openvz driver_openvz)
281 + $(meson_feature parted storage_disk)
282 + $(meson_feature pcap libpcap)
283 + $(meson_feature policykit polkit)
284 + $(meson_feature qemu driver_qemu)
285 + $(meson_feature qemu yajl)
286 + $(meson_feature rbd storage_rbd)
287 + $(meson_feature sasl)
288 + $(meson_feature selinux)
289 + $(meson_feature udev)
290 + $(meson_feature virt-network driver_network)
291 + $(meson_feature virtualbox driver_vbox)
292 + $(meson_feature wireshark-plugins wireshark_dissector)
293 + $(meson_feature xen driver_libxl)
294 + $(meson_feature zfs storage_zfs)
295 +
296 + -Dnetcf=disabled
297 + -Dsanlock=disabled
298 +
299 + -Ddriver_esx=enabled
300 + -Dinit_script=systemd
301 + -Dqemu_user=$(usex caps qemu root)
302 + -Dqemu_group=$(usex caps qemu root)
303 + -Ddriver_remote=enabled
304 + -Dstorage_fs=enabled
305 + -Ddriver_vmware=enabled
306 +
307 + --localstatedir="${EPREFIX}/var"
308 + -Drunstatedir="${EPREFIX}/run"
309 + -Ddocdir="${EPREFIX}/usr/share/doc/${PF}"
310 + )
311 +
312 + meson_src_configure
313 +}
314 +
315 +src_test() {
316 + export VIR_TEST_DEBUG=1
317 + meson_src_test
318 +}
319 +
320 +src_install() {
321 + meson_src_install
322 +
323 + # Depending on configuration option, libvirt will create some bogus
324 + # directoreis. They are either not used, or libvirtd is able to create
325 + # them on demand, so let's remove them.
326 + #
327 + # Note, we are using -f here so that rm does not fail or warn if the
328 + # directory is nonexistent.
329 + rm -rf "${D}"/etc/sysconfig
330 + rm -rf "${D}"/var
331 + rm -rf "${D}"/run
332 +
333 + use libvirtd || return 0
334 + # From here, only libvirtd-related instructions, be warned!
335 +
336 + newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
337 +
338 + newinitd "${S}/libvirtd.init" libvirtd
339 + newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
340 + newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
341 + newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
342 +
343 + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
344 + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
345 +
346 + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
347 + DISABLE_AUTOFORMATTING=true
348 + readme.gentoo_create_doc
349 +}
350 +
351 +pkg_postinst() {
352 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
353 + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
354 + fi
355 +
356 + use libvirtd || return 0
357 + # From here, only libvirtd-related instructions, be warned!
358 + tmpfiles_process libvirtd.conf
359 + readme.gentoo_print_elog
360 +}