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