1 |
commit: ca4fef46af2f1f60d594477d7f29f024a6d81bd1 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat May 6 18:11:22 2017 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 6 18:27:34 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca4fef46 |
7 |
|
8 |
app-emulation/libvirt: drop old versions <2.5.0 |
9 |
|
10 |
Package-Manager: Portage-2.3.5, Repoman-2.3.2 |
11 |
|
12 |
app-emulation/libvirt/Manifest | 4 - |
13 |
.../libvirt-1.2.21-avoid_deprecated_pc_file.patch | 24 -- |
14 |
app-emulation/libvirt/libvirt-1.3.5-r2.ebuild | 379 -------------------- |
15 |
app-emulation/libvirt/libvirt-2.1.0-r2.ebuild | 381 -------------------- |
16 |
app-emulation/libvirt/libvirt-2.3.0.ebuild | 382 --------------------- |
17 |
5 files changed, 1170 deletions(-) |
18 |
|
19 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
20 |
index fe9fc2f124b..01fff6c49bc 100644 |
21 |
--- a/app-emulation/libvirt/Manifest |
22 |
+++ b/app-emulation/libvirt/Manifest |
23 |
@@ -1,7 +1,3 @@ |
24 |
-DIST libvirt-1.3.5-20160709.tar.xz 1336 SHA256 d14b14661e9bd89a8805dd84d8ee5f8b39f428a4dcbf70693eea593328e28033 SHA512 08ad8c691f145a3a8c27b594b486b9265777f756099c127e58fd76bac7249a0e84181a3f15da4cf64ffdcf35ff7e3a2f1f1ee50f3882df5d980ad7250a30e44e WHIRLPOOL 8d8106314c2bed984db3947b51b90dadd45680a07d568cc980c6534ba2229bfff8d041ecf40898131030f3db8d6e223fe30ba3dc72b3fe7fedc02a77b5c37331 |
25 |
-DIST libvirt-1.3.5.tar.gz 35109092 SHA256 93a23c44eb431da46c9458f95a66e29c9b98e37515d44b6be09e75b35ec94ac8 SHA512 6c6a09623d3d4d426311bfa7039f5e39584d5f891b8e761bbdb3022601ea066b8e1c3f8d609326e8ba4081ae40b7b03086fbc8ba5759d218b8616ec98200a89d WHIRLPOOL 88ac308cc461efff842c27e40263a3b25ce0bc0ca310fb6e9def9126ab893fe43aed01bda9fc3615439ee797c36e2800f741b346e0b3d96aac64e7909c269879 |
26 |
-DIST libvirt-2.1.0.tar.xz 13212368 SHA256 1a799562337472ab00f76aa30a53d54c623c96633070ec53286c9cc2a456316b SHA512 5ad1bcf4d28be39028db7b551c77947d56a7119501912fdf41b0d46467f9c37525d364854181bd084e2107e9cd459303856403e5330bd99458c32e42abb4059c WHIRLPOOL 75485a02e9c1538f91379f6e702c39e5e7acd248221e01b797ec03930e92e7859c2986050c06009059f5cf9cff6bab131c1d6758d3950b201e5ce555e3b15a90 |
27 |
-DIST libvirt-2.3.0.tar.xz 13224384 SHA256 e430e69b27d3f6c97255e638617b59b179618d531d81ac7dfe0783a1c1eeafd1 SHA512 b815704a7d021895e94f34551f783b053f4dce3d6f792e0734b98745b8bd895ddb30250b3cf9b1ecc61bb2f09073a51bc75edb2745591d22d6a7ef2935eac701 WHIRLPOOL d27df68a6464e763fb119d8926ba9d4ad1e47fa37e08aa14adeb3684d2675bb0d7be69b17e22e98fffe281393d37a4c7fdd318e1641e0a6767fcab63d5a790e5 |
28 |
DIST libvirt-2.5.0.tar.xz 13638636 SHA256 819dffefbfd6ae95dfe1b28cfdee15ebcf9f91bbd732157488a57705bf81cb1e SHA512 256d6cae635851d710ffa3bdfd6b4d744687610b899a65821829af0f66a65e9c4ae287c8651534b40fc04f6525920b3704e90028a6f906af141cd61f2e79d10c WHIRLPOOL 64ef68bba5b2b47ef8c191c3cadc8121267fc07f6fdc40f7969b3762bab222872b987ad8d04b22c2f6d6629d7599a7ff3263b3491f0143d59a172b269d81284c |
29 |
DIST libvirt-3.1.0.tar.xz 13906204 SHA256 7879029a0fcac4e58dbeec66f0bc77771565c4b6667212c8f6251eefb03732a9 SHA512 e08c82aa3c06b2ea7615b71937fa16e7ae52cb82350bacaefcac1a872471bbbf993e20b4b14f5bb4d7c539be18c42b377df9100b493d3873b5fd5f1f67449e17 WHIRLPOOL 7fdb068a95575499115eb542342e2d133c3d877df3190f40f97de4f2f0af67fdc722c3d1bcaeea14306dcf94ff4a013bd5e60736e7866de3ae56e662df7c5dc4 |
30 |
DIST libvirt-3.2.0.tar.xz 14057340 SHA256 9481a083b567a07927f239553dd70b5c0d1bff5b9b4ec61be1899981c646209e SHA512 35a9db3d59a3817d15fd6a586a2a73860b3d8a2d2ff37dbea1b4045fe1514c3535fce2eeba0f09df2d0bb9072ed9f1078ca9bad61a37c586eb019ddad3f898c4 WHIRLPOOL 499eb2cbf1367c99c106a747c76087f6ed980cc057cdb10cefe50a8a823a294f67925c98b1baa6ac7e12dcc20c90145b9a0c1e0927772e3b4a046bb4414391a0 |
31 |
|
32 |
diff --git a/app-emulation/libvirt/files/libvirt-1.2.21-avoid_deprecated_pc_file.patch b/app-emulation/libvirt/files/libvirt-1.2.21-avoid_deprecated_pc_file.patch |
33 |
deleted file mode 100644 |
34 |
index fa13f829436..00000000000 |
35 |
--- a/app-emulation/libvirt/files/libvirt-1.2.21-avoid_deprecated_pc_file.patch |
36 |
+++ /dev/null |
37 |
@@ -1,24 +0,0 @@ |
38 |
-From Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779775 |
39 |
- |
40 |
-From: Michael Biebl <biebl@××××××.org> |
41 |
-Date: Tue, 11 Aug 2015 07:25:01 +0200 |
42 |
-Subject: libsystemd |
43 |
- |
44 |
-Use libsystemd instead of deprecated libsystemd-daemon |
45 |
---- |
46 |
- m4/virt-systemd-daemon.m4 | 2 +- |
47 |
- 1 file changed, 1 insertion(+), 1 deletion(-) |
48 |
- |
49 |
-diff --git a/m4/virt-systemd-daemon.m4 b/m4/virt-systemd-daemon.m4 |
50 |
-index 8516e41..c9708ec 100644 |
51 |
---- a/m4/virt-systemd-daemon.m4 |
52 |
-+++ b/m4/virt-systemd-daemon.m4 |
53 |
-@@ -18,7 +18,7 @@ dnl <http://www.gnu.org/licenses/>. |
54 |
- dnl |
55 |
- |
56 |
- AC_DEFUN([LIBVIRT_CHECK_SYSTEMD_DAEMON],[ |
57 |
-- LIBVIRT_CHECK_PKG([SYSTEMD_DAEMON], [libsystemd-daemon], [0.27.1]) |
58 |
-+ LIBVIRT_CHECK_PKG([SYSTEMD_DAEMON], [libsystemd], [209]) |
59 |
- |
60 |
- old_CFLAGS="$CFLAGS" |
61 |
- old_LIBS="$LIBS" |
62 |
|
63 |
diff --git a/app-emulation/libvirt/libvirt-1.3.5-r2.ebuild b/app-emulation/libvirt/libvirt-1.3.5-r2.ebuild |
64 |
deleted file mode 100644 |
65 |
index d036292f3c2..00000000000 |
66 |
--- a/app-emulation/libvirt/libvirt-1.3.5-r2.ebuild |
67 |
+++ /dev/null |
68 |
@@ -1,379 +0,0 @@ |
69 |
-# Copyright 1999-2017 Gentoo Foundation |
70 |
-# Distributed under the terms of the GNU General Public License v2 |
71 |
- |
72 |
-EAPI=5 |
73 |
- |
74 |
-inherit eutils user autotools-utils linux-info systemd readme.gentoo |
75 |
- |
76 |
-BACKPORTS="20160709" # CVE-2016-5008 |
77 |
- |
78 |
-if [[ ${PV} = *9999* ]]; then |
79 |
- inherit git-r3 |
80 |
- EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
81 |
- SRC_URI="" |
82 |
- KEYWORDS="" |
83 |
- SLOT="0" |
84 |
-else |
85 |
- # Versions with 4 numbers are stable updates: |
86 |
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then |
87 |
- SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.gz" |
88 |
- else |
89 |
- SRC_URI="http://libvirt.org/sources/${P}.tar.gz" |
90 |
- fi |
91 |
- SRC_URI+=" ${BACKPORTS:+ |
92 |
- https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz |
93 |
- https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}" |
94 |
- KEYWORDS="amd64 x86" |
95 |
- SLOT="0/${PV}" |
96 |
-fi |
97 |
- |
98 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
99 |
-HOMEPAGE="http://www.libvirt.org/" |
100 |
-LICENSE="LGPL-2.1" |
101 |
-IUSE="apparmor audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm \ |
102 |
- lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \ |
103 |
- selinux systemd +udev uml +vepa virtualbox virt-network wireshark-plugins \ |
104 |
- xen elibc_glibc" |
105 |
- |
106 |
-REQUIRED_USE=" |
107 |
- firewalld? ( virt-network ) |
108 |
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
109 |
- lxc? ( caps libvirtd ) |
110 |
- openvz? ( libvirtd ) |
111 |
- qemu? ( libvirtd ) |
112 |
- uml? ( libvirtd ) |
113 |
- vepa? ( macvtap ) |
114 |
- virt-network? ( libvirtd ) |
115 |
- virtualbox? ( libvirtd ) |
116 |
- xen? ( libvirtd )" |
117 |
- |
118 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
119 |
-# non-optional, so put it into RDEPEND. |
120 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
121 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
122 |
-# we must go with the most recent |
123 |
-RDEPEND=" |
124 |
- app-misc/scrub |
125 |
- dev-libs/libgcrypt:0 |
126 |
- dev-libs/libnl:3 |
127 |
- >=dev-libs/libxml2-2.7.6 |
128 |
- || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 ) |
129 |
- >=net-libs/gnutls-1.0.25:0= |
130 |
- net-libs/libssh2 |
131 |
- >=net-misc/curl-7.18.0 |
132 |
- sys-apps/dmidecode |
133 |
- >=sys-apps/util-linux-2.17 |
134 |
- sys-devel/gettext |
135 |
- sys-libs/ncurses:0= |
136 |
- sys-libs/readline:= |
137 |
- apparmor? ( sys-libs/libapparmor ) |
138 |
- audit? ( sys-process/audit ) |
139 |
- avahi? ( >=net-dns/avahi-0.6[dbus] ) |
140 |
- caps? ( sys-libs/libcap-ng ) |
141 |
- elibc_glibc? ( sys-libs/glibc[rpc(+)] ) |
142 |
- firewalld? ( net-firewall/firewalld ) |
143 |
- fuse? ( >=sys-fs/fuse-2.8.6 ) |
144 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
145 |
- iscsi? ( sys-block/open-iscsi ) |
146 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
147 |
- lxc? ( !systemd? ( sys-power/pm-utils ) ) |
148 |
- nfs? ( net-fs/nfs-utils ) |
149 |
- numa? ( |
150 |
- >sys-process/numactl-2.0.2 |
151 |
- sys-process/numad |
152 |
- ) |
153 |
- openvz? ( sys-kernel/openvz-sources:* ) |
154 |
- parted? ( |
155 |
- >=sys-block/parted-1.8[device-mapper] |
156 |
- sys-fs/lvm2[-device-mapper-only(-)] |
157 |
- ) |
158 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
159 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
160 |
- qemu? ( |
161 |
- >=app-emulation/qemu-0.13.0 |
162 |
- dev-libs/yajl |
163 |
- !systemd? ( sys-power/pm-utils ) |
164 |
- ) |
165 |
- rbd? ( sys-cluster/ceph ) |
166 |
- sasl? ( dev-libs/cyrus-sasl ) |
167 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
168 |
- systemd? ( sys-apps/systemd ) |
169 |
- virt-network? ( |
170 |
- net-dns/dnsmasq[script] |
171 |
- net-firewall/ebtables |
172 |
- >=net-firewall/iptables-1.4.10[ipv6] |
173 |
- net-misc/radvd |
174 |
- sys-apps/iproute2[-minimal] |
175 |
- ) |
176 |
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
177 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
178 |
- xen? ( |
179 |
- app-emulation/xen |
180 |
- app-emulation/xen-tools:= |
181 |
- ) |
182 |
- udev? ( |
183 |
- virtual/udev |
184 |
- >=x11-libs/libpciaccess-0.10.9 |
185 |
- )" |
186 |
- |
187 |
-DEPEND="${RDEPEND} |
188 |
- app-text/xhtml1 |
189 |
- dev-lang/perl |
190 |
- dev-libs/libxslt |
191 |
- dev-perl/XML-XPath |
192 |
- virtual/pkgconfig" |
193 |
- |
194 |
-pkg_setup() { |
195 |
- if use qemu; then |
196 |
- enewgroup qemu 77 |
197 |
- enewuser qemu 77 -1 -1 "qemu,kvm" |
198 |
- fi |
199 |
- |
200 |
- # Check kernel configuration: |
201 |
- CONFIG_CHECK="" |
202 |
- use fuse && CONFIG_CHECK+=" |
203 |
- ~FUSE_FS" |
204 |
- |
205 |
- use lvm && CONFIG_CHECK+=" |
206 |
- ~BLK_DEV_DM |
207 |
- ~DM_MULTIPATH |
208 |
- ~DM_SNAPSHOT" |
209 |
- |
210 |
- use lxc && CONFIG_CHECK+=" |
211 |
- ~BLK_CGROUP |
212 |
- ~CGROUP_CPUACCT |
213 |
- ~CGROUP_DEVICE |
214 |
- ~CGROUP_FREEZER |
215 |
- ~CGROUP_NET_PRIO |
216 |
- ~CGROUP_PERF |
217 |
- ~CGROUPS |
218 |
- ~CGROUP_SCHED |
219 |
- ~CPUSETS |
220 |
- ~DEVPTS_MULTIPLE_INSTANCES |
221 |
- ~IPC_NS |
222 |
- ~MACVLAN |
223 |
- ~NAMESPACES |
224 |
- ~NET_CLS_CGROUP |
225 |
- ~NET_NS |
226 |
- ~PID_NS |
227 |
- ~POSIX_MQUEUE |
228 |
- ~SECURITYFS |
229 |
- ~USER_NS |
230 |
- ~UTS_NS |
231 |
- ~VETH |
232 |
- ~!GRKERNSEC_CHROOT_MOUNT |
233 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
234 |
- ~!GRKERNSEC_CHROOT_PIVOT |
235 |
- ~!GRKERNSEC_CHROOT_CHMOD |
236 |
- ~!GRKERNSEC_CHROOT_CAPS" |
237 |
- # Handle specific kernel versions for different features |
238 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
239 |
- if $(kernel_is ge 3 6); then |
240 |
- CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
241 |
- if $(kernel_is lt 4 5); then |
242 |
- CONFIG_CHECK+=" ~MEMCG_KMEM " |
243 |
- fi |
244 |
- fi |
245 |
- |
246 |
- use macvtap && CONFIG_CHECK+=" |
247 |
- ~MACVTAP" |
248 |
- |
249 |
- use virt-network && CONFIG_CHECK+=" |
250 |
- ~BRIDGE_EBT_MARK_T |
251 |
- ~BRIDGE_NF_EBTABLES |
252 |
- ~NETFILTER_ADVANCED |
253 |
- ~NETFILTER_XT_CONNMARK |
254 |
- ~NETFILTER_XT_MARK |
255 |
- ~NETFILTER_XT_TARGET_CHECKSUM" |
256 |
- # Bandwidth Limiting Support |
257 |
- use virt-network && CONFIG_CHECK+=" |
258 |
- ~BRIDGE_EBT_T_NAT |
259 |
- ~NET_ACT_POLICE |
260 |
- ~NET_CLS_FW |
261 |
- ~NET_CLS_U32 |
262 |
- ~NET_SCH_HTB |
263 |
- ~NET_SCH_INGRESS |
264 |
- ~NET_SCH_SFQ" |
265 |
- |
266 |
- ERROR_USER_NS="Optional depending on LXC configuration." |
267 |
- |
268 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
269 |
- linux-info_pkg_setup |
270 |
- fi |
271 |
-} |
272 |
- |
273 |
-src_prepare() { |
274 |
- touch "${S}/.mailmap" |
275 |
- |
276 |
- if [[ ${PV} = *9999* ]]; then |
277 |
- # git checkouts require bootstrapping to create the configure script. |
278 |
- # Additionally the submodules must be cloned to the right locations |
279 |
- # bug #377279 |
280 |
- ./bootstrap || die "bootstrap failed" |
281 |
- ( |
282 |
- git submodule status | sed 's/^[ +-]//;s/ .*//' |
283 |
- git hash-object bootstrap.conf |
284 |
- ) >.git-module-status |
285 |
- fi |
286 |
- |
287 |
- epatch \ |
288 |
- "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch \ |
289 |
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \ |
290 |
- "${FILESDIR}"/${PN}-1.3.1-fix_paths_for_apparmor.patch \ |
291 |
- "${FILESDIR}"/${PN}-1.2.21-avoid_deprecated_pc_file.patch \ |
292 |
- "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch |
293 |
- |
294 |
- [[ -n ${BACKPORTS} ]] && |
295 |
- EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ |
296 |
- EPATCH_SOURCE="${WORKDIR}/patches" epatch |
297 |
- |
298 |
- epatch_user |
299 |
- |
300 |
- # Tweak the init script: |
301 |
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
302 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
303 |
- -e "s/USE_FLAG_AVAHI/$(usex avahi 'use avahi-daemon' '')/" \ |
304 |
- -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
305 |
- -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
306 |
- -i "${S}/libvirtd.init" || die "sed failed" |
307 |
- |
308 |
- AUTOTOOLS_AUTORECONF=true |
309 |
- autotools-utils_src_prepare |
310 |
-} |
311 |
- |
312 |
-src_configure() { |
313 |
- local myeconfargs=( |
314 |
- $(use_with apparmor) |
315 |
- $(use_with apparmor apparmor-profiles) |
316 |
- $(use_with audit) |
317 |
- $(use_with avahi) |
318 |
- $(use_with caps capng) |
319 |
- $(use_with firewalld) |
320 |
- $(use_with fuse) |
321 |
- $(use_with glusterfs) |
322 |
- $(use_with glusterfs storage-gluster) |
323 |
- $(use_with iscsi storage-iscsi) |
324 |
- $(use_with libvirtd) |
325 |
- $(use_with lvm storage-lvm) |
326 |
- $(use_with lvm storage-mpath) |
327 |
- $(use_with lxc) |
328 |
- $(use_with macvtap) |
329 |
- $(use_enable nls) |
330 |
- $(use_with numa numactl) |
331 |
- $(use_with numa numad) |
332 |
- $(use_with openvz) |
333 |
- $(use_with parted storage-disk) |
334 |
- $(use_with pcap libpcap) |
335 |
- $(use_with phyp) |
336 |
- $(use_with policykit polkit) |
337 |
- $(use_with qemu) |
338 |
- $(use_with qemu yajl) |
339 |
- $(use_with rbd storage-rbd) |
340 |
- $(use_with sasl) |
341 |
- $(use_with selinux) |
342 |
- $(use_with systemd systemd-daemon) |
343 |
- $(usex systemd --with-init-script=systemd '') |
344 |
- $(use_with udev) |
345 |
- $(use_with uml) |
346 |
- $(use_with vepa virtualport) |
347 |
- $(use_with virt-network network) |
348 |
- $(use_with wireshark-plugins wireshark-dissector) |
349 |
- $(use_with xen) |
350 |
- $(use_with xen xen-inotify) |
351 |
- $(usex xen --with-libxl '') |
352 |
- |
353 |
- --without-hal |
354 |
- --without-netcf |
355 |
- --without-sanlock |
356 |
- --without-xenapi |
357 |
- --with-esx |
358 |
- --with-qemu-group=$(usex caps qemu root) |
359 |
- --with-qemu-user=$(usex caps qemu root) |
360 |
- --with-remote |
361 |
- --with-storage-fs |
362 |
- --with-vmware |
363 |
- |
364 |
- --disable-static |
365 |
- --disable-werror |
366 |
- |
367 |
- --with-html-subdir=${PF}/html |
368 |
- --localstatedir=/var |
369 |
- ) |
370 |
- |
371 |
- if use virtualbox && has_version app-emulation/virtualbox-ose; then |
372 |
- myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) |
373 |
- else |
374 |
- myeconfargs+=( $(use_with virtualbox vbox) ) |
375 |
- fi |
376 |
- |
377 |
- autotools-utils_src_configure |
378 |
- |
379 |
- if [[ ${PV} = *9999* ]]; then |
380 |
- # Restore gnulib's config.sub and config.guess |
381 |
- # bug #377279 |
382 |
- (cd .gnulib && git reset --hard > /dev/null) |
383 |
- fi |
384 |
- |
385 |
- # Workaround: Sometimes this subdirectory is missing and leads to a |
386 |
- # build failure. |
387 |
- mkdir -p "${BUILD_DIR}"/docs/internals |
388 |
-} |
389 |
- |
390 |
-src_test() { |
391 |
- # Explicitly allow parallel build of tests |
392 |
- export VIR_TEST_DEBUG=1 |
393 |
- HOME="${T}" emake check || die "tests failed" |
394 |
-} |
395 |
- |
396 |
-src_install() { |
397 |
- autotools-utils_src_compile install \ |
398 |
- DESTDIR="${D}" \ |
399 |
- SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" |
400 |
- |
401 |
- find "${D}" -name '*.la' -delete || die |
402 |
- |
403 |
- # Remove bogus, empty directories. They are either not used, or |
404 |
- # libvirtd is able to create them on demand |
405 |
- rm -rf "${D}"/etc/sysconfig |
406 |
- rm -rf "${D}"/var/cache |
407 |
- rm -rf "${D}"/var/run |
408 |
- rm -rf "${D}"/var/log |
409 |
- |
410 |
- use libvirtd || return 0 |
411 |
- # From here, only libvirtd-related instructions, be warned! |
412 |
- |
413 |
- use systemd && systemd_install_serviced \ |
414 |
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
415 |
- |
416 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
417 |
- |
418 |
- newinitd "${S}/libvirtd.init" libvirtd || die |
419 |
- newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die |
420 |
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
421 |
- newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
422 |
- |
423 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
424 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
425 |
- |
426 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
427 |
- DISABLE_AUTOFORMATTING=true |
428 |
- readme.gentoo_create_doc |
429 |
-} |
430 |
- |
431 |
-pkg_preinst() { |
432 |
- # we only ever want to generate this once |
433 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
434 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
435 |
- fi |
436 |
-} |
437 |
- |
438 |
-pkg_postinst() { |
439 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
440 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
441 |
- fi |
442 |
- |
443 |
- use libvirtd || return 0 |
444 |
- # From here, only libvirtd-related instructions, be warned! |
445 |
- |
446 |
- readme.gentoo_print_elog |
447 |
-} |
448 |
|
449 |
diff --git a/app-emulation/libvirt/libvirt-2.1.0-r2.ebuild b/app-emulation/libvirt/libvirt-2.1.0-r2.ebuild |
450 |
deleted file mode 100644 |
451 |
index fd991524faf..00000000000 |
452 |
--- a/app-emulation/libvirt/libvirt-2.1.0-r2.ebuild |
453 |
+++ /dev/null |
454 |
@@ -1,381 +0,0 @@ |
455 |
-# Copyright 1999-2017 Gentoo Foundation |
456 |
-# Distributed under the terms of the GNU General Public License v2 |
457 |
- |
458 |
-EAPI=5 |
459 |
- |
460 |
-inherit eutils user autotools-utils linux-info systemd readme.gentoo-r1 |
461 |
- |
462 |
-BACKPORTS="" |
463 |
- |
464 |
-if [[ ${PV} = *9999* ]]; then |
465 |
- inherit git-r3 |
466 |
- EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
467 |
- SRC_URI="" |
468 |
- KEYWORDS="" |
469 |
- SLOT="0" |
470 |
-else |
471 |
- # Versions with 4 numbers are stable updates: |
472 |
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then |
473 |
- SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz" |
474 |
- else |
475 |
- SRC_URI="http://libvirt.org/sources/${P}.tar.xz" |
476 |
- fi |
477 |
- SRC_URI+=" ${BACKPORTS:+ |
478 |
- https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz |
479 |
- https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}" |
480 |
- KEYWORDS="amd64 x86" |
481 |
- SLOT="0/${PV}" |
482 |
-fi |
483 |
- |
484 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
485 |
-HOMEPAGE="http://www.libvirt.org/" |
486 |
-LICENSE="LGPL-2.1" |
487 |
-IUSE=" |
488 |
- apparmor audit +caps firewalld fuse glusterfs iscsi +libvirtd lvm |
489 |
- lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd |
490 |
- sasl selinux +udev uml +vepa virtualbox virt-network wireshark-plugins |
491 |
- xen zeroconf elibc_glibc |
492 |
-" |
493 |
- |
494 |
-REQUIRED_USE=" |
495 |
- firewalld? ( virt-network ) |
496 |
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
497 |
- lxc? ( caps libvirtd ) |
498 |
- openvz? ( libvirtd ) |
499 |
- qemu? ( libvirtd ) |
500 |
- uml? ( libvirtd ) |
501 |
- vepa? ( macvtap ) |
502 |
- virt-network? ( libvirtd ) |
503 |
- virtualbox? ( libvirtd ) |
504 |
- xen? ( libvirtd )" |
505 |
- |
506 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
507 |
-# non-optional, so put it into RDEPEND. |
508 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
509 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
510 |
-# we must go with the most recent |
511 |
-RDEPEND=" |
512 |
- app-misc/scrub |
513 |
- dev-libs/libgcrypt:0 |
514 |
- dev-libs/libnl:3 |
515 |
- >=dev-libs/libxml2-2.7.6 |
516 |
- || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 ) |
517 |
- >=net-libs/gnutls-1.0.25:0= |
518 |
- net-libs/libssh2 |
519 |
- >=net-misc/curl-7.18.0 |
520 |
- sys-apps/dmidecode |
521 |
- >=sys-apps/util-linux-2.17 |
522 |
- sys-devel/gettext |
523 |
- sys-libs/ncurses:0= |
524 |
- sys-libs/readline:= |
525 |
- apparmor? ( sys-libs/libapparmor ) |
526 |
- audit? ( sys-process/audit ) |
527 |
- caps? ( sys-libs/libcap-ng ) |
528 |
- elibc_glibc? ( sys-libs/glibc[rpc(+)] ) |
529 |
- firewalld? ( net-firewall/firewalld ) |
530 |
- fuse? ( >=sys-fs/fuse-2.8.6 ) |
531 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
532 |
- iscsi? ( sys-block/open-iscsi ) |
533 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
534 |
- nfs? ( net-fs/nfs-utils ) |
535 |
- numa? ( |
536 |
- >sys-process/numactl-2.0.2 |
537 |
- sys-process/numad |
538 |
- ) |
539 |
- openvz? ( sys-kernel/openvz-sources:* ) |
540 |
- parted? ( |
541 |
- >=sys-block/parted-1.8[device-mapper] |
542 |
- sys-fs/lvm2[-device-mapper-only(-)] |
543 |
- ) |
544 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
545 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
546 |
- qemu? ( |
547 |
- >=app-emulation/qemu-0.13.0 |
548 |
- dev-libs/yajl |
549 |
- ) |
550 |
- rbd? ( sys-cluster/ceph ) |
551 |
- sasl? ( dev-libs/cyrus-sasl ) |
552 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
553 |
- virt-network? ( |
554 |
- net-dns/dnsmasq[script] |
555 |
- net-firewall/ebtables |
556 |
- >=net-firewall/iptables-1.4.10[ipv6] |
557 |
- net-misc/radvd |
558 |
- sys-apps/iproute2[-minimal] |
559 |
- ) |
560 |
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
561 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
562 |
- xen? ( |
563 |
- app-emulation/xen |
564 |
- app-emulation/xen-tools:= |
565 |
- ) |
566 |
- udev? ( |
567 |
- virtual/udev |
568 |
- >=x11-libs/libpciaccess-0.10.9 |
569 |
- ) |
570 |
- zeroconf? ( >=net-dns/avahi-0.6[dbus] )" |
571 |
- |
572 |
-DEPEND="${RDEPEND} |
573 |
- app-text/xhtml1 |
574 |
- dev-lang/perl |
575 |
- dev-libs/libxslt |
576 |
- dev-perl/XML-XPath |
577 |
- virtual/pkgconfig" |
578 |
- |
579 |
-pkg_setup() { |
580 |
- if use qemu; then |
581 |
- enewgroup qemu 77 |
582 |
- enewuser qemu 77 -1 -1 "qemu,kvm" |
583 |
- fi |
584 |
- |
585 |
- # Check kernel configuration: |
586 |
- CONFIG_CHECK="" |
587 |
- use fuse && CONFIG_CHECK+=" |
588 |
- ~FUSE_FS" |
589 |
- |
590 |
- use lvm && CONFIG_CHECK+=" |
591 |
- ~BLK_DEV_DM |
592 |
- ~DM_MULTIPATH |
593 |
- ~DM_SNAPSHOT" |
594 |
- |
595 |
- use lxc && CONFIG_CHECK+=" |
596 |
- ~BLK_CGROUP |
597 |
- ~CGROUP_CPUACCT |
598 |
- ~CGROUP_DEVICE |
599 |
- ~CGROUP_FREEZER |
600 |
- ~CGROUP_NET_PRIO |
601 |
- ~CGROUP_PERF |
602 |
- ~CGROUPS |
603 |
- ~CGROUP_SCHED |
604 |
- ~CPUSETS |
605 |
- ~DEVPTS_MULTIPLE_INSTANCES |
606 |
- ~IPC_NS |
607 |
- ~MACVLAN |
608 |
- ~NAMESPACES |
609 |
- ~NET_CLS_CGROUP |
610 |
- ~NET_NS |
611 |
- ~PID_NS |
612 |
- ~POSIX_MQUEUE |
613 |
- ~SECURITYFS |
614 |
- ~USER_NS |
615 |
- ~UTS_NS |
616 |
- ~VETH |
617 |
- ~!GRKERNSEC_CHROOT_MOUNT |
618 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
619 |
- ~!GRKERNSEC_CHROOT_PIVOT |
620 |
- ~!GRKERNSEC_CHROOT_CHMOD |
621 |
- ~!GRKERNSEC_CHROOT_CAPS" |
622 |
- # Handle specific kernel versions for different features |
623 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
624 |
- if $(kernel_is ge 3 6); then |
625 |
- CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
626 |
- if $(kernel_is lt 4 5); then |
627 |
- CONFIG_CHECK+=" ~MEMCG_KMEM " |
628 |
- fi |
629 |
- fi |
630 |
- |
631 |
- use macvtap && CONFIG_CHECK+=" |
632 |
- ~MACVTAP" |
633 |
- |
634 |
- use virt-network && CONFIG_CHECK+=" |
635 |
- ~BRIDGE_EBT_MARK_T |
636 |
- ~BRIDGE_NF_EBTABLES |
637 |
- ~NETFILTER_ADVANCED |
638 |
- ~NETFILTER_XT_CONNMARK |
639 |
- ~NETFILTER_XT_MARK |
640 |
- ~NETFILTER_XT_TARGET_CHECKSUM" |
641 |
- # Bandwidth Limiting Support |
642 |
- use virt-network && CONFIG_CHECK+=" |
643 |
- ~BRIDGE_EBT_T_NAT |
644 |
- ~NET_ACT_POLICE |
645 |
- ~NET_CLS_FW |
646 |
- ~NET_CLS_U32 |
647 |
- ~NET_SCH_HTB |
648 |
- ~NET_SCH_INGRESS |
649 |
- ~NET_SCH_SFQ" |
650 |
- |
651 |
- ERROR_USER_NS="Optional depending on LXC configuration." |
652 |
- |
653 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
654 |
- linux-info_pkg_setup |
655 |
- fi |
656 |
-} |
657 |
- |
658 |
-src_prepare() { |
659 |
- touch "${S}/.mailmap" |
660 |
- |
661 |
- if [[ ${PV} = *9999* ]]; then |
662 |
- # git checkouts require bootstrapping to create the configure script. |
663 |
- # Additionally the submodules must be cloned to the right locations |
664 |
- # bug #377279 |
665 |
- ./bootstrap || die "bootstrap failed" |
666 |
- ( |
667 |
- git submodule status | sed 's/^[ +-]//;s/ .*//' |
668 |
- git hash-object bootstrap.conf |
669 |
- ) >.git-module-status |
670 |
- fi |
671 |
- |
672 |
- epatch \ |
673 |
- "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch \ |
674 |
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \ |
675 |
- "${FILESDIR}"/${PN}-1.3.1-fix_paths_for_apparmor.patch \ |
676 |
- "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch |
677 |
- |
678 |
- [[ -n ${BACKPORTS} ]] && |
679 |
- EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ |
680 |
- EPATCH_SOURCE="${WORKDIR}/patches" epatch |
681 |
- |
682 |
- epatch_user |
683 |
- |
684 |
- # Tweak the init script: |
685 |
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
686 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
687 |
- -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ |
688 |
- -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
689 |
- -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
690 |
- -i "${S}/libvirtd.init" || die "sed failed" |
691 |
- |
692 |
- AUTOTOOLS_AUTORECONF=true |
693 |
- autotools-utils_src_prepare |
694 |
-} |
695 |
- |
696 |
-src_configure() { |
697 |
- local myeconfargs=( |
698 |
- $(use_with apparmor) |
699 |
- $(use_with apparmor apparmor-profiles) |
700 |
- $(use_with audit) |
701 |
- $(use_with caps capng) |
702 |
- $(use_with firewalld) |
703 |
- $(use_with fuse) |
704 |
- $(use_with glusterfs) |
705 |
- $(use_with glusterfs storage-gluster) |
706 |
- $(use_with iscsi storage-iscsi) |
707 |
- $(use_with libvirtd) |
708 |
- $(use_with lvm storage-lvm) |
709 |
- $(use_with lvm storage-mpath) |
710 |
- $(use_with lxc) |
711 |
- $(use_with macvtap) |
712 |
- $(use_enable nls) |
713 |
- $(use_with numa numactl) |
714 |
- $(use_with numa numad) |
715 |
- $(use_with openvz) |
716 |
- $(use_with parted storage-disk) |
717 |
- $(use_with pcap libpcap) |
718 |
- $(use_with phyp) |
719 |
- $(use_with policykit polkit) |
720 |
- $(use_with qemu) |
721 |
- $(use_with qemu yajl) |
722 |
- $(use_with rbd storage-rbd) |
723 |
- $(use_with sasl) |
724 |
- $(use_with selinux) |
725 |
- $(use_with udev) |
726 |
- $(use_with uml) |
727 |
- $(use_with vepa virtualport) |
728 |
- $(use_with virt-network network) |
729 |
- $(use_with wireshark-plugins wireshark-dissector) |
730 |
- $(use_with xen) |
731 |
- $(use_with xen xen-inotify) |
732 |
- $(usex xen --with-libxl '') |
733 |
- $(use_with zeroconf avahi) |
734 |
- |
735 |
- --without-hal |
736 |
- --without-netcf |
737 |
- --without-sanlock |
738 |
- --without-xenapi |
739 |
- |
740 |
- --with-esx |
741 |
- --with-init-script=systemd |
742 |
- --with-qemu-group=$(usex caps qemu root) |
743 |
- --with-qemu-user=$(usex caps qemu root) |
744 |
- --with-remote |
745 |
- --with-storage-fs |
746 |
- --with-vmware |
747 |
- |
748 |
- --disable-static |
749 |
- --disable-werror |
750 |
- |
751 |
- --with-html-subdir=${PF}/html |
752 |
- --localstatedir=/var |
753 |
- ) |
754 |
- |
755 |
- if use virtualbox && has_version app-emulation/virtualbox-ose; then |
756 |
- myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) |
757 |
- else |
758 |
- myeconfargs+=( $(use_with virtualbox vbox) ) |
759 |
- fi |
760 |
- |
761 |
- autotools-utils_src_configure |
762 |
- |
763 |
- if [[ ${PV} = *9999* ]]; then |
764 |
- # Restore gnulib's config.sub and config.guess |
765 |
- # bug #377279 |
766 |
- (cd .gnulib && git reset --hard > /dev/null) |
767 |
- fi |
768 |
-} |
769 |
- |
770 |
-src_test() { |
771 |
- cd "${BUILD_DIR}" |
772 |
- |
773 |
- # remove problematic tests, bug #591416, bug #591418 |
774 |
- sed -i -e 's#commandtest$(EXEEXT) # #' \ |
775 |
- -e 's#virfirewalltest$(EXEEXT) # #' \ |
776 |
- -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ |
777 |
- -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ |
778 |
- tests/Makefile |
779 |
- |
780 |
- export VIR_TEST_DEBUG=1 |
781 |
- HOME="${T}" emake check || die "tests failed" |
782 |
-} |
783 |
- |
784 |
-src_install() { |
785 |
- autotools-utils_src_compile install \ |
786 |
- DESTDIR="${D}" \ |
787 |
- SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" |
788 |
- |
789 |
- find "${D}" -name '*.la' -delete || die |
790 |
- |
791 |
- # Remove bogus, empty directories. They are either not used, or |
792 |
- # libvirtd is able to create them on demand |
793 |
- rm -rf "${D}"/etc/sysconfig |
794 |
- rm -rf "${D}"/var/cache |
795 |
- rm -rf "${D}"/var/run |
796 |
- rm -rf "${D}"/var/log |
797 |
- |
798 |
- use libvirtd || return 0 |
799 |
- # From here, only libvirtd-related instructions, be warned! |
800 |
- |
801 |
- systemd_install_serviced \ |
802 |
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
803 |
- |
804 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
805 |
- |
806 |
- newinitd "${S}/libvirtd.init" libvirtd || die |
807 |
- newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die |
808 |
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
809 |
- newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
810 |
- |
811 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
812 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
813 |
- |
814 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
815 |
- DISABLE_AUTOFORMATTING=true |
816 |
- readme.gentoo_create_doc |
817 |
-} |
818 |
- |
819 |
-pkg_preinst() { |
820 |
- # we only ever want to generate this once |
821 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
822 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
823 |
- fi |
824 |
-} |
825 |
- |
826 |
-pkg_postinst() { |
827 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
828 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
829 |
- fi |
830 |
- |
831 |
- use libvirtd || return 0 |
832 |
- # From here, only libvirtd-related instructions, be warned! |
833 |
- |
834 |
- readme.gentoo_print_elog |
835 |
-} |
836 |
|
837 |
diff --git a/app-emulation/libvirt/libvirt-2.3.0.ebuild b/app-emulation/libvirt/libvirt-2.3.0.ebuild |
838 |
deleted file mode 100644 |
839 |
index 4ea11feb8d3..00000000000 |
840 |
--- a/app-emulation/libvirt/libvirt-2.3.0.ebuild |
841 |
+++ /dev/null |
842 |
@@ -1,382 +0,0 @@ |
843 |
-# Copyright 1999-2017 Gentoo Foundation |
844 |
-# Distributed under the terms of the GNU General Public License v2 |
845 |
- |
846 |
-EAPI=5 |
847 |
- |
848 |
-inherit eutils user autotools-utils linux-info systemd readme.gentoo-r1 |
849 |
- |
850 |
-BACKPORTS="" |
851 |
- |
852 |
-if [[ ${PV} = *9999* ]]; then |
853 |
- inherit git-r3 |
854 |
- EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
855 |
- SRC_URI="" |
856 |
- KEYWORDS="" |
857 |
- SLOT="0" |
858 |
-else |
859 |
- # Versions with 4 numbers are stable updates: |
860 |
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then |
861 |
- SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz" |
862 |
- else |
863 |
- SRC_URI="http://libvirt.org/sources/${P}.tar.xz" |
864 |
- fi |
865 |
- SRC_URI+=" ${BACKPORTS:+ |
866 |
- https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz |
867 |
- https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}" |
868 |
- KEYWORDS="amd64 x86" |
869 |
- SLOT="0/${PV}" |
870 |
-fi |
871 |
- |
872 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
873 |
-HOMEPAGE="http://www.libvirt.org/" |
874 |
-LICENSE="LGPL-2.1" |
875 |
-IUSE=" |
876 |
- apparmor audit +caps firewalld fuse glusterfs iscsi +libvirtd lvm |
877 |
- lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd |
878 |
- sasl selinux +udev uml +vepa virtualbox virt-network wireshark-plugins |
879 |
- xen zeroconf elibc_glibc |
880 |
-" |
881 |
- |
882 |
-REQUIRED_USE=" |
883 |
- firewalld? ( virt-network ) |
884 |
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
885 |
- lxc? ( caps libvirtd ) |
886 |
- openvz? ( libvirtd ) |
887 |
- qemu? ( libvirtd ) |
888 |
- uml? ( libvirtd ) |
889 |
- vepa? ( macvtap ) |
890 |
- virt-network? ( libvirtd ) |
891 |
- virtualbox? ( libvirtd ) |
892 |
- xen? ( libvirtd )" |
893 |
- |
894 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
895 |
-# non-optional, so put it into RDEPEND. |
896 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
897 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
898 |
-# we must go with the most recent |
899 |
-RDEPEND=" |
900 |
- app-misc/scrub |
901 |
- dev-libs/libgcrypt:0 |
902 |
- dev-libs/libnl:3 |
903 |
- >=dev-libs/libxml2-2.7.6 |
904 |
- || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 ) |
905 |
- >=net-libs/gnutls-1.0.25:0= |
906 |
- net-libs/libssh2 |
907 |
- >=net-misc/curl-7.18.0 |
908 |
- sys-apps/dmidecode |
909 |
- >=sys-apps/util-linux-2.17 |
910 |
- sys-devel/gettext |
911 |
- sys-libs/ncurses:0= |
912 |
- sys-libs/readline:= |
913 |
- apparmor? ( sys-libs/libapparmor ) |
914 |
- audit? ( sys-process/audit ) |
915 |
- caps? ( sys-libs/libcap-ng ) |
916 |
- elibc_glibc? ( sys-libs/glibc[rpc(+)] ) |
917 |
- firewalld? ( net-firewall/firewalld ) |
918 |
- fuse? ( >=sys-fs/fuse-2.8.6 ) |
919 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
920 |
- iscsi? ( sys-block/open-iscsi ) |
921 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] ) |
922 |
- nfs? ( net-fs/nfs-utils ) |
923 |
- numa? ( |
924 |
- >sys-process/numactl-2.0.2 |
925 |
- sys-process/numad |
926 |
- ) |
927 |
- openvz? ( sys-kernel/openvz-sources:* ) |
928 |
- parted? ( |
929 |
- >=sys-block/parted-1.8[device-mapper] |
930 |
- sys-fs/lvm2[-device-mapper-only(-)] |
931 |
- ) |
932 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
933 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
934 |
- qemu? ( |
935 |
- >=app-emulation/qemu-0.13.0 |
936 |
- dev-libs/yajl |
937 |
- ) |
938 |
- rbd? ( sys-cluster/ceph ) |
939 |
- sasl? ( dev-libs/cyrus-sasl ) |
940 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
941 |
- virt-network? ( |
942 |
- net-dns/dnsmasq[script] |
943 |
- net-firewall/ebtables |
944 |
- >=net-firewall/iptables-1.4.10[ipv6] |
945 |
- net-misc/radvd |
946 |
- sys-apps/iproute2[-minimal] |
947 |
- ) |
948 |
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
949 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
950 |
- xen? ( |
951 |
- app-emulation/xen |
952 |
- app-emulation/xen-tools:= |
953 |
- ) |
954 |
- udev? ( |
955 |
- virtual/udev |
956 |
- >=x11-libs/libpciaccess-0.10.9 |
957 |
- ) |
958 |
- zeroconf? ( >=net-dns/avahi-0.6[dbus] )" |
959 |
- |
960 |
-DEPEND="${RDEPEND} |
961 |
- app-text/xhtml1 |
962 |
- dev-lang/perl |
963 |
- dev-libs/libxslt |
964 |
- dev-perl/XML-XPath |
965 |
- virtual/pkgconfig" |
966 |
- |
967 |
-pkg_setup() { |
968 |
- if use qemu; then |
969 |
- enewgroup qemu 77 |
970 |
- enewuser qemu 77 -1 -1 "qemu,kvm" |
971 |
- fi |
972 |
- |
973 |
- # Check kernel configuration: |
974 |
- CONFIG_CHECK="" |
975 |
- use fuse && CONFIG_CHECK+=" |
976 |
- ~FUSE_FS" |
977 |
- |
978 |
- use lvm && CONFIG_CHECK+=" |
979 |
- ~BLK_DEV_DM |
980 |
- ~DM_MULTIPATH |
981 |
- ~DM_SNAPSHOT" |
982 |
- |
983 |
- use lxc && CONFIG_CHECK+=" |
984 |
- ~BLK_CGROUP |
985 |
- ~CGROUP_CPUACCT |
986 |
- ~CGROUP_DEVICE |
987 |
- ~CGROUP_FREEZER |
988 |
- ~CGROUP_NET_PRIO |
989 |
- ~CGROUP_PERF |
990 |
- ~CGROUPS |
991 |
- ~CGROUP_SCHED |
992 |
- ~CPUSETS |
993 |
- ~IPC_NS |
994 |
- ~MACVLAN |
995 |
- ~NAMESPACES |
996 |
- ~NET_CLS_CGROUP |
997 |
- ~NET_NS |
998 |
- ~PID_NS |
999 |
- ~POSIX_MQUEUE |
1000 |
- ~SECURITYFS |
1001 |
- ~USER_NS |
1002 |
- ~UTS_NS |
1003 |
- ~VETH |
1004 |
- ~!GRKERNSEC_CHROOT_MOUNT |
1005 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
1006 |
- ~!GRKERNSEC_CHROOT_PIVOT |
1007 |
- ~!GRKERNSEC_CHROOT_CHMOD |
1008 |
- ~!GRKERNSEC_CHROOT_CAPS" |
1009 |
- |
1010 |
- kernel_is lt 4 7 && use lxc && CONFIG_CHECK+=" |
1011 |
- ~DEVPTS_MULTIPLE_INSTANCES" |
1012 |
- |
1013 |
- use macvtap && CONFIG_CHECK+=" |
1014 |
- ~MACVTAP" |
1015 |
- |
1016 |
- use virt-network && CONFIG_CHECK+=" |
1017 |
- ~BRIDGE_EBT_MARK_T |
1018 |
- ~BRIDGE_NF_EBTABLES |
1019 |
- ~NETFILTER_ADVANCED |
1020 |
- ~NETFILTER_XT_CONNMARK |
1021 |
- ~NETFILTER_XT_MARK |
1022 |
- ~NETFILTER_XT_TARGET_CHECKSUM" |
1023 |
- # Bandwidth Limiting Support |
1024 |
- use virt-network && CONFIG_CHECK+=" |
1025 |
- ~BRIDGE_EBT_T_NAT |
1026 |
- ~NET_ACT_POLICE |
1027 |
- ~NET_CLS_FW |
1028 |
- ~NET_CLS_U32 |
1029 |
- ~NET_SCH_HTB |
1030 |
- ~NET_SCH_INGRESS |
1031 |
- ~NET_SCH_SFQ" |
1032 |
- |
1033 |
- # Handle specific kernel versions for different features |
1034 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
1035 |
- if kernel_is ge 3 6; then |
1036 |
- CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP " |
1037 |
- kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM " |
1038 |
- fi |
1039 |
- |
1040 |
- ERROR_USER_NS="Optional depending on LXC configuration." |
1041 |
- |
1042 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
1043 |
- linux-info_pkg_setup |
1044 |
- fi |
1045 |
-} |
1046 |
- |
1047 |
-src_prepare() { |
1048 |
- touch "${S}/.mailmap" |
1049 |
- |
1050 |
- if [[ ${PV} = *9999* ]]; then |
1051 |
- # git checkouts require bootstrapping to create the configure script. |
1052 |
- # Additionally the submodules must be cloned to the right locations |
1053 |
- # bug #377279 |
1054 |
- ./bootstrap || die "bootstrap failed" |
1055 |
- ( |
1056 |
- git submodule status | sed 's/^[ +-]//;s/ .*//' |
1057 |
- git hash-object bootstrap.conf |
1058 |
- ) >.git-module-status |
1059 |
- fi |
1060 |
- |
1061 |
- epatch \ |
1062 |
- "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch \ |
1063 |
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \ |
1064 |
- "${FILESDIR}"/${PN}-1.3.1-fix_paths_for_apparmor.patch \ |
1065 |
- "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch |
1066 |
- |
1067 |
- [[ -n ${BACKPORTS} ]] && |
1068 |
- EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ |
1069 |
- EPATCH_SOURCE="${WORKDIR}/patches" epatch |
1070 |
- |
1071 |
- epatch_user |
1072 |
- |
1073 |
- # Tweak the init script: |
1074 |
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
1075 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
1076 |
- -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \ |
1077 |
- -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
1078 |
- -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
1079 |
- -i "${S}/libvirtd.init" || die "sed failed" |
1080 |
- |
1081 |
- AUTOTOOLS_AUTORECONF=true |
1082 |
- autotools-utils_src_prepare |
1083 |
-} |
1084 |
- |
1085 |
-src_configure() { |
1086 |
- local myeconfargs=( |
1087 |
- $(use_with apparmor) |
1088 |
- $(use_with apparmor apparmor-profiles) |
1089 |
- $(use_with audit) |
1090 |
- $(use_with caps capng) |
1091 |
- $(use_with firewalld) |
1092 |
- $(use_with fuse) |
1093 |
- $(use_with glusterfs) |
1094 |
- $(use_with glusterfs storage-gluster) |
1095 |
- $(use_with iscsi storage-iscsi) |
1096 |
- $(use_with libvirtd) |
1097 |
- $(use_with lvm storage-lvm) |
1098 |
- $(use_with lvm storage-mpath) |
1099 |
- $(use_with lxc) |
1100 |
- $(use_with macvtap) |
1101 |
- $(use_enable nls) |
1102 |
- $(use_with numa numactl) |
1103 |
- $(use_with numa numad) |
1104 |
- $(use_with openvz) |
1105 |
- $(use_with parted storage-disk) |
1106 |
- $(use_with pcap libpcap) |
1107 |
- $(use_with phyp) |
1108 |
- $(use_with policykit polkit) |
1109 |
- $(use_with qemu) |
1110 |
- $(use_with qemu yajl) |
1111 |
- $(use_with rbd storage-rbd) |
1112 |
- $(use_with sasl) |
1113 |
- $(use_with selinux) |
1114 |
- $(use_with udev) |
1115 |
- $(use_with uml) |
1116 |
- $(use_with vepa virtualport) |
1117 |
- $(use_with virt-network network) |
1118 |
- $(use_with wireshark-plugins wireshark-dissector) |
1119 |
- $(use_with xen) |
1120 |
- $(use_with xen xen-inotify) |
1121 |
- $(usex xen --with-libxl '') |
1122 |
- $(use_with zeroconf avahi) |
1123 |
- |
1124 |
- --without-hal |
1125 |
- --without-netcf |
1126 |
- --without-sanlock |
1127 |
- --without-xenapi |
1128 |
- |
1129 |
- --with-esx |
1130 |
- --with-init-script=systemd |
1131 |
- --with-qemu-group=$(usex caps qemu root) |
1132 |
- --with-qemu-user=$(usex caps qemu root) |
1133 |
- --with-remote |
1134 |
- --with-storage-fs |
1135 |
- --with-vmware |
1136 |
- |
1137 |
- --disable-static |
1138 |
- --disable-werror |
1139 |
- |
1140 |
- --with-html-subdir=${PF}/html |
1141 |
- --localstatedir=/var |
1142 |
- ) |
1143 |
- |
1144 |
- if use virtualbox && has_version app-emulation/virtualbox-ose; then |
1145 |
- myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) |
1146 |
- else |
1147 |
- myeconfargs+=( $(use_with virtualbox vbox) ) |
1148 |
- fi |
1149 |
- |
1150 |
- autotools-utils_src_configure |
1151 |
- |
1152 |
- if [[ ${PV} = *9999* ]]; then |
1153 |
- # Restore gnulib's config.sub and config.guess |
1154 |
- # bug #377279 |
1155 |
- (cd .gnulib && git reset --hard > /dev/null) |
1156 |
- fi |
1157 |
-} |
1158 |
- |
1159 |
-src_test() { |
1160 |
- cd "${BUILD_DIR}" |
1161 |
- |
1162 |
- # remove problematic tests, bug #591416, bug #591418 |
1163 |
- sed -i -e 's#commandtest$(EXEEXT) # #' \ |
1164 |
- -e 's#virfirewalltest$(EXEEXT) # #' \ |
1165 |
- -e 's#nwfilterebiptablestest$(EXEEXT) # #' \ |
1166 |
- -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \ |
1167 |
- tests/Makefile |
1168 |
- |
1169 |
- export VIR_TEST_DEBUG=1 |
1170 |
- HOME="${T}" emake check || die "tests failed" |
1171 |
-} |
1172 |
- |
1173 |
-src_install() { |
1174 |
- autotools-utils_src_compile install \ |
1175 |
- DESTDIR="${D}" \ |
1176 |
- SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" |
1177 |
- |
1178 |
- find "${D}" -name '*.la' -delete || die |
1179 |
- |
1180 |
- # Remove bogus, empty directories. They are either not used, or |
1181 |
- # libvirtd is able to create them on demand |
1182 |
- rm -rf "${D}"/etc/sysconfig |
1183 |
- rm -rf "${D}"/var/cache |
1184 |
- rm -rf "${D}"/var/run |
1185 |
- rm -rf "${D}"/var/log |
1186 |
- |
1187 |
- use libvirtd || return 0 |
1188 |
- # From here, only libvirtd-related instructions, be warned! |
1189 |
- |
1190 |
- systemd_install_serviced \ |
1191 |
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
1192 |
- |
1193 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
1194 |
- |
1195 |
- newinitd "${S}/libvirtd.init" libvirtd || die |
1196 |
- newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die |
1197 |
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
1198 |
- newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
1199 |
- |
1200 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
1201 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
1202 |
- |
1203 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
1204 |
- DISABLE_AUTOFORMATTING=true |
1205 |
- readme.gentoo_create_doc |
1206 |
-} |
1207 |
- |
1208 |
-pkg_preinst() { |
1209 |
- # we only ever want to generate this once |
1210 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
1211 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
1212 |
- fi |
1213 |
-} |
1214 |
- |
1215 |
-pkg_postinst() { |
1216 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
1217 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
1218 |
- fi |
1219 |
- |
1220 |
- use libvirtd || return 0 |
1221 |
- # From here, only libvirtd-related instructions, be warned! |
1222 |
- |
1223 |
- readme.gentoo_print_elog |
1224 |
-} |