1 |
commit: 81e9174865c0134c98c143516861e8eb07cac289 |
2 |
Author: Jonathan Davies <jpds <AT> protonmail <DOT> com> |
3 |
AuthorDate: Fri Sep 10 13:55:41 2021 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 10 15:31:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=81e91748 |
7 |
|
8 |
app-emulation/libvirt: Version updated to 7.7.0. |
9 |
|
10 |
Bug: https://bugs.gentoo.org/812317 |
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 | 2 + |
16 |
app-emulation/libvirt/libvirt-7.7.0.ebuild | 327 +++++++++++++++++++++++++++++ |
17 |
2 files changed, 329 insertions(+) |
18 |
|
19 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
20 |
index 0ffc4f7067f..20c81af0a58 100644 |
21 |
--- a/app-emulation/libvirt/Manifest |
22 |
+++ b/app-emulation/libvirt/Manifest |
23 |
@@ -10,3 +10,5 @@ DIST libvirt-7.4.0.tar.xz 8617788 BLAKE2B 06271895ac39865df632b6ad669eb20d1f1bb7 |
24 |
DIST libvirt-7.4.0.tar.xz.asc 833 BLAKE2B c9d63bb9cdd604663754ccd927a5a1305131617b1d4edb51d289878ff67b7168e882ec1bf0f16aaea509aa32b8419a3c6420615051bd8f42216ce9d1aeae601b SHA512 9a887cf73fb494e55617a69863a0877fba56d180fecbec892a7990f76bc6e1fe15871b4e688e88289eb7acf3ab4a70c1d6202b224cf3c9a96ecb1ecfb2279b2c |
25 |
DIST libvirt-7.5.0.tar.xz 8642788 BLAKE2B 467dbd2a337beee5d9f10de7bc37ca988e85fad17fb75e6ab73c13cf79eceab27c9ff51bbe2ac9f6c121feed4c67860fa263e601e10f6b1dd7b8a647b53228a7 SHA512 cf89800c8970b8b1373ee32cc49ea88b87e76b50fd134df5da354be83e0ef490e514f16425c1c16eb3989fbadd3ba7d9976972fbbae6cb40db3d2ae94863219d |
26 |
DIST libvirt-7.5.0.tar.xz.asc 833 BLAKE2B ab9ba2a02e4af90002fffbcd0bc04f9faa1d5a23ab815d6b9b6ef1410d9d114fc07c1b29850b59d1ab4ea3a186f4b7d65f5a5ca37d65f3034146617445849dcb SHA512 ebcc1fcce10e19e0a4ae43fbf9bfd5b1b7732829eeb3543c84ba24e0a5d9872be692e7b6c105cdcd730d1c26b895b306387ab380623acf6bba242bd2c62ec7b2 |
27 |
+DIST libvirt-7.7.0.tar.xz 8670212 BLAKE2B 93c72117941b0a74484c7510c8437054e66fc3ad20c02cead3ce917a38868da2acff9b1e70bbb823122ba647763a3682aaa0da04d82fa75e1acc67449301ae8c SHA512 a0d585c9ac46be08d2865d66456d681b7233291d17f6e0ed2564d0f29dc38ea7afc846ab382f58a193d3cd9acaf25fcc526feb3c98e12a6b4b8ae5aa4aec2f3e |
28 |
+DIST libvirt-7.7.0.tar.xz.asc 833 BLAKE2B 86a77bf461e353776d79f31f1d0c82fa13e28348bd9c6ae7cb653b98886c7e070d67ed0db55f5e1f3b5e5bd2a3861a5cb08dbf95799b14df1037139f8001b030 SHA512 d5f8cd6accd3bfaebfb7c8761e321aaa9a090c7705256785c5507aa88d985f78a788047dc881f37ea6f64a4634c65c9718d8b1ee0a24744acc3ad5ed6e517bdf |
29 |
|
30 |
diff --git a/app-emulation/libvirt/libvirt-7.7.0.ebuild b/app-emulation/libvirt/libvirt-7.7.0.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..34cffee8629 |
33 |
--- /dev/null |
34 |
+++ b/app-emulation/libvirt/libvirt-7.7.0.ebuild |
35 |
@@ -0,0 +1,327 @@ |
36 |
+# Copyright 1999-2021 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
42 |
+ |
43 |
+inherit meson bash-completion-r1 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig |
44 |
+ |
45 |
+if [[ ${PV} = *9999* ]]; then |
46 |
+ inherit git-r3 |
47 |
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" |
48 |
+ EGIT_BRANCH="master" |
49 |
+ SRC_URI="" |
50 |
+ SLOT="0" |
51 |
+else |
52 |
+ SRC_URI="https://libvirt.org/sources/${P}.tar.xz |
53 |
+ verify-sig? ( https://libvirt.org/sources/${P}.tar.xz.asc )" |
54 |
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86" |
55 |
+ SLOT="0/${PV}" |
56 |
+fi |
57 |
+ |
58 |
+DESCRIPTION="C toolkit to manipulate virtual machines" |
59 |
+HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/" |
60 |
+LICENSE="LGPL-2.1" |
61 |
+VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/libvirt.org.asc |
62 |
+IUSE=" |
63 |
+ apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs |
64 |
+ iscsi iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz |
65 |
+ parted pcap policykit +qemu rbd sasl selinux +udev |
66 |
+ virtualbox +virt-network wireshark-plugins xen zfs |
67 |
+" |
68 |
+ |
69 |
+REQUIRED_USE=" |
70 |
+ firewalld? ( virt-network ) |
71 |
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) |
72 |
+ lxc? ( caps libvirtd ) |
73 |
+ openvz? ( libvirtd ) |
74 |
+ qemu? ( libvirtd ) |
75 |
+ virt-network? ( libvirtd ) |
76 |
+ virtualbox? ( libvirtd ) |
77 |
+ xen? ( libvirtd )" |
78 |
+ |
79 |
+BDEPEND=" |
80 |
+ app-text/xhtml1 |
81 |
+ dev-lang/perl |
82 |
+ dev-libs/libxslt |
83 |
+ dev-perl/XML-XPath |
84 |
+ dev-python/docutils |
85 |
+ virtual/pkgconfig |
86 |
+ bash-completion? ( >=app-shells/bash-completion-2.0 ) |
87 |
+ verify-sig? ( app-crypt/openpgp-keys-libvirt )" |
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 |
+ acct-user/qemu |
96 |
+ app-misc/scrub |
97 |
+ >=dev-libs/glib-2.48.0 |
98 |
+ dev-libs/libgcrypt:0 |
99 |
+ dev-libs/libnl:3 |
100 |
+ >=dev-libs/libxml2-2.7.6 |
101 |
+ >=net-analyzer/openbsd-netcat-1.105-r1 |
102 |
+ >=net-libs/gnutls-1.0.25:0= |
103 |
+ net-libs/libssh2 |
104 |
+ net-libs/libtirpc |
105 |
+ net-libs/rpcsvc-proto |
106 |
+ >=net-misc/curl-7.18.0 |
107 |
+ sys-apps/dbus |
108 |
+ sys-apps/dmidecode |
109 |
+ sys-devel/gettext |
110 |
+ sys-libs/ncurses:0= |
111 |
+ sys-libs/readline:= |
112 |
+ virtual/acl |
113 |
+ apparmor? ( sys-libs/libapparmor ) |
114 |
+ audit? ( sys-process/audit ) |
115 |
+ caps? ( sys-libs/libcap-ng ) |
116 |
+ dtrace? ( dev-util/systemtap ) |
117 |
+ firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
118 |
+ fuse? ( sys-fs/fuse:0= ) |
119 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
120 |
+ iscsi? ( sys-block/open-iscsi ) |
121 |
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
122 |
+ libssh? ( net-libs/libssh ) |
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.0.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 |
142 |
+ ) |
143 |
+ rbd? ( sys-cluster/ceph ) |
144 |
+ sasl? ( dev-libs/cyrus-sasl ) |
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:= ) |
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 |
+ |
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}-6.7.0-do-not-use-sysconfig.patch |
171 |
+ "${FILESDIR}"/${PN}-6.7.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 |
+ # Tweak the init script: |
256 |
+ cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die |
257 |
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
258 |
+ -i "${S}/libvirtd.init" || die "sed failed" |
259 |
+} |
260 |
+ |
261 |
+src_configure() { |
262 |
+ local emesonargs=( |
263 |
+ $(meson_feature apparmor) |
264 |
+ $(meson_feature apparmor apparmor_profiles) |
265 |
+ $(meson_feature audit) |
266 |
+ $(meson_feature caps capng) |
267 |
+ $(meson_feature dtrace) |
268 |
+ $(meson_feature firewalld) |
269 |
+ $(meson_feature fuse) |
270 |
+ $(meson_feature glusterfs) |
271 |
+ $(meson_feature glusterfs storage_gluster) |
272 |
+ $(meson_feature iscsi storage_iscsi) |
273 |
+ $(meson_feature iscsi-direct storage_iscsi_direct) |
274 |
+ $(meson_feature libvirtd driver_libvirtd) |
275 |
+ $(meson_feature libssh) |
276 |
+ $(meson_feature lvm storage_lvm) |
277 |
+ $(meson_feature lvm storage_mpath) |
278 |
+ $(meson_feature lxc driver_lxc) |
279 |
+ $(meson_feature nls) |
280 |
+ $(meson_feature numa numactl) |
281 |
+ $(meson_feature numa numad) |
282 |
+ $(meson_feature openvz driver_openvz) |
283 |
+ $(meson_feature parted storage_disk) |
284 |
+ $(meson_feature pcap libpcap) |
285 |
+ $(meson_feature policykit polkit) |
286 |
+ $(meson_feature qemu driver_qemu) |
287 |
+ $(meson_feature qemu yajl) |
288 |
+ $(meson_feature rbd storage_rbd) |
289 |
+ $(meson_feature sasl) |
290 |
+ $(meson_feature selinux) |
291 |
+ $(meson_feature udev) |
292 |
+ $(meson_feature virt-network driver_network) |
293 |
+ $(meson_feature virtualbox driver_vbox) |
294 |
+ $(meson_feature wireshark-plugins wireshark_dissector) |
295 |
+ $(meson_feature xen driver_libxl) |
296 |
+ $(meson_feature zfs storage_zfs) |
297 |
+ |
298 |
+ -Dnetcf=disabled |
299 |
+ -Dsanlock=disabled |
300 |
+ |
301 |
+ -Ddriver_esx=enabled |
302 |
+ -Dinit_script=systemd |
303 |
+ -Dqemu_user=$(usex caps qemu root) |
304 |
+ -Dqemu_group=$(usex caps qemu root) |
305 |
+ -Ddriver_remote=enabled |
306 |
+ -Dstorage_fs=enabled |
307 |
+ -Ddriver_vmware=enabled |
308 |
+ |
309 |
+ --localstatedir="${EPREFIX}/var" |
310 |
+ -Drunstatedir="${EPREFIX}/run" |
311 |
+ -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" |
312 |
+ ) |
313 |
+ |
314 |
+ meson_src_configure |
315 |
+} |
316 |
+ |
317 |
+src_test() { |
318 |
+ export VIR_TEST_DEBUG=1 |
319 |
+ meson_src_test |
320 |
+} |
321 |
+ |
322 |
+src_install() { |
323 |
+ meson_src_install |
324 |
+ |
325 |
+ # Depending on configuration option, libvirt will create some bogus |
326 |
+ # directoreis. They are either not used, or libvirtd is able to create |
327 |
+ # them on demand, so let's remove them. |
328 |
+ # |
329 |
+ # Note, we are using -f here so that rm does not fail or warn if the |
330 |
+ # directory is nonexistent. |
331 |
+ rm -rf "${D}"/etc/sysconfig |
332 |
+ rm -rf "${D}"/var |
333 |
+ rm -rf "${D}"/run |
334 |
+ |
335 |
+ use libvirtd || return 0 |
336 |
+ # From here, only libvirtd-related instructions, be warned! |
337 |
+ |
338 |
+ newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
339 |
+ |
340 |
+ newinitd "${S}/libvirtd.init" libvirtd |
341 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
342 |
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd |
343 |
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd |
344 |
+ |
345 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
346 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
347 |
+ |
348 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") |
349 |
+ DISABLE_AUTOFORMATTING=true |
350 |
+ readme.gentoo_create_doc |
351 |
+} |
352 |
+ |
353 |
+pkg_postinst() { |
354 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
355 |
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die |
356 |
+ fi |
357 |
+ |
358 |
+ use libvirtd || return 0 |
359 |
+ # From here, only libvirtd-related instructions, be warned! |
360 |
+ tmpfiles_process libvirtd.conf |
361 |
+ readme.gentoo_print_elog |
362 |
+} |