1 |
commit: bce23afa245ec4b4d1b68e629e48d18168336069 |
2 |
Author: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 10 16:00:03 2015 +0000 |
4 |
Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Oct 10 16:06:27 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bce23afa |
7 |
|
8 |
app-emulation/libvirt: drop 1.2.15-r1 |
9 |
|
10 |
Package-Manager: portage-2.2.22 |
11 |
|
12 |
app-emulation/libvirt/Manifest | 1 - |
13 |
app-emulation/libvirt/libvirt-1.2.15-r1.ebuild | 464 ------------------------- |
14 |
2 files changed, 465 deletions(-) |
15 |
|
16 |
diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest |
17 |
index 961bf34..375998b 100644 |
18 |
--- a/app-emulation/libvirt/Manifest |
19 |
+++ b/app-emulation/libvirt/Manifest |
20 |
@@ -1,4 +1,3 @@ |
21 |
-DIST libvirt-1.2.15.tar.gz 29094868 SHA256 5f88041b8c212f8f687c672fe583108833240d6175b512ce4de92ab6660194c6 SHA512 c5dd3af86e89e3804d6c3b527c6dbd98c79d87d2591725a13af33530e0e9a9a2e9aeb9491844469d44ec4f4d17adb036c76391f964158ada23ec042a75556fbc WHIRLPOOL a43aad4caeff707c8d7a6872ff3c46911c96fd90ece02a7f6ceabb4ccd00e467b5341ab9d922912cc2968a2bb8826e970b253b257c5a8981b37364550f9b3616 |
22 |
DIST libvirt-1.2.18.tar.gz 29412554 SHA256 d5a5ff18af4cced21fed986d28fa0a21b782d256920326bf0ff1c7731eeb6ade SHA512 e89d494066ebec4de4c9a53089f015635b7b5ccf4a10ab9749883cc81f6f9607b18ca91a1bd01a9cdacb3a46de86223f0432fae3954106cb92dd275e5b4138c5 WHIRLPOOL dbbbd627ccb9be154bc680407898cd32dfdbc218a67f54560e6b0f0200cbc157a9aa05834de5d9d23e3b6da0625fd5943b4c8e38f8bb9a6ff920bc5820287bfc |
23 |
DIST libvirt-1.2.19.tar.gz 29644247 SHA256 282c141f03331d640020c15f81464b27400e0ee307ef4c5190393b021caedd6e SHA512 2f3f26b90120a39861683f1b5af93ac661ab561e23514c71c2ebfb1ab88da99d25acee9a5d11bec35478e38b9105f3779bffb4d4649f16a91aeccdcaa61e4aa4 WHIRLPOOL 4262beb2248495746d32bc7b16c3eec69d9cba7d4fb3870fcd560bd4d222827cf90eb9cc3df647f3fe10467d1562e72138cbf871adc5f63d4788069e1b9740ac |
24 |
DIST libvirt-1.2.20.tar.gz 29725368 SHA256 df0b5d8a150863a86b98cf809a586c91b2d49af25b74a354049ea416b0b27d30 SHA512 2c7f7995d38d15453de99cc34e63db9c39c653fc24a4fd949207e62c0241f2a5ff3ab5505909ffae77f7a91d321396372188aa29124b8271f876d93546c44d07 WHIRLPOOL 553517c8eec3f601987d9a9205668a81ffcaf9081ee0d79de847ce1d2c9bcd9115471adf2022095143d440a07f7d48059cfd88094b7dda7046a784c93c449817 |
25 |
|
26 |
diff --git a/app-emulation/libvirt/libvirt-1.2.15-r1.ebuild b/app-emulation/libvirt/libvirt-1.2.15-r1.ebuild |
27 |
deleted file mode 100644 |
28 |
index ac4516f..0000000 |
29 |
--- a/app-emulation/libvirt/libvirt-1.2.15-r1.ebuild |
30 |
+++ /dev/null |
31 |
@@ -1,464 +0,0 @@ |
32 |
-# Copyright 1999-2015 Gentoo Foundation |
33 |
-# Distributed under the terms of the GNU General Public License v2 |
34 |
-# $Id$ |
35 |
- |
36 |
-EAPI=5 |
37 |
- |
38 |
-AUTOTOOLIZE=yes |
39 |
- |
40 |
-MY_P="${P/_rc/-rc}" |
41 |
- |
42 |
-inherit eutils user autotools linux-info systemd readme.gentoo |
43 |
- |
44 |
-BACKPORTS="" |
45 |
- |
46 |
-if [[ ${PV} = *9999* ]]; then |
47 |
- inherit git-r3 |
48 |
- EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
49 |
- SRC_URI="" |
50 |
- KEYWORDS="" |
51 |
- SLOT="0" |
52 |
-else |
53 |
- # Versions with 4 numbers are stable updates: |
54 |
- if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then |
55 |
- SRC_URI="http://libvirt.org/sources/stable_updates/${MY_P}.tar.gz" |
56 |
- else |
57 |
- SRC_URI="http://libvirt.org/sources/${MY_P}.tar.gz" |
58 |
- fi |
59 |
- SRC_URI+=" ${BACKPORTS:+ |
60 |
- https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz |
61 |
- https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}" |
62 |
- KEYWORDS="amd64 x86" |
63 |
- SLOT="0/${PV}" |
64 |
-fi |
65 |
-S="${WORKDIR}/${P%_rc*}" |
66 |
- |
67 |
-DESCRIPTION="C toolkit to manipulate virtual machines" |
68 |
-HOMEPAGE="http://www.libvirt.org/" |
69 |
-LICENSE="LGPL-2.1" |
70 |
-# TODO: Reenable IUSE wireshark-plugins |
71 |
-IUSE="audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm lxc \ |
72 |
- +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \ |
73 |
- selinux +udev uml +vepa virtualbox virt-network wireshark-plugins xen \ |
74 |
- elibc_glibc systemd" |
75 |
-REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
76 |
- lxc? ( caps libvirtd ) |
77 |
- openvz? ( libvirtd ) |
78 |
- qemu? ( libvirtd ) |
79 |
- uml? ( libvirtd ) |
80 |
- vepa? ( macvtap ) |
81 |
- virtualbox? ( libvirtd ) |
82 |
- xen? ( libvirtd ) |
83 |
- virt-network? ( libvirtd ) |
84 |
- firewalld? ( virt-network )" |
85 |
- |
86 |
-# gettext.sh command is used by the libvirt command wrappers, and it's |
87 |
-# non-optional, so put it into RDEPEND. |
88 |
-# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
89 |
-# package will use 3 by default. Since we don't have slot pinning in an API, |
90 |
-# we must go with the most recent |
91 |
-RDEPEND="sys-libs/readline:= |
92 |
- sys-libs/ncurses:0= |
93 |
- >=net-misc/curl-7.18.0 |
94 |
- dev-libs/libgcrypt:0 |
95 |
- >=dev-libs/libxml2-2.7.6 |
96 |
- dev-libs/libnl:3 |
97 |
- >=net-libs/gnutls-1.0.25 |
98 |
- net-libs/libssh2 |
99 |
- sys-apps/dmidecode |
100 |
- >=sys-apps/util-linux-2.17 |
101 |
- sys-devel/gettext |
102 |
- >=net-analyzer/netcat6-1.0-r2 |
103 |
- app-misc/scrub |
104 |
- audit? ( sys-process/audit ) |
105 |
- avahi? ( >=net-dns/avahi-0.6[dbus] ) |
106 |
- caps? ( sys-libs/libcap-ng ) |
107 |
- fuse? ( >=sys-fs/fuse-2.8.6 ) |
108 |
- glusterfs? ( >=sys-cluster/glusterfs-3.4.1 ) |
109 |
- iscsi? ( sys-block/open-iscsi ) |
110 |
- lxc? ( !systemd? ( sys-power/pm-utils ) ) |
111 |
- lvm? ( >=sys-fs/lvm2-2.02.48-r2 ) |
112 |
- nfs? ( net-fs/nfs-utils ) |
113 |
- numa? ( |
114 |
- >sys-process/numactl-2.0.2 |
115 |
- sys-process/numad |
116 |
- ) |
117 |
- openvz? ( sys-kernel/openvz-sources:* ) |
118 |
- parted? ( |
119 |
- >=sys-block/parted-1.8[device-mapper] |
120 |
- sys-fs/lvm2 |
121 |
- ) |
122 |
- pcap? ( >=net-libs/libpcap-1.0.0 ) |
123 |
- policykit? ( >=sys-auth/polkit-0.9 ) |
124 |
- qemu? ( |
125 |
- >=app-emulation/qemu-0.13.0 |
126 |
- dev-libs/yajl |
127 |
- !systemd? ( sys-power/pm-utils ) |
128 |
- ) |
129 |
- rbd? ( sys-cluster/ceph ) |
130 |
- sasl? ( dev-libs/cyrus-sasl ) |
131 |
- selinux? ( >=sys-libs/libselinux-2.0.85 ) |
132 |
- systemd? ( sys-apps/systemd ) |
133 |
- virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
134 |
- wireshark-plugins? ( net-analyzer/wireshark:= ) |
135 |
- xen? ( app-emulation/xen-tools app-emulation/xen ) |
136 |
- udev? ( virtual/udev >=x11-libs/libpciaccess-0.10.9 ) |
137 |
- virt-network? ( net-dns/dnsmasq[script] |
138 |
- >=net-firewall/iptables-1.4.10[ipv6] |
139 |
- net-misc/radvd |
140 |
- net-firewall/ebtables |
141 |
- sys-apps/iproute2[-minimal] |
142 |
- firewalld? ( net-firewall/firewalld ) |
143 |
- ) |
144 |
- elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )" |
145 |
- |
146 |
-DEPEND="${RDEPEND} |
147 |
- virtual/pkgconfig |
148 |
- app-text/xhtml1 |
149 |
- dev-lang/perl |
150 |
- dev-perl/XML-XPath |
151 |
- dev-libs/libxslt" |
152 |
- |
153 |
-DOC_CONTENTS="For the basic networking support (bridged and routed networks) |
154 |
-you don't need any extra software. For more complex network modes |
155 |
-including but not limited to NATed network, you can enable the |
156 |
-'virt-network' USE flag.\n\n |
157 |
-If you are using dnsmasq on your system, you will have |
158 |
-to configure /etc/dnsmasq.conf to enable the following settings:\n\n |
159 |
- bind-interfaces\n |
160 |
- interface or except-interface\n\n |
161 |
-Otherwise you might have issues with your existing DNS server." |
162 |
- |
163 |
-LXC_CONFIG_CHECK=" |
164 |
- ~CGROUPS |
165 |
- ~CGROUP_FREEZER |
166 |
- ~CGROUP_DEVICE |
167 |
- ~CGROUP_CPUACCT |
168 |
- ~CGROUP_SCHED |
169 |
- ~CGROUP_PERF |
170 |
- ~BLK_CGROUP |
171 |
- ~NET_CLS_CGROUP |
172 |
- ~CGROUP_NET_PRIO |
173 |
- ~CPUSETS |
174 |
- ~NAMESPACES |
175 |
- ~UTS_NS |
176 |
- ~IPC_NS |
177 |
- ~PID_NS |
178 |
- ~NET_NS |
179 |
- ~USER_NS |
180 |
- ~DEVPTS_MULTIPLE_INSTANCES |
181 |
- ~VETH |
182 |
- ~MACVLAN |
183 |
- ~POSIX_MQUEUE |
184 |
- ~SECURITYFS |
185 |
- ~!GRKERNSEC_CHROOT_MOUNT |
186 |
- ~!GRKERNSEC_CHROOT_DOUBLE |
187 |
- ~!GRKERNSEC_CHROOT_PIVOT |
188 |
- ~!GRKERNSEC_CHROOT_CHMOD |
189 |
- ~!GRKERNSEC_CHROOT_CAPS |
190 |
-" |
191 |
- |
192 |
-VIRTNET_CONFIG_CHECK=" |
193 |
- ~BRIDGE_NF_EBTABLES |
194 |
- ~BRIDGE_EBT_MARK_T |
195 |
- ~NETFILTER_ADVANCED |
196 |
- ~NETFILTER_XT_TARGET_CHECKSUM |
197 |
- ~NETFILTER_XT_CONNMARK |
198 |
- ~NETFILTER_XT_MARK |
199 |
-" |
200 |
- |
201 |
-BWLMT_CONFIG_CHECK=" |
202 |
- ~BRIDGE_EBT_T_NAT |
203 |
- ~NET_SCH_HTB |
204 |
- ~NET_SCH_SFQ |
205 |
- ~NET_SCH_INGRESS |
206 |
- ~NET_CLS_FW |
207 |
- ~NET_CLS_U32 |
208 |
- ~NET_ACT_POLICE |
209 |
-" |
210 |
- |
211 |
-MACVTAP_CONFIG_CHECK=" ~MACVTAP" |
212 |
- |
213 |
-LVM_CONFIG_CHECK=" ~BLK_DEV_DM ~DM_SNAPSHOT ~DM_MULTIPATH" |
214 |
- |
215 |
-ERROR_USER_NS="Optional depending on LXC configuration." |
216 |
- |
217 |
-pkg_setup() { |
218 |
- enewgroup qemu 77 |
219 |
- enewuser qemu 77 -1 -1 qemu kvm |
220 |
- |
221 |
- # Some people used the masked ebuild which was not adding the qemu |
222 |
- # user to the kvm group originally. This results in VMs failing to |
223 |
- # start for some users. bug #430808 |
224 |
- egetent group kvm | grep -q qemu |
225 |
- if [[ $? -ne 0 ]]; then |
226 |
- gpasswd -a qemu kvm |
227 |
- fi |
228 |
- |
229 |
- # Handle specific kernel versions for different features |
230 |
- kernel_is lt 3 6 && LXC_CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR" |
231 |
- kernel_is ge 3 6 && LXC_CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP ~MEMCG_KMEM" |
232 |
- |
233 |
- CONFIG_CHECK="" |
234 |
- use fuse && CONFIG_CHECK+=" ~FUSE_FS" |
235 |
- use lvm && CONFIG_CHECK+="${LVM_CONFIG_CHECK}" |
236 |
- use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}" |
237 |
- use macvtap && CONFIG_CHECK+="${MACVTAP_CONFIG_CHECK}" |
238 |
- use virt-network && CONFIG_CHECK+="${VIRTNET_CONFIG_CHECK}" |
239 |
- # Bandwidth Limiting Support |
240 |
- use virt-network && CONFIG_CHECK+="${BWLMT_CONFIG_CHECK}" |
241 |
- if [[ -n ${CONFIG_CHECK} ]]; then |
242 |
- linux-info_pkg_setup |
243 |
- fi |
244 |
-} |
245 |
- |
246 |
-src_prepare() { |
247 |
- touch "${S}/.mailmap" |
248 |
- |
249 |
- if [[ ${PV} = *9999* ]]; then |
250 |
- # git checkouts require bootstrapping to create the configure script. |
251 |
- # Additionally the submodules must be cloned to the right locations |
252 |
- # bug #377279 |
253 |
- ./bootstrap || die "bootstrap failed" |
254 |
- ( |
255 |
- git submodule status | sed 's/^[ +-]//;s/ .*//' |
256 |
- git hash-object bootstrap.conf |
257 |
- ) >.git-module-status |
258 |
- fi |
259 |
- |
260 |
- epatch "${FILESDIR}"/${PN}-1.2.9-do_not_use_sysconf.patch |
261 |
- |
262 |
- [[ -n ${BACKPORTS} ]] && \ |
263 |
- EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \ |
264 |
- EPATCH_SOURCE="${WORKDIR}/patches" epatch |
265 |
- |
266 |
- epatch_user |
267 |
- |
268 |
- [[ -n ${AUTOTOOLIZE} ]] && eautoreconf |
269 |
- |
270 |
- # Tweak the init script |
271 |
- local avahi_init= |
272 |
- local iscsi_init= |
273 |
- local rbd_init= |
274 |
- local firewalld_init= |
275 |
- cp "${FILESDIR}/libvirtd.init-r14" "${S}/libvirtd.init" |
276 |
- use avahi && avahi_init='avahi-daemon' |
277 |
- use iscsi && iscsi_init='iscsid' |
278 |
- use rbd && rbd_init='ceph' |
279 |
- use firewalld && firewalld_init='need firewalld' |
280 |
- |
281 |
- sed -e "s/USE_FLAG_FIREWALLD/${firewalld_init}/" -i "${S}/libvirtd.init" |
282 |
- sed -e "s/USE_FLAG_AVAHI/${avahi_init}/" -i "${S}/libvirtd.init" |
283 |
- sed -e "s/USE_FLAG_ISCSI/${iscsi_init}/" -i "${S}/libvirtd.init" |
284 |
- sed -e "s/USE_FLAG_RBD/${rbd_init}/" -i "${S}/libvirtd.init" |
285 |
-} |
286 |
- |
287 |
-src_configure() { |
288 |
- local myconf="" |
289 |
- |
290 |
- ## enable/disable daemon, otherwise client only utils |
291 |
- myconf+=" $(use_with libvirtd)" |
292 |
- |
293 |
- ## enable/disable the daemon using avahi to find VMs |
294 |
- myconf+=" $(use_with avahi)" |
295 |
- |
296 |
- ## hypervisors on the local host |
297 |
- myconf+=" $(use_with xen) $(use_with xen xen-inotify)" |
298 |
- myconf+=" --without-xenapi" |
299 |
- if use xen && has_version ">=app-emulation/xen-tools-4.2.0"; then |
300 |
- myconf+=" --with-libxl" |
301 |
- else |
302 |
- myconf+=" --without-libxl" |
303 |
- fi |
304 |
- myconf+=" $(use_with openvz)" |
305 |
- myconf+=" $(use_with lxc)" |
306 |
- if use virtualbox && has_version app-emulation/virtualbox-ose; then |
307 |
- myconf+=" --with-vbox=/usr/lib/virtualbox-ose/" |
308 |
- else |
309 |
- myconf+=" $(use_with virtualbox vbox)" |
310 |
- fi |
311 |
- myconf+=" $(use_with uml)" |
312 |
- myconf+=" $(use_with qemu)" |
313 |
- myconf+=" $(use_with qemu yajl)" # Use QMP over HMP |
314 |
- myconf+=" $(use_with phyp)" |
315 |
- myconf+=" --with-esx" |
316 |
- myconf+=" --with-vmware" |
317 |
- |
318 |
- ## additional host drivers |
319 |
- myconf+=" $(use_with virt-network network)" |
320 |
- myconf+=" --with-storage-fs" |
321 |
- myconf+=" $(use_with lvm storage-lvm)" |
322 |
- myconf+=" $(use_with iscsi storage-iscsi)" |
323 |
- myconf+=" $(use_with parted storage-disk)" |
324 |
- myconf+=" $(use_with glusterfs)" |
325 |
- myconf+=" $(use_with glusterfs storage-gluster)" |
326 |
- myconf+=" $(use_with lvm storage-mpath)" |
327 |
- myconf+=" $(use_with rbd storage-rbd)" |
328 |
- myconf+=" $(use_with numa numactl)" |
329 |
- myconf+=" $(use_with numa numad)" |
330 |
- myconf+=" $(use_with selinux)" |
331 |
- myconf+=" $(use_with fuse)" |
332 |
- |
333 |
- # udev for device support details |
334 |
- myconf+=" $(use_with udev)" |
335 |
- myconf+=" --without-hal" |
336 |
- |
337 |
- # linux capability support so we don't need privileged accounts |
338 |
- myconf+=" $(use_with caps capng)" |
339 |
- |
340 |
- ## auth stuff |
341 |
- myconf+=" $(use_with policykit polkit)" |
342 |
- myconf+=" $(use_with sasl)" |
343 |
- |
344 |
- # network bits |
345 |
- myconf+=" $(use_with macvtap)" |
346 |
- myconf+=" $(use_with pcap libpcap)" |
347 |
- myconf+=" $(use_with vepa virtualport)" |
348 |
- myconf+=" $(use_with firewalld)" |
349 |
- |
350 |
- ## other |
351 |
- myconf+=" $(use_enable nls)" |
352 |
- |
353 |
- # user privilege bits fir qemu/kvm |
354 |
- if use caps; then |
355 |
- myconf+=" --with-qemu-user=qemu" |
356 |
- myconf+=" --with-qemu-group=qemu" |
357 |
- else |
358 |
- myconf+=" --with-qemu-user=root" |
359 |
- myconf+=" --with-qemu-group=root" |
360 |
- fi |
361 |
- |
362 |
- # audit support |
363 |
- myconf+=" $(use_with audit)" |
364 |
- |
365 |
- # wireshark dissector |
366 |
- myconf+=" $(use_with wireshark-plugins wireshark-dissector)" |
367 |
- |
368 |
- ## stuff we don't yet support |
369 |
- myconf+=" --without-netcf" |
370 |
- |
371 |
- # locking support |
372 |
- myconf+=" --without-sanlock" |
373 |
- |
374 |
- # systemd unit files |
375 |
- myconf+=" $(use_with systemd systemd-daemon)" |
376 |
- use systemd && myconf+=" --with-init-script=systemd" |
377 |
- |
378 |
- # this is a nasty trick to work around the problem in bug |
379 |
- # #275073. The reason why we don't solve this properly is that |
380 |
- # it'll require us to rebuild autotools (and we don't really want |
381 |
- # to do that right now). The proper solution has been sent |
382 |
- # upstream and should hopefully land in 0.7.7, in the mean time, |
383 |
- # mime the same functionality with this. |
384 |
- case ${CHOST} in |
385 |
- *cygwin* | *mingw* ) |
386 |
- ;; |
387 |
- *) |
388 |
- ac_cv_prog_WINDRES=no |
389 |
- ;; |
390 |
- esac |
391 |
- |
392 |
- econf \ |
393 |
- ${myconf} \ |
394 |
- --disable-static \ |
395 |
- --disable-werror \ |
396 |
- --with-remote \ |
397 |
- --docdir=/usr/share/doc/${PF} \ |
398 |
- --localstatedir=/var |
399 |
- |
400 |
- if [[ ${PV} = *9999* ]]; then |
401 |
- # Restore gnulib's config.sub and config.guess |
402 |
- # bug #377279 |
403 |
- (cd .gnulib && git reset --hard > /dev/null) |
404 |
- fi |
405 |
-} |
406 |
- |
407 |
-src_test() { |
408 |
- # Explicitly allow parallel build of tests |
409 |
- export VIR_TEST_DEBUG=1 |
410 |
- HOME="${T}" emake check || die "tests failed" |
411 |
-} |
412 |
- |
413 |
-src_install() { |
414 |
- emake install \ |
415 |
- DESTDIR="${D}" \ |
416 |
- HTML_DIR=/usr/share/doc/${PF}/html \ |
417 |
- DOCS_DIR=/usr/share/doc/${PF} \ |
418 |
- EXAMPLE_DIR=/usr/share/doc/${PF}/examples \ |
419 |
- SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)" \ |
420 |
- || die "emake install failed" |
421 |
- |
422 |
- find "${D}" -name '*.la' -delete || die |
423 |
- |
424 |
- # Remove bogus, empty directories. They are either not used, or |
425 |
- # libvirtd is able to create them on demand |
426 |
- rm -rf "${D}"/etc/sysconf |
427 |
- rm -rf "${D}"/var/cache |
428 |
- rm -rf "${D}"/var/run |
429 |
- rm -rf "${D}"/var/log |
430 |
- |
431 |
- use libvirtd || return 0 |
432 |
- # From here, only libvirtd-related instructions, be warned! |
433 |
- |
434 |
- use systemd && systemd_install_serviced \ |
435 |
- "${FILESDIR}"/libvirtd.service.conf libvirtd.service |
436 |
- |
437 |
- systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf |
438 |
- |
439 |
- newinitd "${S}/libvirtd.init" libvirtd || die |
440 |
- newconfd "${FILESDIR}/libvirtd.confd-r4" libvirtd || die |
441 |
- newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die |
442 |
- |
443 |
- readme.gentoo_create_doc |
444 |
-} |
445 |
- |
446 |
-pkg_preinst() { |
447 |
- # we only ever want to generate this once |
448 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
449 |
- rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
450 |
- fi |
451 |
- |
452 |
- # We really don't want to use or support old PolicyKit cause it |
453 |
- # screws with the new polkit integration |
454 |
- if has_version sys-auth/policykit; then |
455 |
- rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy |
456 |
- fi |
457 |
- |
458 |
- # Only sysctl files ending in .conf work |
459 |
- dodir /etc/sysctl.d |
460 |
- mv "${D}"/usr/lib/sysctl.d/libvirtd.conf "${D}"/etc/sysctl.d/libvirtd.conf |
461 |
-} |
462 |
- |
463 |
-pkg_postinst() { |
464 |
- if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
465 |
- touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml |
466 |
- fi |
467 |
- |
468 |
- if ! use policykit; then |
469 |
- elog "To allow normal users to connect to libvirtd you must change the" |
470 |
- elog "unix sock group and/or perms in /etc/libvirt/libvirtd.conf" |
471 |
- fi |
472 |
- |
473 |
- use libvirtd || return 0 |
474 |
- # From here, only libvirtd-related instructions, be warned! |
475 |
- |
476 |
- readme.gentoo_print_elog |
477 |
- |
478 |
- if use caps && use qemu; then |
479 |
- elog "libvirt will now start qemu/kvm VMs with non-root privileges." |
480 |
- elog "Ensure any resources your VMs use are accessible by qemu:qemu" |
481 |
- fi |
482 |
- |
483 |
- if [[ -n "${REPLACING_VERSIONS}" ]]; then |
484 |
- elog "" |
485 |
- elog "The systemd service-file configuration under /etc/sysconfig has" |
486 |
- elog "been removed. Please use" |
487 |
- elog " /etc/systemd/system/libvirtd.service.d/00gentoo.conf" |
488 |
- elog "to control the '--listen' parameter for libvirtd. The configuration" |
489 |
- elog "for the libvirt-guests.service is now found under" |
490 |
- elog " /etc/libvirt/libvirt-guests.conf" |
491 |
- elog "The openrc configuration has not been changed. Thus no action is" |
492 |
- elog "required for the openrc service manager." |
493 |
- elog "" |
494 |
- fi |
495 |
-} |