1 |
commit: 84532c1fc1a9caa8a9be5e01cf6786119c49f285 |
2 |
Author: Michal Privoznik <mprivozn <AT> redhat <DOT> com> |
3 |
AuthorDate: Fri Jan 25 15:24:12 2019 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 25 16:27:09 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84532c1f |
7 |
|
8 |
app-emulation/libvirt: version bump to 5.0.0 |
9 |
|
10 |
Signed-off-by: Michal Privoznik <mprivozn <AT> redhat.com> |
11 |
Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org> |
12 |
|
13 |
app-emulation/libvirt/Manifest | 1 + |
14 |
app-emulation/libvirt/libvirt-5.0.0.ebuild | 382 +++++++++++++++++++++++++++++ |
15 |
2 files changed, 383 insertions(+) |
16 |
|
17 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
18 |
index 19f7d33e671..13f25d957cd 100644 |
19 |
--- a/app-emulation/libvirt/Manifest |
20 |
+++ b/app-emulation/libvirt/Manifest |
21 |
@@ -1,3 +1,4 @@ |
22 |
DIST libvirt-4.10.0.tar.xz 14841188 BLAKE2B b52f2ed1c4c65930339a6b6fc9e7b034c7661edc0defdd78642f305b97332c33247bfc552efc43aa75a8d360c0d721d1a58a22fa7a016e7cf14ee2219d70a762 SHA512 a4f97aed6299c7954518ab88738ab781cee0755bfd64094a44468f77f99cac5eb2bc74ecd6aec90177317606ebd073292f5b5d0056054d1d94973fa938589fbd |
23 |
DIST libvirt-4.5.0.tar.xz 14743956 BLAKE2B 930852765104b1b22744df0ec4f1c74d89bc0fda80852978f7c857943858cc45eed9b74a3d42668f872540be2637f26c4d9d7859594847e58e6fb4cd33350130 SHA512 26710c7e5219f007524e9f93a642e55e4e8ea197afa6b2ca6a4b67b7028313f4b0d82924ee9a1e91ff688a4d2b53f89f3655fbeef0fa99a34f8418f37d787984 |
24 |
DIST libvirt-4.9.0.tar.xz 14744184 BLAKE2B 03ddefc8f505c8688ad506b81ea9b37ee085e4c9c429834c6b6f338981bfc3c6034a5455a79feca604fb36e658de766ee6104aeed690c682ae596d10eb5632a9 SHA512 3cfada940f9de6cc4b0504e089f41aa03d9986f0163344dd3b3ab8e6c4eb556a56996dc8f24bca913b036862c75b256628ea9ab7674ef0a57b87f47c58689e90 |
25 |
+DIST libvirt-5.0.0.tar.xz 14832576 BLAKE2B 8839a10e4ec8de012ca17e348efd75cbd94cc3b1cf378c867d958b61079105d6eb4f98d8d4b89dd5a6a368a3d9ea41f30498e44b7e039cdf8931ae6de8fa47b3 SHA512 d93042f49d2550d14577b5257c548d7108462fe1ad69420c128acf094ffd3e80deb744db13d4c3d5fbe5e4c1826d13131be12e3413710711a2d8cba6cb5a9db9 |
26 |
|
27 |
diff --git a/app-emulation/libvirt/libvirt-5.0.0.ebuild b/app-emulation/libvirt/libvirt-5.0.0.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..158a315e310 |
30 |
--- /dev/null |
31 |
+++ b/app-emulation/libvirt/libvirt-5.0.0.ebuild |
32 |
@@ -0,0 +1,382 @@ |
33 |
+# Copyright 1999-2018 Gentoo Authors |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
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 +libvirtd lvm |
64 |
+ libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit |
65 |
+ +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/netcat6-1.0-r2 >=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 ) |
107 |
+ fuse? ( >=sys-fs/fuse-2.8.6:= ) |
108 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
109 |
+ iscsi? ( sys-block/open-iscsi ) |
110 |
+ libssh? ( net-libs/libssh ) |
111 |
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
112 |
+ nfs? ( net-fs/nfs-utils ) |
113 |
+ numa? ( |
114 |
+ >sys-process/numactl-2.0.2 |
115 |
+ sys-process/numad |
116 |
+ ) |
117 |
+ parted? ( |
118 |
+ >=sys-block/parted-1.8[device-mapper] |
119 |
+ sys-fs/lvm2[-device-mapper-only(-)] |
120 |
+ ) |
121 |
+ pcap? ( >=net-libs/libpcap-1.0.0 ) |
122 |
+ policykit? ( >=sys-auth/polkit-0.9 ) |
123 |
+ qemu? ( |
124 |
+ >=app-emulation/qemu-1.5.0 |
125 |
+ dev-libs/yajl |
126 |
+ ) |
127 |
+ rbd? ( sys-cluster/ceph ) |
128 |
+ sasl? ( dev-libs/cyrus-sasl ) |
129 |
+ selinux? ( >=sys-libs/libselinux-2.0.85 ) |
130 |
+ virt-network? ( |
131 |
+ net-dns/dnsmasq[script] |
132 |
+ net-firewall/ebtables |
133 |
+ >=net-firewall/iptables-1.4.10[ipv6] |
134 |
+ net-misc/radvd |
135 |
+ sys-apps/iproute2[-minimal] |
136 |
+ ) |
137 |
+ virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
138 |
+ wireshark-plugins? ( net-analyzer/wireshark:= ) |
139 |
+ xen? ( |
140 |
+ >=app-emulation/xen-4.6.0 |
141 |
+ app-emulation/xen-tools:= |
142 |
+ ) |
143 |
+ udev? ( |
144 |
+ virtual/udev |
145 |
+ >=x11-libs/libpciaccess-0.10.9 |
146 |
+ ) |
147 |
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] ) |
148 |
+ zfs? ( sys-fs/zfs )" |
149 |
+ |
150 |
+DEPEND="${RDEPEND} |
151 |
+ ${PYTHON_DEPS} |
152 |
+ app-text/xhtml1 |
153 |
+ dev-lang/perl |
154 |
+ dev-libs/libxslt |
155 |
+ dev-perl/XML-XPath |
156 |
+ virtual/pkgconfig" |
157 |
+ |
158 |
+PATCHES=( |
159 |
+ "${FILESDIR}"/${PN}-5.0.0-do-not-use-sysconf.patch |
160 |
+ "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch |
161 |
+ "${FILESDIR}"/${PN}-5.0.0-fix-paths-for-apparmor.patch |
162 |
+) |
163 |
+ |
164 |
+pkg_setup() { |
165 |
+ if use qemu; then |
166 |
+ enewgroup qemu 77 |
167 |
+ enewuser qemu 77 -1 -1 "qemu,kvm" |
168 |
+ fi |
169 |
+ |
170 |
+ use policykit && enewgroup libvirt |
171 |
+ |
172 |
+ # Check kernel configuration: |
173 |
+ CONFIG_CHECK="" |
174 |
+ use fuse && CONFIG_CHECK+=" |
175 |
+ ~FUSE_FS" |
176 |
+ |
177 |
+ use lvm && CONFIG_CHECK+=" |
178 |
+ ~BLK_DEV_DM |
179 |
+ ~DM_MULTIPATH |
180 |
+ ~DM_SNAPSHOT" |
181 |
+ |
182 |
+ use lxc && CONFIG_CHECK+=" |
183 |
+ ~BLK_CGROUP |
184 |
+ ~CGROUP_CPUACCT |
185 |
+ ~CGROUP_DEVICE |
186 |
+ ~CGROUP_FREEZER |
187 |
+ ~CGROUP_NET_PRIO |
188 |
+ ~CGROUP_PERF |
189 |
+ ~CGROUPS |
190 |
+ ~CGROUP_SCHED |
191 |
+ ~CPUSETS |
192 |
+ ~IPC_NS |
193 |
+ ~MACVLAN |
194 |
+ ~NAMESPACES |
195 |
+ ~NET_CLS_CGROUP |
196 |
+ ~NET_NS |
197 |
+ ~PID_NS |
198 |
+ ~POSIX_MQUEUE |
199 |
+ ~SECURITYFS |
200 |
+ ~USER_NS |
201 |
+ ~UTS_NS |
202 |
+ ~VETH |
203 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
204 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
205 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
206 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
207 |
+ ~!GRKERNSEC_CHROOT_CAPS" |
208 |
+ |
209 |
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
210 |
+ ~DEVPTS_MULTIPLE_INSTANCES" |
211 |
+ |
212 |
+ use macvtap && CONFIG_CHECK+=" |
213 |
+ ~MACVTAP" |
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 |
+ # Bandwidth Limiting Support |
223 |
+ use virt-network && CONFIG_CHECK+=" |
224 |
+ ~BRIDGE_EBT_T_NAT |
225 |
+ ~IP_NF_TARGET_REJECT |
226 |
+ ~NET_ACT_POLICE |
227 |
+ ~NET_CLS_FW |
228 |
+ ~NET_CLS_U32 |
229 |
+ ~NET_SCH_HTB |
230 |
+ ~NET_SCH_INGRESS |
231 |
+ ~NET_SCH_SFQ" |
232 |
+ |
233 |
+ # Handle specific kernel versions for different features |
234 |
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
235 |
+ if kernel_is ge 3 6; then |
236 |
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
237 |
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
238 |
+ fi |
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 |
+ |
247 |
+src_prepare() { |
248 |
+ touch "${S}/.mailmap" |
249 |
+ |
250 |
+ default |
251 |
+ |
252 |
+ if [[ ${PV} = *9999* ]]; then |
253 |
+ # Reinitialize submodules as this is required for gnulib's bootstrap |
254 |
+ git submodule init |
255 |
+ # git checkouts require bootstrapping to create the configure script. |
256 |
+ # Additionally the submodules must be cloned to the right locations |
257 |
+ # bug #377279 |
258 |
+ ./bootstrap || die "bootstrap failed" |
259 |
+ ( |
260 |
+ git submodule status | sed 's/^[ +-]//;s/ .*//' |
261 |
+ git hash-object bootstrap.conf |
262 |
+ ) >.git-module-status |
263 |
+ fi |
264 |
+ |
265 |
+ # Tweak the init script: |
266 |
+ cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
267 |
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
268 |
+ -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ |
269 |
+ -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
270 |
+ -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
271 |
+ -i "${S}/libvirtd.init" || die "sed failed" |
272 |
+ |
273 |
+ eautoreconf |
274 |
+} |
275 |
+ |
276 |
+src_configure() { |
277 |
+ local myeconfargs=( |
278 |
+ $(use_with apparmor) |
279 |
+ $(use_with apparmor apparmor-profiles) |
280 |
+ $(use_with audit) |
281 |
+ $(use_with caps capng) |
282 |
+ $(use_with dbus) |
283 |
+ $(use_with firewalld) |
284 |
+ $(use_with fuse) |
285 |
+ $(use_with glusterfs) |
286 |
+ $(use_with glusterfs storage-gluster) |
287 |
+ $(use_with iscsi storage-iscsi) |
288 |
+ $(use_with libvirtd) |
289 |
+ $(use_with libssh) |
290 |
+ $(use_with lvm storage-lvm) |
291 |
+ $(use_with lvm storage-mpath) |
292 |
+ $(use_with lxc) |
293 |
+ $(use_with macvtap) |
294 |
+ $(use_enable nls) |
295 |
+ $(use_with numa numactl) |
296 |
+ $(use_with numa numad) |
297 |
+ $(use_with openvz) |
298 |
+ $(use_with parted storage-disk) |
299 |
+ $(use_with pcap libpcap) |
300 |
+ $(use_with phyp) |
301 |
+ $(use_with policykit polkit) |
302 |
+ $(use_with qemu) |
303 |
+ $(use_with qemu yajl) |
304 |
+ $(use_with rbd storage-rbd) |
305 |
+ $(use_with sasl) |
306 |
+ $(use_with selinux) |
307 |
+ $(use_with udev) |
308 |
+ $(use_with vepa virtualport) |
309 |
+ $(use_with virt-network network) |
310 |
+ $(use_with wireshark-plugins wireshark-dissector) |
311 |
+ $(use_with xen libxl) |
312 |
+ $(use_with zeroconf avahi) |
313 |
+ $(use_with zfs storage-zfs) |
314 |
+ |
315 |
+ --without-hal |
316 |
+ --without-netcf |
317 |
+ --without-sanlock |
318 |
+ |
319 |
+ --with-esx |
320 |
+ --with-init-script=systemd |
321 |
+ --with-qemu-group=$(usex caps qemu root) |
322 |
+ --with-qemu-user=$(usex caps qemu root) |
323 |
+ --with-remote |
324 |
+ --with-storage-fs |
325 |
+ --with-vmware |
326 |
+ |
327 |
+ --disable-static |
328 |
+ --disable-werror |
329 |
+ |
330 |
+ --with-html-subdir=${PF}/html |
331 |
+ --localstatedir=/var |
332 |
+ ) |
333 |
+ |
334 |
+ if use virtualbox && has_version app-emulation/virtualbox-ose; then |
335 |
+ myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) |
336 |
+ else |
337 |
+ myeconfargs+=( $(use_with virtualbox vbox) ) |
338 |
+ fi |
339 |
+ |
340 |
+ econf "${myeconfargs[@]}" |
341 |
+ |
342 |
+ if [[ ${PV} = *9999* ]]; then |
343 |
+ # Restore gnulib's config.sub and config.guess |
344 |
+ # bug #377279 |
345 |
+ (cd .gnulib && git reset --hard > /dev/null) |
346 |
+ fi |
347 |
+} |
348 |
+ |
349 |
+src_test() { |
350 |
+ cd "${BUILD_DIR}" |
351 |
+ |
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 || die "tests failed" |
361 |
+} |
362 |
+ |
363 |
+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 |
+ use libvirtd || return 0 |
375 |
+ # From here, only libvirtd-related instructions, be warned! |
376 |
+ |
377 |
+ systemd_install_serviced \ |
378 |
+ "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
379 |
+ |
380 |
+ systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
381 |
+ |
382 |
+ newinitd "${S}/libvirtd.init" libvirtd || die |
383 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r3" libvirt-guests || die |
384 |
+ newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
385 |
+ newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
386 |
+ |
387 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
388 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
389 |
+ |
390 |
+ newbashcomp "${S}/tools/bash-completion/vsh" vsh |
391 |
+ bashcomp_alias vsh virsh virt-admin |
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 |
+} |