1 |
commit: 4a32cc051db69c73866cbbaca5c452a114cb2420 |
2 |
Author: Jonathan Davies <jpds <AT> protonmail <DOT> com> |
3 |
AuthorDate: Tue May 11 10:38:21 2021 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 17 04:53:28 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a32cc05 |
7 |
|
8 |
app-emulation/libvirt: Version updated to 7.3.0, with changes: |
9 |
|
10 |
* Set minimum required QEMU version to 2.11. |
11 |
* Removed virCgroupKillRecursive patch - applied upstream in commit ea7d0ca3. |
12 |
* Added build-dep on bash-completion as upstream's build system wants this |
13 |
installed. |
14 |
|
15 |
Signed-off-by: Jonathan Davies <jpds <AT> protonmail.com> |
16 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
17 |
|
18 |
app-emulation/libvirt/Manifest | 2 + |
19 |
app-emulation/libvirt/libvirt-7.3.0.ebuild | 326 +++++++++++++++++++++++++++++ |
20 |
2 files changed, 328 insertions(+) |
21 |
|
22 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
23 |
index 1b170960177..cd23471daa1 100644 |
24 |
--- a/app-emulation/libvirt/Manifest |
25 |
+++ b/app-emulation/libvirt/Manifest |
26 |
@@ -4,3 +4,5 @@ DIST libvirt-7.1.0.tar.xz 8645944 BLAKE2B 97a76091616b427fc64a6a3caf5d9b04d7b9ae |
27 |
DIST libvirt-7.1.0.tar.xz.asc 833 BLAKE2B 2610cff98967260a5005840e1b03cff16790da82d9a51f14d6b34453db3ba89aa34915bba69d57b333f50d17e2492c77e85ee4e6282b8fe5f4cd0f7ace638334 SHA512 6c92c91bc7f23b32deee3442008b44d6469a9cabf2ed39459afcbfce9b3f2b1b655514a068c4bcdc8909ba02a0a4762e8f845ae4dba8da18719acf45614ca6da |
28 |
DIST libvirt-7.2.0.tar.xz 8661052 BLAKE2B eae6b4e7422690dd780e1647e2a39dfdff0562f3e63bce9ca5ee34540dec3755269efaad459d1b516b56fdeb1503cc966ffa60378aaa18210b972b739716fe34 SHA512 f6bb26ca7cb5a8d342f1f39afd051ed76b71414e1b934557cf50784da17e4f2fb3301c2ace3b593fcdeb6a18ad559a007ad594111c2c348b9157d3a59d475928 |
29 |
DIST libvirt-7.2.0.tar.xz.asc 833 BLAKE2B c389d80ef4f7627230b88446ef77daab1bf34e49e20cfb5c5418500fdf388af23aeb2458551548cb732c868f87f35a5c28acff8c01faebe985a6953953a69149 SHA512 526955a9f9d294635e63a4ed20c3e478fb4b5f3a63150a59ff30d84ad16a286ddb4c6508d0317c56df63a0d22a099085697df344fe2b15bce07acf9f05cda331 |
30 |
+DIST libvirt-7.3.0.tar.xz 8680468 BLAKE2B 88ad3dbac627203419eb80b28649613480a287014688b5b75b9a18d60b3d2b2c6628c803384ce0eed81bf84cdc0dd8539b072f32ccf0319f09bebaaeb0e089bf SHA512 e039d5cc000c0f29ead4faddf154852ee8d8b5943e940b717eabb33cc9990d3f257a942b05a661bf6c36df5b5763c31df3f8b5a0fc21e8111a81c57da42d903e |
31 |
+DIST libvirt-7.3.0.tar.xz.asc 833 BLAKE2B 812a7cf4bcaef88a4229008579a18da19d78b0a988890359907e4067b5eb6d74176907875a3a27775ffabaf29fb4d0e92c7f2ec13042ef8657c09ad6b287984d SHA512 f5349bb6c7919b54518a2ffc058592fb588045d37d18dfce5efb7e2f512c2a19b0f956d6ee34a16982cdaec4c23954300f7e130656afeb3cf535c65a0d62c04e |
32 |
|
33 |
diff --git a/app-emulation/libvirt/libvirt-7.3.0.ebuild b/app-emulation/libvirt/libvirt-7.3.0.ebuild |
34 |
new file mode 100644 |
35 |
index 00000000000..2de18dcd6e2 |
36 |
--- /dev/null |
37 |
+++ b/app-emulation/libvirt/libvirt-7.3.0.ebuild |
38 |
@@ -0,0 +1,326 @@ |
39 |
+# Copyright 1999-2021 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+PYTHON_COMPAT=( python3_{7,8,9} ) |
45 |
+ |
46 |
+inherit meson bash-completion-r1 linux-info python-any-r1 readme.gentoo-r1 tmpfiles verify-sig |
47 |
+ |
48 |
+if [[ ${PV} = *9999* ]]; then |
49 |
+ inherit git-r3 |
50 |
+ EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git" |
51 |
+ SRC_URI="" |
52 |
+ SLOT="0" |
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 |
+ SLOT="0/${PV}" |
58 |
+fi |
59 |
+ |
60 |
+DESCRIPTION="C toolkit to manipulate virtual machines" |
61 |
+HOMEPAGE="https://www.libvirt.org/ https://gitlab.com/libvirt/libvirt/" |
62 |
+LICENSE="LGPL-2.1" |
63 |
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/libvirt.org.asc |
64 |
+IUSE=" |
65 |
+ apparmor audit bash-completion +caps dtrace firewalld fuse glusterfs |
66 |
+ iscsi iscsi-direct +libvirtd lvm libssh lxc nfs nls numa openvz |
67 |
+ parted pcap policykit +qemu rbd sasl selinux +udev |
68 |
+ virtualbox +virt-network wireshark-plugins xen zfs |
69 |
+" |
70 |
+ |
71 |
+REQUIRED_USE=" |
72 |
+ firewalld? ( virt-network ) |
73 |
+ libvirtd? ( || ( lxc openvz qemu virtualbox xen ) ) |
74 |
+ lxc? ( caps libvirtd ) |
75 |
+ openvz? ( libvirtd ) |
76 |
+ qemu? ( libvirtd ) |
77 |
+ virt-network? ( libvirtd ) |
78 |
+ virtualbox? ( libvirtd ) |
79 |
+ xen? ( libvirtd )" |
80 |
+ |
81 |
+BDEPEND=" |
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 |
+ bash-completion? ( >=app-shells/bash-completion-2.0 ) |
89 |
+ verify-sig? ( app-crypt/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.48.0 |
100 |
+ dev-libs/libgcrypt:0 |
101 |
+ dev-libs/libnl:3 |
102 |
+ >=dev-libs/libxml2-2.7.6 |
103 |
+ >=net-analyzer/openbsd-netcat-1.105-r1 |
104 |
+ >=net-libs/gnutls-1.0.25:0= |
105 |
+ net-libs/libssh2 |
106 |
+ net-libs/libtirpc |
107 |
+ net-libs/rpcsvc-proto |
108 |
+ >=net-misc/curl-7.18.0 |
109 |
+ sys-apps/dbus |
110 |
+ sys-apps/dmidecode |
111 |
+ sys-devel/gettext |
112 |
+ sys-libs/ncurses:0= |
113 |
+ sys-libs/readline:= |
114 |
+ virtual/acl |
115 |
+ apparmor? ( sys-libs/libapparmor ) |
116 |
+ audit? ( sys-process/audit ) |
117 |
+ caps? ( sys-libs/libcap-ng ) |
118 |
+ dtrace? ( dev-util/systemtap ) |
119 |
+ firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
120 |
+ fuse? ( sys-fs/fuse:0= ) |
121 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
122 |
+ iscsi? ( sys-block/open-iscsi ) |
123 |
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
124 |
+ libssh? ( net-libs/libssh ) |
125 |
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
126 |
+ lxc? ( !sys-apps/systemd[cgroup-hybrid(-)] ) |
127 |
+ nfs? ( net-fs/nfs-utils ) |
128 |
+ numa? ( |
129 |
+ >sys-process/numactl-2.0.2 |
130 |
+ sys-process/numad |
131 |
+ ) |
132 |
+ parted? ( |
133 |
+ >=sys-block/parted-1.8[device-mapper] |
134 |
+ sys-fs/lvm2[-device-mapper-only(-)] |
135 |
+ ) |
136 |
+ pcap? ( >=net-libs/libpcap-1.0.0 ) |
137 |
+ policykit? ( |
138 |
+ acct-group/libvirt |
139 |
+ >=sys-auth/polkit-0.9 |
140 |
+ ) |
141 |
+ qemu? ( |
142 |
+ >=app-emulation/qemu-2.11 |
143 |
+ dev-libs/yajl |
144 |
+ ) |
145 |
+ rbd? ( sys-cluster/ceph ) |
146 |
+ sasl? ( dev-libs/cyrus-sasl ) |
147 |
+ selinux? ( >=sys-libs/libselinux-2.0.85 ) |
148 |
+ virt-network? ( |
149 |
+ net-dns/dnsmasq[dhcp,ipv6,script] |
150 |
+ net-firewall/ebtables |
151 |
+ >=net-firewall/iptables-1.4.10[ipv6] |
152 |
+ net-misc/radvd |
153 |
+ sys-apps/iproute2[-minimal] |
154 |
+ ) |
155 |
+ wireshark-plugins? ( net-analyzer/wireshark:= ) |
156 |
+ xen? ( |
157 |
+ >=app-emulation/xen-4.6.0 |
158 |
+ app-emulation/xen-tools:= |
159 |
+ ) |
160 |
+ udev? ( |
161 |
+ virtual/libudev |
162 |
+ >=x11-libs/libpciaccess-0.10.9 |
163 |
+ ) |
164 |
+ zfs? ( sys-fs/zfs )" |
165 |
+ |
166 |
+DEPEND="${BDEPEND} |
167 |
+ ${RDEPEND} |
168 |
+ ${PYTHON_DEPS}" |
169 |
+ |
170 |
+PATCHES=( |
171 |
+ "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch |
172 |
+ "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch |
173 |
+ "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch |
174 |
+) |
175 |
+ |
176 |
+pkg_setup() { |
177 |
+ # Check kernel configuration: |
178 |
+ CONFIG_CHECK="" |
179 |
+ use fuse && CONFIG_CHECK+=" |
180 |
+ ~FUSE_FS" |
181 |
+ |
182 |
+ use lvm && CONFIG_CHECK+=" |
183 |
+ ~BLK_DEV_DM |
184 |
+ ~DM_MULTIPATH |
185 |
+ ~DM_SNAPSHOT" |
186 |
+ |
187 |
+ use lxc && CONFIG_CHECK+=" |
188 |
+ ~BLK_CGROUP |
189 |
+ ~CGROUP_CPUACCT |
190 |
+ ~CGROUP_DEVICE |
191 |
+ ~CGROUP_FREEZER |
192 |
+ ~CGROUP_NET_PRIO |
193 |
+ ~CGROUP_PERF |
194 |
+ ~CGROUPS |
195 |
+ ~CGROUP_SCHED |
196 |
+ ~CPUSETS |
197 |
+ ~IPC_NS |
198 |
+ ~MACVLAN |
199 |
+ ~NAMESPACES |
200 |
+ ~NET_CLS_CGROUP |
201 |
+ ~NET_NS |
202 |
+ ~PID_NS |
203 |
+ ~POSIX_MQUEUE |
204 |
+ ~SECURITYFS |
205 |
+ ~USER_NS |
206 |
+ ~UTS_NS |
207 |
+ ~VETH |
208 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
209 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
210 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
211 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
212 |
+ ~!GRKERNSEC_CHROOT_CAPS" |
213 |
+ |
214 |
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
215 |
+ ~DEVPTS_MULTIPLE_INSTANCES" |
216 |
+ |
217 |
+ use virt-network && CONFIG_CHECK+=" |
218 |
+ ~BRIDGE_EBT_MARK_T |
219 |
+ ~BRIDGE_NF_EBTABLES |
220 |
+ ~NETFILTER_ADVANCED |
221 |
+ ~NETFILTER_XT_CONNMARK |
222 |
+ ~NETFILTER_XT_MARK |
223 |
+ ~NETFILTER_XT_TARGET_CHECKSUM |
224 |
+ ~IP_NF_FILTER |
225 |
+ ~IP_NF_MANGLE |
226 |
+ ~IP_NF_NAT |
227 |
+ ~IP_NF_TARGET_MASQUERADE |
228 |
+ ~IP6_NF_FILTER |
229 |
+ ~IP6_NF_MANGLE |
230 |
+ ~IP6_NF_NAT" |
231 |
+ # Bandwidth Limiting Support |
232 |
+ use virt-network && CONFIG_CHECK+=" |
233 |
+ ~BRIDGE_EBT_T_NAT |
234 |
+ ~IP_NF_TARGET_REJECT |
235 |
+ ~NET_ACT_POLICE |
236 |
+ ~NET_CLS_FW |
237 |
+ ~NET_CLS_U32 |
238 |
+ ~NET_SCH_HTB |
239 |
+ ~NET_SCH_INGRESS |
240 |
+ ~NET_SCH_SFQ" |
241 |
+ |
242 |
+ ERROR_USER_NS="Optional depending on LXC configuration." |
243 |
+ |
244 |
+ if [[ -n ${CONFIG_CHECK} ]]; then |
245 |
+ linux-info_pkg_setup |
246 |
+ fi |
247 |
+ |
248 |
+ python-any-r1_pkg_setup |
249 |
+} |
250 |
+ |
251 |
+src_prepare() { |
252 |
+ touch "${S}/.mailmap" || die |
253 |
+ |
254 |
+ default |
255 |
+ python_fix_shebang . |
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 dtrace) |
270 |
+ $(meson_feature firewalld) |
271 |
+ $(meson_feature fuse) |
272 |
+ $(meson_feature glusterfs) |
273 |
+ $(meson_feature glusterfs storage_gluster) |
274 |
+ $(meson_feature iscsi storage_iscsi) |
275 |
+ $(meson_feature iscsi-direct storage_iscsi_direct) |
276 |
+ $(meson_feature libvirtd driver_libvirtd) |
277 |
+ $(meson_feature libssh) |
278 |
+ $(meson_feature lvm storage_lvm) |
279 |
+ $(meson_feature lvm storage_mpath) |
280 |
+ $(meson_feature lxc driver_lxc) |
281 |
+ $(meson_feature nls) |
282 |
+ $(meson_feature numa numactl) |
283 |
+ $(meson_feature numa numad) |
284 |
+ $(meson_feature openvz driver_openvz) |
285 |
+ $(meson_feature parted storage_disk) |
286 |
+ $(meson_feature pcap libpcap) |
287 |
+ $(meson_feature policykit polkit) |
288 |
+ $(meson_feature qemu driver_qemu) |
289 |
+ $(meson_feature qemu yajl) |
290 |
+ $(meson_feature rbd storage_rbd) |
291 |
+ $(meson_feature sasl) |
292 |
+ $(meson_feature selinux) |
293 |
+ $(meson_feature udev) |
294 |
+ $(meson_feature virt-network driver_network) |
295 |
+ $(meson_feature virtualbox driver_vbox) |
296 |
+ $(meson_feature wireshark-plugins wireshark_dissector) |
297 |
+ $(meson_feature xen driver_libxl) |
298 |
+ $(meson_feature zfs storage_zfs) |
299 |
+ |
300 |
+ -Dnetcf=disabled |
301 |
+ -Dsanlock=disabled |
302 |
+ |
303 |
+ -Ddriver_esx=enabled |
304 |
+ -Dinit_script=systemd |
305 |
+ -Dqemu_user=$(usex caps qemu root) |
306 |
+ -Dqemu_group=$(usex caps qemu root) |
307 |
+ -Ddriver_remote=enabled |
308 |
+ -Dstorage_fs=enabled |
309 |
+ -Ddriver_vmware=enabled |
310 |
+ |
311 |
+ --localstatedir="${EPREFIX}/var" |
312 |
+ -Drunstatedir="${EPREFIX}/run" |
313 |
+ -Ddocdir="${EPREFIX}/usr/share/doc/${PF}" |
314 |
+ ) |
315 |
+ |
316 |
+ meson_src_configure |
317 |
+} |
318 |
+ |
319 |
+src_test() { |
320 |
+ export VIR_TEST_DEBUG=1 |
321 |
+ meson_src_test |
322 |
+} |
323 |
+ |
324 |
+src_install() { |
325 |
+ meson_src_install |
326 |
+ |
327 |
+ # Depending on configuration option, libvirt will create some bogus |
328 |
+ # directoreis. They are either not used, or libvirtd is able to create |
329 |
+ # them on demand, so let's remove them. |
330 |
+ # |
331 |
+ # Note, we are using -f here so that rm does not fail or warn if the |
332 |
+ # directory is nonexistent. |
333 |
+ rm -rf "${D}"/etc/sysconfig |
334 |
+ rm -rf "${D}"/var |
335 |
+ rm -rf "${D}"/run |
336 |
+ |
337 |
+ use libvirtd || return 0 |
338 |
+ # From here, only libvirtd-related instructions, be warned! |
339 |
+ |
340 |
+ newtmpfiles "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
341 |
+ |
342 |
+ newinitd "${S}/libvirtd.init" libvirtd |
343 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
344 |
+ newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd |
345 |
+ newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd |
346 |
+ |
347 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
348 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
349 |
+ |
350 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3") |
351 |
+ DISABLE_AUTOFORMATTING=true |
352 |
+ readme.gentoo_create_doc |
353 |
+} |
354 |
+ |
355 |
+pkg_postinst() { |
356 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
357 |
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die |
358 |
+ fi |
359 |
+ |
360 |
+ use libvirtd || return 0 |
361 |
+ # From here, only libvirtd-related instructions, be warned! |
362 |
+ |
363 |
+ readme.gentoo_print_elog |
364 |
+} |