1 |
commit: dc0ff761730e25cf7d91bde9f129a4c2875213a0 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 1 09:35:11 2016 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 1 09:35:11 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dc0ff761 |
7 |
|
8 |
app-emulation/libvirt: drop vuln. 1.3.1-r1, 1.3.4, bug #587570, bug #583950 |
9 |
|
10 |
Vulnerable version left in tree: 1.2.21-r2 |
11 |
|
12 |
CVE-2014-3672 |
13 |
CVE-2016-5008 |
14 |
|
15 |
Gentoo Bug: 583950 |
16 |
Gentoo Bug: 587570 |
17 |
|
18 |
Package-Manager: portage-2.2.28 |
19 |
|
20 |
app-emulation/libvirt/Manifest | 2 - |
21 |
app-emulation/libvirt/libvirt-1.3.1-r1.ebuild | 385 ------------------------- |
22 |
app-emulation/libvirt/libvirt-1.3.4.ebuild | 386 -------------------------- |
23 |
3 files changed, 773 deletions(-) |
24 |
|
25 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
26 |
index c416f0f..7e8e347 100644 |
27 |
--- a/app-emulation/libvirt/Manifest |
28 |
+++ b/app-emulation/libvirt/Manifest |
29 |
@@ -1,5 +1,3 @@ |
30 |
DIST libvirt-1.2.21-20151222.tar.xz 1684 SHA256 6c97f288470ec58bcbe98507563c6a191892c6f8813a7b9688c09b823934cbe5 SHA512 4fd43f0e12434b78ac3e671ad8eb0e402d384cff6278f6d0db322a068c2c8807c7c7f7e5774aa9d19e2a85e49f6d9888908b32fca5fc04980134edaccba0afe2 WHIRLPOOL 2bfbc3cbf1ca44a2bb06ddf2e8eabeb116165560b9c73d649d7b8cc9baba851f5e9246414bfc2c4740f27d0d0d42b6176eaec43b05e8c1e54de2804150c2cde1 |
31 |
DIST libvirt-1.2.21.tar.gz 29848954 SHA256 8d406582f5fe88d739d1d83e0ba7ac7f91f5a8da4be82162ab85631744d8925b SHA512 5c15d0ba5d75c13f735c6a60dfdbad007426f77e113f95894d520f7fc358fa4361d5cce7bb9a548a436f323b845f13b8940abbad568b8b146418430068bb970e WHIRLPOOL d53bbb07c85b3aa2d9b0f38ff2edd3cd0a2a5300627f3e2f0a82bc057303617cab9d6f1d8a9a771bd968b0496d38d3a39a0154f88bdca44dda359a65fdc2c650 |
32 |
-DIST libvirt-1.3.1.tar.gz 29900143 SHA256 a5d43fbed34d31eeffc641d2ac9b6026a57bf1a4fa74d0fa19a9891d9ec2c21a SHA512 a109c09d947f7c5e924fdbc9c9b6c0a9d6ff64d9411aedd9a3e710d20f749b088ff9895e882dd888b88bfea7724a8933534be4078f16cb9d2047da761515e804 WHIRLPOOL 62fb8486bfa53d55b397d9a90750d32a83f0a73cf2e6685f296489390abf9c62efc69fecd6d011fc51e9f562f75f5b8ce03208c350e98d20de0a5560721c675e |
33 |
-DIST libvirt-1.3.4.tar.gz 30493908 SHA256 e2396ebebb3f3fdb50429ce8faa99559f6e8e3cc0493d5fa0c1999db189c25bd SHA512 6f85e4cd8a696da729bb88368c608694119258c6ab7f9b99f41c34a6cc4492d9ad90b8ff1574fd4ee6c78c674a3a501db60d1d3ba898f7013321ecc996612919 WHIRLPOOL af4a8a0e3d746f50e0f9d95e3920c023c5bbec0d7c641f43aea580db9b95a793027f7579ecd94625a68b7e3662c328d94b7b2d243afea60a8d2f31cab1cc9319 |
34 |
DIST libvirt-1.3.5.tar.gz 35109092 SHA256 93a23c44eb431da46c9458f95a66e29c9b98e37515d44b6be09e75b35ec94ac8 SHA512 6c6a09623d3d4d426311bfa7039f5e39584d5f891b8e761bbdb3022601ea066b8e1c3f8d609326e8ba4081ae40b7b03086fbc8ba5759d218b8616ec98200a89d WHIRLPOOL 88ac308cc461efff842c27e40263a3b25ce0bc0ca310fb6e9def9126ab893fe43aed01bda9fc3615439ee797c36e2800f741b346e0b3d96aac64e7909c269879 |
35 |
|
36 |
diff --git a/app-emulation/libvirt/libvirt-1.3.1-r1.ebuild b/app-emulation/libvirt/libvirt-1.3.1-r1.ebuild |
37 |
deleted file mode 100644 |
38 |
index a022027..0000000 |
39 |
--- a/app-emulation/libvirt/libvirt-1.3.1-r1.ebuild |
40 |
+++ /dev/null |
41 |
@@ -1,385 +0,0 @@ |
42 |
-# Copyright 1999-2016 Gentoo Foundation |
43 |
-# Distributed under the terms of the GNU General Public License v2 |
44 |
-# $Id$ |
45 |
- |
46 |
-EAPI=5 |
47 |
- |
48 |
-inherit eutils user autotools-utils linux-info systemd readme.gentoo |
49 |
- |
50 |
-BACKPORTS="" |
51 |
- |
52 |
-if [[ ${PV} = *9999* ]]; then |
53 |
- inherit git-r3 |
54 |
- EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
55 |
- SRC_URI="" |
56 |
- KEYWORDS="" |
57 |
- SLOT="0" |
58 |
-else |
59 |
- # Versions with 4 numbers are stable updates: |
60 |
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then |
61 |
- SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.gz" |
62 |
- else |
63 |
- SRC_URI="http://libvirt.org/sources/${P}.tar.gz" |
64 |
- fi |
65 |
- SRC_URI+=" ${BACKPORTS:+ |
66 |
- https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz |
67 |
- https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}" |
68 |
- KEYWORDS="amd64 x86" |
69 |
- SLOT="0/${PV}" |
70 |
-fi |
71 |
- |
72 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
73 |
-HOMEPAGE="http://www.libvirt.org/" |
74 |
-LICENSE="LGPL-2.1" |
75 |
-IUSE="apparmor audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm \ |
76 |
- lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \ |
77 |
- selinux systemd +udev uml +vepa virtualbox virt-network wireshark-plugins \ |
78 |
- xen" |
79 |
- |
80 |
-REQUIRED_USE=" |
81 |
- firewalld? ( virt-network ) |
82 |
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
83 |
- lxc? ( caps libvirtd ) |
84 |
- openvz? ( libvirtd ) |
85 |
- qemu? ( libvirtd ) |
86 |
- uml? ( libvirtd ) |
87 |
- vepa? ( macvtap ) |
88 |
- virt-network? ( libvirtd ) |
89 |
- virtualbox? ( libvirtd ) |
90 |
- xen? ( libvirtd )" |
91 |
- |
92 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
93 |
-# non-optional, so put it into RDEPEND. |
94 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
95 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
96 |
-# we must go with the most recent |
97 |
-RDEPEND=" |
98 |
- app-misc/scrub |
99 |
- dev-libs/libgcrypt:0 |
100 |
- dev-libs/libnl:3 |
101 |
- >=dev-libs/libxml2-2.7.6 |
102 |
- >=net-analyzer/netcat6-1.0-r2 |
103 |
- >=net-libs/gnutls-1.0.25:0= |
104 |
- net-libs/libssh2 |
105 |
- >=net-misc/curl-7.18.0 |
106 |
- sys-apps/dmidecode |
107 |
- >=sys-apps/util-linux-2.17 |
108 |
- sys-devel/gettext |
109 |
- sys-libs/ncurses:0= |
110 |
- sys-libs/readline:= |
111 |
- apparmor? ( sys-libs/libapparmor ) |
112 |
- audit? ( sys-process/audit ) |
113 |
- avahi? ( >=net-dns/avahi-0.6[dbus] ) |
114 |
- caps? ( sys-libs/libcap-ng ) |
115 |
- firewalld? ( net-firewall/firewalld ) |
116 |
- fuse? ( >=sys-fs/fuse-2.8.6 ) |
117 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
118 |
- iscsi? ( sys-block/open-iscsi ) |
119 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2 ) |
120 |
- lxc? ( !systemd? ( sys-power/pm-utils ) ) |
121 |
- nfs? ( net-fs/nfs-utils ) |
122 |
- numa? ( |
123 |
- >sys-process/numactl-2.0.2 |
124 |
- sys-process/numad |
125 |
- ) |
126 |
- openvz? ( sys-kernel/openvz-sources:* ) |
127 |
- parted? ( |
128 |
- >=sys-block/parted-1.8[device-mapper] |
129 |
- sys-fs/lvm2 |
130 |
- ) |
131 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
132 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
133 |
- qemu? ( |
134 |
- >=app-emulation/qemu-0.13.0 |
135 |
- dev-libs/yajl |
136 |
- !systemd? ( sys-power/pm-utils ) |
137 |
- ) |
138 |
- rbd? ( sys-cluster/ceph ) |
139 |
- sasl? ( dev-libs/cyrus-sasl ) |
140 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
141 |
- systemd? ( sys-apps/systemd ) |
142 |
- virt-network? ( |
143 |
- net-dns/dnsmasq[script] |
144 |
- net-firewall/ebtables |
145 |
- >=net-firewall/iptables-1.4.10[ipv6] |
146 |
- net-misc/radvd |
147 |
- sys-apps/iproute2[-minimal] |
148 |
- ) |
149 |
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
150 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
151 |
- xen? ( |
152 |
- app-emulation/xen |
153 |
- app-emulation/xen-tools:= |
154 |
- ) |
155 |
- udev? ( |
156 |
- virtual/udev |
157 |
- >=x11-libs/libpciaccess-0.10.9 |
158 |
- )" |
159 |
- |
160 |
-DEPEND="${RDEPEND} |
161 |
- app-text/xhtml1 |
162 |
- dev-lang/perl |
163 |
- dev-libs/libxslt |
164 |
- dev-perl/XML-XPath |
165 |
- virtual/pkgconfig" |
166 |
- |
167 |
-pkg_setup() { |
168 |
- enewgroup qemu 77 |
169 |
- enewuser qemu 77 -1 -1 qemu kvm |
170 |
- |
171 |
- # Some people used the masked ebuild which was not adding the qemu |
172 |
- # user to the kvm group originally. This results in VMs failing to |
173 |
- # start for some users. bug #430808 |
174 |
- egetent group kvm | grep -q qemu |
175 |
- if [[ $? -ne 0 ]]; then |
176 |
- gpasswd -a qemu kvm |
177 |
- fi |
178 |
- |
179 |
- # Check kernel configuration: |
180 |
- CONFIG_CHECK="" |
181 |
- use fuse && CONFIG_CHECK+=" |
182 |
- ~FUSE_FS" |
183 |
- |
184 |
- use lvm && CONFIG_CHECK+=" |
185 |
- ~BLK_DEV_DM |
186 |
- ~DM_MULTIPATH |
187 |
- ~DM_SNAPSHOT" |
188 |
- |
189 |
- use lxc && CONFIG_CHECK+=" |
190 |
- ~BLK_CGROUP |
191 |
- ~CGROUP_CPUACCT |
192 |
- ~CGROUP_DEVICE |
193 |
- ~CGROUP_FREEZER |
194 |
- ~CGROUP_NET_PRIO |
195 |
- ~CGROUP_PERF |
196 |
- ~CGROUPS |
197 |
- ~CGROUP_SCHED |
198 |
- ~CPUSETS |
199 |
- ~DEVPTS_MULTIPLE_INSTANCES |
200 |
- ~IPC_NS |
201 |
- ~MACVLAN |
202 |
- ~NAMESPACES |
203 |
- ~NET_CLS_CGROUP |
204 |
- ~NET_NS |
205 |
- ~PID_NS |
206 |
- ~POSIX_MQUEUE |
207 |
- ~SECURITYFS |
208 |
- ~USER_NS |
209 |
- ~UTS_NS |
210 |
- ~VETH |
211 |
- ~!GRKERNSEC_CHROOT_MOUNT |
212 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
213 |
- ~!GRKERNSEC_CHROOT_PIVOT |
214 |
- ~!GRKERNSEC_CHROOT_CHMOD |
215 |
- ~!GRKERNSEC_CHROOT_CAPS" |
216 |
- # Handle specific kernel versions for different features |
217 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
218 |
- kernel_is ge 3 6 && CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP ~MEMCG_KMEM" |
219 |
- |
220 |
- use macvtap && CONFIG_CHECK+=" |
221 |
- ~MACVTAP" |
222 |
- |
223 |
- use virt-network && CONFIG_CHECK+=" |
224 |
- ~BRIDGE_EBT_MARK_T |
225 |
- ~BRIDGE_NF_EBTABLES |
226 |
- ~NETFILTER_ADVANCED |
227 |
- ~NETFILTER_XT_CONNMARK |
228 |
- ~NETFILTER_XT_MARK |
229 |
- ~NETFILTER_XT_TARGET_CHECKSUM" |
230 |
- # Bandwidth Limiting Support |
231 |
- use virt-network && CONFIG_CHECK+=" |
232 |
- ~BRIDGE_EBT_T_NAT |
233 |
- ~NET_ACT_POLICE |
234 |
- ~NET_CLS_FW |
235 |
- ~NET_CLS_U32 |
236 |
- ~NET_SCH_HTB |
237 |
- ~NET_SCH_INGRESS |
238 |
- ~NET_SCH_SFQ" |
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 |
- 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 |
- epatch \ |
262 |
- "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch \ |
263 |
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \ |
264 |
- "${FILESDIR}"/${P}-fix_paths_for_apparmor.patch \ |
265 |
- "${FILESDIR}"/${PN}-1.2.21-avoid_deprecated_pc_file.patch |
266 |
- |
267 |
- [[ -n ${BACKPORTS} ]] && |
268 |
- EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ |
269 |
- EPATCH_SOURCE="${WORKDIR}/patches" epatch |
270 |
- |
271 |
- epatch_user |
272 |
- |
273 |
- # Tweak the init script: |
274 |
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
275 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
276 |
- -e "s/USE_FLAG_AVAHI/$(usex avahi 'use avahi-daemon' '')/" \ |
277 |
- -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
278 |
- -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
279 |
- -i "${S}/libvirtd.init" || die "sed failed" |
280 |
- |
281 |
- AUTOTOOLS_AUTORECONF=true |
282 |
- autotools-utils_src_prepare |
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 avahi) |
291 |
- $(use_with caps capng) |
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 libvirtd) |
298 |
- $(use_with lvm storage-lvm) |
299 |
- $(use_with lvm storage-mpath) |
300 |
- $(use_with lxc) |
301 |
- $(use_with macvtap) |
302 |
- $(use_enable nls) |
303 |
- $(use_with numa numactl) |
304 |
- $(use_with numa numad) |
305 |
- $(use_with openvz) |
306 |
- $(use_with parted storage-disk) |
307 |
- $(use_with pcap libpcap) |
308 |
- $(use_with phyp) |
309 |
- $(use_with policykit polkit) |
310 |
- $(use_with qemu) |
311 |
- $(use_with qemu yajl) |
312 |
- $(use_with rbd storage-rbd) |
313 |
- $(use_with sasl) |
314 |
- $(use_with selinux) |
315 |
- $(use_with systemd systemd-daemon) |
316 |
- $(usex systemd --with-init-script=systemd '') |
317 |
- $(use_with udev) |
318 |
- $(use_with uml) |
319 |
- $(use_with vepa virtualport) |
320 |
- $(use_with virt-network network) |
321 |
- $(use_with wireshark-plugins wireshark-dissector) |
322 |
- $(use_with xen) |
323 |
- $(use_with xen xen-inotify) |
324 |
- $(usex xen --with-libxl '') |
325 |
- |
326 |
- --without-hal |
327 |
- --without-netcf |
328 |
- --without-sanlock |
329 |
- --without-xenapi |
330 |
- --with-esx |
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 |
- autotools-utils_src_configure |
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 |
- # Workaround: Sometimes this subdirectory is missing and leads to a |
359 |
- # build failure. |
360 |
- mkdir -p "${BUILD_DIR}"/docs/internals |
361 |
-} |
362 |
- |
363 |
-src_test() { |
364 |
- # Explicitly allow parallel build of tests |
365 |
- export VIR_TEST_DEBUG=1 |
366 |
- HOME="${T}" emake check || die "tests failed" |
367 |
-} |
368 |
- |
369 |
-src_install() { |
370 |
- autotools-utils_src_compile install \ |
371 |
- DESTDIR="${D}" \ |
372 |
- SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" |
373 |
- |
374 |
- find "${D}" -name '*.la' -delete || die |
375 |
- |
376 |
- # Remove bogus, empty directories. They are either not used, or |
377 |
- # libvirtd is able to create them on demand |
378 |
- rm -rf "${D}"/etc/sysconfig |
379 |
- rm -rf "${D}"/var/cache |
380 |
- rm -rf "${D}"/var/run |
381 |
- rm -rf "${D}"/var/log |
382 |
- |
383 |
- use libvirtd || return 0 |
384 |
- # From here, only libvirtd-related instructions, be warned! |
385 |
- |
386 |
- use systemd && systemd_install_serviced \ |
387 |
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
388 |
- |
389 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
390 |
- |
391 |
- newinitd "${S}/libvirtd.init" libvirtd || die |
392 |
- newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die |
393 |
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
394 |
- newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
395 |
- |
396 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
397 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
398 |
- |
399 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
400 |
- DISABLE_AUTOFORMATTING=true |
401 |
- readme.gentoo_create_doc |
402 |
-} |
403 |
- |
404 |
-pkg_preinst() { |
405 |
- # we only ever want to generate this once |
406 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
407 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
408 |
- fi |
409 |
-} |
410 |
- |
411 |
-pkg_postinst() { |
412 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
413 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
414 |
- fi |
415 |
- |
416 |
- use libvirtd || return 0 |
417 |
- # From here, only libvirtd-related instructions, be warned! |
418 |
- |
419 |
- if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.2.18-r2 ${REPLACING_VERSIONS} ]]; then |
420 |
- FORCE_PRINT_ELOG=true |
421 |
- fi |
422 |
- |
423 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
424 |
- DISABLE_AUTOFORMATTING=true |
425 |
- readme.gentoo_print_elog |
426 |
-} |
427 |
|
428 |
diff --git a/app-emulation/libvirt/libvirt-1.3.4.ebuild b/app-emulation/libvirt/libvirt-1.3.4.ebuild |
429 |
deleted file mode 100644 |
430 |
index de27d80..0000000 |
431 |
--- a/app-emulation/libvirt/libvirt-1.3.4.ebuild |
432 |
+++ /dev/null |
433 |
@@ -1,386 +0,0 @@ |
434 |
-# Copyright 1999-2016 Gentoo Foundation |
435 |
-# Distributed under the terms of the GNU General Public License v2 |
436 |
-# $Id$ |
437 |
- |
438 |
-EAPI=5 |
439 |
- |
440 |
-inherit eutils user autotools-utils linux-info systemd readme.gentoo |
441 |
- |
442 |
-BACKPORTS="" |
443 |
- |
444 |
-if [[ ${PV} = *9999* ]]; then |
445 |
- inherit git-r3 |
446 |
- EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
447 |
- SRC_URI="" |
448 |
- KEYWORDS="" |
449 |
- SLOT="0" |
450 |
-else |
451 |
- # Versions with 4 numbers are stable updates: |
452 |
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then |
453 |
- SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.gz" |
454 |
- else |
455 |
- SRC_URI="http://libvirt.org/sources/${P}.tar.gz" |
456 |
- fi |
457 |
- SRC_URI+=" ${BACKPORTS:+ |
458 |
- https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz |
459 |
- https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}" |
460 |
- KEYWORDS="amd64 x86" |
461 |
- SLOT="0/${PV}" |
462 |
-fi |
463 |
- |
464 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
465 |
-HOMEPAGE="http://www.libvirt.org/" |
466 |
-LICENSE="LGPL-2.1" |
467 |
-IUSE="apparmor audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm \ |
468 |
- lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \ |
469 |
- selinux systemd +udev uml +vepa virtualbox virt-network wireshark-plugins \ |
470 |
- xen" |
471 |
- |
472 |
-REQUIRED_USE=" |
473 |
- firewalld? ( virt-network ) |
474 |
- libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
475 |
- lxc? ( caps libvirtd ) |
476 |
- openvz? ( libvirtd ) |
477 |
- qemu? ( libvirtd ) |
478 |
- uml? ( libvirtd ) |
479 |
- vepa? ( macvtap ) |
480 |
- virt-network? ( libvirtd ) |
481 |
- virtualbox? ( libvirtd ) |
482 |
- xen? ( libvirtd )" |
483 |
- |
484 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
485 |
-# non-optional, so put it into RDEPEND. |
486 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
487 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
488 |
-# we must go with the most recent |
489 |
-RDEPEND=" |
490 |
- app-misc/scrub |
491 |
- dev-libs/libgcrypt:0 |
492 |
- dev-libs/libnl:3 |
493 |
- >=dev-libs/libxml2-2.7.6 |
494 |
- || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 ) |
495 |
- >=net-libs/gnutls-1.0.25:0= |
496 |
- net-libs/libssh2 |
497 |
- >=net-misc/curl-7.18.0 |
498 |
- sys-apps/dmidecode |
499 |
- >=sys-apps/util-linux-2.17 |
500 |
- sys-devel/gettext |
501 |
- sys-libs/ncurses:0= |
502 |
- sys-libs/readline:= |
503 |
- apparmor? ( sys-libs/libapparmor ) |
504 |
- audit? ( sys-process/audit ) |
505 |
- avahi? ( >=net-dns/avahi-0.6[dbus] ) |
506 |
- caps? ( sys-libs/libcap-ng ) |
507 |
- firewalld? ( net-firewall/firewalld ) |
508 |
- fuse? ( >=sys-fs/fuse-2.8.6 ) |
509 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
510 |
- iscsi? ( sys-block/open-iscsi ) |
511 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2 ) |
512 |
- lxc? ( !systemd? ( sys-power/pm-utils ) ) |
513 |
- nfs? ( net-fs/nfs-utils ) |
514 |
- numa? ( |
515 |
- >sys-process/numactl-2.0.2 |
516 |
- sys-process/numad |
517 |
- ) |
518 |
- openvz? ( sys-kernel/openvz-sources:* ) |
519 |
- parted? ( |
520 |
- >=sys-block/parted-1.8[device-mapper] |
521 |
- sys-fs/lvm2 |
522 |
- ) |
523 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
524 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
525 |
- qemu? ( |
526 |
- >=app-emulation/qemu-0.13.0 |
527 |
- dev-libs/yajl |
528 |
- !systemd? ( sys-power/pm-utils ) |
529 |
- ) |
530 |
- rbd? ( sys-cluster/ceph ) |
531 |
- sasl? ( dev-libs/cyrus-sasl ) |
532 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
533 |
- systemd? ( sys-apps/systemd ) |
534 |
- virt-network? ( |
535 |
- net-dns/dnsmasq[script] |
536 |
- net-firewall/ebtables |
537 |
- >=net-firewall/iptables-1.4.10[ipv6] |
538 |
- net-misc/radvd |
539 |
- sys-apps/iproute2[-minimal] |
540 |
- ) |
541 |
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
542 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
543 |
- xen? ( |
544 |
- app-emulation/xen |
545 |
- app-emulation/xen-tools:= |
546 |
- ) |
547 |
- udev? ( |
548 |
- virtual/udev |
549 |
- >=x11-libs/libpciaccess-0.10.9 |
550 |
- )" |
551 |
- |
552 |
-DEPEND="${RDEPEND} |
553 |
- app-text/xhtml1 |
554 |
- dev-lang/perl |
555 |
- dev-libs/libxslt |
556 |
- dev-perl/XML-XPath |
557 |
- virtual/pkgconfig" |
558 |
- |
559 |
-pkg_setup() { |
560 |
- enewgroup qemu 77 |
561 |
- enewuser qemu 77 -1 -1 qemu kvm |
562 |
- |
563 |
- # Some people used the masked ebuild which was not adding the qemu |
564 |
- # user to the kvm group originally. This results in VMs failing to |
565 |
- # start for some users. bug #430808 |
566 |
- egetent group kvm | grep -q qemu |
567 |
- if [[ $? -ne 0 ]]; then |
568 |
- gpasswd -a qemu kvm |
569 |
- fi |
570 |
- |
571 |
- # Check kernel configuration: |
572 |
- CONFIG_CHECK="" |
573 |
- use fuse && CONFIG_CHECK+=" |
574 |
- ~FUSE_FS" |
575 |
- |
576 |
- use lvm && CONFIG_CHECK+=" |
577 |
- ~BLK_DEV_DM |
578 |
- ~DM_MULTIPATH |
579 |
- ~DM_SNAPSHOT" |
580 |
- |
581 |
- use lxc && CONFIG_CHECK+=" |
582 |
- ~BLK_CGROUP |
583 |
- ~CGROUP_CPUACCT |
584 |
- ~CGROUP_DEVICE |
585 |
- ~CGROUP_FREEZER |
586 |
- ~CGROUP_NET_PRIO |
587 |
- ~CGROUP_PERF |
588 |
- ~CGROUPS |
589 |
- ~CGROUP_SCHED |
590 |
- ~CPUSETS |
591 |
- ~DEVPTS_MULTIPLE_INSTANCES |
592 |
- ~IPC_NS |
593 |
- ~MACVLAN |
594 |
- ~NAMESPACES |
595 |
- ~NET_CLS_CGROUP |
596 |
- ~NET_NS |
597 |
- ~PID_NS |
598 |
- ~POSIX_MQUEUE |
599 |
- ~SECURITYFS |
600 |
- ~USER_NS |
601 |
- ~UTS_NS |
602 |
- ~VETH |
603 |
- ~!GRKERNSEC_CHROOT_MOUNT |
604 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
605 |
- ~!GRKERNSEC_CHROOT_PIVOT |
606 |
- ~!GRKERNSEC_CHROOT_CHMOD |
607 |
- ~!GRKERNSEC_CHROOT_CAPS" |
608 |
- # Handle specific kernel versions for different features |
609 |
- kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
610 |
- kernel_is ge 3 6 && CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP ~MEMCG_KMEM" |
611 |
- |
612 |
- use macvtap && CONFIG_CHECK+=" |
613 |
- ~MACVTAP" |
614 |
- |
615 |
- use virt-network && CONFIG_CHECK+=" |
616 |
- ~BRIDGE_EBT_MARK_T |
617 |
- ~BRIDGE_NF_EBTABLES |
618 |
- ~NETFILTER_ADVANCED |
619 |
- ~NETFILTER_XT_CONNMARK |
620 |
- ~NETFILTER_XT_MARK |
621 |
- ~NETFILTER_XT_TARGET_CHECKSUM" |
622 |
- # Bandwidth Limiting Support |
623 |
- use virt-network && CONFIG_CHECK+=" |
624 |
- ~BRIDGE_EBT_T_NAT |
625 |
- ~NET_ACT_POLICE |
626 |
- ~NET_CLS_FW |
627 |
- ~NET_CLS_U32 |
628 |
- ~NET_SCH_HTB |
629 |
- ~NET_SCH_INGRESS |
630 |
- ~NET_SCH_SFQ" |
631 |
- |
632 |
- ERROR_USER_NS="Optional depending on LXC configuration." |
633 |
- |
634 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
635 |
- linux-info_pkg_setup |
636 |
- fi |
637 |
-} |
638 |
- |
639 |
-src_prepare() { |
640 |
- touch "${S}/.mailmap" |
641 |
- |
642 |
- if [[ ${PV} = *9999* ]]; then |
643 |
- # git checkouts require bootstrapping to create the configure script. |
644 |
- # Additionally the submodules must be cloned to the right locations |
645 |
- # bug #377279 |
646 |
- ./bootstrap || die "bootstrap failed" |
647 |
- ( |
648 |
- git submodule status | sed 's/^[ +-]//;s/ .*//' |
649 |
- git hash-object bootstrap.conf |
650 |
- ) >.git-module-status |
651 |
- fi |
652 |
- |
653 |
- epatch \ |
654 |
- "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch \ |
655 |
- "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \ |
656 |
- "${FILESDIR}"/${PN}-1.3.1-fix_paths_for_apparmor.patch \ |
657 |
- "${FILESDIR}"/${PN}-1.2.21-avoid_deprecated_pc_file.patch \ |
658 |
- "${FILESDIR}"/${P}-glibc-2.23.patch |
659 |
- |
660 |
- [[ -n ${BACKPORTS} ]] && |
661 |
- EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ |
662 |
- EPATCH_SOURCE="${WORKDIR}/patches" epatch |
663 |
- |
664 |
- epatch_user |
665 |
- |
666 |
- # Tweak the init script: |
667 |
- cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die |
668 |
- sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \ |
669 |
- -e "s/USE_FLAG_AVAHI/$(usex avahi 'use avahi-daemon' '')/" \ |
670 |
- -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \ |
671 |
- -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \ |
672 |
- -i "${S}/libvirtd.init" || die "sed failed" |
673 |
- |
674 |
- AUTOTOOLS_AUTORECONF=true |
675 |
- autotools-utils_src_prepare |
676 |
-} |
677 |
- |
678 |
-src_configure() { |
679 |
- local myeconfargs=( |
680 |
- $(use_with apparmor) |
681 |
- $(use_with apparmor apparmor-profiles) |
682 |
- $(use_with audit) |
683 |
- $(use_with avahi) |
684 |
- $(use_with caps capng) |
685 |
- $(use_with firewalld) |
686 |
- $(use_with fuse) |
687 |
- $(use_with glusterfs) |
688 |
- $(use_with glusterfs storage-gluster) |
689 |
- $(use_with iscsi storage-iscsi) |
690 |
- $(use_with libvirtd) |
691 |
- $(use_with lvm storage-lvm) |
692 |
- $(use_with lvm storage-mpath) |
693 |
- $(use_with lxc) |
694 |
- $(use_with macvtap) |
695 |
- $(use_enable nls) |
696 |
- $(use_with numa numactl) |
697 |
- $(use_with numa numad) |
698 |
- $(use_with openvz) |
699 |
- $(use_with parted storage-disk) |
700 |
- $(use_with pcap libpcap) |
701 |
- $(use_with phyp) |
702 |
- $(use_with policykit polkit) |
703 |
- $(use_with qemu) |
704 |
- $(use_with qemu yajl) |
705 |
- $(use_with rbd storage-rbd) |
706 |
- $(use_with sasl) |
707 |
- $(use_with selinux) |
708 |
- $(use_with systemd systemd-daemon) |
709 |
- $(usex systemd --with-init-script=systemd '') |
710 |
- $(use_with udev) |
711 |
- $(use_with uml) |
712 |
- $(use_with vepa virtualport) |
713 |
- $(use_with virt-network network) |
714 |
- $(use_with wireshark-plugins wireshark-dissector) |
715 |
- $(use_with xen) |
716 |
- $(use_with xen xen-inotify) |
717 |
- $(usex xen --with-libxl '') |
718 |
- |
719 |
- --without-hal |
720 |
- --without-netcf |
721 |
- --without-sanlock |
722 |
- --without-xenapi |
723 |
- --with-esx |
724 |
- --with-qemu-group=$(usex caps qemu root) |
725 |
- --with-qemu-user=$(usex caps qemu root) |
726 |
- --with-remote |
727 |
- --with-storage-fs |
728 |
- --with-vmware |
729 |
- |
730 |
- --disable-static |
731 |
- --disable-werror |
732 |
- |
733 |
- --with-html-subdir=${PF}/html |
734 |
- --localstatedir=/var |
735 |
- ) |
736 |
- |
737 |
- if use virtualbox && has_version app-emulation/virtualbox-ose; then |
738 |
- myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ ) |
739 |
- else |
740 |
- myeconfargs+=( $(use_with virtualbox vbox) ) |
741 |
- fi |
742 |
- |
743 |
- autotools-utils_src_configure |
744 |
- |
745 |
- if [[ ${PV} = *9999* ]]; then |
746 |
- # Restore gnulib's config.sub and config.guess |
747 |
- # bug #377279 |
748 |
- (cd .gnulib && git reset --hard > /dev/null) |
749 |
- fi |
750 |
- |
751 |
- # Workaround: Sometimes this subdirectory is missing and leads to a |
752 |
- # build failure. |
753 |
- mkdir -p "${BUILD_DIR}"/docs/internals |
754 |
-} |
755 |
- |
756 |
-src_test() { |
757 |
- # Explicitly allow parallel build of tests |
758 |
- export VIR_TEST_DEBUG=1 |
759 |
- HOME="${T}" emake check || die "tests failed" |
760 |
-} |
761 |
- |
762 |
-src_install() { |
763 |
- autotools-utils_src_compile install \ |
764 |
- DESTDIR="${D}" \ |
765 |
- SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" |
766 |
- |
767 |
- find "${D}" -name '*.la' -delete || die |
768 |
- |
769 |
- # Remove bogus, empty directories. They are either not used, or |
770 |
- # libvirtd is able to create them on demand |
771 |
- rm -rf "${D}"/etc/sysconfig |
772 |
- rm -rf "${D}"/var/cache |
773 |
- rm -rf "${D}"/var/run |
774 |
- rm -rf "${D}"/var/log |
775 |
- |
776 |
- use libvirtd || return 0 |
777 |
- # From here, only libvirtd-related instructions, be warned! |
778 |
- |
779 |
- use systemd && systemd_install_serviced \ |
780 |
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
781 |
- |
782 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
783 |
- |
784 |
- newinitd "${S}/libvirtd.init" libvirtd || die |
785 |
- newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die |
786 |
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
787 |
- newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die |
788 |
- |
789 |
- newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die |
790 |
- newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die |
791 |
- |
792 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
793 |
- DISABLE_AUTOFORMATTING=true |
794 |
- readme.gentoo_create_doc |
795 |
-} |
796 |
- |
797 |
-pkg_preinst() { |
798 |
- # we only ever want to generate this once |
799 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
800 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
801 |
- fi |
802 |
-} |
803 |
- |
804 |
-pkg_postinst() { |
805 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
806 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
807 |
- fi |
808 |
- |
809 |
- use libvirtd || return 0 |
810 |
- # From here, only libvirtd-related instructions, be warned! |
811 |
- |
812 |
- if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.2.18-r2 ${REPLACING_VERSIONS} ]]; then |
813 |
- FORCE_PRINT_ELOG=true |
814 |
- fi |
815 |
- |
816 |
- DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1") |
817 |
- DISABLE_AUTOFORMATTING=true |
818 |
- readme.gentoo_print_elog |
819 |
-} |