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