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: Sun, 19 Aug 2018 18:54:52
Message-Id: 1534704792.90d5b84c04af6a2426950e273f31699248db3bca.tamiko@gentoo
1 commit: 90d5b84c04af6a2426950e273f31699248db3bca
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 19 18:18:13 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 19 18:53:12 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90d5b84c
7
8 app-emulation/libvirt: version bump to 4.6.0
9
10 Package-Manager: Portage-2.3.47, Repoman-2.3.10
11
12 app-emulation/libvirt/Manifest | 1 +
13 app-emulation/libvirt/libvirt-4.6.0.ebuild | 379 +++++++++++++++++++++++++++++
14 2 files changed, 380 insertions(+)
15
16 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
17 index 62bc9fc3cb1..599a32b18a7 100644
18 --- a/app-emulation/libvirt/Manifest
19 +++ b/app-emulation/libvirt/Manifest
20 @@ -1,3 +1,4 @@
21 DIST libvirt-4.3.0.tar.xz 14667860 BLAKE2B bd4dfbcfba3b11036be979caf938ec7ca4fc04cc4bd6dfd5eec05c054ba4ebf953c0e86a080e65ab8a880f2bcc2f4d018283e870afcb64bd0b750247f3c96357 SHA512 cc61497121931019a8cc3fa8234d7cf95b0f0e1d77ab6fcd089db92759617b099eb83c57aa91768ae6ccf92c345cf72e1d9b202acb5132a159476fb86f1a6999
22 DIST libvirt-4.4.0.tar.xz 14668912 BLAKE2B 04f7a48618924bb8bbe1621572d260a01626687c66ed45d1a08d745210fc522fba63387a0433c0c55e41a5655267c094c16b7ff97f9e45b17419dfc83f465c79 SHA512 725b9b093a2aaeab6fdcb8df341a400ab363bcd50af8400dfd0593c41d8fbc8352f89147be9fbfde2e8418cc7298e090fe07ec7255b0aff1f0d001b93322f93f
23 DIST libvirt-4.5.0.tar.xz 14743956 BLAKE2B 930852765104b1b22744df0ec4f1c74d89bc0fda80852978f7c857943858cc45eed9b74a3d42668f872540be2637f26c4d9d7859594847e58e6fb4cd33350130 SHA512 26710c7e5219f007524e9f93a642e55e4e8ea197afa6b2ca6a4b67b7028313f4b0d82924ee9a1e91ff688a4d2b53f89f3655fbeef0fa99a34f8418f37d787984
24 +DIST libvirt-4.6.0.tar.xz 14760064 BLAKE2B 1e21cb4340ec6c1983ea884f813121c98a8f6b18fb058edd085fd35a2aa1a30e004274a248ddb12c74ccb8a4da788fd8c735d53c7e8b4177c591cf95a8c20be8 SHA512 beae0f1cafa73b9495d877979547bbc9b7ca2a7c3b213c5da92e6302b570d42df9d639f50380dbc0cebd6af983924dc27b1c81139c81dee0897f39a6a5158968
25
26 diff --git a/app-emulation/libvirt/libvirt-4.6.0.ebuild b/app-emulation/libvirt/libvirt-4.6.0.ebuild
27 new file mode 100644
28 index 00000000000..637c2875d6f
29 --- /dev/null
30 +++ b/app-emulation/libvirt/libvirt-4.6.0.ebuild
31 @@ -0,0 +1,379 @@
32 +# Copyright 1999-2018 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=6
36 +
37 +inherit autotools eutils user linux-info systemd readme.gentoo-r1 bash-completion-r1
38 +
39 +if [[ ${PV} = *9999* ]]; then
40 + inherit git-r3
41 + EGIT_REPO_URI="https://libvirt.org/git/libvirt.git"
42 + SRC_URI=""
43 + KEYWORDS=""
44 + SLOT="0"
45 +else
46 + # Versions with 4 numbers are stable updates:
47 + if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
48 + SRC_URI="https://libvirt.org/sources/stable_updates/${P}.tar.xz"
49 + else
50 + SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
51 + fi
52 + KEYWORDS="~amd64 ~arm64 ~x86"
53 + SLOT="0/${PV}"
54 +fi
55 +
56 +DESCRIPTION="C toolkit to manipulate virtual machines"
57 +HOMEPAGE="http://www.libvirt.org/"
58 +LICENSE="LGPL-2.1"
59 +IUSE="
60 + apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm
61 + libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit
62 + +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network
63 + wireshark-plugins xen zeroconf zfs
64 +"
65 +
66 +REQUIRED_USE="
67 + firewalld? ( virt-network )
68 + libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
69 + lxc? ( caps libvirtd )
70 + openvz? ( libvirtd )
71 + policykit? ( dbus )
72 + qemu? ( libvirtd )
73 + uml? ( 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 + app-misc/scrub
86 + dev-libs/libgcrypt:0
87 + dev-libs/libnl:3
88 + >=dev-libs/libxml2-2.7.6
89 + || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 )
90 + >=net-libs/gnutls-1.0.25:0=
91 + net-libs/libssh2
92 + net-libs/libtirpc
93 + net-libs/rpcsvc-proto
94 + >=net-misc/curl-7.18.0
95 + sys-apps/dmidecode
96 + >=sys-apps/util-linux-2.17
97 + sys-devel/gettext
98 + sys-libs/ncurses:0=
99 + sys-libs/readline:=
100 + apparmor? ( sys-libs/libapparmor )
101 + audit? ( sys-process/audit )
102 + caps? ( sys-libs/libcap-ng )
103 + dbus? ( sys-apps/dbus )
104 + firewalld? ( net-firewall/firewalld )
105 + fuse? ( >=sys-fs/fuse-2.8.6:= )
106 + glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
107 + iscsi? ( sys-block/open-iscsi )
108 + libssh? ( net-libs/libssh )
109 + lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
110 + nfs? ( net-fs/nfs-utils )
111 + numa? (
112 + >sys-process/numactl-2.0.2
113 + sys-process/numad
114 + )
115 + parted? (
116 + >=sys-block/parted-1.8[device-mapper]
117 + sys-fs/lvm2[-device-mapper-only(-)]
118 + )
119 + pcap? ( >=net-libs/libpcap-1.0.0 )
120 + policykit? ( >=sys-auth/polkit-0.9 )
121 + qemu? (
122 + >=app-emulation/qemu-0.13.0
123 + dev-libs/jansson
124 + )
125 + rbd? ( sys-cluster/ceph )
126 + sasl? ( dev-libs/cyrus-sasl )
127 + selinux? ( >=sys-libs/libselinux-2.0.85 )
128 + virt-network? (
129 + net-dns/dnsmasq[script]
130 + net-firewall/ebtables
131 + >=net-firewall/iptables-1.4.10[ipv6]
132 + net-misc/radvd
133 + sys-apps/iproute2[-minimal]
134 + )
135 + virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
136 + wireshark-plugins? ( net-analyzer/wireshark:= )
137 + xen? (
138 + app-emulation/xen
139 + app-emulation/xen-tools:=
140 + )
141 + udev? (
142 + virtual/udev
143 + >=x11-libs/libpciaccess-0.10.9
144 + )
145 + zeroconf? ( >=net-dns/avahi-0.6[dbus] )
146 + zfs? ( sys-fs/zfs )"
147 +
148 +DEPEND="${RDEPEND}
149 + app-text/xhtml1
150 + dev-lang/perl
151 + dev-libs/libxslt
152 + dev-perl/XML-XPath
153 + virtual/pkgconfig"
154 +
155 +PATCHES=(
156 + "${FILESDIR}"/${PN}-4.5.0-do_not_use_sysconf.patch
157 + "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
158 + "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch
159 +)
160 +
161 +pkg_setup() {
162 + if use qemu; then
163 + enewgroup qemu 77
164 + enewuser qemu 77 -1 -1 "qemu,kvm"
165 + fi
166 +
167 + use policykit && enewgroup libvirt
168 +
169 + # Check kernel configuration:
170 + CONFIG_CHECK=""
171 + use fuse && CONFIG_CHECK+="
172 + ~FUSE_FS"
173 +
174 + use lvm && CONFIG_CHECK+="
175 + ~BLK_DEV_DM
176 + ~DM_MULTIPATH
177 + ~DM_SNAPSHOT"
178 +
179 + use lxc && CONFIG_CHECK+="
180 + ~BLK_CGROUP
181 + ~CGROUP_CPUACCT
182 + ~CGROUP_DEVICE
183 + ~CGROUP_FREEZER
184 + ~CGROUP_NET_PRIO
185 + ~CGROUP_PERF
186 + ~CGROUPS
187 + ~CGROUP_SCHED
188 + ~CPUSETS
189 + ~IPC_NS
190 + ~MACVLAN
191 + ~NAMESPACES
192 + ~NET_CLS_CGROUP
193 + ~NET_NS
194 + ~PID_NS
195 + ~POSIX_MQUEUE
196 + ~SECURITYFS
197 + ~USER_NS
198 + ~UTS_NS
199 + ~VETH
200 + ~!GRKERNSEC_CHROOT_MOUNT
201 + ~!GRKERNSEC_CHROOT_DOUBLE
202 + ~!GRKERNSEC_CHROOT_PIVOT
203 + ~!GRKERNSEC_CHROOT_CHMOD
204 + ~!GRKERNSEC_CHROOT_CAPS"
205 +
206 + kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
207 + ~DEVPTS_MULTIPLE_INSTANCES"
208 +
209 + use macvtap && CONFIG_CHECK+="
210 + ~MACVTAP"
211 +
212 + use virt-network && CONFIG_CHECK+="
213 + ~BRIDGE_EBT_MARK_T
214 + ~BRIDGE_NF_EBTABLES
215 + ~NETFILTER_ADVANCED
216 + ~NETFILTER_XT_CONNMARK
217 + ~NETFILTER_XT_MARK
218 + ~NETFILTER_XT_TARGET_CHECKSUM"
219 + # Bandwidth Limiting Support
220 + use virt-network && CONFIG_CHECK+="
221 + ~BRIDGE_EBT_T_NAT
222 + ~NET_ACT_POLICE
223 + ~NET_CLS_FW
224 + ~NET_CLS_U32
225 + ~NET_SCH_HTB
226 + ~NET_SCH_INGRESS
227 + ~NET_SCH_SFQ"
228 +
229 + # Handle specific kernel versions for different features
230 + kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
231 + if kernel_is ge 3 6; then
232 + CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
233 + kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
234 + fi
235 +
236 + ERROR_USER_NS="Optional depending on LXC configuration."
237 +
238 + if [[ -n ${CONFIG_CHECK} ]]; then
239 + linux-info_pkg_setup
240 + fi
241 +}
242 +
243 +src_prepare() {
244 + touch "${S}/.mailmap"
245 +
246 + default
247 +
248 + if [[ ${PV} = *9999* ]]; then
249 + # git checkouts require bootstrapping to create the configure script.
250 + # Additionally the submodules must be cloned to the right locations
251 + # bug #377279
252 + ./bootstrap || die "bootstrap failed"
253 + (
254 + git submodule status | sed 's/^[ +-]//;s/ .*//'
255 + git hash-object bootstrap.conf
256 + ) >.git-module-status
257 + fi
258 +
259 + # Tweak the init script:
260 + cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die
261 + sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
262 + -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \
263 + -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \
264 + -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \
265 + -i "${S}/libvirtd.init" || die "sed failed"
266 +
267 + eautoreconf
268 +}
269 +
270 +src_configure() {
271 + local myeconfargs=(
272 + $(use_with apparmor)
273 + $(use_with apparmor apparmor-profiles)
274 + $(use_with audit)
275 + $(use_with caps capng)
276 + $(use_with dbus)
277 + $(use_with firewalld)
278 + $(use_with fuse)
279 + $(use_with glusterfs)
280 + $(use_with glusterfs storage-gluster)
281 + $(use_with iscsi storage-iscsi)
282 + $(use_with libvirtd)
283 + $(use_with libssh)
284 + $(use_with lvm storage-lvm)
285 + $(use_with lvm storage-mpath)
286 + $(use_with lxc)
287 + $(use_with macvtap)
288 + $(use_enable nls)
289 + $(use_with numa numactl)
290 + $(use_with numa numad)
291 + $(use_with openvz)
292 + $(use_with parted storage-disk)
293 + $(use_with pcap libpcap)
294 + $(use_with phyp)
295 + $(use_with policykit polkit)
296 + $(use_with qemu)
297 + $(use_with qemu jansson)
298 + $(use_with rbd storage-rbd)
299 + $(use_with sasl)
300 + $(use_with selinux)
301 + $(use_with udev)
302 + $(use_with uml)
303 + $(use_with vepa virtualport)
304 + $(use_with virt-network network)
305 + $(use_with wireshark-plugins wireshark-dissector)
306 + $(use_with xen libxl)
307 + $(use_with zeroconf avahi)
308 + $(use_with zfs storage-zfs)
309 +
310 + --without-hal
311 + --without-netcf
312 + --without-sanlock
313 + --without-xenapi
314 +
315 + --with-esx
316 + --with-init-script=systemd
317 + --with-qemu-group=$(usex caps qemu root)
318 + --with-qemu-user=$(usex caps qemu root)
319 + --with-remote
320 + --with-storage-fs
321 + --with-vmware
322 +
323 + --disable-static
324 + --disable-werror
325 +
326 + --with-html-subdir=${PF}/html
327 + --localstatedir=/var
328 + )
329 +
330 + if use virtualbox && has_version app-emulation/virtualbox-ose; then
331 + myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
332 + else
333 + myeconfargs+=( $(use_with virtualbox vbox) )
334 + fi
335 +
336 + econf "${myeconfargs[@]}"
337 +
338 + if [[ ${PV} = *9999* ]]; then
339 + # Restore gnulib's config.sub and config.guess
340 + # bug #377279
341 + (cd .gnulib && git reset --hard > /dev/null)
342 + fi
343 +}
344 +
345 +src_test() {
346 + cd "${BUILD_DIR}"
347 +
348 + # remove problematic tests, bug #591416, bug #591418
349 + sed -i -e 's#commandtest$(EXEEXT) # #' \
350 + -e 's#virfirewalltest$(EXEEXT) # #' \
351 + -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
352 + -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
353 + tests/Makefile
354 +
355 + export VIR_TEST_DEBUG=1
356 + HOME="${T}" emake check || die "tests failed"
357 +}
358 +
359 +src_install() {
360 + emake DESTDIR="${D}" \
361 + SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
362 +
363 + find "${D}" -name '*.la' -delete || die
364 +
365 + # Remove bogus, empty directories. They are either not used, or
366 + # libvirtd is able to create them on demand
367 + rm -rf "${D}"/etc/sysconfig
368 + rm -rf "${D}"/var
369 +
370 + use libvirtd || return 0
371 + # From here, only libvirtd-related instructions, be warned!
372 +
373 + systemd_install_serviced \
374 + "${FILESDIR}"/libvirtd.service.conf libvirtd.service
375 +
376 + systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
377 +
378 + newinitd "${S}/libvirtd.init" libvirtd || die
379 + newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die
380 + newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
381 + newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
382 +
383 + newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
384 + newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
385 +
386 + newbashcomp "${S}/tools/bash-completion/vsh" vsh
387 + bashcomp_alias vsh virsh virt-admin
388 +
389 + DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
390 + DISABLE_AUTOFORMATTING=true
391 + readme.gentoo_create_doc
392 +}
393 +
394 +pkg_preinst() {
395 + # we only ever want to generate this once
396 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
397 + rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
398 + fi
399 +}
400 +
401 +pkg_postinst() {
402 + if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
403 + touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
404 + fi
405 +
406 + use libvirtd || return 0
407 + # From here, only libvirtd-related instructions, be warned!
408 +
409 + readme.gentoo_print_elog
410 +}