Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/
Date: Wed, 03 Feb 2016 04:30:56
Message-Id: 1454473819.9d8d18f317941f3e5bbfceff323eb54f5b360c01.tamiko@gentoo
1 commit: 9d8d18f317941f3e5bbfceff323eb54f5b360c01
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 3 04:30:19 2016 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 3 04:30:19 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d8d18f3
7
8 app-emulation/libvirt: Drop obsolete 1.3.0
9
10 Package-Manager: portage-2.2.26
11
12 app-emulation/libvirt/libvirt-1.3.0.ebuild | 384 -----------------------------
13 1 file changed, 384 deletions(-)
14
15 diff --git a/app-emulation/libvirt/libvirt-1.3.0.ebuild b/app-emulation/libvirt/libvirt-1.3.0.ebuild
16 deleted file mode 100644
17 index 0f03ffa..0000000
18 --- a/app-emulation/libvirt/libvirt-1.3.0.ebuild
19 +++ /dev/null
20 @@ -1,384 +0,0 @@
21 -# Copyright 1999-2015 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
24 -
25 -EAPI=5
26 -
27 -inherit eutils user autotools-utils linux-info systemd readme.gentoo
28 -
29 -BACKPORTS="20151222" # CVE-2015-5313
30 -
31 -if [[ ${PV} = *9999* ]]; then
32 - inherit git-r3
33 - EGIT_REPO_URI="git://libvirt.org/libvirt.git"
34 - SRC_URI=""
35 - KEYWORDS=""
36 - SLOT="0"
37 -else
38 - # Versions with 4 numbers are stable updates:
39 - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
40 - SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.gz"
41 - else
42 - SRC_URI="http://libvirt.org/sources/${P}.tar.gz"
43 - fi
44 - SRC_URI+=" ${BACKPORTS:+
45 - https://dev.gentoo.org/~cardoe/distfiles/${P}-${BACKPORTS}.tar.xz
46 - https://dev.gentoo.org/~tamiko/distfiles/${P}-${BACKPORTS}.tar.xz}"
47 - KEYWORDS="~amd64 ~x86"
48 - SLOT="0/${PV}"
49 -fi
50 -
51 -DESCRIPTION="C toolkit to manipulate virtual machines"
52 -HOMEPAGE="http://www.libvirt.org/"
53 -LICENSE="LGPL-2.1"
54 -IUSE="apparmor audit avahi +caps firewalld fuse glusterfs iscsi +libvirtd lvm \
55 - lxc +macvtap nfs nls numa openvz parted pcap phyp policykit +qemu rbd sasl \
56 - selinux systemd +udev uml +vepa virtualbox virt-network wireshark-plugins \
57 - xen"
58 -
59 -REQUIRED_USE="
60 - firewalld? ( virt-network )
61 - libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
62 - lxc? ( caps libvirtd )
63 - openvz? ( libvirtd )
64 - qemu? ( libvirtd )
65 - uml? ( libvirtd )
66 - vepa? ( macvtap )
67 - virt-network? ( libvirtd )
68 - virtualbox? ( libvirtd )
69 - xen? ( libvirtd )"
70 -
71 -# gettext.sh command is used by the libvirt command wrappers, and it's
72 -# non-optional, so put it into RDEPEND.
73 -# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
74 -# package will use 3 by default. Since we don't have slot pinning in an API,
75 -# we must go with the most recent
76 -RDEPEND="
77 - app-misc/scrub
78 - dev-libs/libgcrypt:0
79 - dev-libs/libnl:3
80 - >=dev-libs/libxml2-2.7.6
81 - >=net-analyzer/netcat6-1.0-r2
82 - >=net-libs/gnutls-1.0.25
83 - net-libs/libssh2
84 - >=net-misc/curl-7.18.0
85 - sys-apps/dmidecode
86 - >=sys-apps/util-linux-2.17
87 - sys-devel/gettext
88 - sys-libs/ncurses:0=
89 - sys-libs/readline:=
90 - apparmor? ( sys-libs/libapparmor )
91 - audit? ( sys-process/audit )
92 - avahi? ( >=net-dns/avahi-0.6[dbus] )
93 - caps? ( sys-libs/libcap-ng )
94 - firewalld? ( net-firewall/firewalld )
95 - fuse? ( >=sys-fs/fuse-2.8.6 )
96 - glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
97 - iscsi? ( sys-block/open-iscsi )
98 - lvm? ( >=sys-fs/lvm2-2.02.48-r2 )
99 - lxc? ( !systemd? ( sys-power/pm-utils ) )
100 - nfs? ( net-fs/nfs-utils )
101 - numa? (
102 - >sys-process/numactl-2.0.2
103 - sys-process/numad
104 - )
105 - openvz? ( sys-kernel/openvz-sources:* )
106 - parted? (
107 - >=sys-block/parted-1.8[device-mapper]
108 - sys-fs/lvm2
109 - )
110 - pcap? ( >=net-libs/libpcap-1.0.0 )
111 - policykit? ( >=sys-auth/polkit-0.9 )
112 - qemu? (
113 - >=app-emulation/qemu-0.13.0
114 - dev-libs/yajl
115 - !systemd? ( sys-power/pm-utils )
116 - )
117 - rbd? ( sys-cluster/ceph )
118 - sasl? ( dev-libs/cyrus-sasl )
119 - selinux? ( >=sys-libs/libselinux-2.0.85 )
120 - systemd? ( sys-apps/systemd )
121 - virt-network? (
122 - net-dns/dnsmasq[script]
123 - net-firewall/ebtables
124 - >=net-firewall/iptables-1.4.10[ipv6]
125 - net-misc/radvd
126 - sys-apps/iproute2[-minimal]
127 - )
128 - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
129 - wireshark-plugins? ( net-analyzer/wireshark:= )
130 - xen? (
131 - app-emulation/xen
132 - app-emulation/xen-tools:=
133 - )
134 - udev? (
135 - virtual/udev
136 - >=x11-libs/libpciaccess-0.10.9
137 - )"
138 -
139 -DEPEND="${RDEPEND}
140 - app-text/xhtml1
141 - dev-lang/perl
142 - dev-libs/libxslt
143 - dev-perl/XML-XPath
144 - virtual/pkgconfig"
145 -
146 -pkg_setup() {
147 - enewgroup qemu 77
148 - enewuser qemu 77 -1 -1 qemu kvm
149 -
150 - # Some people used the masked ebuild which was not adding the qemu
151 - # user to the kvm group originally. This results in VMs failing to
152 - # start for some users. bug #430808
153 - egetent group kvm | grep -q qemu
154 - if [[ $? -ne 0 ]]; then
155 - gpasswd -a qemu kvm
156 - fi
157 -
158 - # Check kernel configuration:
159 - CONFIG_CHECK=""
160 - use fuse && CONFIG_CHECK+="
161 - ~FUSE_FS"
162 -
163 - use lvm && CONFIG_CHECK+="
164 - ~BLK_DEV_DM
165 - ~DM_MULTIPATH
166 - ~DM_SNAPSHOT"
167 -
168 - use lxc && CONFIG_CHECK+="
169 - ~BLK_CGROUP
170 - ~CGROUP_CPUACCT
171 - ~CGROUP_DEVICE
172 - ~CGROUP_FREEZER
173 - ~CGROUP_NET_PRIO
174 - ~CGROUP_PERF
175 - ~CGROUPS
176 - ~CGROUP_SCHED
177 - ~CPUSETS
178 - ~DEVPTS_MULTIPLE_INSTANCES
179 - ~IPC_NS
180 - ~MACVLAN
181 - ~NAMESPACES
182 - ~NET_CLS_CGROUP
183 - ~NET_NS
184 - ~PID_NS
185 - ~POSIX_MQUEUE
186 - ~SECURITYFS
187 - ~USER_NS
188 - ~UTS_NS
189 - ~VETH
190 - ~!GRKERNSEC_CHROOT_MOUNT
191 - ~!GRKERNSEC_CHROOT_DOUBLE
192 - ~!GRKERNSEC_CHROOT_PIVOT
193 - ~!GRKERNSEC_CHROOT_CHMOD
194 - ~!GRKERNSEC_CHROOT_CAPS"
195 - # Handle specific kernel versions for different features
196 - kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
197 - kernel_is ge 3 6 && CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP ~MEMCG_KMEM"
198 -
199 - use macvtap && CONFIG_CHECK+="
200 - ~MACVTAP"
201 -
202 - use virt-network && CONFIG_CHECK+="
203 - ~BRIDGE_EBT_MARK_T
204 - ~BRIDGE_NF_EBTABLES
205 - ~NETFILTER_ADVANCED
206 - ~NETFILTER_XT_CONNMARK
207 - ~NETFILTER_XT_MARK
208 - ~NETFILTER_XT_TARGET_CHECKSUM"
209 - # Bandwidth Limiting Support
210 - use virt-network && CONFIG_CHECK+="
211 - ~BRIDGE_EBT_T_NAT
212 - ~NET_ACT_POLICE
213 - ~NET_CLS_FW
214 - ~NET_CLS_U32
215 - ~NET_SCH_HTB
216 - ~NET_SCH_INGRESS
217 - ~NET_SCH_SFQ"
218 -
219 - ERROR_USER_NS="Optional depending on LXC configuration."
220 -
221 - if [[ -n ${CONFIG_CHECK} ]]; then
222 - linux-info_pkg_setup
223 - fi
224 -}
225 -
226 -src_prepare() {
227 - touch "${S}/.mailmap"
228 -
229 - if [[ ${PV} = *9999* ]]; then
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 \
241 - "${FILESDIR}"/${P}-do_not_use_sysconf.patch \
242 - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch \
243 - "${FILESDIR}"/${PN}-1.2.17-fix_paths_for_apparmor.patch
244 -
245 - [[ -n ${BACKPORTS} ]] &&
246 - EPATCH_FORCE=yes EPATCH_SUFFIX="patch" \
247 - EPATCH_SOURCE="${WORKDIR}/patches" epatch
248 -
249 - epatch_user
250 -
251 - # Tweak the init script:
252 - cp "${FILESDIR}/libvirtd.init-r15" "${S}/libvirtd.init" || die
253 - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
254 - -e "s/USE_FLAG_AVAHI/$(usex avahi avahi-daemon '')/" \
255 - -e "s/USE_FLAG_ISCSI/$(usex iscsi iscsid '')/" \
256 - -e "s/USE_FLAG_RBD/$(usex rbd ceph '')/" \
257 - -i "${S}/libvirtd.init" || die "sed failed"
258 -
259 - AUTOTOOLS_AUTORECONF=true
260 - autotools-utils_src_prepare
261 -}
262 -
263 -src_configure() {
264 - local myeconfargs=(
265 - $(use_with apparmor)
266 - $(use_with apparmor apparmor-profiles)
267 - $(use_with audit)
268 - $(use_with avahi)
269 - $(use_with caps capng)
270 - $(use_with firewalld)
271 - $(use_with fuse)
272 - $(use_with glusterfs)
273 - $(use_with glusterfs storage-gluster)
274 - $(use_with iscsi storage-iscsi)
275 - $(use_with libvirtd)
276 - $(use_with lvm storage-lvm)
277 - $(use_with lvm storage-mpath)
278 - $(use_with lxc)
279 - $(use_with macvtap)
280 - $(use_enable nls)
281 - $(use_with numa numactl)
282 - $(use_with numa numad)
283 - $(use_with openvz)
284 - $(use_with parted storage-disk)
285 - $(use_with pcap libpcap)
286 - $(use_with phyp)
287 - $(use_with policykit polkit)
288 - $(use_with qemu)
289 - $(use_with qemu yajl)
290 - $(use_with rbd storage-rbd)
291 - $(use_with sasl)
292 - $(use_with selinux)
293 - $(use_with systemd systemd-daemon)
294 - $(usex systemd --with-init-script=systemd '')
295 - $(use_with udev)
296 - $(use_with uml)
297 - $(use_with vepa virtualport)
298 - $(use_with virt-network network)
299 - $(use_with wireshark-plugins wireshark-dissector)
300 - $(use_with xen)
301 - $(use_with xen xen-inotify)
302 - $(usex xen --with-libxl '')
303 -
304 - --without-hal
305 - --without-netcf
306 - --without-sanlock
307 - --without-xenapi
308 - --with-esx
309 - --with-qemu-group=$(usex caps qemu root)
310 - --with-qemu-user=$(usex caps qemu root)
311 - --with-remote
312 - --with-storage-fs
313 - --with-vmware
314 -
315 - --disable-static
316 - --disable-werror
317 -
318 - --with-html-subdir=${PF}/html
319 - --localstatedir=/var
320 - )
321 -
322 - if use virtualbox && has_version app-emulation/virtualbox-ose; then
323 - myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
324 - else
325 - myeconfargs+=( $(use_with virtualbox vbox) )
326 - fi
327 -
328 - autotools-utils_src_configure
329 -
330 - if [[ ${PV} = *9999* ]]; then
331 - # Restore gnulib's config.sub and config.guess
332 - # bug #377279
333 - (cd .gnulib && git reset --hard > /dev/null)
334 - fi
335 -
336 - # Workaround: Sometimes this subdirectory is missing and leads to a
337 - # build failure.
338 - mkdir -p "${BUILD_DIR}"/docs/internals
339 -}
340 -
341 -src_test() {
342 - # Explicitly allow parallel build of tests
343 - export VIR_TEST_DEBUG=1
344 - HOME="${T}" emake check || die "tests failed"
345 -}
346 -
347 -src_install() {
348 - autotools-utils_src_compile install \
349 - DESTDIR="${D}" \
350 - SYSTEMD_UNIT_DIR="$(systemd_get_unitdir)"
351 -
352 - find "${D}" -name '*.la' -delete || die
353 -
354 - # Remove bogus, empty directories. They are either not used, or
355 - # libvirtd is able to create them on demand
356 - rm -rf "${D}"/etc/sysconfig
357 - rm -rf "${D}"/var/cache
358 - rm -rf "${D}"/var/run
359 - rm -rf "${D}"/var/log
360 -
361 - use libvirtd || return 0
362 - # From here, only libvirtd-related instructions, be warned!
363 -
364 - use systemd && systemd_install_serviced \
365 - "${FILESDIR}"/libvirtd.service.conf libvirtd.service
366 -
367 - systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
368 -
369 - newinitd "${S}/libvirtd.init" libvirtd || die
370 - newinitd "${FILESDIR}/libvirt-guests.init-r1" libvirt-guests || die
371 - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
372 - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
373 -
374 - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
375 - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
376 -
377 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1")
378 - DISABLE_AUTOFORMATTING=true
379 - readme.gentoo_create_doc
380 -}
381 -
382 -pkg_preinst() {
383 - # we only ever want to generate this once
384 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
385 - rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
386 - fi
387 -}
388 -
389 -pkg_postinst() {
390 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
391 - touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
392 - fi
393 -
394 - use libvirtd || return 0
395 - # From here, only libvirtd-related instructions, be warned!
396 -
397 - if [[ -n ${REPLACING_VERSIONS} ]] && ! version_is_at_least 1.2.18-r2 ${REPLACING_VERSIONS} ]]; then
398 - FORCE_PRINT_ELOG=true
399 - fi
400 -
401 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r1")
402 - DISABLE_AUTOFORMATTING=true
403 - readme.gentoo_print_elog
404 -}