1 |
commit: 1fbde295b2ac747fe8995079f7007dbfe11ecef0 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 3 02:57:33 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 3 03:08:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fbde295 |
7 |
|
8 |
app-emulation/libvirt: add 8.4.0 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
app-emulation/libvirt/Manifest | 2 + |
13 |
app-emulation/libvirt/libvirt-8.4.0.ebuild | 340 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 342 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
17 |
index a2579a56b3b3..879c08d531e1 100644 |
18 |
--- a/app-emulation/libvirt/Manifest |
19 |
+++ b/app-emulation/libvirt/Manifest |
20 |
@@ -10,3 +10,5 @@ DIST libvirt-8.2.0.tar.xz 8871236 BLAKE2B 85c4fd7323f4ea0564e6fcb37dffe643d0ff54 |
21 |
DIST libvirt-8.2.0.tar.xz.asc 833 BLAKE2B 3dba2fe7dc76052307ab8b1d7f2a61445759ed15e130615ca2a6325e981ae5c1a7143e7d78ee67f2bf9001cdf82126dff89f4f1eb3b39b77620721a5b75f4cfa SHA512 33ecc465da1b7e4b53733611255d01414f8c1081c96fdcb0a9f1a0e194823872b7f9f9032938527f6d1d8bbebc3b61f2dc393875b8d11fdd47bec40e9408475b |
22 |
DIST libvirt-8.3.0.tar.xz 8829288 BLAKE2B 37890dac8f46e14c5f0329f7f3318b611bfe3b97b7beddcdb91541e71a619738baa2a3e9847fee2d0b63abb630895860555a5337686702fc6fb06cc4f060f8b5 SHA512 914c8a4884d703f368849b852ba8330d1b17cf598a359f70d344e0a94e02f60337216e9011cbeba90eb4e87fa644e7eb9e8a407ca58632b2b41511d3f598ff71 |
23 |
DIST libvirt-8.3.0.tar.xz.asc 833 BLAKE2B d1faf041532fc4c33641cab0510401db2fb1c45004f2615df6807729d7a83a8a28bd2410eb5478e479e7cd1b28272ee92885b30ecdccb8a9390536df51377d5e SHA512 5c32087769aba0d2a245a4ce317e1428842a682cf71e03e5f33fc4476309f40c08118241b1ad2b4be14933971431960b89960858a1f841ab1b7c9bda9f571d52 |
24 |
+DIST libvirt-8.4.0.tar.xz 8846528 BLAKE2B 479d7d47a9d711e0240da09eb295f1a644bc4cfddbe544908f2011eb45dff9cf9ffdfff87ba63ded96f5b69024c65832326f9fb0837c5338114ad5dbbada7af1 SHA512 e9dcaa489f162e3a26fe1ca7bb83a22e3f1952594c3541ddd2a7f8e8a0e6ad37e193fb89421df1efe3d2a4d9bb7cf5455c7b7a0b59e133eb6c0ff3cbbd8403b6 |
25 |
+DIST libvirt-8.4.0.tar.xz.asc 833 BLAKE2B 7bfbfc05ce7d95018c07e92d475bc0fddbb0b396132c12defd0205638d22534ba83fea8180345635b9f59b8a10fd3177b1a84ad748f1ddb9e533e11700bd4cbd SHA512 5d85ce4764dc36d940033c5feda59b9cff64844a52e3a25b1b8d0278adbc2378978a7dbe6f577f82bc760d617edc75c4a6ab8e1325a38847e1d40e3bf7c9684b |
26 |
|
27 |
diff --git a/app-emulation/libvirt/libvirt-8.4.0.ebuild b/app-emulation/libvirt/libvirt-8.4.0.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..6128a61b974d |
30 |
--- /dev/null |
31 |
+++ b/app-emulation/libvirt/libvirt-8.4.0.ebuild |
32 |
@@ -0,0 +1,340 @@ |
33 |
+# Copyright 1999-2022 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=8 |
37 |
+ |
38 |
+# Packages which get releases together: |
39 |
+# app-emacs/nxml-libvirt-schemas |
40 |
+# dev-python/libvirt-python |
41 |
+# dev-perl/Sys-Virt |
42 |
+# app-emulation/libvirt |
43 |
+# Please bump them together! |
44 |
+ |
45 |
+PYTHON_COMPAT=( python3_{8..11} ) |
46 |
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/libvirt.org.asc |
47 |
+inherit meson bash-completion-r1 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig |
48 |
+ |
49 |
+if [[ ${PV} = *9999* ]]; then |
50 |
+ inherit git-r3 |
51 |
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" |
52 |
+ EGIT_BRANCH="master" |
53 |
+else |
54 |
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz |
55 |
+ verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )" |
56 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
57 |
+fi |
58 |
+ |
59 |
+DESCRIPTION="C toolkit to manipulate virtual machines" |
60 |
+HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/" |
61 |
+LICENSE="LGPL-2.1" |
62 |
+SLOT="0/${PV}" |
63 |
+IUSE=" |
64 |
+ apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs |
65 |
+ iscsi iscsi-direct +libvirtd lvm libssh libssh2 lxc nfs nls numa openvz |
66 |
+ parted pcap policykit +qemu rbd sasl selinux +udev |
67 |
+ virtualbox +virt-network wireshark-plugins xen zfs |
68 |
+" |
69 |
+ |
70 |
+REQUIRED_USE=" |
71 |
+ firewalld? ( virt-network ) |
72 |
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) |
73 |
+ lxc? ( caps libvirtd ) |
74 |
+ openvz? ( libvirtd ) |
75 |
+ qemu? ( libvirtd ) |
76 |
+ virt-network? ( libvirtd ) |
77 |
+ virtualbox? ( libvirtd ) |
78 |
+ xen? ( libvirtd )" |
79 |
+ |
80 |
+BDEPEND=" |
81 |
+ app-text/xhtml1 |
82 |
+ dev-lang/perl |
83 |
+ dev-libs/libxslt |
84 |
+ dev-perl/XML-XPath |
85 |
+ dev-python/docutils |
86 |
+ virtual/pkgconfig |
87 |
+ net-libs/rpcsvc-proto |
88 |
+ bash-completion? ( >=app-shells/bash-completion-2.0 ) |
89 |
+ verify-sig? ( sec-keys/openpgp-keys-libvirt )" |
90 |
+ |
91 |
+# gettext.sh command is used by the libvirt command wrappers, and it's |
92 |
+# non-optional, so put it into RDEPEND. |
93 |
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
94 |
+# package will use 3 by default. Since we don't have slot pinning in an API, |
95 |
+# we must go with the most recent |
96 |
+RDEPEND=" |
97 |
+ acct-user/qemu |
98 |
+ app-misc/scrub |
99 |
+ >=dev-libs/glib-2.56.0 |
100 |
+ dev-libs/libgcrypt |
101 |
+ dev-libs/libnl:3 |
102 |
+ >=dev-libs/libxml2-2.9.1 |
103 |
+ >=net-analyzer/openbsd-netcat-1.105-r1 |
104 |
+ >=net-libs/gnutls-3.2.0:= |
105 |
+ net-libs/libtirpc:= |
106 |
+ >=net-misc/curl-7.18.0 |
107 |
+ sys-apps/dbus |
108 |
+ sys-apps/dmidecode |
109 |
+ sys-devel/gettext |
110 |
+ >=sys-libs/readline-7.0:= |
111 |
+ virtual/acl |
112 |
+ apparmor? ( sys-libs/libapparmor ) |
113 |
+ audit? ( sys-process/audit ) |
114 |
+ caps? ( sys-libs/libcap-ng ) |
115 |
+ dtrace? ( dev-util/systemtap ) |
116 |
+ firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
117 |
+ fuse? ( sys-fs/fuse:= ) |
118 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
119 |
+ iscsi? ( >=sys-block/open-iscsi-1.18.0 ) |
120 |
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
121 |
+ libssh? ( >=net-libs/libssh-0.7:= ) |
122 |
+ libssh2? ( >=net-libs/libssh2-1.3 ) |
123 |
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
124 |
+ lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] ) |
125 |
+ nfs? ( net-fs/nfs-utils ) |
126 |
+ numa? ( |
127 |
+ >sys-process/numactl-2.0.2 |
128 |
+ sys-process/numad |
129 |
+ ) |
130 |
+ parted? ( |
131 |
+ >=sys-block/parted-1.8[device-mapper] |
132 |
+ sys-fs/lvm2[-device-mapper-only(-)] |
133 |
+ ) |
134 |
+ pcap? ( >=net-libs/libpcap-1.8.0 ) |
135 |
+ policykit? ( |
136 |
+ acct-group/libvirt |
137 |
+ >=sys-auth/polkit-0.9 |
138 |
+ ) |
139 |
+ qemu? ( |
140 |
+ >=app-emulation/qemu-2.11 |
141 |
+ >=dev-libs/yajl-2.0.3:= |
142 |
+ ) |
143 |
+ rbd? ( sys-cluster/ceph ) |
144 |
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.26 ) |
145 |
+ selinux? ( >=sys-libs/libselinux-2.0.85 ) |
146 |
+ virt-network? ( |
147 |
+ net-dns/dnsmasq[dhcp,ipv6(+),script] |
148 |
+ net-firewall/ebtables |
149 |
+ >=net-firewall/iptables-1.4.10[ipv6(+)] |
150 |
+ net-misc/radvd |
151 |
+ sys-apps/iproute2[-minimal] |
152 |
+ ) |
153 |
+ wireshark-plugins? ( >=net-analyzer/wireshark-2.6.0:= ) |
154 |
+ xen? ( |
155 |
+ >=app-emulation/xen-4.9.0 |
156 |
+ app-emulation/xen-tools:= |
157 |
+ ) |
158 |
+ udev? ( |
159 |
+ virtual/libudev:= |
160 |
+ >=x11-libs/libpciaccess-0.10.9 |
161 |
+ ) |
162 |
+ zfs? ( sys-fs/zfs ) |
163 |
+ kernel_linux? ( sys-apps/util-linux )" |
164 |
+DEPEND="${BDEPEND} |
165 |
+ ${RDEPEND} |
166 |
+ ${PYTHON_DEPS}" |
167 |
+ |
168 |
+PATCHES=( |
169 |
+ "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch |
170 |
+ "${FILESDIR}"/${PN}-8.2.0-do-not-use-sysconfig.patch |
171 |
+ "${FILESDIR}"/${PN}-8.2.0-fix-paths-for-apparmor.patch |
172 |
+) |
173 |
+ |
174 |
+pkg_setup() { |
175 |
+ # Check kernel configuration: |
176 |
+ CONFIG_CHECK="" |
177 |
+ use fuse && CONFIG_CHECK+=" |
178 |
+ ~FUSE_FS" |
179 |
+ |
180 |
+ use lvm && CONFIG_CHECK+=" |
181 |
+ ~BLK_DEV_DM |
182 |
+ ~DM_MULTIPATH |
183 |
+ ~DM_SNAPSHOT" |
184 |
+ |
185 |
+ use lxc && CONFIG_CHECK+=" |
186 |
+ ~BLK_CGROUP |
187 |
+ ~CGROUP_CPUACCT |
188 |
+ ~CGROUP_DEVICE |
189 |
+ ~CGROUP_FREEZER |
190 |
+ ~CGROUP_NET_PRIO |
191 |
+ ~CGROUP_PERF |
192 |
+ ~CGROUPS |
193 |
+ ~CGROUP_SCHED |
194 |
+ ~CPUSETS |
195 |
+ ~IPC_NS |
196 |
+ ~MACVLAN |
197 |
+ ~NAMESPACES |
198 |
+ ~NET_CLS_CGROUP |
199 |
+ ~NET_NS |
200 |
+ ~PID_NS |
201 |
+ ~POSIX_MQUEUE |
202 |
+ ~SECURITYFS |
203 |
+ ~USER_NS |
204 |
+ ~UTS_NS |
205 |
+ ~VETH |
206 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
207 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
208 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
209 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
210 |
+ ~!GRKERNSEC_CHROOT_CAPS" |
211 |
+ |
212 |
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
213 |
+ ~DEVPTS_MULTIPLE_INSTANCES" |
214 |
+ |
215 |
+ use virt-network && CONFIG_CHECK+=" |
216 |
+ ~BRIDGE_EBT_MARK_T |
217 |
+ ~BRIDGE_NF_EBTABLES |
218 |
+ ~NETFILTER_ADVANCED |
219 |
+ ~NETFILTER_XT_CONNMARK |
220 |
+ ~NETFILTER_XT_MARK |
221 |
+ ~NETFILTER_XT_TARGET_CHECKSUM |
222 |
+ ~IP_NF_FILTER |
223 |
+ ~IP_NF_MANGLE |
224 |
+ ~IP_NF_NAT |
225 |
+ ~IP_NF_TARGET_MASQUERADE |
226 |
+ ~IP6_NF_FILTER |
227 |
+ ~IP6_NF_MANGLE |
228 |
+ ~IP6_NF_NAT" |
229 |
+ # Bandwidth Limiting Support |
230 |
+ use virt-network && CONFIG_CHECK+=" |
231 |
+ ~BRIDGE_EBT_T_NAT |
232 |
+ ~IP_NF_TARGET_REJECT |
233 |
+ ~NET_ACT_POLICE |
234 |
+ ~NET_CLS_FW |
235 |
+ ~NET_CLS_U32 |
236 |
+ ~NET_SCH_HTB |
237 |
+ ~NET_SCH_INGRESS |
238 |
+ ~NET_SCH_SFQ" |
239 |
+ |
240 |
+ ERROR_USER_NS="Optional depending on LXC configuration." |
241 |
+ |
242 |
+ if [[ -n ${CONFIG_CHECK} ]]; then |
243 |
+ linux-info_pkg_setup |
244 |
+ fi |
245 |
+ |
246 |
+ python-any-r1_pkg_setup |
247 |
+} |
248 |
+ |
249 |
+src_prepare() { |
250 |
+ touch "${S}/.mailmap" || die |
251 |
+ |
252 |
+ default |
253 |
+ python_fix_shebang . |
254 |
+ |
255 |
+ # Skip fragile tests which relies on pristine environment |
256 |
+ # (Breaks because of sandbox environment variables) |
257 |
+ # bug #802876 |
258 |
+ sed -i -e "/commandtest/d" tests/meson.build || die |
259 |
+ |
260 |
+ # Tweak the init script: |
261 |
+ cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die |
262 |
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
263 |
+ -i "${S}/libvirtd.init" || die "sed failed" |
264 |
+} |
265 |
+ |
266 |
+src_configure() { |
267 |
+ local emesonargs=( |
268 |
+ $(meson_feature apparmor) |
269 |
+ $(meson_feature apparmor apparmor_profiles) |
270 |
+ $(meson_feature audit) |
271 |
+ $(meson_feature caps capng) |
272 |
+ $(meson_feature dtrace) |
273 |
+ $(meson_feature firewalld) |
274 |
+ $(meson_feature fuse) |
275 |
+ $(meson_feature glusterfs) |
276 |
+ $(meson_feature glusterfs storage_gluster) |
277 |
+ $(meson_feature iscsi storage_iscsi) |
278 |
+ $(meson_feature iscsi-direct storage_iscsi_direct) |
279 |
+ $(meson_feature libvirtd driver_libvirtd) |
280 |
+ $(meson_feature libssh) |
281 |
+ $(meson_feature libssh2) |
282 |
+ $(meson_feature lvm storage_lvm) |
283 |
+ $(meson_feature lvm storage_mpath) |
284 |
+ $(meson_feature lxc driver_lxc) |
285 |
+ $(meson_feature nls) |
286 |
+ $(meson_feature numa numactl) |
287 |
+ $(meson_feature numa numad) |
288 |
+ $(meson_feature openvz driver_openvz) |
289 |
+ $(meson_feature parted storage_disk) |
290 |
+ $(meson_feature pcap libpcap) |
291 |
+ $(meson_feature policykit polkit) |
292 |
+ $(meson_feature qemu driver_qemu) |
293 |
+ $(meson_feature qemu yajl) |
294 |
+ $(meson_feature rbd storage_rbd) |
295 |
+ $(meson_feature sasl) |
296 |
+ $(meson_feature selinux) |
297 |
+ $(meson_feature udev) |
298 |
+ $(meson_feature virt-network driver_network) |
299 |
+ $(meson_feature virtualbox driver_vbox) |
300 |
+ $(meson_feature wireshark-plugins wireshark_dissector) |
301 |
+ $(meson_feature xen driver_libxl) |
302 |
+ $(meson_feature zfs storage_zfs) |
303 |
+ |
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 |
+ -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" |
318 |
+ ) |
319 |
+ |
320 |
+ meson_src_configure |
321 |
+} |
322 |
+ |
323 |
+src_test() { |
324 |
+ export VIR_TEST_DEBUG=1 |
325 |
+ # Don't run the syntax check tests, they're fragile and not relevant |
326 |
+ # to us downstream anyway. |
327 |
+ # We also crank up the timeout (as Fedora does) just to preempt failures |
328 |
+ # on slower arches. |
329 |
+ meson_src_test --no-suite syntax-check --timeout-multiplier 10 |
330 |
+} |
331 |
+ |
332 |
+src_install() { |
333 |
+ meson_src_install |
334 |
+ |
335 |
+ # Depending on configuration option, libvirt will create some bogus |
336 |
+ # directoreis. They are either not used, or libvirtd is able to create |
337 |
+ # them on demand, so let's remove them. |
338 |
+ # |
339 |
+ # Note, we are using -f here so that rm does not fail or warn if the |
340 |
+ # directory is nonexistent. |
341 |
+ rm -rf "${D}"/etc/sysconfig |
342 |
+ rm -rf "${D}"/var |
343 |
+ rm -rf "${D}"/run |
344 |
+ |
345 |
+ use libvirtd || return 0 |
346 |
+ # From here, only libvirtd-related instructions, be warned! |
347 |
+ |
348 |
+ newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
349 |
+ |
350 |
+ newinitd "${S}/libvirtd.init" libvirtd |
351 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
352 |
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd |
353 |
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd |
354 |
+ |
355 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
356 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
357 |
+ |
358 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") |
359 |
+ DISABLE_AUTOFORMATTING=true |
360 |
+ readme.gentoo_create_doc |
361 |
+} |
362 |
+ |
363 |
+pkg_postinst() { |
364 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
365 |
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die |
366 |
+ fi |
367 |
+ |
368 |
+ use libvirtd || return 0 |
369 |
+ # From here, only libvirtd-related instructions, be warned! |
370 |
+ tmpfiles_process libvirtd.conf |
371 |
+ readme.gentoo_print_elog |
372 |
+} |