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