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/files/, app-emulation/libvirt/
Date: Tue, 30 Jan 2018 17:08:42
Message-Id: 1517331971.c2ed1c8684ce24e9be429594b8562b3ac256fde3.tamiko@gentoo
1 commit: c2ed1c8684ce24e9be429594b8562b3ac256fde3
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 30 17:06:11 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 30 17:06:11 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2ed1c86
7
8 app-emulation/libvirt: drop obsolete
9
10 Package-Manager: Portage-2.3.20, Repoman-2.3.6
11
12 .../libvirt-3.10.0-fix_paths_for_apparmor.patch | 118 -------
13 app-emulation/libvirt/libvirt-3.10.0-r1.ebuild | 382 ---------------------
14 2 files changed, 500 deletions(-)
15
16 diff --git a/app-emulation/libvirt/files/libvirt-3.10.0-fix_paths_for_apparmor.patch b/app-emulation/libvirt/files/libvirt-3.10.0-fix_paths_for_apparmor.patch
17 deleted file mode 100644
18 index 0e386c1e00b..00000000000
19 --- a/app-emulation/libvirt/files/libvirt-3.10.0-fix_paths_for_apparmor.patch
20 +++ /dev/null
21 @@ -1,118 +0,0 @@
22 -diff --git a/examples/Makefile.am b/examples/Makefile.am
23 -index ef2f79d..d8cdb9b 100644
24 ---- a/examples/Makefile.am
25 -+++ b/examples/Makefile.am
26 -@@ -23,7 +23,7 @@ EXTRA_DIST = \
27 - apparmor/TEMPLATE.lxc \
28 - apparmor/libvirt-qemu \
29 - apparmor/libvirt-lxc \
30 -- apparmor/usr.lib.libvirt.virt-aa-helper \
31 -+ apparmor/usr.libexec.virt-aa-helper \
32 - apparmor/usr.sbin.libvirtd \
33 - lxcconvert/virt-lxc-convert \
34 - polkit/libvirt-acl.rules \
35 -@@ -70,7 +70,7 @@ admin_logging_SOURCES = admin/logging.c
36 - if WITH_APPARMOR_PROFILES
37 - apparmordir = $(sysconfdir)/apparmor.d/
38 - apparmor_DATA = \
39 -- apparmor/usr.lib.libvirt.virt-aa-helper \
40 -+ apparmor/usr.libexec.virt-aa-helper \
41 - apparmor/usr.sbin.libvirtd \
42 - $(NULL)
43 -
44 -diff --git a/examples/apparmor/libvirt-qemu b/examples/apparmor/libvirt-qemu
45 -index d4fad85..0b22009 100644
46 ---- a/examples/apparmor/libvirt-qemu
47 -+++ b/examples/apparmor/libvirt-qemu
48 -@@ -86,6 +86,8 @@
49 - /usr/share/AAVMF/** r,
50 - /usr/share/qemu-efi/** r,
51 - /usr/share/slof/** r,
52 -+ /usr/share/seavgabios/** r,
53 -+ /usr/share/edk2-ovmf/** r,
54 -
55 - # access PKI infrastructure
56 - /etc/pki/libvirt-vnc/** r,
57 -diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
58 -deleted file mode 100644
59 -index bd6181d..0000000
60 ---- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
61 -+++ /dev/null
62 -@@ -1,60 +0,0 @@
63 --# Last Modified: Mon Apr 5 15:10:27 2010
64 --#include <tunables/global>
65 --
66 --profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
67 -- #include <abstractions/base>
68 --
69 -- # needed for searching directories
70 -- capability dac_override,
71 -- capability dac_read_search,
72 --
73 -- # needed for when disk is on a network filesystem
74 -- network inet,
75 -- network inet6,
76 --
77 -- deny @{PROC}/[0-9]*/mounts r,
78 -- @{PROC}/[0-9]*/net/psched r,
79 -- owner @{PROC}/[0-9]*/status r,
80 -- @{PROC}/filesystems r,
81 --
82 -- /etc/libnl-3/classid r,
83 --
84 -- # for hostdev
85 -- /sys/devices/ r,
86 -- /sys/devices/** r,
87 -- deny /dev/sd* r,
88 -- deny /dev/vd* r,
89 -- deny /dev/dm-* r,
90 -- deny /dev/drbd[0-9]* r,
91 -- deny /dev/dasd* r,
92 -- deny /dev/nvme* r,
93 -- deny /dev/zd[0-9]* r,
94 -- deny /dev/mapper/ r,
95 -- deny /dev/mapper/* r,
96 --
97 -- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
98 -- /{usr/,}sbin/apparmor_parser Ux,
99 --
100 -- /etc/apparmor.d/libvirt/* r,
101 -- /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
102 --
103 -- # for backingstore -- allow access to non-hidden files in @{HOME} as well
104 -- # as storage pools
105 -- audit deny @{HOME}/.* mrwkl,
106 -- audit deny @{HOME}/.*/ rw,
107 -- audit deny @{HOME}/.*/** mrwkl,
108 -- audit deny @{HOME}/bin/ rw,
109 -- audit deny @{HOME}/bin/** mrwkl,
110 -- @{HOME}/ r,
111 -- @{HOME}/** r,
112 -- /var/lib/libvirt/images/ r,
113 -- /var/lib/libvirt/images/** r,
114 -- /{media,mnt,opt,srv}/** r,
115 --
116 -- /**.img r,
117 -- /**.qcow{,2} r,
118 -- /**.qed r,
119 -- /**.vmdk r,
120 -- /**.[iI][sS][oO] r,
121 -- /**/disk{,.*} r,
122 --}
123 -diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
124 -index 8d61d15..656a559 100644
125 ---- a/examples/apparmor/usr.sbin.libvirtd
126 -+++ b/examples/apparmor/usr.sbin.libvirtd
127 -@@ -84,8 +84,10 @@
128 - audit deny /sys/kernel/security/apparmor/.* rwxl,
129 - /sys/kernel/security/apparmor/profiles r,
130 - /usr/{lib,lib64}/libvirt/* PUxr,
131 -- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
132 -- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
133 -+ /usr/libexec/virt-aa-helper PUxr,
134 -+ /usr/libexec/libvirt_lxc PUxr,
135 -+ /usr/libexec/libvirt_parthelper ix,
136 -+ /usr/libexec/libvirt_iohelper ix,
137 - /etc/libvirt/hooks/** rmix,
138 - /etc/xen/scripts/** rmix,
139 -
140
141 diff --git a/app-emulation/libvirt/libvirt-3.10.0-r1.ebuild b/app-emulation/libvirt/libvirt-3.10.0-r1.ebuild
142 deleted file mode 100644
143 index cfdcbb6c994..00000000000
144 --- a/app-emulation/libvirt/libvirt-3.10.0-r1.ebuild
145 +++ /dev/null
146 @@ -1,382 +0,0 @@
147 -# Copyright 1999-2017 Gentoo Foundation
148 -# Distributed under the terms of the GNU General Public License v2
149 -
150 -EAPI=6
151 -
152 -inherit autotools eutils user linux-info systemd readme.gentoo-r1
153 -
154 -if [[ ${PV} = *9999* ]]; then
155 - inherit git-r3
156 - EGIT_REPO_URI="git://libvirt.org/libvirt.git"
157 - SRC_URI=""
158 - KEYWORDS=""
159 - SLOT="0"
160 -else
161 - # Versions with 4 numbers are stable updates:
162 - if [[ ${PV} =~ ^[0-9]+(\.[0-9]+){3} ]]; then
163 - SRC_URI="http://libvirt.org/sources/stable_updates/${P}.tar.xz"
164 - else
165 - SRC_URI="http://libvirt.org/sources/${P}.tar.xz"
166 - fi
167 - KEYWORDS="~amd64 ~arm64 ~x86"
168 - SLOT="0/${PV}"
169 -fi
170 -
171 -DESCRIPTION="C toolkit to manipulate virtual machines"
172 -HOMEPAGE="http://www.libvirt.org/"
173 -LICENSE="LGPL-2.1"
174 -IUSE="
175 - apparmor audit +caps +dbus firewalld fuse glusterfs iscsi +libvirtd lvm
176 - libssh lxc +macvtap nfs nls numa openvz parted pcap phyp policykit
177 - +qemu rbd sasl selinux +udev uml +vepa virtualbox virt-network
178 - wireshark-plugins xen zeroconf zfs
179 -"
180 -
181 -REQUIRED_USE="
182 - firewalld? ( virt-network )
183 - libvirtd? ( || ( lxc openvz qemu uml virtualbox xen ) )
184 - lxc? ( caps libvirtd )
185 - openvz? ( libvirtd )
186 - policykit? ( dbus )
187 - qemu? ( libvirtd )
188 - uml? ( libvirtd )
189 - vepa? ( macvtap )
190 - virt-network? ( libvirtd )
191 - virtualbox? ( libvirtd )
192 - xen? ( libvirtd )"
193 -
194 -# gettext.sh command is used by the libvirt command wrappers, and it's
195 -# non-optional, so put it into RDEPEND.
196 -# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
197 -# package will use 3 by default. Since we don't have slot pinning in an API,
198 -# we must go with the most recent
199 -RDEPEND="
200 - app-misc/scrub
201 - dev-libs/libgcrypt:0
202 - dev-libs/libnl:3
203 - >=dev-libs/libxml2-2.7.6
204 - || ( >=net-analyzer/netcat6-1.0-r2 >=net-analyzer/openbsd-netcat-1.105-r1 )
205 - >=net-libs/gnutls-1.0.25:0=
206 - net-libs/libssh2
207 - net-libs/libtirpc
208 - net-libs/rpcsvc-proto
209 - >=net-misc/curl-7.18.0
210 - sys-apps/dmidecode
211 - >=sys-apps/util-linux-2.17
212 - sys-devel/gettext
213 - sys-libs/ncurses:0=
214 - sys-libs/readline:=
215 - apparmor? ( sys-libs/libapparmor )
216 - audit? ( sys-process/audit )
217 - caps? ( sys-libs/libcap-ng )
218 - dbus? ( sys-apps/dbus )
219 - firewalld? ( net-firewall/firewalld )
220 - fuse? ( >=sys-fs/fuse-2.8.6:= )
221 - glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
222 - iscsi? ( sys-block/open-iscsi )
223 - libssh? ( net-libs/libssh )
224 - lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
225 - nfs? ( net-fs/nfs-utils )
226 - numa? (
227 - >sys-process/numactl-2.0.2
228 - sys-process/numad
229 - )
230 - parted? (
231 - >=sys-block/parted-1.8[device-mapper]
232 - sys-fs/lvm2[-device-mapper-only(-)]
233 - )
234 - pcap? ( >=net-libs/libpcap-1.0.0 )
235 - policykit? ( >=sys-auth/polkit-0.9 )
236 - qemu? (
237 - >=app-emulation/qemu-0.13.0
238 - dev-libs/yajl
239 - )
240 - rbd? ( sys-cluster/ceph )
241 - sasl? ( dev-libs/cyrus-sasl )
242 - selinux? ( >=sys-libs/libselinux-2.0.85 )
243 - virt-network? (
244 - net-dns/dnsmasq[script]
245 - net-firewall/ebtables
246 - >=net-firewall/iptables-1.4.10[ipv6]
247 - net-misc/radvd
248 - sys-apps/iproute2[-minimal]
249 - )
250 - virtualbox? ( || ( app-emulation/virtualbox >=app-emulation/virtualbox-bin-2.2.0 ) )
251 - wireshark-plugins? ( net-analyzer/wireshark:= )
252 - xen? (
253 - app-emulation/xen
254 - app-emulation/xen-tools:=
255 - )
256 - udev? (
257 - virtual/udev
258 - >=x11-libs/libpciaccess-0.10.9
259 - )
260 - zeroconf? ( >=net-dns/avahi-0.6[dbus] )
261 - zfs? ( sys-fs/zfs )"
262 -
263 -DEPEND="${RDEPEND}
264 - app-text/xhtml1
265 - dev-lang/perl
266 - dev-libs/libxslt
267 - dev-perl/XML-XPath
268 - virtual/pkgconfig"
269 -
270 -PATCHES=(
271 - "${FILESDIR}"/${PN}-1.3.0-do_not_use_sysconf.patch
272 - "${FILESDIR}"/${PN}-1.2.16-fix_paths_in_libvirt-guests_sh.patch
273 - "${FILESDIR}"/${PN}-3.10.0-fix_paths_for_apparmor.patch
274 - "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
275 - "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488
276 -)
277 -
278 -pkg_setup() {
279 - if use qemu; then
280 - enewgroup qemu 77
281 - enewuser qemu 77 -1 -1 "qemu,kvm"
282 - fi
283 -
284 - use policykit && enewgroup libvirt
285 -
286 - # Check kernel configuration:
287 - CONFIG_CHECK=""
288 - use fuse && CONFIG_CHECK+="
289 - ~FUSE_FS"
290 -
291 - use lvm && CONFIG_CHECK+="
292 - ~BLK_DEV_DM
293 - ~DM_MULTIPATH
294 - ~DM_SNAPSHOT"
295 -
296 - use lxc && CONFIG_CHECK+="
297 - ~BLK_CGROUP
298 - ~CGROUP_CPUACCT
299 - ~CGROUP_DEVICE
300 - ~CGROUP_FREEZER
301 - ~CGROUP_NET_PRIO
302 - ~CGROUP_PERF
303 - ~CGROUPS
304 - ~CGROUP_SCHED
305 - ~CPUSETS
306 - ~IPC_NS
307 - ~MACVLAN
308 - ~NAMESPACES
309 - ~NET_CLS_CGROUP
310 - ~NET_NS
311 - ~PID_NS
312 - ~POSIX_MQUEUE
313 - ~SECURITYFS
314 - ~USER_NS
315 - ~UTS_NS
316 - ~VETH
317 - ~!GRKERNSEC_CHROOT_MOUNT
318 - ~!GRKERNSEC_CHROOT_DOUBLE
319 - ~!GRKERNSEC_CHROOT_PIVOT
320 - ~!GRKERNSEC_CHROOT_CHMOD
321 - ~!GRKERNSEC_CHROOT_CAPS"
322 -
323 - kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
324 - ~DEVPTS_MULTIPLE_INSTANCES"
325 -
326 - use macvtap && CONFIG_CHECK+="
327 - ~MACVTAP"
328 -
329 - use virt-network && CONFIG_CHECK+="
330 - ~BRIDGE_EBT_MARK_T
331 - ~BRIDGE_NF_EBTABLES
332 - ~NETFILTER_ADVANCED
333 - ~NETFILTER_XT_CONNMARK
334 - ~NETFILTER_XT_MARK
335 - ~NETFILTER_XT_TARGET_CHECKSUM"
336 - # Bandwidth Limiting Support
337 - use virt-network && CONFIG_CHECK+="
338 - ~BRIDGE_EBT_T_NAT
339 - ~NET_ACT_POLICE
340 - ~NET_CLS_FW
341 - ~NET_CLS_U32
342 - ~NET_SCH_HTB
343 - ~NET_SCH_INGRESS
344 - ~NET_SCH_SFQ"
345 -
346 - # Handle specific kernel versions for different features
347 - kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
348 - if kernel_is ge 3 6; then
349 - CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
350 - kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
351 - fi
352 -
353 - ERROR_USER_NS="Optional depending on LXC configuration."
354 -
355 - if [[ -n ${CONFIG_CHECK} ]]; then
356 - linux-info_pkg_setup
357 - fi
358 -}
359 -
360 -src_prepare() {
361 - touch "${S}/.mailmap"
362 -
363 - default
364 -
365 - if [[ ${PV} = *9999* ]]; then
366 - # git checkouts require bootstrapping to create the configure script.
367 - # Additionally the submodules must be cloned to the right locations
368 - # bug #377279
369 - ./bootstrap || die "bootstrap failed"
370 - (
371 - git submodule status | sed 's/^[ +-]//;s/ .*//'
372 - git hash-object bootstrap.conf
373 - ) >.git-module-status
374 - fi
375 -
376 - # Tweak the init script:
377 - cp "${FILESDIR}/libvirtd.init-r16" "${S}/libvirtd.init" || die
378 - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
379 - -e "s/USE_FLAG_AVAHI/$(usex zeroconf 'use avahi-daemon' '')/" \
380 - -e "s/USE_FLAG_ISCSI/$(usex iscsi 'use iscsid' '')/" \
381 - -e "s/USE_FLAG_RBD/$(usex rbd 'use ceph' '')/" \
382 - -i "${S}/libvirtd.init" || die "sed failed"
383 -
384 - eautoreconf
385 -}
386 -
387 -src_configure() {
388 - local myeconfargs=(
389 - $(use_with apparmor)
390 - $(use_with apparmor apparmor-profiles)
391 - $(use_with audit)
392 - $(use_with caps capng)
393 - $(use_with dbus)
394 - $(use_with firewalld)
395 - $(use_with fuse)
396 - $(use_with glusterfs)
397 - $(use_with glusterfs storage-gluster)
398 - $(use_with iscsi storage-iscsi)
399 - $(use_with libvirtd)
400 - $(use_with libssh)
401 - $(use_with lvm storage-lvm)
402 - $(use_with lvm storage-mpath)
403 - $(use_with lxc)
404 - $(use_with macvtap)
405 - $(use_enable nls)
406 - $(use_with numa numactl)
407 - $(use_with numa numad)
408 - $(use_with openvz)
409 - $(use_with parted storage-disk)
410 - $(use_with pcap libpcap)
411 - $(use_with phyp)
412 - $(use_with policykit polkit)
413 - $(use_with qemu)
414 - $(use_with qemu yajl)
415 - $(use_with rbd storage-rbd)
416 - $(use_with sasl)
417 - $(use_with selinux)
418 - $(use_with udev)
419 - $(use_with uml)
420 - $(use_with vepa virtualport)
421 - $(use_with virt-network network)
422 - $(use_with wireshark-plugins wireshark-dissector)
423 - $(use_with xen)
424 - $(use_with xen xen-inotify)
425 - $(use_with xen libxl)
426 - $(use_with zeroconf avahi)
427 - $(use_with zfs storage-zfs)
428 -
429 - --without-hal
430 - --without-netcf
431 - --without-sanlock
432 - --without-xenapi
433 -
434 - --with-esx
435 - --with-init-script=systemd
436 - --with-qemu-group=$(usex caps qemu root)
437 - --with-qemu-user=$(usex caps qemu root)
438 - --with-remote
439 - --with-storage-fs
440 - --with-vmware
441 -
442 - --disable-static
443 - --disable-werror
444 -
445 - --with-html-subdir=${PF}/html
446 - --localstatedir=/var
447 - )
448 -
449 - if use virtualbox && has_version app-emulation/virtualbox-ose; then
450 - myeconfargs+=( --with-vbox=/usr/lib/virtualbox-ose/ )
451 - else
452 - myeconfargs+=( $(use_with virtualbox vbox) )
453 - fi
454 -
455 - econf "${myeconfargs[@]}"
456 -
457 - if [[ ${PV} = *9999* ]]; then
458 - # Restore gnulib's config.sub and config.guess
459 - # bug #377279
460 - (cd .gnulib && git reset --hard > /dev/null)
461 - fi
462 -}
463 -
464 -src_test() {
465 - cd "${BUILD_DIR}"
466 -
467 - # remove problematic tests, bug #591416, bug #591418
468 - sed -i -e 's#commandtest$(EXEEXT) # #' \
469 - -e 's#virfirewalltest$(EXEEXT) # #' \
470 - -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
471 - -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
472 - tests/Makefile
473 -
474 - export VIR_TEST_DEBUG=1
475 - HOME="${T}" emake check || die "tests failed"
476 -}
477 -
478 -src_install() {
479 - emake DESTDIR="${D}" \
480 - SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install
481 -
482 - find "${D}" -name '*.la' -delete || die
483 -
484 - # Remove bogus, empty directories. They are either not used, or
485 - # libvirtd is able to create them on demand
486 - rm -rf "${D}"/etc/sysconfig
487 - rm -rf "${D}"/var/cache
488 - rm -rf "${D}"/var/run
489 - rm -rf "${D}"/var/log
490 -
491 - use libvirtd || return 0
492 - # From here, only libvirtd-related instructions, be warned!
493 -
494 - systemd_install_serviced \
495 - "${FILESDIR}"/libvirtd.service.conf libvirtd.service
496 -
497 - systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
498 -
499 - newinitd "${S}/libvirtd.init" libvirtd || die
500 - newinitd "${FILESDIR}/libvirt-guests.init-r2" libvirt-guests || die
501 - newinitd "${FILESDIR}/virtlockd.init-r1" virtlockd || die
502 - newinitd "${FILESDIR}/virtlogd.init-r1" virtlogd || die
503 -
504 - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
505 - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
506 -
507 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
508 - DISABLE_AUTOFORMATTING=true
509 - readme.gentoo_create_doc
510 -}
511 -
512 -pkg_preinst() {
513 - # we only ever want to generate this once
514 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
515 - rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml
516 - fi
517 -}
518 -
519 -pkg_postinst() {
520 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
521 - touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml
522 - fi
523 -
524 - use libvirtd || return 0
525 - # From here, only libvirtd-related instructions, be warned!
526 -
527 - readme.gentoo_print_elog
528 -}