1 |
commit: 34bf2cf53203d4e701e8eb7d5468a1e8a3cff9df |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 6 18:05:54 2017 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 6 18:27:33 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34bf2cf5 |
7 |
|
8 |
app-emulation/libvirt: version bump to 3.3.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
app-emulation/libvirt/Manifest | 1 + |
13 |
app-emulation/libvirt/libvirt-3.3.0.ebuild | 382 +++++++++++++++++++++++++++++ |
14 |
2 files changed, 383 insertions(+) |
15 |
|
16 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
17 |
index 84b6a1f9c40..fe9fc2f124b 100644 |
18 |
--- a/app-emulation/libvirt/Manifest |
19 |
+++ b/app-emulation/libvirt/Manifest |
20 |
@@ -5,3 +5,4 @@ DIST libvirt-2.3.0.tar.xz 13224384 SHA256 e430e69b27d3f6c97255e638617b59b179618d |
21 |
DIST libvirt-2.5.0.tar.xz 13638636 SHA256 819dffefbfd6ae95dfe1b28cfdee15ebcf9f91bbd732157488a57705bf81cb1e SHA512 256d6cae635851d710ffa3bdfd6b4d744687610b899a65821829af0f66a65e9c4ae287c8651534b40fc04f6525920b3704e90028a6f906af141cd61f2e79d10c WHIRLPOOL 64ef68bba5b2b47ef8c191c3cadc8121267fc07f6fdc40f7969b3762bab222872b987ad8d04b22c2f6d6629d7599a7ff3263b3491f0143d59a172b269d81284c |
22 |
DIST libvirt-3.1.0.tar.xz 13906204 SHA256 7879029a0fcac4e58dbeec66f0bc77771565c4b6667212c8f6251eefb03732a9 SHA512 e08c82aa3c06b2ea7615b71937fa16e7ae52cb82350bacaefcac1a872471bbbf993e20b4b14f5bb4d7c539be18c42b377df9100b493d3873b5fd5f1f67449e17 WHIRLPOOL 7fdb068a95575499115eb542342e2d133c3d877df3190f40f97de4f2f0af67fdc722c3d1bcaeea14306dcf94ff4a013bd5e60736e7866de3ae56e662df7c5dc4 |
23 |
DIST libvirt-3.2.0.tar.xz 14057340 SHA256 9481a083b567a07927f239553dd70b5c0d1bff5b9b4ec61be1899981c646209e SHA512 35a9db3d59a3817d15fd6a586a2a73860b3d8a2d2ff37dbea1b4045fe1514c3535fce2eeba0f09df2d0bb9072ed9f1078ca9bad61a37c586eb019ddad3f898c4 WHIRLPOOL 499eb2cbf1367c99c106a747c76087f6ed980cc057cdb10cefe50a8a823a294f67925c98b1baa6ac7e12dcc20c90145b9a0c1e0927772e3b4a046bb4414391a0 |
24 |
+DIST libvirt-3.3.0.tar.xz 14043384 SHA256 29e00984174e33cf2183b478382c017de26860452ffee17b73871051264ebb1b SHA512 69166ddd7d4b9ef3b1bf2466e781139ef9b4d224a64acc7b8e6fca8786d36482138a1fe7b7407c0fca3b3d012cb418d168671a3e65e428f023c16493b7718c2d WHIRLPOOL 1b2688f6b9a89608677070b5ce1fd2b2af115336126d4214071bc1abba25056d54dbbf16d6bdfab7582b252a833d3e53e51175d552d5c936b08973c0eed76643 |
25 |
|
26 |
diff --git a/app-emulation/libvirt/libvirt-3.3.0.ebuild b/app-emulation/libvirt/libvirt-3.3.0.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..674ea5e9798 |
29 |
--- /dev/null |
30 |
+++ b/app-emulation/libvirt/libvirt-3.3.0.ebuild |
31 |
@@ -0,0 +1,382 @@ |
32 |
+# Copyright 1999-2017 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 |
38 |
+ |
39 |
+if [[ ${PV} = *9999* ]]; then |
40 |
+ inherit git-r3 |
41 |
+ EGIT_REPO_URI="git://libvirt.org/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="http://libvirt.org/sources/stable_updates/${P}.tar.xz" |
49 |
+ else |
50 |
+ SRC_URI="http://libvirt.org/sources/${P}.tar.xz" |
51 |
+ fi |
52 |
+ KEYWORDS="~amd64 ~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 elibc_glibc |
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-misc/curl-7.18.0 |
93 |
+ sys-apps/dmidecode |
94 |
+ >=sys-apps/util-linux-2.17 |
95 |
+ sys-devel/gettext |
96 |
+ sys-libs/ncurses:0= |
97 |
+ sys-libs/readline:= |
98 |
+ apparmor? ( sys-libs/libapparmor ) |
99 |
+ audit? ( sys-process/audit ) |
100 |
+ caps? ( sys-libs/libcap-ng ) |
101 |
+ dbus? ( sys-apps/dbus ) |
102 |
+ elibc_glibc? ( sys-libs/glibc[rpc(+)] ) |
103 |
+ firewalld? ( net-firewall/firewalld ) |
104 |
+ fuse? ( >=sys-fs/fuse-2.8.6 ) |
105 |
+ glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
106 |
+ iscsi? ( sys-block/open-iscsi ) |
107 |
+ libssh? ( net-libs/libssh ) |
108 |
+ lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
109 |
+ nfs? ( net-fs/nfs-utils ) |
110 |
+ numa? ( |
111 |
+ >sys-process/numactl-2.0.2 |
112 |
+ sys-process/numad |
113 |
+ ) |
114 |
+ openvz? ( sys-kernel/openvz-sources:* ) |
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/yajl |
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}-1.3.0-do_not_use_sysconf.patch |
157 |
+ "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch |
158 |
+ "${FILESDIR}"/${PN}-3.0.0-fix_paths_for_apparmor.patch |
159 |
+ "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch |
160 |
+ "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488 |
161 |
+) |
162 |
+ |
163 |
+pkg_setup() { |
164 |
+ if use qemu; then |
165 |
+ enewgroup qemu 77 |
166 |
+ enewuser qemu 77 -1 -1 "qemu,kvm" |
167 |
+ fi |
168 |
+ |
169 |
+ use policykit && enewgroup libvirt |
170 |
+ |
171 |
+ # Check kernel configuration: |
172 |
+ CONFIG_CHECK="" |
173 |
+ use fuse && CONFIG_CHECK+=" |
174 |
+ ~FUSE_FS" |
175 |
+ |
176 |
+ use lvm && CONFIG_CHECK+=" |
177 |
+ ~BLK_DEV_DM |
178 |
+ ~DM_MULTIPATH |
179 |
+ ~DM_SNAPSHOT" |
180 |
+ |
181 |
+ use lxc && CONFIG_CHECK+=" |
182 |
+ ~BLK_CGROUP |
183 |
+ ~CGROUP_CPUACCT |
184 |
+ ~CGROUP_DEVICE |
185 |
+ ~CGROUP_FREEZER |
186 |
+ ~CGROUP_NET_PRIO |
187 |
+ ~CGROUP_PERF |
188 |
+ ~CGROUPS |
189 |
+ ~CGROUP_SCHED |
190 |
+ ~CPUSETS |
191 |
+ ~IPC_NS |
192 |
+ ~MACVLAN |
193 |
+ ~NAMESPACES |
194 |
+ ~NET_CLS_CGROUP |
195 |
+ ~NET_NS |
196 |
+ ~PID_NS |
197 |
+ ~POSIX_MQUEUE |
198 |
+ ~SECURITYFS |
199 |
+ ~USER_NS |
200 |
+ ~UTS_NS |
201 |
+ ~VETH |
202 |
+ ~!GRKERNSEC_CHROOT_MOUNT |
203 |
+ ~!GRKERNSEC_CHROOT_DOUBLE |
204 |
+ ~!GRKERNSEC_CHROOT_PIVOT |
205 |
+ ~!GRKERNSEC_CHROOT_CHMOD |
206 |
+ ~!GRKERNSEC_CHROOT_CAPS" |
207 |
+ |
208 |
+ kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
209 |
+ ~DEVPTS_MULTIPLE_INSTANCES" |
210 |
+ |
211 |
+ use macvtap && CONFIG_CHECK+=" |
212 |
+ ~MACVTAP" |
213 |
+ |
214 |
+ use virt-network && CONFIG_CHECK+=" |
215 |
+ ~BRIDGE_EBT_MARK_T |
216 |
+ ~BRIDGE_NF_EBTABLES |
217 |
+ ~NETFILTER_ADVANCED |
218 |
+ ~NETFILTER_XT_CONNMARK |
219 |
+ ~NETFILTER_XT_MARK |
220 |
+ ~NETFILTER_XT_TARGET_CHECKSUM" |
221 |
+ # Bandwidth Limiting Support |
222 |
+ use virt-network && CONFIG_CHECK+=" |
223 |
+ ~BRIDGE_EBT_T_NAT |
224 |
+ ~NET_ACT_POLICE |
225 |
+ ~NET_CLS_FW |
226 |
+ ~NET_CLS_U32 |
227 |
+ ~NET_SCH_HTB |
228 |
+ ~NET_SCH_INGRESS |
229 |
+ ~NET_SCH_SFQ" |
230 |
+ |
231 |
+ # Handle specific kernel versions for different features |
232 |
+ kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
233 |
+ if kernel_is ge 3 6; then |
234 |
+ CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
235 |
+ kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
236 |
+ fi |
237 |
+ |
238 |
+ ERROR_USER_NS="Optional depending on LXC configuration." |
239 |
+ |
240 |
+ if [[ -n ${CONFIG_CHECK} ]]; then |
241 |
+ linux-info_pkg_setup |
242 |
+ fi |
243 |
+} |
244 |
+ |
245 |
+src_prepare() { |
246 |
+ touch "${S}/.mailmap" |
247 |
+ |
248 |
+ default |
249 |
+ |
250 |
+ if [[ ${PV} = *9999* ]]; then |
251 |
+ # git checkouts require bootstrapping to create the configure script. |
252 |
+ # Additionally the submodules must be cloned to the right locations |
253 |
+ # bug #377279 |
254 |
+ ./bootstrap || die "bootstrap failed" |
255 |
+ ( |
256 |
+ git submodule status | sed 's/^[ +-]//;s/ .*//' |
257 |
+ git hash-object bootstrap.conf |
258 |
+ ) >.git-module-status |
259 |
+ fi |
260 |
+ |
261 |
+ # Tweak the init script: |
262 |
+ cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
263 |
+ sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
264 |
+ -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ |
265 |
+ -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
266 |
+ -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
267 |
+ -i "${S}/libvirtd.init" || die "sed failed" |
268 |
+ |
269 |
+ eautoreconf |
270 |
+} |
271 |
+ |
272 |
+src_configure() { |
273 |
+ local myeconfargs=( |
274 |
+ $(use_with apparmor) |
275 |
+ $(use_with apparmor apparmor-profiles) |
276 |
+ $(use_with audit) |
277 |
+ $(use_with caps capng) |
278 |
+ $(use_with dbus) |
279 |
+ $(use_with firewalld) |
280 |
+ $(use_with fuse) |
281 |
+ $(use_with glusterfs) |
282 |
+ $(use_with glusterfs storage-gluster) |
283 |
+ $(use_with iscsi storage-iscsi) |
284 |
+ $(use_with libvirtd) |
285 |
+ $(use_with libssh) |
286 |
+ $(use_with lvm storage-lvm) |
287 |
+ $(use_with lvm storage-mpath) |
288 |
+ $(use_with lxc) |
289 |
+ $(use_with macvtap) |
290 |
+ $(use_enable nls) |
291 |
+ $(use_with numa numactl) |
292 |
+ $(use_with numa numad) |
293 |
+ $(use_with openvz) |
294 |
+ $(use_with parted storage-disk) |
295 |
+ $(use_with pcap libpcap) |
296 |
+ $(use_with phyp) |
297 |
+ $(use_with policykit polkit) |
298 |
+ $(use_with qemu) |
299 |
+ $(use_with qemu yajl) |
300 |
+ $(use_with rbd storage-rbd) |
301 |
+ $(use_with sasl) |
302 |
+ $(use_with selinux) |
303 |
+ $(use_with udev) |
304 |
+ $(use_with uml) |
305 |
+ $(use_with vepa virtualport) |
306 |
+ $(use_with virt-network network) |
307 |
+ $(use_with wireshark-plugins wireshark-dissector) |
308 |
+ $(use_with xen) |
309 |
+ $(use_with xen xen-inotify) |
310 |
+ $(use_with xen libxl) |
311 |
+ $(use_with zeroconf avahi) |
312 |
+ $(use_with zfs storage-zfs) |
313 |
+ |
314 |
+ --without-hal |
315 |
+ --without-netcf |
316 |
+ --without-sanlock |
317 |
+ --without-xenapi |
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/cache |
373 |
+ rm -rf "${D}"/var/run |
374 |
+ rm -rf "${D}"/var/log |
375 |
+ |
376 |
+ use libvirtd || return 0 |
377 |
+ # From here, only libvirtd-related instructions, be warned! |
378 |
+ |
379 |
+ systemd_install_serviced \ |
380 |
+ "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
381 |
+ |
382 |
+ systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
383 |
+ |
384 |
+ newinitd "${S}/libvirtd.init" libvirtd || die |
385 |
+ newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die |
386 |
+ newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
387 |
+ newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
388 |
+ |
389 |
+ newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
390 |
+ newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
391 |
+ |
392 |
+ DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2") |
393 |
+ DISABLE_AUTOFORMATTING=true |
394 |
+ readme.gentoo_create_doc |
395 |
+} |
396 |
+ |
397 |
+pkg_preinst() { |
398 |
+ # we only ever want to generate this once |
399 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
400 |
+ rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
401 |
+ fi |
402 |
+} |
403 |
+ |
404 |
+pkg_postinst() { |
405 |
+ if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
406 |
+ touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
407 |
+ fi |
408 |
+ |
409 |
+ use libvirtd || return 0 |
410 |
+ # From here, only libvirtd-related instructions, be warned! |
411 |
+ |
412 |
+ readme.gentoo_print_elog |
413 |
+} |