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-9999.ebuild ChangeLog
Date: Sat, 12 Feb 2011 04:57:56
Message-Id: 20110212045745.5BC0F20054@flycatcher.gentoo.org
1 cardoe 11/02/12 04:57:45
2
3 Modified: ChangeLog
4 Added: libvirt-9999.ebuild
5 Log:
6 Initial live ebuild
7
8 (Portage version: 2.1.9.39/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.91 app-emulation/libvirt/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?rev=1.91&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?rev=1.91&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/ChangeLog?r1=1.90&r2=1.91
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v
20 retrieving revision 1.90
21 retrieving revision 1.91
22 diff -u -r1.90 -r1.91
23 --- ChangeLog 4 Feb 2011 17:39:52 -0000 1.90
24 +++ ChangeLog 12 Feb 2011 04:57:45 -0000 1.91
25 @@ -1,6 +1,11 @@
26 # ChangeLog for app-emulation/libvirt
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.90 2011/02/04 17:39:52 angelos Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/ChangeLog,v 1.91 2011/02/12 04:57:45 cardoe Exp $
30 +
31 +*libvirt-9999 (12 Feb 2011)
32 +
33 + 12 Feb 2011; Doug Goldstein <cardoe@g.o> +libvirt-9999.ebuild:
34 + Initial live ebuild
35
36 04 Feb 2011; <angelos@g.o> libvirt-0.8.7.ebuild:
37 Stable on amd64 (bug #352277)
38
39
40
41 1.1 app-emulation/libvirt/libvirt-9999.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/libvirt-9999.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-emulation/libvirt/libvirt-9999.ebuild?rev=1.1&content-type=text/plain
45
46 Index: libvirt-9999.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/app-emulation/libvirt/libvirt-9999.ebuild,v 1.1 2011/02/12 04:57:45 cardoe Exp $
51
52 #BACKPORTS=1
53
54 EAPI="2"
55
56 if [[ ${PV} = *9999* ]]; then
57 EGIT_REPO_URI="git://libvirt.org/libvirt.git"
58 GIT_ECLASS="git"
59 AUTOTOOLIZE=yes
60 fi
61
62 PYTHON_DEPEND="python? 2:2.4"
63 #RESTRICT_PYTHON_ABIS="3.*"
64 #SUPPORT_PYTHON_ABIS="1"
65
66 inherit eutils python ${AUTOTOOLIZE+autotools}
67
68 if [[ ${PV} = *9999* ]]; then
69 SRC_URI=""
70 KEYWORDS=""
71 else
72 SRC_URI="http://libvirt.org/sources/${P}.tar.gz
73 ${BACKPORTS:+
74 http://dev.gentoo.org/~flameeyes/${PN}/${P}-backports-${BACKPORTS}.tar.bz2
75 http://dev.gentoo.org/~cardoe/${PN}/${P}-backports-${BACKPORTS}.tar.bz2}"
76 KEYWORDS="~amd64 ~x86"
77 fi
78
79 DESCRIPTION="C toolkit to manipulate virtual machines"
80 HOMEPAGE="http://www.libvirt.org/"
81 LICENSE="LGPL-2.1"
82 SLOT="0"
83 IUSE="avahi caps debug iscsi +json +libvirtd lvm +lxc macvtap +network nfs \
84 nls numa openvz parted pcap phyp policykit python qemu sasl selinux udev \
85 uml virtualbox virt-network xen"
86 # IUSE=one : bug #293416 & bug #299011
87
88 RDEPEND="sys-libs/readline
89 sys-libs/ncurses
90 >=net-misc/curl-7.18.0
91 >=dev-libs/libxml2-2.7.6
92 >=dev-libs/libnl-1.1
93 >=net-libs/gnutls-1.0.25
94 sys-fs/sysfsutils
95 sys-apps/util-linux
96 >=net-analyzer/netcat6-1.0-r2
97 avahi? ( >=net-dns/avahi-0.6[dbus] )
98 caps? ( sys-libs/libcap-ng )
99 iscsi? ( sys-block/open-iscsi )
100 json? ( dev-libs/yajl )
101 libvirtd? ( net-misc/bridge-utils )
102 lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
103 macvtap? ( >=dev-libs/libnl-1.1 )
104 nfs? ( net-fs/nfs-utils )
105 numa? ( sys-process/numactl )
106 openvz? ( sys-kernel/openvz-sources )
107 parted? ( >=sys-block/parted-1.8[device-mapper] )
108 pcap? ( >=net-libs/libpcap-1.0.0 )
109 phyp? ( net-libs/libssh2 )
110 policykit? ( >=sys-auth/polkit-0.9 )
111 qemu? ( || ( app-emulation/qemu-kvm >=app-emulation/qemu-0.10.0 app-emulation/qemu-kvm-spice ) )
112 sasl? ( dev-libs/cyrus-sasl )
113 selinux? ( >=sys-libs/libselinux-2.0.85 )
114 virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
115 xen? ( app-emulation/xen-tools app-emulation/xen )
116 udev? ( >=sys-fs/udev-145 >=x11-libs/libpciaccess-0.10.9 )
117 virt-network? ( net-dns/dnsmasq
118 >=net-firewall/iptables-1.4.10
119 net-firewall/ebtables
120 sys-apps/iproute2 )"
121 # one? ( dev-libs/xmlrpc-c )
122 DEPEND="${RDEPEND}
123 dev-util/pkgconfig
124 nls? ( sys-devel/gettext )"
125
126 pkg_setup() {
127 python_set_active_version 2
128 }
129
130 src_prepare() {
131 [[ -n ${BACKPORTS} ]] && \
132 EPATCH_FORCE=yes EPATCH_SUFFIX="patch" EPATCH_SOURCE="${S}/patches" \
133 epatch
134
135 # This is required to be able to run the tests when using the sandbox
136 if [[ ${LD_PRELOAD} == libsandbox.so ]]; then
137 sed -i -e '/LOGNAME/iENV:LD_PRELOAD=libsandbox.so' \
138 "${S}"/tests/commanddata/*.log || die
139 sed -i -e '/DISPLAY/aENV:LD_PRELOAD=libsandbox.so' \
140 "${S}"/tests/commanddata/test6.log || die
141 sed -i -e '/LANG/aENV:LD_PRELOAD=libsandbox.so' \
142 "${S}"/tests/commanddata/test8.log || die
143 fi
144
145 [[ -n ${AUTOTOOLIZE} ]] && eautoreconf
146 }
147
148 src_configure() {
149 local myconf=""
150
151 myconf="${myconf} $(use_enable debug)"
152
153 ## enable/disable daemon, otherwise client only utils
154 myconf="${myconf} $(use_with libvirtd)"
155
156 ## enable/disable the daemon using avahi to find VMs
157 myconf="${myconf} $(use_with avahi)"
158
159 ## hypervisors on the local host
160 myconf="${myconf} $(use_with xen) $(use_with xen xen-inotify)"
161 myconf="${myconf} $(use_with openvz)"
162 myconf="${myconf} $(use_with lxc)"
163 if use virtualbox && has_version app-emulation/virtualbox-ose; then
164 myconf="${myconf} --with-vbox=/usr/lib/virtualbox-ose/"
165 else
166 myconf="${myconf} $(use_with virtualbox vbox)"
167 fi
168 myconf="${myconf} $(use_with uml)"
169 myconf="${myconf} $(use_with qemu)"
170 # doesn't belong with hypervisors but links to libvirtd for some reason
171 #myconf="${myconf} $(use_with one)"
172
173 ## hypervisor protocols
174 myconf="${myconf} $(use_with phyp)"
175 myconf="${myconf} --with-esx"
176
177 ## additional host drivers
178 myconf="${myconf} $(use_with network)"
179 myconf="${myconf} --with-storage-fs"
180 myconf="${myconf} $(use_with lvm storage-lvm)"
181 myconf="${myconf} $(use_with iscsi storage-iscsi)"
182 myconf="${myconf} $(use_with parted storage-disk)"
183 myconf="${myconf} $(use_with lvm storage-mpath)"
184 myconf="${myconf} $(use_with numa numactl)"
185 myconf="${myconf} $(use_with selinux)"
186
187 # udev for device support details
188 myconf="${myconf} $(use_with udev)"
189
190 # linux capability support so we don't need privileged accounts
191 myconf="${myconf} $(use_with caps capng)"
192
193 ## auth stuff
194 myconf="${myconf} $(use_with policykit polkit)"
195 myconf="${myconf} $(use_with sasl)"
196
197 # network biits
198 myconf="${myconf} $(use_with macvtap)"
199 myconf="${myconf} $(use_with pcap libpcap)"
200
201 ## other
202 myconf="${myconf} $(use_enable nls)"
203 myconf="${myconf} $(use_with python)"
204 myconf="${myconf} $(use_with json yajl)"
205
206 ## stuff we don't yet support
207 myconf="${myconf} --without-netcf --without-audit"
208
209 # we use udev over hal
210 myconf="${myconf} --without-hal"
211
212 # this is a nasty trick to work around the problem in bug
213 # #275073. The reason why we don't solve this properly is that
214 # it'll require us to rebuild autotools (and we don't really want
215 # to do that right now). The proper solution has been sent
216 # upstream and should hopefully land in 0.7.7, in the mean time,
217 # mime the same functionality with this.
218 case ${CHOST} in
219 *cygwin* | *mingw* )
220 ;;
221 *)
222 ac_cv_prog_WINDRES=no
223 ;;
224 esac
225
226 econf \
227 ${myconf} \
228 --disable-static \
229 --docdir=/usr/share/doc/${PF} \
230 --with-remote \
231 --localstatedir=/var \
232 --with-remote-pid-file=/var/run/libvirtd.pid
233 }
234
235 src_test() {
236 # Explicitly allow parallel build of tests
237 emake check || die "tests failed"
238 }
239
240 src_install() {
241 emake install \
242 DESTDIR="${D}" \
243 HTML_DIR=/usr/share/doc/${PF}/html \
244 DOCS_DIR=/usr/share/doc/${PF}/python \
245 EXAMPLE_DIR=/usr/share/doc/${PF}/python/examples \
246 || die "emake install failed"
247
248 find "${D}" -name '*.la' -delete || die
249
250 use libvirtd || return 0
251 # From here, only libvirtd-related instructions, be warned!
252
253 newinitd "${FILESDIR}/libvirtd.init-r2" libvirtd || die
254 newconfd "${FILESDIR}/libvirtd.confd-r2" libvirtd || die
255
256 keepdir /var/lib/libvirt/images
257 }
258
259 pkg_preinst() {
260 # we only ever want to generate this once
261 if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
262 rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
263 fi
264
265 # We really don't want to use or support old PolicyKit cause it
266 # screws with the new polkit integration
267 if has_version sys-auth/policykit; then
268 rm -rf "${D}"/usr/share/PolicyKit/policy/org.libvirt.unix.policy
269 fi
270 }
271
272 pkg_postinst() {
273 use python && python_mod_optimize $(python_get_sitedir)/libvirt.py
274
275 elog
276 if use policykit && has_version sys-auth/policykit; then
277 elog "You must have run the following at least once:"
278 elog
279 elog "$ polkit-auth --grant org.libvirt.unix.manage --user \"USERNAME\""
280 elog
281 elog "to grant USERNAME access to libvirt when using USE=policykit"
282 else
283 elog "To allow normal users to connect to libvirtd you must change the"
284 elog " unix sock group and/or perms in /etc/libvirt/libvirtd.conf"
285 fi
286
287 use libvirtd || return 0
288 # From here, only libvirtd-related instructions, be warned!
289
290 elog
291 elog "For the basic networking support (bridged and routed networks)"
292 elog "you don't need any extra software. For more complex network modes"
293 elog "including but not limited to NATed network, you can enable the"
294 elog "'virt-network' USE flag."
295 elog
296 if has_version net-dns/dnsmasq; then
297 ewarn "If you have a DNS server setup on your machine, you will have"
298 ewarn "to configure /etc/dnsmasq.conf to enable the following settings: "
299 ewarn " bind-interfaces"
300 ewarn " interface or except-interface"
301 ewarn
302 ewarn "Otherwise you might have issues with your existing DNS server."
303 fi
304 }
305
306 pkg_postrm() {
307 use python && python_mod_cleanup $(python_get_sitedir)/libvirt.py
308 }