1 |
cardoe 12/08/27 04:42:01 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: libvirt-0.10.0_rc2.ebuild |
5 |
Log: |
6 |
Bump 0.10.0 RC. |
7 |
|
8 |
(Portage version: 2.1.11.9/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.210 app-emulation/libvirt/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?rev=1.210&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?rev=1.210&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?r1=1.209&r2=1.210 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v |
20 |
retrieving revision 1.209 |
21 |
retrieving revision 1.210 |
22 |
diff -u -r1.209 -r1.210 |
23 |
--- ChangeLog 25 Aug 2012 23:57:43 -0000 1.209 |
24 |
+++ ChangeLog 27 Aug 2012 04:42:00 -0000 1.210 |
25 |
@@ -1,6 +1,11 @@ |
26 |
# ChangeLog for app-emulation/libvirt |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.209 2012/08/25 23:57:43 cardoe Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.210 2012/08/27 04:42:00 cardoe Exp $ |
30 |
+ |
31 |
+*libvirt-0.10.0_rc2 (27 Aug 2012) |
32 |
+ |
33 |
+ 27 Aug 2012; Doug Goldstein <cardoe@g.o> +libvirt-0.10.0_rc2.ebuild: |
34 |
+ Bump 0.10.0 RC. |
35 |
|
36 |
*libvirt-0.10.0_rc1 (25 Aug 2012) |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
1.1 app-emulation/libvirt/libvirt-0.10.0_rc2.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/libvirt-0.10.0_rc2.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/libvirt-0.10.0_rc2.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: libvirt-0.10.0_rc2.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2012 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-0.10.0_rc2.ebuild,v 1.1 2012/08/27 04:42:00 cardoe Exp $ |
51 |
|
52 |
EAPI=4 |
53 |
|
54 |
#BACKPORTS=1 |
55 |
AUTOTOOLIZE=yes |
56 |
|
57 |
MY_P="${P/_rc/-rc}" |
58 |
|
59 |
PYTHON_DEPEND="python? 2:2.5" |
60 |
#RESTRICT_PYTHON_ABIS="3.*" |
61 |
#SUPPORT_PYTHON_ABIS="1" |
62 |
|
63 |
inherit eutils python user autotools linux-info |
64 |
|
65 |
if [[ ${PV} = *9999* ]]; then |
66 |
inherit git-2 |
67 |
EGIT_REPO_URI="git://libvirt.org/libvirt.git" |
68 |
AUTOTOOLIZE=yes |
69 |
SRC_URI="" |
70 |
KEYWORDS="" |
71 |
else |
72 |
SRC_URI="http://libvirt.org/sources/${MY_P}.tar.gz |
73 |
ftp://libvirt.org/libvirt/${MY_P}.tar.gz |
74 |
${BACKPORTS:+ |
75 |
http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-bp-${BACKPORTS}.tar.xz}" |
76 |
KEYWORDS="~amd64 ~x86" |
77 |
fi |
78 |
S="${WORKDIR}/${P%_rc*}" |
79 |
|
80 |
DESCRIPTION="C toolkit to manipulate virtual machines" |
81 |
HOMEPAGE="http://www.libvirt.org/" |
82 |
LICENSE="LGPL-2.1" |
83 |
SLOT="0" |
84 |
IUSE="audit avahi +caps debug iscsi +libvirtd lvm +lxc +macvtap nfs \ |
85 |
nls numa openvz parted pcap phyp policykit python qemu rbd sasl \ |
86 |
selinux +udev uml +vepa virtualbox virt-network xen elibc_glibc" |
87 |
REQUIRED_USE="libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) ) |
88 |
lxc? ( caps libvirtd ) |
89 |
openvz? ( libvirtd ) |
90 |
qemu? ( libvirtd ) |
91 |
uml? ( libvirtd ) |
92 |
vepa? ( macvtap ) |
93 |
virtualbox? ( libvirtd ) |
94 |
xen? ( libvirtd )" |
95 |
|
96 |
# gettext.sh command is used by the libvirt command wrappers, and it's |
97 |
# non-optional, so put it into RDEPEND. |
98 |
# We can use both libnl:1.1 and libnl:3, but if you have both installed, the |
99 |
# package will use 3 by default. Since we don't have slot pinning in an API, |
100 |
# we must go with the most recent |
101 |
RDEPEND="sys-libs/readline |
102 |
sys-libs/ncurses |
103 |
>=net-misc/curl-7.18.0 |
104 |
dev-libs/libgcrypt |
105 |
>=dev-libs/libxml2-2.7.6 |
106 |
dev-libs/libnl:3 |
107 |
>=net-libs/gnutls-1.0.25 |
108 |
sys-apps/dmidecode |
109 |
>=sys-apps/util-linux-2.17 |
110 |
sys-devel/gettext |
111 |
>=net-analyzer/netcat6-1.0-r2 |
112 |
app-misc/scrub |
113 |
audit? ( sys-process/audit ) |
114 |
avahi? ( >=net-dns/avahi-0.6[dbus] ) |
115 |
caps? ( sys-libs/libcap-ng ) |
116 |
iscsi? ( sys-block/open-iscsi ) |
117 |
lxc? ( sys-power/pm-utils ) |
118 |
lvm? ( >=sys-fs/lvm2-2.02.48-r2 ) |
119 |
nfs? ( net-fs/nfs-utils ) |
120 |
numa? ( |
121 |
>sys-process/numactl-2.0.2 |
122 |
sys-process/numad |
123 |
) |
124 |
openvz? ( sys-kernel/openvz-sources ) |
125 |
parted? ( |
126 |
>=sys-block/parted-1.8[device-mapper] |
127 |
sys-fs/lvm2 |
128 |
) |
129 |
pcap? ( >=net-libs/libpcap-1.0.0 ) |
130 |
phyp? ( net-libs/libssh2 ) |
131 |
policykit? ( >=sys-auth/polkit-0.9 ) |
132 |
qemu? ( |
133 |
|| ( app-emulation/qemu-kvm >=app-emulation/qemu-0.10.0 ) |
134 |
dev-libs/yajl |
135 |
sys-power/pm-utils |
136 |
) |
137 |
rbd? ( sys-cluster/ceph ) |
138 |
sasl? ( dev-libs/cyrus-sasl ) |
139 |
selinux? ( >=sys-libs/libselinux-2.0.85 ) |
140 |
virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) ) |
141 |
xen? ( app-emulation/xen-tools app-emulation/xen ) |
142 |
udev? ( >=sys-fs/udev-145 >=x11-libs/libpciaccess-0.10.9 ) |
143 |
virt-network? ( net-dns/dnsmasq |
144 |
>=net-firewall/iptables-1.4.10 |
145 |
net-firewall/ebtables |
146 |
sys-apps/iproute2[-minimal] ) |
147 |
elibc_glibc? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )" |
148 |
# one? ( dev-libs/xmlrpc-c ) |
149 |
DEPEND="${RDEPEND} |
150 |
virtual/pkgconfig |
151 |
app-text/xhtml1 |
152 |
=dev-lang/python-2*" |
153 |
|
154 |
LXC_CONFIG_CHECK=" |
155 |
~CGROUPS |
156 |
~CGROUP_FREEZER |
157 |
~CGROUP_DEVICE |
158 |
~CPUSETS |
159 |
~CGROUP_CPUACCT |
160 |
~RESOURCE_COUNTERS |
161 |
~CGROUP_MEM_RES_CTLR |
162 |
~CGROUP_SCHED |
163 |
~BLK_CGROUP |
164 |
~NAMESPACES |
165 |
~UTS_NS |
166 |
~IPC_NS |
167 |
~PID_NS |
168 |
~NET_NS |
169 |
~DEVPTS_MULTIPLE_INSTANCES |
170 |
~VETH |
171 |
~MACVLAN |
172 |
~POSIX_MQUEUE |
173 |
~!GRKERNSEC_CHROOT_MOUNT |
174 |
~!GRKERNSEC_CHROOT_DOUBLE |
175 |
~!GRKERNSEC_CHROOT_PIVOT |
176 |
~!GRKERNSEC_CHROOT_CHMOD |
177 |
~!GRKERNSEC_CHROOT_CAPS |
178 |
" |
179 |
|
180 |
VIRTNET_CONFIG_CHECK=" |
181 |
~BRIDGE_NF_EBTABLES |
182 |
~NETFILTER_ADVANCED |
183 |
~NETFILTER_XT_TARGET_CHECKSUM |
184 |
" |
185 |
|
186 |
MACVTAP_CONFIG_CHECK="~MACVTAP" |
187 |
|
188 |
pkg_setup() { |
189 |
python_set_active_version 2 |
190 |
python_pkg_setup |
191 |
|
192 |
enewgroup qemu 77 |
193 |
enewuser qemu 77 -1 -1 qemu kvm |
194 |
|
195 |
# Some people used the masked ebuild which was not adding the qemu |
196 |
# user to the kvm group originally. This results in VMs failing to |
197 |
# start for some users. bug #430808 |
198 |
egetent group kvm | grep -q qemu |
199 |
if [[ $? -ne 0 ]]; then |
200 |
gpasswd -a qemu kvm |
201 |
fi |
202 |
|
203 |
CONFIG_CHECK="" |
204 |
use lxc && CONFIG_CHECK+="${LXC_CONFIG_CHECK}" |
205 |
kernel_is lt 3 5 && use lxc && CONFIG_CHECK+=" ~USER_NS" |
206 |
use macvtap && CONFIG_CHECK+="${MACVTAP}" |
207 |
use virt-network && CONFIG_CHECK+="${VIRTNET_CONFIG_CHECK}" |
208 |
if [[ -n ${CONFIG_CHECK} ]]; then |
209 |
linux-info_pkg_setup |
210 |
fi |
211 |
} |
212 |
|
213 |
src_prepare() { |
214 |
[[ -n ${BACKPORTS} ]] && \ |
215 |
EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \ |
216 |
epatch |
217 |
|
218 |
if [[ ${PV} = *9999* ]]; then |
219 |
|
220 |
# git checkouts require bootstrapping to create the configure script. |
221 |
# Additionally the submodules must be cloned to the right locations |
222 |
# bug #377279 |
223 |
./bootstrap || die "bootstrap failed" |
224 |
( |
225 |
git submodule status | sed 's/^[ +-]//;s/ .*//' |
226 |
git hash-object bootstrap.conf |
227 |
) >.git-module-status |
228 |
fi |
229 |
|
230 |
epatch_user |
231 |
|
232 |
[[ -n ${AUTOTOOLIZE} ]] && eautoreconf |
233 |
} |
234 |
|
235 |
src_configure() { |
236 |
local myconf="" |
237 |
|
238 |
myconf="${myconf} $(use_enable debug)" |
239 |
|
240 |
## enable/disable daemon, otherwise client only utils |
241 |
myconf="${myconf} $(use_with libvirtd)" |
242 |
|
243 |
## enable/disable the daemon using avahi to find VMs |
244 |
myconf="${myconf} $(use_with avahi)" |
245 |
|
246 |
## hypervisors on the local host |
247 |
myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)" |
248 |
# leave it automagic as it depends on the version of xen used. |
249 |
use xen || myconf+=" --without-libxl" |
250 |
use xen || myconf+=" --without-xenapi" |
251 |
myconf="${myconf} $(use_with openvz)" |
252 |
myconf="${myconf} $(use_with lxc)" |
253 |
if use virtualbox && has_version app-emulation/virtualbox-ose; then |
254 |
myconf="${myconf} --with-vbox=/usr/lib/virtualbox-ose/" |
255 |
else |
256 |
myconf="${myconf} $(use_with virtualbox vbox)" |
257 |
fi |
258 |
myconf="${myconf} $(use_with uml)" |
259 |
myconf="${myconf} $(use_with qemu)" |
260 |
myconf="${myconf} $(use_with qemu yajl)" # Use QMP over HMP |
261 |
myconf="${myconf} $(use_with phyp)" |
262 |
myconf="${myconf} --with-esx" |
263 |
myconf="${myconf} --with-vmware" |
264 |
|
265 |
## additional host drivers |
266 |
myconf="${myconf} $(use_with virt-network network)" |
267 |
myconf="${myconf} --with-storage-fs" |
268 |
myconf="${myconf} $(use_with lvm storage-lvm)" |
269 |
myconf="${myconf} $(use_with iscsi storage-iscsi)" |
270 |
myconf="${myconf} $(use_with parted storage-disk)" |
271 |
myconf="${myconf} $(use_with lvm storage-mpath)" |
272 |
myconf="${myconf} $(use_with rbd storage-rbd)" |
273 |
myconf="${myconf} $(use_with numa numactl)" |
274 |
myconf="${myconf} $(use_with numa numad)" |
275 |
myconf="${myconf} $(use_with selinux)" |
276 |
|
277 |
# udev for device support details |
278 |
myconf="${myconf} $(use_with udev)" |
279 |
|
280 |
# linux capability support so we don't need privileged accounts |
281 |
myconf="${myconf} $(use_with caps capng)" |
282 |
|
283 |
## auth stuff |
284 |
myconf="${myconf} $(use_with policykit polkit)" |
285 |
myconf="${myconf} $(use_with sasl)" |
286 |
|
287 |
# network bits |
288 |
myconf="${myconf} $(use_with macvtap)" |
289 |
myconf="${myconf} $(use_with pcap libpcap)" |
290 |
myconf="${myconf} $(use_with vepa virtualport)" |
291 |
|
292 |
## other |
293 |
myconf="${myconf} $(use_enable nls)" |
294 |
myconf="${myconf} $(use_with python)" |
295 |
|
296 |
# user privilege bits fir qemu/kvm |
297 |
if use caps; then |
298 |
myconf="${myconf} --with-qemu-user=qemu" |
299 |
myconf="${myconf} --with-qemu-group=qemu" |
300 |
else |
301 |
myconf="${myconf} --with-qemu-user=root" |
302 |
myconf="${myconf} --with-qemu-group=root" |
303 |
fi |
304 |
|
305 |
# audit support |
306 |
myconf="${myconf} $(use_with audit)" |
307 |
|
308 |
## stuff we don't yet support |
309 |
myconf="${myconf} --without-netcf" |
310 |
|
311 |
# we use udev over hal |
312 |
myconf="${myconf} --without-hal" |
313 |
|
314 |
# locking support |
315 |
myconf="${myconf} --without-sanlock" |
316 |
|
317 |
# this is a nasty trick to work around the problem in bug |
318 |
# #275073. The reason why we don't solve this properly is that |
319 |
# it'll require us to rebuild autotools (and we don't really want |
320 |
# to do that right now). The proper solution has been sent |
321 |
# upstream and should hopefully land in 0.7.7, in the mean time, |
322 |
# mime the same functionality with this. |
323 |
case ${CHOST} in |
324 |
*cygwin* | *mingw* ) |
325 |
;; |
326 |
*) |
327 |
ac_cv_prog_WINDRES=no |
328 |
;; |
329 |
esac |
330 |
|
331 |
econf \ |
332 |
${myconf} \ |
333 |
--disable-static \ |
334 |
--docdir=/usr/share/doc/${PF} \ |
335 |
--with-remote \ |
336 |
--localstatedir=/var |
337 |
|
338 |
if [[ ${PV} = *9999* ]]; then |
339 |
# Restore gnulib's config.sub and config.guess |
340 |
# bug #377279 |
341 |
(cd .gnulib && git reset --hard > /dev/null) |
342 |
fi |
343 |
} |
344 |
|
345 |
src_test() { |
346 |
# Explicitly allow parallel build of tests |
347 |
HOME="${T}" emake check || die "tests failed" |
348 |
} |
349 |
|
350 |
src_install() { |
351 |
emake install \ |
352 |
DESTDIR="${D}" \ |
353 |
HTML_DIR=/usr/share/doc/${PF}/html \ |
354 |
DOCS_DIR=/usr/share/doc/${PF}/python \ |
355 |
EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \ |
356 |
|| die "emake install failed" |
357 |
|
358 |
find "${D}" -name '*.la' -delete || die |
359 |
|
360 |
use libvirtd || return 0 |
361 |
# From here, only libvirtd-related instructions, be warned! |
362 |
|
363 |
newinitd "${FILESDIR}/libvirtd.init-r8" libvirtd || die |
364 |
newconfd "${FILESDIR}/libvirtd.confd-r3" libvirtd || die |
365 |
|
366 |
keepdir /var/lib/libvirt/images |
367 |
} |
368 |
|
369 |
pkg_preinst() { |
370 |
# we only ever want to generate this once |
371 |
if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then |
372 |
rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml |
373 |
fi |
374 |
|
375 |
# We really don't want to use or support old PolicyKit cause it |
376 |
# screws with the new polkit integration |
377 |
if has_version sys-auth/policykit; then |
378 |
rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy |
379 |
fi |
380 |
|
381 |
# Only sysctl files ending in .conf work |
382 |
mv "${D}"/etc/sysctl.d/libvirtd "${D}"/etc/sysctl.d/libvirtd.conf |
383 |
} |
384 |
|
385 |
pkg_postinst() { |
386 |
use python && python_mod_optimize libvirt.py |
387 |
|
388 |
# support for dropped privileges |
389 |
if use qemu; then |
390 |
fperms 0750 "${EROOT}/var/lib/libvirt/qemu" |
391 |
fperms 0750 "${EROOT}/var/cache/libvirt/qemu" |
392 |
fi |
393 |
|
394 |
if use caps && use qemu; then |
395 |
fowners -R qemu:qemu "${EROOT}/var/lib/libvirt/qemu" |
396 |
fowners -R qemu:qemu "${EROOT}/var/cache/libvirt/qemu" |
397 |
elif use qemu; then |
398 |
fowners -R root:root "${EROOT}/var/lib/libvirt/qemu" |
399 |
fowners -R root:root "${EROOT}/var/cache/libvirt/qemu" |
400 |
fi |
401 |
|
402 |
if ! use policykit; then |
403 |
elog "To allow normal users to connect to libvirtd you must change the" |
404 |
elog "unix sock group and/or perms in /etc/libvirt/libvirtd.conf" |
405 |
fi |
406 |
|
407 |
use libvirtd || return 0 |
408 |
# From here, only libvirtd-related instructions, be warned! |
409 |
|
410 |
elog |
411 |
elog "For the basic networking support (bridged and routed networks)" |
412 |
elog "you don't need any extra software. For more complex network modes" |
413 |
elog "including but not limited to NATed network, you can enable the" |
414 |
elog "'virt-network' USE flag." |
415 |
elog |
416 |
if has_version net-dns/dnsmasq; then |
417 |
ewarn "If you have a DNS server setup on your machine, you will have" |
418 |
ewarn "to configure /etc/dnsmasq.conf to enable the following settings: " |
419 |
ewarn " bind-interfaces" |
420 |
ewarn " interface or except-interface" |
421 |
ewarn |
422 |
ewarn "Otherwise you might have issues with your existing DNS server." |
423 |
fi |
424 |
|
425 |
if use caps && use qemu; then |
426 |
elog "libvirt will now start qemu/kvm VMs with non-root privileges." |
427 |
elog "Ensure any resources your VMs use are accessible by qemu:qemu" |
428 |
fi |
429 |
} |
430 |
|
431 |
pkg_postrm() { |
432 |
use python && python_mod_cleanup libvirt.py |
433 |
} |