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