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