Gentoo Archives: gentoo-commits

From: "Doug Goldstein (cardoe)" <cardoe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-emulation/libvirt: ChangeLog libvirt-0.10.1.ebuild libvirt-0.10.0_rc1.ebuild libvirt-0.10.0_rc2.ebuild
Date: Fri, 31 Aug 2012 21:53:50
Message-Id: 20120831215315.2A0F720DF8@flycatcher.gentoo.org
1 cardoe 12/08/31 21:53:15
2
3 Modified: ChangeLog
4 Added: libvirt-0.10.1.ebuild
5 Removed: libvirt-0.10.0_rc1.ebuild libvirt-0.10.0_rc2.ebuild
6 Log:
7 Bump to latest release.
8
9 (Portage version: 2.2.0_alpha123/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.211 app-emulation/libvirt/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?rev=1.211&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?rev=1.211&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?r1=1.210&r2=1.211
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v
21 retrieving revision 1.210
22 retrieving revision 1.211
23 diff -u -r1.210 -r1.211
24 --- ChangeLog 27 Aug 2012 04:42:00 -0000 1.210
25 +++ ChangeLog 31 Aug 2012 21:53:14 -0000 1.211
26 @@ -1,6 +1,12 @@
27 # ChangeLog for app-emulation/libvirt
28 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.210 2012/08/27 04:42:00 cardoe Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.211 2012/08/31 21:53:14 cardoe Exp $
31 +
32 +*libvirt-0.10.1 (31 Aug 2012)
33 +
34 + 31 Aug 2012; Doug Goldstein <cardoe@g.o> -libvirt-0.10.0_rc1.ebuild,
35 + -libvirt-0.10.0_rc2.ebuild, +libvirt-0.10.1.ebuild:
36 + Bump to latest release.
37
38 *libvirt-0.10.0_rc2 (27 Aug 2012)
39
40
41
42
43 1.1 app-emulation/libvirt/libvirt-0.10.1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/libvirt-0.10.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/libvirt-0.10.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: libvirt-0.10.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.1.ebuild,v 1.1 2012/08/31 21:53:14 cardoe Exp $
53
54 EAPI=4
55
56 #BACKPORTS=1
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/${MY_P}.tar.gz
75 ftp://libvirt.org/libvirt/${MY_P}.tar.gz
76 ${BACKPORTS:+
77 http://dev.gentoo.org/~cardoe/distfiles/${MY_P}-bp-${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 sys-apps/dmidecode
111 >=sys-apps/util-linux-2.17
112 sys-devel/gettext
113 >=net-analyzer/netcat6-1.0-r2
114 app-misc/scrub
115 audit? ( sys-process/audit )
116 avahi? ( >=net-dns/avahi-0.6[dbus] )
117 caps? ( sys-libs/libcap-ng )
118 iscsi? ( sys-block/open-iscsi )
119 lxc? ( sys-power/pm-utils )
120 lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
121 nfs? ( net-fs/nfs-utils )
122 numa? (
123 >sys-process/numactl-2.0.2
124 sys-process/numad
125 )
126 openvz? ( sys-kernel/openvz-sources )
127 parted? (
128 >=sys-block/parted-1.8[device-mapper]
129 sys-fs/lvm2
130 )
131 pcap? ( >=net-libs/libpcap-1.0.0 )
132 phyp? ( net-libs/libssh2 )
133 policykit? ( >=sys-auth/polkit-0.9 )
134 qemu? (
135 || ( app-emulation/qemu-kvm >=app-emulation/qemu-0.10.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-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 [[ -n ${BACKPORTS} ]] && \
218 EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
219 epatch
220
221 if [[ ${PV} = *9999* ]]; then
222
223 # git checkouts require bootstrapping to create the configure script.
224 # Additionally the submodules must be cloned to the right locations
225 # bug #377279
226 ./bootstrap || die "bootstrap failed"
227 (
228 git submodule status | sed 's/^[ +-]//;s/ .*//'
229 git hash-object bootstrap.conf
230 ) >.git-module-status
231 fi
232
233 epatch_user
234
235 [[ -n ${AUTOTOOLIZE} ]] && eautoreconf
236 }
237
238 src_configure() {
239 local myconf=""
240
241 myconf="${myconf} $(use_enable debug)"
242
243 ## enable/disable daemon, otherwise client only utils
244 myconf="${myconf} $(use_with libvirtd)"
245
246 ## enable/disable the daemon using avahi to find VMs
247 myconf="${myconf} $(use_with avahi)"
248
249 ## hypervisors on the local host
250 myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
251 # leave it automagic as it depends on the version of xen used.
252 use xen || myconf+=" --without-libxl"
253 use xen || myconf+=" --without-xenapi"
254 myconf="${myconf} $(use_with openvz)"
255 myconf="${myconf} $(use_with lxc)"
256 if use virtualbox && has_version app-emulation/virtualbox-ose; then
257 myconf="${myconf} --with-vbox=/usr/lib/virtualbox-ose/"
258 else
259 myconf="${myconf} $(use_with virtualbox vbox)"
260 fi
261 myconf="${myconf} $(use_with uml)"
262 myconf="${myconf} $(use_with qemu)"
263 myconf="${myconf} $(use_with qemu yajl)" # Use QMP over HMP
264 myconf="${myconf} $(use_with phyp)"
265 myconf="${myconf} --with-esx"
266 myconf="${myconf} --with-vmware"
267
268 ## additional host drivers
269 myconf="${myconf} $(use_with virt-network network)"
270 myconf="${myconf} --with-storage-fs"
271 myconf="${myconf} $(use_with lvm storage-lvm)"
272 myconf="${myconf} $(use_with iscsi storage-iscsi)"
273 myconf="${myconf} $(use_with parted storage-disk)"
274 myconf="${myconf} $(use_with lvm storage-mpath)"
275 myconf="${myconf} $(use_with rbd storage-rbd)"
276 myconf="${myconf} $(use_with numa numactl)"
277 myconf="${myconf} $(use_with numa numad)"
278 myconf="${myconf} $(use_with selinux)"
279
280 # udev for device support details
281 myconf="${myconf} $(use_with udev)"
282
283 # linux capability support so we don't need privileged accounts
284 myconf="${myconf} $(use_with caps capng)"
285
286 ## auth stuff
287 myconf="${myconf} $(use_with policykit polkit)"
288 myconf="${myconf} $(use_with sasl)"
289
290 # network bits
291 myconf="${myconf} $(use_with macvtap)"
292 myconf="${myconf} $(use_with pcap libpcap)"
293 myconf="${myconf} $(use_with vepa virtualport)"
294
295 ## other
296 myconf="${myconf} $(use_enable nls)"
297 myconf="${myconf} $(use_with python)"
298
299 # user privilege bits fir qemu/kvm
300 if use caps; then
301 myconf="${myconf} --with-qemu-user=qemu"
302 myconf="${myconf} --with-qemu-group=qemu"
303 else
304 myconf="${myconf} --with-qemu-user=root"
305 myconf="${myconf} --with-qemu-group=root"
306 fi
307
308 # audit support
309 myconf="${myconf} $(use_with audit)"
310
311 ## stuff we don't yet support
312 myconf="${myconf} --without-netcf"
313
314 # we use udev over hal
315 myconf="${myconf} --without-hal"
316
317 # locking support
318 myconf="${myconf} --without-sanlock"
319
320 # this is a nasty trick to work around the problem in bug
321 # #275073. The reason why we don't solve this properly is that
322 # it'll require us to rebuild autotools (and we don't really want
323 # to do that right now). The proper solution has been sent
324 # upstream and should hopefully land in 0.7.7, in the mean time,
325 # mime the same functionality with this.
326 case ${CHOST} in
327 *cygwin* | *mingw* )
328 ;;
329 *)
330 ac_cv_prog_WINDRES=no
331 ;;
332 esac
333
334 econf \
335 ${myconf} \
336 --disable-static \
337 --docdir=/usr/share/doc/${PF} \
338 --with-remote \
339 --localstatedir=/var
340
341 if [[ ${PV} = *9999* ]]; then
342 # Restore gnulib's config.sub and config.guess
343 # bug #377279
344 (cd .gnulib && git reset --hard > /dev/null)
345 fi
346 }
347
348 src_test() {
349 # Explicitly allow parallel build of tests
350 HOME="${T}" emake check || die "tests failed"
351 }
352
353 src_install() {
354 emake install \
355 DESTDIR="${D}" \
356 HTML_DIR=/usr/share/doc/${PF}/html \
357 DOCS_DIR=/usr/share/doc/${PF}/python \
358 EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \
359 || die "emake install failed"
360
361 find "${D}" -name '*.la' -delete || die
362
363 use libvirtd || return 0
364 # From here, only libvirtd-related instructions, be warned!
365
366 newinitd "${FILESDIR}/libvirtd.init-r8" libvirtd || die
367 newconfd "${FILESDIR}/libvirtd.confd-r3" libvirtd || die
368
369 keepdir /var/lib/libvirt/images
370 }
371
372 pkg_preinst() {
373 # we only ever want to generate this once
374 if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
375 rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
376 fi
377
378 # We really don't want to use or support old PolicyKit cause it
379 # screws with the new polkit integration
380 if has_version sys-auth/policykit; then
381 rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy
382 fi
383
384 # Only sysctl files ending in .conf work
385 mv "${D}"/etc/sysctl.d/libvirtd "${D}"/etc/sysctl.d/libvirtd.conf
386 }
387
388 pkg_postinst() {
389 use python && python_mod_optimize libvirt.py
390
391 # support for dropped privileges
392 if use qemu; then
393 fperms 0750 "${EROOT}/var/lib/libvirt/qemu"
394 fperms 0750 "${EROOT}/var/cache/libvirt/qemu"
395 fi
396
397 if use caps && use qemu; then
398 fowners -R qemu:qemu "${EROOT}/var/lib/libvirt/qemu"
399 fowners -R qemu:qemu "${EROOT}/var/cache/libvirt/qemu"
400 elif use qemu; then
401 fowners -R root:root "${EROOT}/var/lib/libvirt/qemu"
402 fowners -R root:root "${EROOT}/var/cache/libvirt/qemu"
403 fi
404
405 if ! use policykit; then
406 elog "To allow normal users to connect to libvirtd you must change the"
407 elog "unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
408 fi
409
410 use libvirtd || return 0
411 # From here, only libvirtd-related instructions, be warned!
412
413 elog
414 elog "For the basic networking support (bridged and routed networks)"
415 elog "you don't need any extra software. For more complex network modes"
416 elog "including but not limited to NATed network, you can enable the"
417 elog "'virt-network' USE flag."
418 elog
419 if has_version net-dns/dnsmasq; then
420 ewarn "If you have a DNS server setup on your machine, you will have"
421 ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
422 ewarn " bind-interfaces"
423 ewarn " interface or except-interface"
424 ewarn
425 ewarn "Otherwise you might have issues with your existing DNS server."
426 fi
427
428 if use caps && use qemu; then
429 elog "libvirt will now start qemu/kvm VMs with non-root privileges."
430 elog "Ensure any resources your VMs use are accessible by qemu:qemu"
431 fi
432 }
433
434 pkg_postrm() {
435 use python && python_mod_cleanup libvirt.py
436 }