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