1 |
commit: bb4fc1071be2c3cc4db7f3ce9ba4b5ef15aae3ac |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 31 21:07:11 2019 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 31 22:01:21 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb4fc107 |
7 |
|
8 |
app-emulation/libvirt: version bump to 5.10.0 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/698424 |
11 |
Closes: https://bugs.gentoo.org/702816 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/14190 |
13 |
Package-Manager: Portage-2.3.83, Repoman-2.3.20 |
14 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
15 |
|
16 |
app-emulation/libvirt/Manifest | 1 + |
17 |
app-emulation/libvirt/libvirt-5.10.0.ebuild | 379 ++++++++++++++++++++++++++++ |
18 |
2 files changed, 380 insertions(+) |
19 |
|
20 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
21 |
index 244f6d53a41..3a68bbb64c5 100644 |
22 |
--- a/app-emulation/libvirt/Manifest |
23 |
+++ b/app-emulation/libvirt/Manifest |
24 |
@@ -1,3 +1,4 @@ |
25 |
+DIST libvirt-5.10.0.tar.xz 8732120 BLAKE2B 9b191a624cca2c84d157482c48cd4eec0456382aa861958880bbbdc25785625386f63320a0626e52683776cca25c4af80ee65d19349ed0b2862e76a074e4e419 SHA512 bb518a6aa6731a7de4b24fc7b8ffdcd2cdd84dfe49047374e0f02265c274eb06dbe1732c9cc4954412853d36d9dd5c1124fb8a5e37f4c01654d85013773ffa23 |
26 |
DIST libvirt-5.2.0.tar.xz 14992888 BLAKE2B d68aedb634a70063a116e112689f252d3fc2fe5369a4cdde8cacd392e806203bf277406bb10c751bae27f34f27a38355fde84573b6221fc4843393f9ae60ae5c SHA512 378dc1552263cce746117487abc0a1f3411e5be149331717158ba23825734ceae7ca474290264d71de798fdd089ad9672026bcb242fa5b3aef87294284d06f04 |
27 |
DIST libvirt-5.5.0.tar.xz 12930224 BLAKE2B 4add0b727e4754bd1b2b4e9020942b17872533737e496ddf7976bf86a0fd3bcfbebd83387a8f3bab8dcc9afb05755b245e55682ed17d6094085d3dc96d94eefe SHA512 47923aaca605fb43a53238ac535abc1f88f73435336b8f3e88cb01df277ed205d99c586991e523aa32b50c832a0a7c949ab5f84dc78eb8d18a4951cfc791448d |
28 |
DIST libvirt-5.6.0.tar.xz 13147976 BLAKE2B dbfc997123f43fcf9d635b59fffa00d96826e673c4037105151bde2c4a0fb3015a0e458e8e67969b5513a4ddbf41d062feb91e6a86054ddcc1d661f0554fd1f7 SHA512 95fe931394fb31288faf73349bb298f08f63cf062f851b9935303145f8166f69128be9360757f0e1845256c14f4d7672843dba0dc6c086b1c3c8bfc035cc8986 |
29 |
|
30 |
diff --git a/app-emulation/libvirt/libvirt-5.10.0.ebuild b/app-emulation/libvirt/libvirt-5.10.0.ebuild |
31 |
new file mode 100644 |
32 |
index 00000000000..033d4a551e9 |
33 |
--- /dev/null |
34 |
+++ b/app-emulation/libvirt/libvirt-5.10.0.ebuild |
35 |
@@ -0,0 +1,379 @@ |
36 |
+# Copyright 1999-2019 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
42 |
+ |
43 |
+inherit autotools out-of-source bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd |
44 |
+ |
45 |
+if [[ ${PV} = *9999* ]]; then |
46 |
+ inherit git-r3 |
47 |
+ EGIT_REPO_URI="https://libvirt.org/git/libvirt.git" |
48 |
+ SRC_URI="" |
49 |
+ KEYWORDS="" |
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="http://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 phyp 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 |
+# gettext.sh command is used by the libvirt command wrappers, and it's |
80 |
+# non-optional, so put it into RDEPEND. |
81 |
+# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
82 |
+# package will use 3 by default. Since we don't have slot pinning in an API, |
83 |
+# we must go with the most recent |
84 |
+RDEPEND=" |
85 |
+ acct-user/qemu |
86 |
+ policykit? ( acct-group/libvirt ) |
87 |
+ app-misc/scrub |
88 |
+ >=dev-libs/glib-2.48.0 |
89 |
+ dev-libs/libgcrypt:0 |
90 |
+ dev-libs/libnl:3 |
91 |
+ >=dev-libs/libxml2-2.7.6 |
92 |
+ >=net-analyzer/openbsd-netcat-1.105-r1 |
93 |
+ >=net-libs/gnutls-1.0.25:0= |
94 |
+ net-libs/libssh2 |
95 |
+ net-libs/libtirpc |
96 |
+ net-libs/rpcsvc-proto |
97 |
+ >=net-misc/curl-7.18.0 |
98 |
+ sys-apps/dmidecode |
99 |
+ >=sys-apps/util-linux-2.17 |
100 |
+ sys-devel/gettext |
101 |
+ sys-libs/ncurses:0= |
102 |
+ sys-libs/readline:= |
103 |
+ apparmor? ( sys-libs/libapparmor ) |
104 |
+ audit? ( sys-process/audit ) |
105 |
+ caps? ( sys-libs/libcap-ng ) |
106 |
+ dbus? ( sys-apps/dbus ) |
107 |
+ dtrace? ( dev-util/systemtap ) |
108 |
+ firewalld? ( >=net-firewall/firewalld-0.6.3 ) |
109 |
+ fuse? ( >=sys-fs/fuse-2.8.6:= ) |
110 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
111 |
+ iscsi? ( sys-block/open-iscsi ) |
112 |
+ iscsi-direct? ( >=net-libs/libiscsi-1.18.0 ) |
113 |
+ libssh? ( net-libs/libssh ) |
114 |
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
115 |
+ lxc? ( !sys-apps/systemd[-cgroup-hybrid(+)] ) |
116 |
+ nfs? ( net-fs/nfs-utils ) |
117 |
+ numa? ( |
118 |
+ >sys-process/numactl-2.0.2 |
119 |
+ sys-process/numad |
120 |
+ ) |
121 |
+ parted? ( |
122 |
+ >=sys-block/parted-1.8[device-mapper] |
123 |
+ sys-fs/lvm2[-device-mapper-only(-)] |
124 |
+ ) |
125 |
+ pcap? ( >=net-libs/libpcap-1.0.0 ) |
126 |
+ policykit? ( >=sys-auth/polkit-0.9 ) |
127 |
+ qemu? ( |
128 |
+ >=app-emulation/qemu-1.5.0 |
129 |
+ dev-libs/yajl |
130 |
+ ) |
131 |
+ rbd? ( sys-cluster/ceph ) |
132 |
+ sasl? ( dev-libs/cyrus-sasl ) |
133 |
+ selinux? ( >=sys-libs/libselinux-2.0.85 ) |
134 |
+ virt-network? ( |
135 |
+ net-dns/dnsmasq[script] |
136 |
+ net-firewall/ebtables |
137 |
+ >=net-firewall/iptables-1.4.10[ipv6] |
138 |
+ net-misc/radvd |
139 |
+ sys-apps/iproute2[-minimal] |
140 |
+ ) |
141 |
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
142 |
+ wireshark-plugins? ( net-analyzer/wireshark:= ) |
143 |
+ xen? ( |
144 |
+ >=app-emulation/xen-4.6.0 |
145 |
+ app-emulation/xen-tools:= |
146 |
+ ) |
147 |
+ udev? ( |
148 |
+ virtual/udev |
149 |
+ >=x11-libs/libpciaccess-0.10.9 |
150 |
+ ) |
151 |
+ zfs? ( sys-fs/zfs )" |
152 |
+ |
153 |
+DEPEND="${RDEPEND} |
154 |
+ ${PYTHON_DEPS} |
155 |
+ app-text/xhtml1 |
156 |
+ dev-lang/perl |
157 |
+ dev-libs/libxslt |
158 |
+ dev-perl/XML-XPath |
159 |
+ virtual/pkgconfig" |
160 |
+ |
161 |
+PATCHES=( |
162 |
+ "${FILESDIR}"/${PN}-5.7.0-do-not-use-sysconf.patch |
163 |
+ "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch |
164 |
+ "${FILESDIR}"/${PN}-5.2.0-fix-paths-for-apparmor.patch |
165 |
+) |
166 |
+ |
167 |
+pkg_setup() { |
168 |
+ # Check kernel configuration: |
169 |
+ CONFIG_CHECK="" |
170 |
+ use fuse && CONFIG_CHECK+=" |
171 |
+ ~FUSE_FS" |
172 |
+ |
173 |
+ use lvm && CONFIG_CHECK+=" |
174 |
+ ~BLK_DEV_DM |
175 |
+ ~DM_MULTIPATH |
176 |
+ ~DM_SNAPSHOT" |
177 |
+ |
178 |
+ use lxc && CONFIG_CHECK+=" |
179 |
+ ~BLK_CGROUP |
180 |
+ ~CGROUP_CPUACCT |
181 |
+ ~CGROUP_DEVICE |
182 |
+ ~CGROUP_FREEZER |
183 |
+ ~CGROUP_NET_PRIO |
184 |
+ ~CGROUP_PERF |
185 |
+ ~CGROUPS |
186 |
+ ~CGROUP_SCHED |
187 |
+ ~CPUSETS |
188 |
+ ~IPC_NS |
189 |
+ ~MACVLAN |
190 |
+ ~NAMESPACES |
191 |
+ ~NET_CLS_CGROUP |
192 |
+ ~NET_NS |
193 |
+ ~PID_NS |
194 |
+ ~POSIX_MQUEUE |
195 |
+ ~SECURITYFS |
196 |
+ ~USER_NS |
197 |
+ ~UTS_NS |
198 |
+ ~VETH |
199 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
200 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
201 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
202 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
203 |
+ ~!GRKERNSEC_CHROOT_CAPS" |
204 |
+ |
205 |
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
206 |
+ ~DEVPTS_MULTIPLE_INSTANCES" |
207 |
+ |
208 |
+ use macvtap && CONFIG_CHECK+=" |
209 |
+ ~MACVTAP" |
210 |
+ |
211 |
+ use virt-network && CONFIG_CHECK+=" |
212 |
+ ~BRIDGE_EBT_MARK_T |
213 |
+ ~BRIDGE_NF_EBTABLES |
214 |
+ ~NETFILTER_ADVANCED |
215 |
+ ~NETFILTER_XT_CONNMARK |
216 |
+ ~NETFILTER_XT_MARK |
217 |
+ ~NETFILTER_XT_TARGET_CHECKSUM |
218 |
+ ~IP_NF_FILTER |
219 |
+ ~IP_NF_MANGLE |
220 |
+ ~IP_NF_NAT |
221 |
+ ~IP_NF_TARGET_MASQUERADE |
222 |
+ ~IP6_NF_FILTER |
223 |
+ ~IP6_NF_MANGLE |
224 |
+ ~IP6_NF_NAT" |
225 |
+ # Bandwidth Limiting Support |
226 |
+ use virt-network && CONFIG_CHECK+=" |
227 |
+ ~BRIDGE_EBT_T_NAT |
228 |
+ ~IP_NF_TARGET_REJECT |
229 |
+ ~NET_ACT_POLICE |
230 |
+ ~NET_CLS_FW |
231 |
+ ~NET_CLS_U32 |
232 |
+ ~NET_SCH_HTB |
233 |
+ ~NET_SCH_INGRESS |
234 |
+ ~NET_SCH_SFQ" |
235 |
+ |
236 |
+ # Handle specific kernel versions for different features |
237 |
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
238 |
+ if kernel_is ge 3 6; then |
239 |
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
240 |
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
241 |
+ fi |
242 |
+ |
243 |
+ ERROR_USER_NS="Optional depending on LXC configuration." |
244 |
+ |
245 |
+ if [[ -n ${CONFIG_CHECK} ]]; then |
246 |
+ linux-info_pkg_setup |
247 |
+ fi |
248 |
+} |
249 |
+ |
250 |
+src_prepare() { |
251 |
+ touch "${S}/.mailmap" |
252 |
+ |
253 |
+ default |
254 |
+ |
255 |
+ if [[ ${PV} = *9999* ]]; then |
256 |
+ # Reinitialize submodules as this is required for gnulib's bootstrap |
257 |
+ git submodule init |
258 |
+ # git checkouts require bootstrapping to create the configure script. |
259 |
+ # Additionally the submodules must be cloned to the right locations |
260 |
+ # bug #377279 |
261 |
+ ./bootstrap || die "bootstrap failed" |
262 |
+ ( |
263 |
+ git submodule status .gnulib | awk '{ print $1 }' |
264 |
+ git hash-object bootstrap.conf |
265 |
+ git ls-tree -d HEAD gnulib/local | awk '{ print $3 }' |
266 |
+ ) >.git-module-status |
267 |
+ fi |
268 |
+ |
269 |
+ # Tweak the init script: |
270 |
+ cp "${FILESDIR}/libvirtd.init-r18" "${S}/libvirtd.init" || die |
271 |
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
272 |
+ -i "${S}/libvirtd.init" || die "sed failed" |
273 |
+ |
274 |
+ eautoreconf |
275 |
+} |
276 |
+ |
277 |
+my_src_configure() { |
278 |
+ local myeconfargs=( |
279 |
+ $(use_with apparmor) |
280 |
+ $(use_with apparmor apparmor-profiles) |
281 |
+ $(use_with audit) |
282 |
+ $(use_with caps capng) |
283 |
+ $(use_with dbus) |
284 |
+ $(use_with dtrace) |
285 |
+ $(use_with firewalld) |
286 |
+ $(use_with fuse) |
287 |
+ $(use_with glusterfs) |
288 |
+ $(use_with glusterfs storage-gluster) |
289 |
+ $(use_with iscsi storage-iscsi) |
290 |
+ $(use_with iscsi-direct storage-iscsi-direct) |
291 |
+ $(use_with libvirtd) |
292 |
+ $(use_with libssh) |
293 |
+ $(use_with lvm storage-lvm) |
294 |
+ $(use_with lvm storage-mpath) |
295 |
+ $(use_with lxc) |
296 |
+ $(use_with macvtap) |
297 |
+ $(use_enable nls) |
298 |
+ $(use_with numa numactl) |
299 |
+ $(use_with numa numad) |
300 |
+ $(use_with openvz) |
301 |
+ $(use_with parted storage-disk) |
302 |
+ $(use_with pcap libpcap) |
303 |
+ $(use_with phyp) |
304 |
+ $(use_with policykit polkit) |
305 |
+ $(use_with qemu) |
306 |
+ $(use_with qemu yajl) |
307 |
+ $(use_with rbd storage-rbd) |
308 |
+ $(use_with sasl) |
309 |
+ $(use_with selinux) |
310 |
+ $(use_with udev) |
311 |
+ $(use_with vepa virtualport) |
312 |
+ $(use_with virt-network network) |
313 |
+ $(use_with wireshark-plugins wireshark-dissector) |
314 |
+ $(use_with xen libxl) |
315 |
+ $(use_with zfs storage-zfs) |
316 |
+ |
317 |
+ --without-hal |
318 |
+ --without-netcf |
319 |
+ --without-sanlock |
320 |
+ |
321 |
+ --with-esx |
322 |
+ --with-init-script=systemd |
323 |
+ --with-qemu-group=$(usex caps qemu root) |
324 |
+ --with-qemu-user=$(usex caps qemu root) |
325 |
+ --with-remote |
326 |
+ --with-storage-fs |
327 |
+ --with-vmware |
328 |
+ |
329 |
+ --disable-static |
330 |
+ --disable-werror |
331 |
+ |
332 |
+ --localstatedir=/var |
333 |
+ --enable-dependency-tracking |
334 |
+ ) |
335 |
+ |
336 |
+ if use virtualbox && has_version app-emulation/virtualbox-ose; then |
337 |
+ myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) |
338 |
+ else |
339 |
+ myeconfargs+=( $(use_with virtualbox vbox) ) |
340 |
+ fi |
341 |
+ |
342 |
+ econf "${myeconfargs[@]}" |
343 |
+ |
344 |
+ if [[ ${PV} = *9999* ]]; then |
345 |
+ # Restore gnulib's config.sub and config.guess |
346 |
+ # bug #377279 |
347 |
+ (cd ${S}/.gnulib && git reset --hard > /dev/null) |
348 |
+ fi |
349 |
+} |
350 |
+ |
351 |
+my_src_test() { |
352 |
+ # remove problematic tests, bug #591416, bug #591418 |
353 |
+ sed -i -e 's#commandtest$(EXEEXT) # #' \ |
354 |
+ -e 's#virfirewalltest$(EXEEXT) # #' \ |
355 |
+ -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ |
356 |
+ -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ |
357 |
+ tests/Makefile |
358 |
+ |
359 |
+ export VIR_TEST_DEBUG=1 |
360 |
+ HOME="${T}" emake check |
361 |
+} |
362 |
+ |
363 |
+my_src_install() { |
364 |
+ emake DESTDIR="${D}" \ |
365 |
+ SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install |
366 |
+ |
367 |
+ find "${D}" -name '*.la' -delete || die |
368 |
+ |
369 |
+ # Remove bogus, empty directories. They are either not used, or |
370 |
+ # libvirtd is able to create them on demand |
371 |
+ rm -rf "${D}"/etc/sysconfig |
372 |
+ rm -rf "${D}"/var |
373 |
+ |
374 |
+ newbashcomp "${S}/tools/bash-completion/vsh" virsh |
375 |
+ bashcomp_alias virsh virt-admin |
376 |
+ |
377 |
+ use libvirtd || return 0 |
378 |
+ # From here, only libvirtd-related instructions, be warned! |
379 |
+ |
380 |
+ systemd_install_serviced \ |
381 |
+ "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
382 |
+ |
383 |
+ systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
384 |
+ |
385 |
+ newinitd "${S}/libvirtd.init" libvirtd |
386 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests |
387 |
+ newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd |
388 |
+ newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd |
389 |
+ |
390 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd |
391 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests |
392 |
+ |
393 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") |
394 |
+ DISABLE_AUTOFORMATTING=true |
395 |
+ readme.gentoo_create_doc |
396 |
+} |
397 |
+ |
398 |
+pkg_preinst() { |
399 |
+ # we only ever want to generate this once |
400 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
401 |
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
402 |
+ fi |
403 |
+} |
404 |
+ |
405 |
+pkg_postinst() { |
406 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
407 |
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
408 |
+ fi |
409 |
+ |
410 |
+ use libvirtd || return 0 |
411 |
+ # From here, only libvirtd-related instructions, be warned! |
412 |
+ |
413 |
+ readme.gentoo_print_elog |
414 |
+} |