Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/, app-emulation/libvirt/
Date: Sat, 09 Jul 2016 21:04:34
Message-Id: 1468098064.499c1b526e852bb00d899c0684d60242c7926417.tamiko@gentoo
1 commit: 499c1b526e852bb00d899c0684d60242c7926417
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 9 21:01:04 2016 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 9 21:01:04 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=499c1b52
7
8 app-emulation/libvirt: drop old 1.2.21-r3
9
10 Package-Manager: portage-2.2.28
11
12 app-emulation/libvirt/Manifest | 2 -
13 .../libvirt-1.2.17-fix_paths_for_apparmor.patch | 148 --------
14 .../files/libvirt-1.2.9-do_not_use_sysconf.patch | 112 ------
15 app-emulation/libvirt/libvirt-1.2.21-r3.ebuild | 386 ---------------------
16 4 files changed, 648 deletions(-)
17
18 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
19 index 9bd7c4c..eb92106 100644
20 --- a/app-emulation/libvirt/Manifest
21 +++ b/app-emulation/libvirt/Manifest
22 @@ -1,5 +1,3 @@
23 -DIST libvirt-1.2.21-20160709.tar.xz 3048 SHA256 c2bef1c300099c3ff6ce81488a2678e588d18ca46a27916df160c8304239ca80 SHA512 fdf0cd5e1cc3e0144fa99577c1a8c2d5e69ab610c923071b645465fb58076b2ce7a8e4e7747f3a6c59716917c6d41f369d77565c0f9fe10907a76d9b39edede6 WHIRLPOOL 2816d54588e4a49efd6773982b2b8a281572607c86c5a57c45b1736ce22836ea4cb91cee8d59b8fddcaafd2e552d0422ef5ed4b33d19a1705d4a38f270b9d39d
24 -DIST libvirt-1.2.21.tar.gz 29848954 SHA256 8d406582f5fe88d739d1d83e0ba7ac7f91f5a8da4be82162ab85631744d8925b SHA512 5c15d0ba5d75c13f735c6a60dfdbad007426f77e113f95894d520f7fc358fa4361d5cce7bb9a548a436f323b845f13b8940abbad568b8b146418430068bb970e WHIRLPOOL d53bbb07c85b3aa2d9b0f38ff2edd3cd0a2a5300627f3e2f0a82bc057303617cab9d6f1d8a9a771bd968b0496d38d3a39a0154f88bdca44dda359a65fdc2c650
25 DIST libvirt-1.3.5-20160709.tar.xz 1336 SHA256 d14b14661e9bd89a8805dd84d8ee5f8b39f428a4dcbf70693eea593328e28033 SHA512 08ad8c691f145a3a8c27b594b486b9265777f756099c127e58fd76bac7249a0e84181a3f15da4cf64ffdcf35ff7e3a2f1f1ee50f3882df5d980ad7250a30e44e WHIRLPOOL 8d8106314c2bed984db3947b51b90dadd45680a07d568cc980c6534ba2229bfff8d041ecf40898131030f3db8d6e223fe30ba3dc72b3fe7fedc02a77b5c37331
26 DIST libvirt-1.3.5.tar.gz 35109092 SHA256 93a23c44eb431da46c9458f95a66e29c9b98e37515d44b6be09e75b35ec94ac8 SHA512 6c6a09623d3d4d426311bfa7039f5e39584d5f891b8e761bbdb3022601ea066b8e1c3f8d609326e8ba4081ae40b7b03086fbc8ba5759d218b8616ec98200a89d WHIRLPOOL 88ac308cc461efff842c27e40263a3b25ce0bc0ca310fb6e9def9126ab893fe43aed01bda9fc3615439ee797c36e2800f741b346e0b3d96aac64e7909c269879
27 DIST libvirt-2.0.0.tar.xz 13161096 SHA256 10e90af55e613953c0ddc60b4ac3a10c73c0f3493d7014259e3f012b2ffc9acb SHA512 1182346e9268ec50cfd191a18172ad8ca80615a111547cc72fbe227cbbe9579263a1236f80cb36542272bdbf092e2184c9060b65c56dc2098076bbd1a89dd66c WHIRLPOOL 3d6d9e307228f54993c6082f7787d678b2afe84d96b47889d1565e38da489fb99691aeb598831dff04cd9fe47448ea35dc1f5a44b3c6638816cf61533155688c
28
29 diff --git a/app-emulation/libvirt/files/libvirt-1.2.17-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-1.2.17-fix_paths_for_apparmor.patch
30 deleted file mode 100644
31 index c608295..0000000
32 --- a/app-emulation/libvirt/files/libvirt-1.2.17-fix_paths_for_apparmor.patch
33 +++ /dev/null
34 @@ -1,148 +0,0 @@
35 -diff --git a/examples/apparmor/Makefile.am b/examples/apparmor/Makefile.am
36 -index 7a20e16..c3c67b6 100644
37 ---- a/examples/apparmor/Makefile.am
38 -+++ b/examples/apparmor/Makefile.am
39 -@@ -19,13 +19,13 @@ EXTRA_DIST= \
40 - TEMPLATE.lxc \
41 - libvirt-qemu \
42 - libvirt-lxc \
43 -- usr.lib.libvirt.virt-aa-helper \
44 -+ usr.libexec.virt-aa-helper \
45 - usr.sbin.libvirtd
46 -
47 - if WITH_APPARMOR_PROFILES
48 - apparmordir = $(sysconfdir)/apparmor.d/
49 - apparmor_DATA = \
50 -- usr.lib.libvirt.virt-aa-helper \
51 -+ usr.libexec.virt-aa-helper \
52 - usr.sbin.libvirtd \
53 - $(NULL)
54 -
55 -diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
56 -deleted file mode 100644
57 -index b34fb35..0000000
58 ---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
59 -+++ /dev/null
60 -@@ -1,48 +0,0 @@
61 --# Last Modified: Mon Apr 5 15:10:27 2010
62 --#include <tunables/global>
63 --
64 --profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
65 -- #include <abstractions/base>
66 --
67 -- # needed for searching directories
68 -- capability dac_override,
69 -- capability dac_read_search,
70 --
71 -- # needed for when disk is on a network filesystem
72 -- network inet,
73 --
74 -- deny @{PROC}/[0-9]*/mounts r,
75 -- @{PROC}/[0-9]*/net/psched r,
76 -- owner @{PROC}/[0-9]*/status r,
77 -- @{PROC}/filesystems r,
78 --
79 -- # for hostdev
80 -- /sys/devices/ r,
81 -- /sys/devices/** r,
82 --
83 -- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
84 -- /sbin/apparmor_parser Ux,
85 --
86 -- /etc/apparmor.d/libvirt/* r,
87 -- /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
88 --
89 -- # for backingstore -- allow access to non-hidden files in @{HOME} as well
90 -- # as storage pools
91 -- audit deny @{HOME}/.* mrwkl,
92 -- audit deny @{HOME}/.*/ rw,
93 -- audit deny @{HOME}/.*/** mrwkl,
94 -- audit deny @{HOME}/bin/ rw,
95 -- audit deny @{HOME}/bin/** mrwkl,
96 -- @{HOME}/ r,
97 -- @{HOME}/** r,
98 -- /var/lib/libvirt/images/ r,
99 -- /var/lib/libvirt/images/** r,
100 -- /{media,mnt,opt,srv}/** r,
101 --
102 -- /**.img r,
103 -- /**.qcow{,2} r,
104 -- /**.qed r,
105 -- /**.vmdk r,
106 -- /**.[iI][sS][oO] r,
107 -- /**/disk{,.*} r,
108 --}
109 -diff --git a/examples/apparmor/usr.libexec.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
110 -new file mode 100644
111 -index 0000000..b34fb35
112 ---- /dev/null
113 -+++ b/examples/apparmor/usr.libexec.virt-aa-helper
114 -@@ -0,0 +1,48 @@
115 -+# Last Modified: Mon Apr 5 15:10:27 2010
116 -+#include <tunables/global>
117 -+
118 -+profile virt-aa-helper /usr/libexec/virt-aa-helper {
119 -+ #include <abstractions/base>
120 -+
121 -+ # needed for searching directories
122 -+ capability dac_override,
123 -+ capability dac_read_search,
124 -+
125 -+ # needed for when disk is on a network filesystem
126 -+ network inet,
127 -+
128 -+ deny @{PROC}/[0-9]*/mounts r,
129 -+ @{PROC}/[0-9]*/net/psched r,
130 -+ owner @{PROC}/[0-9]*/status r,
131 -+ @{PROC}/filesystems r,
132 -+
133 -+ # for hostdev
134 -+ /sys/devices/ r,
135 -+ /sys/devices/** r,
136 -+
137 -+ /usr/libexec/virt-aa-helper mr,
138 -+ /sbin/apparmor_parser Ux,
139 -+
140 -+ /etc/apparmor.d/libvirt/* r,
141 -+ /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
142 -+
143 -+ # for backingstore -- allow access to non-hidden files in @{HOME} as well
144 -+ # as storage pools
145 -+ audit deny @{HOME}/.* mrwkl,
146 -+ audit deny @{HOME}/.*/ rw,
147 -+ audit deny @{HOME}/.*/** mrwkl,
148 -+ audit deny @{HOME}/bin/ rw,
149 -+ audit deny @{HOME}/bin/** mrwkl,
150 -+ @{HOME}/ r,
151 -+ @{HOME}/** r,
152 -+ /var/lib/libvirt/images/ r,
153 -+ /var/lib/libvirt/images/** r,
154 -+ /{media,mnt,opt,srv}/** r,
155 -+
156 -+ /**.img r,
157 -+ /**.qcow{,2} r,
158 -+ /**.qed r,
159 -+ /**.vmdk r,
160 -+ /**.[iI][sS][oO] r,
161 -+ /**/disk{,.*} r,
162 -+}
163 -diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
164 -index 5d606e6..ab2f1a9 100644
165 ---- a/examples/apparmor/usr.sbin.libvirtd
166 -+++ b/examples/apparmor/usr.sbin.libvirtd
167 -@@ -58,8 +58,10 @@
168 - audit deny /sys/kernel/security/apparmor/.* rwxl,
169 - /sys/kernel/security/apparmor/profiles r,
170 - /usr/{lib,lib64}/libvirt/* PUxr,
171 -- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
172 -- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
173 -+ /usr/libexec/virt-aa-helper PUxr,
174 -+ /usr/libexec/libvirt_lxc PUxr,
175 -+ /usr/libexec/libvirt_parthelper ix,
176 -+ /usr/libexec/libvirt_iohelper ix,
177 - /etc/libvirt/hooks/** rmix,
178 - /etc/xen/scripts/** rmix,
179 -
180 ---
181 -2.3.6
182 -
183
184 diff --git a/app-emulation/libvirt/files/libvirt-1.2.9-do_not_use_sysconf.patch b/app-emulation/libvirt/files/libvirt-1.2.9-do_not_use_sysconf.patch
185 deleted file mode 100644
186 index e766f49..0000000
187 --- a/app-emulation/libvirt/files/libvirt-1.2.9-do_not_use_sysconf.patch
188 +++ /dev/null
189 @@ -1,112 +0,0 @@
190 -From 69372a32025ac16578ad277c6356e89713a3f9f4 Mon Sep 17 00:00:00 2001
191 -From: Matthias Maier <tamiko@××××××××××.org>
192 -Date: Mon, 3 Nov 2014 00:51:35 +0100
193 -Subject: [PATCH] Do not use /etc/sysconf
194 -
195 ----
196 - daemon/Makefile.am | 4 +---
197 - daemon/libvirtd.service.in | 3 +--
198 - src/Makefile.am | 3 ---
199 - src/locking/virtlockd.service.in | 3 +--
200 - tools/Makefile.am | 2 +-
201 - tools/libvirt-guests.service.in | 2 +-
202 - 6 files changed, 5 insertions(+), 12 deletions(-)
203 -
204 -diff --git a/daemon/Makefile.am b/daemon/Makefile.am
205 -index b95a79d..1e98422 100644
206 ---- a/daemon/Makefile.am
207 -+++ b/daemon/Makefile.am
208 -@@ -328,9 +328,7 @@ uninstall-logrotate:
209 - rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :
210 -
211 - install-sysconfig:
212 -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
213 -- $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
214 -- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
215 -+
216 - uninstall-sysconfig:
217 - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
218 - rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
219 -diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
220 -index 1759ac8..cd337a1 100644
221 ---- a/daemon/libvirtd.service.in
222 -+++ b/daemon/libvirtd.service.in
223 -@@ -10,8 +10,7 @@ Documentation=http://libvirt.org
224 -
225 - [Service]
226 - Type=notify
227 --EnvironmentFile=-/etc/sysconfig/libvirtd
228 --ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
229 -+ExecStart=@sbindir@/libvirtd
230 - ExecReload=/bin/kill -HUP $MAINPID
231 - KillMode=process
232 - Restart=on-failure
233 -diff --git a/src/Makefile.am b/src/Makefile.am
234 -index e65177f..18bbbb4 100644
235 ---- a/src/Makefile.am
236 -+++ b/src/Makefile.am
237 -@@ -2269,9 +2269,6 @@ EXTRA_DIST += locking/virtlockd.sysconf \
238 - locking/test_libvirt_lockd.aug.in
239 -
240 - install-sysconfig:
241 -- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
242 -- $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
243 -- $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
244 -
245 - uninstall-sysconfig:
246 - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
247 -diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
248 -index 57089b0..ace0c83 100644
249 ---- a/src/locking/virtlockd.service.in
250 -+++ b/src/locking/virtlockd.service.in
251 -@@ -5,8 +5,7 @@ Documentation=man:virtlockd(8)
252 - Documentation=http://libvirt.org
253 -
254 - [Service]
255 --EnvironmentFile=-/etc/sysconfig/virtlockd
256 --ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
257 -+ExecStart=@sbindir@/virtlockd
258 - ExecReload=/bin/kill -USR1 $MAINPID
259 - # Loosing the locks is a really bad thing that will
260 - # cause the machine to be fenced (rebooted), so make
261 -diff --git a/tools/Makefile.am b/tools/Makefile.am
262 -index 93d642d..2da0e97 100644
263 ---- a/tools/Makefile.am
264 -+++ b/tools/Makefile.am
265 -@@ -259,7 +259,7 @@ uninstall-local: uninstall-init uninstall-systemd
266 - install-sysconfig:
267 - $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
268 - $(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
269 -- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
270 -+ $(DESTDIR)$(sysconfdir)/libvirt/libvirt-guests.conf
271 -
272 - uninstall-sysconfig:
273 - rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
274 -diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
275 -index cc04b6d..9be514b 100644
276 ---- a/tools/libvirt-guests.service.in
277 -+++ b/tools/libvirt-guests.service.in
278 -@@ -5,7 +5,7 @@ Documentation=man:libvirtd(8)
279 - Documentation=http://libvirt.org
280 -
281 - [Service]
282 --EnvironmentFile=-/etc/sysconfig/libvirt-guests
283 -+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
284 - # Hack just call traditional service until we factor
285 - # out the code
286 - ExecStart=@libexecdir@/libvirt-guests.sh start
287 ---- a/tools/libvirt-guests.sysconf
288 -+++ b/tools/libvirt-guests.sysconf
289 -@@ -1,3 +1,10 @@
290 -+#
291 -+# Warning: This configuration file is only sourced by the systemd
292 -+# libvirt-guests.service unit. The coresponding openrc facility is in
293 -+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
294 -+#
295 -+
296 -+
297 - # URIs to check for running guests
298 - # example: URIS='default xen:/// vbox+tcp://host/system lxc:///'
299 - #URIS=default
300 ---
301 -2.0.4
302
303 diff --git a/app-emulation/libvirt/libvirt-1.2.21-r3.ebuild b/app-emulation/libvirt/libvirt-1.2.21-r3.ebuild
304 deleted file mode 100644
305 index 029a9e4..0000000
306 --- a/app-emulation/libvirt/libvirt-1.2.21-r3.ebuild
307 +++ /dev/null
308 @@ -1,386 +0,0 @@
309 -# Copyright 1999-2016 Gentoo Foundation
310 -# Distributed under the terms of the GNU General Public License v2
311 -# $Id$
312 -
313 -EAPI=5
314 -
315 -inherit eutils user autotools-utils linux-info systemd readme.gentoo
316 -
317 -BACKPORTS="20160709" # CVE-2015-5313 CVE-2016-5008
318 -
319 -if [[ ${PV} = *9999* ]]; then
320 - inherit git-r3
321 - EGIT_REPO_URI="git://libvirt.org/libvirt.git"
322 - SRC_URI=""
323 - KEYWORDS=""
324 - SLOT="0"
325 -else
326 - # Versions with 4 numbers are stable updates:
327 - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
328 - SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.gz"
329 - else
330 - SRC_URI="http://libvirt.org/sources/${P}.tar.gz"
331 - fi
332 - SRC_URI+=" ${BACKPORTS:+
333 - https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz
334 - https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}"
335 - KEYWORDS="amd64 x86"
336 - SLOT="0/${PV}"
337 -fi
338 -
339 -DESCRIPTION="C toolkit to manipulate virtual machines"
340 -HOMEPAGE="http://www.libvirt.org/"
341 -LICENSE="LGPL-2.1"
342 -IUSE="apparmor audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm \
343 - lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \
344 - selinux systemd +udev uml +vepa virtualbox virt-network wireshark-plugins \
345 - xen"
346 -
347 -REQUIRED_USE="
348 - firewalld? ( virt-network )
349 - libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
350 - lxc? ( caps libvirtd )
351 - openvz? ( libvirtd )
352 - qemu? ( libvirtd )
353 - uml? ( libvirtd )
354 - vepa? ( macvtap )
355 - virt-network? ( libvirtd )
356 - virtualbox? ( libvirtd )
357 - xen? ( libvirtd )"
358 -
359 -# gettext.sh command is used by the libvirt command wrappers, and it's
360 -# non-optional, so put it into RDEPEND.
361 -# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
362 -# package will use 3 by default. Since we don't have slot pinning in an API,
363 -# we must go with the most recent
364 -RDEPEND="
365 - app-misc/scrub
366 - dev-libs/libgcrypt:0
367 - dev-libs/libnl:3
368 - >=dev-libs/libxml2-2.7.6
369 - >=net-analyzer/netcat6-1.0-r2
370 - >=net-libs/gnutls-1.0.25:0=
371 - net-libs/libssh2
372 - >=net-misc/curl-7.18.0
373 - sys-apps/dmidecode
374 - >=sys-apps/util-linux-2.17
375 - sys-devel/gettext
376 - sys-libs/ncurses:0=
377 - sys-libs/readline:=
378 - apparmor? ( sys-libs/libapparmor )
379 - audit? ( sys-process/audit )
380 - avahi? ( >=net-dns/avahi-0.6[dbus] )
381 - caps? ( sys-libs/libcap-ng )
382 - firewalld? ( net-firewall/firewalld )
383 - fuse? ( >=sys-fs/fuse-2.8.6 )
384 - glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
385 - iscsi? ( sys-block/open-iscsi )
386 - lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
387 - lxc? ( !systemd? ( sys-power/pm-utils ) )
388 - nfs? ( net-fs/nfs-utils )
389 - numa? (
390 - >sys-process/numactl-2.0.2
391 - sys-process/numad
392 - )
393 - openvz? ( sys-kernel/openvz-sources:* )
394 - parted? (
395 - >=sys-block/parted-1.8[device-mapper]
396 - sys-fs/lvm2
397 - )
398 - pcap? ( >=net-libs/libpcap-1.0.0 )
399 - policykit? ( >=sys-auth/polkit-0.9 )
400 - qemu? (
401 - >=app-emulation/qemu-0.13.0
402 - dev-libs/yajl
403 - !systemd? ( sys-power/pm-utils )
404 - )
405 - rbd? ( sys-cluster/ceph )
406 - sasl? ( dev-libs/cyrus-sasl )
407 - selinux? ( >=sys-libs/libselinux-2.0.85 )
408 - systemd? ( sys-apps/systemd )
409 - virt-network? (
410 - net-dns/dnsmasq[script]
411 - net-firewall/ebtables
412 - >=net-firewall/iptables-1.4.10[ipv6]
413 - net-misc/radvd
414 - sys-apps/iproute2[-minimal]
415 - )
416 - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
417 - wireshark-plugins? ( net-analyzer/wireshark:= )
418 - xen? (
419 - app-emulation/xen
420 - app-emulation/xen-tools:=
421 - )
422 - udev? (
423 - virtual/udev
424 - >=x11-libs/libpciaccess-0.10.9
425 - )"
426 -
427 -DEPEND="${RDEPEND}
428 - app-text/xhtml1
429 - dev-lang/perl
430 - dev-libs/libxslt
431 - dev-perl/XML-XPath
432 - virtual/pkgconfig"
433 -
434 -pkg_setup() {
435 - enewgroup qemu 77
436 - enewuser qemu 77 -1 -1 qemu kvm
437 -
438 - # Some people used the masked ebuild which was not adding the qemu
439 - # user to the kvm group originally. This results in VMs failing to
440 - # start for some users. bug #430808
441 - egetent group kvm | grep -q qemu
442 - if [[ $? -ne 0 ]]; then
443 - gpasswd -a qemu kvm
444 - fi
445 -
446 - # Check kernel configuration:
447 - CONFIG_CHECK=""
448 - use fuse && CONFIG_CHECK+="
449 - ~FUSE_FS"
450 -
451 - use lvm && CONFIG_CHECK+="
452 - ~BLK_DEV_DM
453 - ~DM_MULTIPATH
454 - ~DM_SNAPSHOT"
455 -
456 - use lxc && CONFIG_CHECK+="
457 - ~BLK_CGROUP
458 - ~CGROUP_CPUACCT
459 - ~CGROUP_DEVICE
460 - ~CGROUP_FREEZER
461 - ~CGROUP_NET_PRIO
462 - ~CGROUP_PERF
463 - ~CGROUPS
464 - ~CGROUP_SCHED
465 - ~CPUSETS
466 - ~DEVPTS_MULTIPLE_INSTANCES
467 - ~IPC_NS
468 - ~MACVLAN
469 - ~NAMESPACES
470 - ~NET_CLS_CGROUP
471 - ~NET_NS
472 - ~PID_NS
473 - ~POSIX_MQUEUE
474 - ~SECURITYFS
475 - ~USER_NS
476 - ~UTS_NS
477 - ~VETH
478 - ~!GRKERNSEC_CHROOT_MOUNT
479 - ~!GRKERNSEC_CHROOT_DOUBLE
480 - ~!GRKERNSEC_CHROOT_PIVOT
481 - ~!GRKERNSEC_CHROOT_CHMOD
482 - ~!GRKERNSEC_CHROOT_CAPS"
483 - # Handle specific kernel versions for different features
484 - kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
485 - kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
486 - if $(kernel_is ge 3 6); then
487 - CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
488 - if $(kernel_is lt 4 5); then
489 - CONFIG_CHECK+=" ~MEMCG_KMEM "
490 - fi
491 - fi
492 -
493 - use macvtap && CONFIG_CHECK+="
494 - ~MACVTAP"
495 -
496 - use virt-network && CONFIG_CHECK+="
497 - ~BRIDGE_EBT_MARK_T
498 - ~BRIDGE_NF_EBTABLES
499 - ~NETFILTER_ADVANCED
500 - ~NETFILTER_XT_CONNMARK
501 - ~NETFILTER_XT_MARK
502 - ~NETFILTER_XT_TARGET_CHECKSUM"
503 - # Bandwidth Limiting Support
504 - use virt-network && CONFIG_CHECK+="
505 - ~BRIDGE_EBT_T_NAT
506 - ~NET_ACT_POLICE
507 - ~NET_CLS_FW
508 - ~NET_CLS_U32
509 - ~NET_SCH_HTB
510 - ~NET_SCH_INGRESS
511 - ~NET_SCH_SFQ"
512 -
513 - ERROR_USER_NS="Optional depending on LXC configuration."
514 -
515 - if [[ -n ${CONFIG_CHECK} ]]; then
516 - linux-info_pkg_setup
517 - fi
518 -}
519 -
520 -src_prepare() {
521 - touch "${S}/.mailmap"
522 -
523 - if [[ ${PV} = *9999* ]]; then
524 - # git checkouts require bootstrapping to create the configure script.
525 - # Additionally the submodules must be cloned to the right locations
526 - # bug #377279
527 - ./bootstrap || die "bootstrap failed"
528 - (
529 - git submodule status | sed 's/^[ +-]//;s/ .*//'
530 - git hash-object bootstrap.conf
531 - ) >.git-module-status
532 - fi
533 -
534 - epatch \
535 - "${FILESDIR}"/${PN}-1.2.9-do_not_use_sysconf.patch \
536 - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \
537 - "${FILESDIR}"/${PN}-1.2.17-fix_paths_for_apparmor.patch \
538 - "${FILESDIR}"/${P}-avoid_deprecated_pc_file.patch
539 -
540 - [[ -n ${BACKPORTS} ]] &&
541 - EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \
542 - EPATCH_SOURCE="${WORKDIR}/patches" epatch
543 -
544 - epatch_user
545 -
546 - # Tweak the init script:
547 - cp "${FILESDIR}/libvirtd.init-r15" "${S}/libvirtd.init" || die
548 - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
549 - -e "s/USE_FLAG_AVAHI/$(usex avahi avahi-daemon '')/" \
550 - -e "s/USE_FLAG_ISCSI/$(usex iscsi iscsid '')/" \
551 - -e "s/USE_FLAG_RBD/$(usex rbd ceph '')/" \
552 - -i "${S}/libvirtd.init" || die "sed failed"
553 -
554 - AUTOTOOLS_AUTORECONF=true
555 - autotools-utils_src_prepare
556 -}
557 -
558 -src_configure() {
559 - local myeconfargs=(
560 - $(use_with apparmor)
561 - $(use_with apparmor apparmor-profiles)
562 - $(use_with audit)
563 - $(use_with avahi)
564 - $(use_with caps capng)
565 - $(use_with firewalld)
566 - $(use_with fuse)
567 - $(use_with glusterfs)
568 - $(use_with glusterfs storage-gluster)
569 - $(use_with iscsi storage-iscsi)
570 - $(use_with libvirtd)
571 - $(use_with lvm storage-lvm)
572 - $(use_with lvm storage-mpath)
573 - $(use_with lxc)
574 - $(use_with macvtap)
575 - $(use_enable nls)
576 - $(use_with numa numactl)
577 - $(use_with numa numad)
578 - $(use_with openvz)
579 - $(use_with parted storage-disk)
580 - $(use_with pcap libpcap)
581 - $(use_with phyp)
582 - $(use_with policykit polkit)
583 - $(use_with qemu)
584 - $(use_with qemu yajl)
585 - $(use_with rbd storage-rbd)
586 - $(use_with sasl)
587 - $(use_with selinux)
588 - $(use_with systemd systemd-daemon)
589 - $(usex systemd --with-init-script=systemd '')
590 - $(use_with udev)
591 - $(use_with uml)
592 - $(use_with vepa virtualport)
593 - $(use_with virt-network network)
594 - $(use_with wireshark-plugins wireshark-dissector)
595 - $(use_with xen)
596 - $(use_with xen xen-inotify)
597 - $(usex xen --with-libxl '')
598 -
599 - --without-hal
600 - --without-netcf
601 - --without-sanlock
602 - --without-xenapi
603 - --with-esx
604 - --with-qemu-group=$(usex caps qemu root)
605 - --with-qemu-user=$(usex caps qemu root)
606 - --with-remote
607 - --with-storage-fs
608 - --with-vmware
609 -
610 - --disable-static
611 - --disable-werror
612 -
613 - --with-html-subdir=${PF}/html
614 - --localstatedir=/var
615 - )
616 -
617 - if use virtualbox && has_version app-emulation/virtualbox-ose; then
618 - myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
619 - else
620 - myeconfargs+=( $(use_with virtualbox vbox) )
621 - fi
622 -
623 - autotools-utils_src_configure
624 -
625 - if [[ ${PV} = *9999* ]]; then
626 - # Restore gnulib's config.sub and config.guess
627 - # bug #377279
628 - (cd .gnulib && git reset --hard > /dev/null)
629 - fi
630 -}
631 -
632 -src_test() {
633 - # Explicitly allow parallel build of tests
634 - export VIR_TEST_DEBUG=1
635 - HOME="${T}" emake check || die "tests failed"
636 -}
637 -
638 -src_install() {
639 - autotools-utils_src_compile install \
640 - DESTDIR="${D}" \
641 - SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)"
642 -
643 - find "${D}" -name '*.la' -delete || die
644 -
645 - # Remove bogus, empty directories. They are either not used, or
646 - # libvirtd is able to create them on demand
647 - rm -rf "${D}"/etc/sysconfig
648 - rm -rf "${D}"/var/cache
649 - rm -rf "${D}"/var/run
650 - rm -rf "${D}"/var/log
651 -
652 - use libvirtd || return 0
653 - # From here, only libvirtd-related instructions, be warned!
654 -
655 - use systemd && systemd_install_serviced \
656 - "${FILESDIR}"/libvirtd.service.conf libvirtd.service
657 -
658 - systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
659 -
660 - newinitd "${S}/libvirtd.init" libvirtd || die
661 - newinitd "${FILESDIR}/libvirt-guests.init-r1" libvirt-guests || die
662 - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
663 -
664 - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
665 - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
666 -
667 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1")
668 - DISABLE_AUTOFORMATTING=true
669 - readme.gentoo_create_doc
670 -}
671 -
672 -pkg_preinst() {
673 - # we only ever want to generate this once
674 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
675 - rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
676 - fi
677 -}
678 -
679 -pkg_postinst() {
680 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
681 - touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
682 - fi
683 -
684 - use libvirtd || return 0
685 - # From here, only libvirtd-related instructions, be warned!
686 -
687 - if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.2.18-r2 ${REPLACING_VERSIONS} ]]; then
688 - FORCE_PRINT_ELOG=true
689 - fi
690 -
691 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1")
692 - DISABLE_AUTOFORMATTING=true
693 - readme.gentoo_print_elog
694 -}