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