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: Fri, 25 Dec 2020 20:03:48
Message-Id: 1608926611.80d5e81147f726e386e76c37fb24df12c4db9077.tamiko@gentoo
1 commit: 80d5e81147f726e386e76c37fb24df12c4db9077
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 25 20:03:31 2020 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 25 20:03:31 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80d5e811
7
8 app-emulation/libvirt: drop vulnerable
9
10 Bug: https://bugs.gentoo.org/746119
11 Package-Manager: Portage-3.0.12, Repoman-3.0.2
12 Signed-off-by: Matthias Maier <tamiko <AT> gentoo.org>
13
14 app-emulation/libvirt/Manifest | 1 -
15 app-emulation/libvirt/libvirt-6.7.0.ebuild | 344 -----------------------------
16 2 files changed, 345 deletions(-)
17
18 diff --git a/app-emulation/libvirt/Manifest b/app-emulation/libvirt/Manifest
19 index f08670f2237..467d5d9b454 100644
20 --- a/app-emulation/libvirt/Manifest
21 +++ b/app-emulation/libvirt/Manifest
22 @@ -1,4 +1,3 @@
23 DIST libvirt-6.10.0.tar.xz 8462796 BLAKE2B f1188cc869768682bdcb7ab763465705413ebc4fe418e37d4f5ef6a861507c4104a1844cd533fce905e24847918eba6e4e4f054f66b112e9fb54ee19a3653dfc SHA512 42e77a3542e9f15c3aeaab1639a80ee6539cb0f09a1e8324aa0059a8f6041acf20263a9556ac65c9a7a14693b0756020231085e4556ff54cf8329110018a2485
24 -DIST libvirt-6.7.0.tar.xz 8362140 BLAKE2B d0afe33fcdaab3cc0f2ea8c552e7550bcece018b049a3b58e5c05ee85b39e2b3ebf42fa1b70ddb1d2a541d1114b6b49734f23a889b3589397a30a672f27a3a56 SHA512 cabfb6aa65a3a1412b0111654ad3a7d0a6dfc63399a892c540ca39ab4e56f87626a067037e4480bb55418a371d2b5e9ac74862c92a3cdea69822ec3d158d769f
25 DIST libvirt-6.8.0.tar.xz 8412092 BLAKE2B c118ca6b263054bb6941c62f3d1415f7ed1a3f29a35294272d04bc726643247ee5691e0310a1bf013faeba856d7aadd00a90fe8dbdca6ff4c7eb480e94d92fa2 SHA512 9b69f3dcceb5e40470a78908654faf51b643f6793e556f3115daa4bfe08743af290882dd51f15eb27c38d589eb210d495de7c44a40b363420ab4f4d3a6393cc9
26 DIST libvirt-6.9.0.tar.xz 8432360 BLAKE2B 5cf577017158bab3ec5ad55e8e5944f4efd88cb3eb5460355ad0bfc1a30dba5c607b5b3523b8f9095552c494129ccb19bb89a6a0791469d5d47052c2375fa940 SHA512 ca9aed93589e91d383f9a5bddf5ba9fa20b849ba3b302017d625ba4910a0f942d1531006ddeaaa2622d121808105dec6e9bcb0c867f62e2fc546ce043675e175
27
28 diff --git a/app-emulation/libvirt/libvirt-6.7.0.ebuild b/app-emulation/libvirt/libvirt-6.7.0.ebuild
29 deleted file mode 100644
30 index 3a482bab5e2..00000000000
31 --- a/app-emulation/libvirt/libvirt-6.7.0.ebuild
32 +++ /dev/null
33 @@ -1,344 +0,0 @@
34 -# Copyright 1999-2020 Gentoo Authors
35 -# Distributed under the terms of the GNU General Public License v2
36 -
37 -EAPI=7
38 -
39 -PYTHON_COMPAT=( python3_{7,8,9} )
40 -
41 -inherit meson bash-completion-r1 eutils linux-info python-any-r1 readme.gentoo-r1 systemd
42 -
43 -if [[ ${PV} = *9999* ]]; then
44 - inherit git-r3
45 - EGIT_REPO_URI="https://gitlab.com/libvirt/libvirt.git"
46 - SRC_URI=""
47 - SLOT="0"
48 -else
49 - SRC_URI="https://libvirt.org/sources/${P}.tar.xz"
50 - KEYWORDS="amd64 ~arm64 ~ppc64 x86"
51 - SLOT="0/${PV}"
52 -fi
53 -
54 -DESCRIPTION="C toolkit to manipulate virtual machines"
55 -HOMEPAGE="https://www.libvirt.org/"
56 -LICENSE="LGPL-2.1"
57 -IUSE="
58 - apparmor audit +caps +dbus dtrace firewalld fuse glusterfs iscsi
59 - iscsi-direct +libvirtd lvm libssh lxc +macvtap nfs nls numa openvz
60 - parted pcap policykit +qemu rbd sasl selinux +udev +vepa
61 - virtualbox +virt-network wireshark-plugins xen zfs
62 -"
63 -
64 -REQUIRED_USE="
65 - firewalld? ( virt-network )
66 - libvirtd? ( || ( lxc openvz qemu virtualbox xen ) )
67 - lxc? ( caps libvirtd )
68 - openvz? ( libvirtd )
69 - policykit? ( dbus )
70 - qemu? ( libvirtd )
71 - vepa? ( macvtap )
72 - virt-network? ( libvirtd )
73 - virtualbox? ( libvirtd )
74 - xen? ( libvirtd )"
75 -
76 -BDEPEND="
77 - acct-user/qemu
78 - policykit? ( acct-group/libvirt )
79 - app-text/xhtml1
80 - dev-lang/perl
81 - dev-libs/libxslt
82 - dev-perl/XML-XPath
83 - dev-python/docutils
84 - virtual/pkgconfig"
85 -
86 -# gettext.sh command is used by the libvirt command wrappers, and it's
87 -# non-optional, so put it into RDEPEND.
88 -# We can use both libnl:1.1 and libnl:3, but if you have both installed, the
89 -# package will use 3 by default. Since we don't have slot pinning in an API,
90 -# we must go with the most recent
91 -RDEPEND="
92 - app-misc/scrub
93 - >=dev-libs/glib-2.48.0
94 - dev-libs/libgcrypt:0
95 - dev-libs/libnl:3
96 - >=dev-libs/libxml2-2.7.6
97 - >=net-analyzer/openbsd-netcat-1.105-r1
98 - >=net-libs/gnutls-1.0.25:0=
99 - net-libs/libssh2
100 - net-libs/libtirpc
101 - net-libs/rpcsvc-proto
102 - >=net-misc/curl-7.18.0
103 - sys-apps/dmidecode
104 - sys-devel/gettext
105 - sys-libs/ncurses:0=
106 - sys-libs/readline:=
107 - apparmor? ( sys-libs/libapparmor )
108 - audit? ( sys-process/audit )
109 - caps? ( sys-libs/libcap-ng )
110 - dbus? ( sys-apps/dbus )
111 - dtrace? ( dev-util/systemtap )
112 - firewalld? ( >=net-firewall/firewalld-0.6.3 )
113 - fuse? ( sys-fs/fuse:0= )
114 - glusterfs? ( >=sys-cluster/glusterfs-3.4.1 )
115 - iscsi? ( sys-block/open-iscsi )
116 - iscsi-direct? ( >=net-libs/libiscsi-1.18.0 )
117 - libssh? ( net-libs/libssh )
118 - lvm? ( >=sys-fs/lvm2-2.02.48-r2[-device-mapper-only(-)] )
119 - nfs? ( net-fs/nfs-utils )
120 - numa? (
121 - >sys-process/numactl-2.0.2
122 - sys-process/numad
123 - )
124 - parted? (
125 - >=sys-block/parted-1.8[device-mapper]
126 - sys-fs/lvm2[-device-mapper-only(-)]
127 - )
128 - pcap? ( >=net-libs/libpcap-1.0.0 )
129 - policykit? ( >=sys-auth/polkit-0.9 )
130 - qemu? (
131 - >=app-emulation/qemu-1.5.0
132 - dev-libs/yajl
133 - )
134 - rbd? ( sys-cluster/ceph )
135 - sasl? ( dev-libs/cyrus-sasl )
136 - selinux? ( >=sys-libs/libselinux-2.0.85 )
137 - virt-network? (
138 - net-dns/dnsmasq[script]
139 - net-firewall/ebtables
140 - >=net-firewall/iptables-1.4.10[ipv6]
141 - net-misc/radvd
142 - sys-apps/iproute2[-minimal]
143 - )
144 - wireshark-plugins? ( net-analyzer/wireshark:= )
145 - xen? (
146 - >=app-emulation/xen-4.6.0
147 - app-emulation/xen-tools:=
148 - )
149 - udev? (
150 - virtual/libudev
151 - >=x11-libs/libpciaccess-0.10.9
152 - )
153 - zfs? ( sys-fs/zfs )"
154 -
155 -DEPEND="${BDEPEND}
156 - ${RDEPEND}
157 - ${PYTHON_DEPS}"
158 -
159 -PATCHES=(
160 - "${FILESDIR}"/${PN}-6.0.0-fix_paths_in_libvirt-guests_sh.patch
161 - "${FILESDIR}"/${PN}-6.7.0-do-not-use-sysconfig.patch
162 - "${FILESDIR}"/${PN}-6.7.0-doc-path.patch
163 - "${FILESDIR}"/${PN}-6.7.0-fix-paths-for-apparmor.patch
164 -)
165 -
166 -pkg_setup() {
167 - # Check kernel configuration:
168 - CONFIG_CHECK=""
169 - use fuse && CONFIG_CHECK+="
170 - ~FUSE_FS"
171 -
172 - use lvm && CONFIG_CHECK+="
173 - ~BLK_DEV_DM
174 - ~DM_MULTIPATH
175 - ~DM_SNAPSHOT"
176 -
177 - use lxc && CONFIG_CHECK+="
178 - ~BLK_CGROUP
179 - ~CGROUP_CPUACCT
180 - ~CGROUP_DEVICE
181 - ~CGROUP_FREEZER
182 - ~CGROUP_NET_PRIO
183 - ~CGROUP_PERF
184 - ~CGROUPS
185 - ~CGROUP_SCHED
186 - ~CPUSETS
187 - ~IPC_NS
188 - ~MACVLAN
189 - ~NAMESPACES
190 - ~NET_CLS_CGROUP
191 - ~NET_NS
192 - ~PID_NS
193 - ~POSIX_MQUEUE
194 - ~SECURITYFS
195 - ~USER_NS
196 - ~UTS_NS
197 - ~VETH
198 - ~!GRKERNSEC_CHROOT_MOUNT
199 - ~!GRKERNSEC_CHROOT_DOUBLE
200 - ~!GRKERNSEC_CHROOT_PIVOT
201 - ~!GRKERNSEC_CHROOT_CHMOD
202 - ~!GRKERNSEC_CHROOT_CAPS"
203 -
204 - kernel_is lt 4 7 && use lxc && CONFIG_CHECK+="
205 - ~DEVPTS_MULTIPLE_INSTANCES"
206 -
207 - use macvtap && CONFIG_CHECK+="
208 - ~MACVTAP"
209 -
210 - use virt-network && CONFIG_CHECK+="
211 - ~BRIDGE_EBT_MARK_T
212 - ~BRIDGE_NF_EBTABLES
213 - ~NETFILTER_ADVANCED
214 - ~NETFILTER_XT_CONNMARK
215 - ~NETFILTER_XT_MARK
216 - ~NETFILTER_XT_TARGET_CHECKSUM
217 - ~IP_NF_FILTER
218 - ~IP_NF_MANGLE
219 - ~IP_NF_NAT
220 - ~IP_NF_TARGET_MASQUERADE
221 - ~IP6_NF_FILTER
222 - ~IP6_NF_MANGLE
223 - ~IP6_NF_NAT"
224 - # Bandwidth Limiting Support
225 - use virt-network && CONFIG_CHECK+="
226 - ~BRIDGE_EBT_T_NAT
227 - ~IP_NF_TARGET_REJECT
228 - ~NET_ACT_POLICE
229 - ~NET_CLS_FW
230 - ~NET_CLS_U32
231 - ~NET_SCH_HTB
232 - ~NET_SCH_INGRESS
233 - ~NET_SCH_SFQ"
234 -
235 - # Handle specific kernel versions for different features
236 - kernel_is lt 3 6 && CONFIG_CHECK+=" ~CGROUP_MEM_RES_CTLR"
237 - if kernel_is ge 3 6; then
238 - CONFIG_CHECK+=" ~MEMCG ~MEMCG_SWAP "
239 - kernel_is lt 4 5 && CONFIG_CHECK+=" ~MEMCG_KMEM "
240 - fi
241 -
242 - ERROR_USER_NS="Optional depending on LXC configuration."
243 -
244 - if [[ -n ${CONFIG_CHECK} ]]; then
245 - linux-info_pkg_setup
246 - fi
247 -}
248 -
249 -src_prepare() {
250 - touch "${S}/.mailmap" || die
251 -
252 - default
253 -
254 - # Tweak the init script:
255 - cp "${FILESDIR}/libvirtd.init-r19" "${S}/libvirtd.init" || die
256 - sed -e "s/USE_FLAG_FIREWALLD/$(usex firewalld 'need firewalld' '')/" \
257 - -i "${S}/libvirtd.init" || die "sed failed"
258 -}
259 -
260 -src_configure() {
261 - local emesonargs=(
262 - $(meson_feature apparmor)
263 - $(meson_use apparmor apparmor_profiles)
264 - $(meson_feature audit)
265 - $(meson_feature caps capng)
266 - $(meson_feature dbus)
267 - $(meson_feature dtrace)
268 - $(meson_feature firewalld)
269 - $(meson_feature fuse)
270 - $(meson_feature glusterfs)
271 - $(meson_feature glusterfs storage_gluster)
272 - $(meson_feature iscsi storage_iscsi)
273 - $(meson_feature iscsi-direct storage_iscsi_direct)
274 - $(meson_feature libvirtd driver_libvirtd)
275 - $(meson_feature libssh)
276 - $(meson_feature lvm storage_lvm)
277 - $(meson_feature lvm storage_mpath)
278 - $(meson_feature lxc driver_lxc)
279 - $(meson_feature macvtap)
280 - $(meson_feature nls)
281 - $(meson_feature numa numactl)
282 - $(meson_feature numa numad)
283 - $(meson_feature openvz driver_openvz)
284 - $(meson_feature parted storage_disk)
285 - $(meson_feature pcap libpcap)
286 - $(meson_feature policykit polkit)
287 - $(meson_feature qemu driver_qemu)
288 - $(meson_feature qemu yajl)
289 - $(meson_feature rbd storage_rbd)
290 - $(meson_feature sasl)
291 - $(meson_feature selinux)
292 - $(meson_feature udev)
293 - $(meson_feature vepa virtualport)
294 - $(meson_feature virt-network driver_network)
295 - $(meson_feature virtualbox driver_vbox)
296 - $(meson_feature wireshark-plugins wireshark_dissector)
297 - $(meson_feature xen driver_libxl)
298 - $(meson_feature zfs storage_zfs)
299 -
300 - -Dhal=disabled
301 - -Dnetcf=disabled
302 - -Dsanlock=disabled
303 -
304 - -Ddriver_esx=enabled
305 - -Dinit_script=systemd
306 - -Dqemu_user=$(usex caps qemu root)
307 - -Dqemu_group=$(usex caps qemu root)
308 - -Ddriver_remote=enabled
309 - -Dstorage_fs=enabled
310 - -Ddriver_vmware=enabled
311 -
312 - --localstatedir="${EPREFIX}/var"
313 - -Drunstatedir="${EPREFIX}/run"
314 - )
315 -
316 - meson_src_configure
317 -}
318 -
319 -src_test() {
320 - # remove problematic tests, bug #591416, bug #591418
321 - sed -i -e 's#commandtest$(EXEEXT) # #' \
322 - -e 's#virfirewalltest$(EXEEXT) # #' \
323 - -e 's#nwfilterebiptablestest$(EXEEXT) # #' \
324 - -e 's#nwfilterxml2firewalltest$(EXEEXT)$##' \
325 - tests/Makefile
326 -
327 - export VIR_TEST_DEBUG=1
328 - meson_src_test
329 -}
330 -
331 -src_install() {
332 - meson_src_install
333 -
334 - # Remove bogus, empty directories. They are either not used, or
335 - # libvirtd is able to create them on demand
336 - rm -rf "${D}"/etc/sysconfig || die
337 - rm -rf "${D}"/var || die
338 - rm -rf "${D}"/run || die
339 -
340 - newbashcomp "${S}/tools/bash-completion/vsh" virsh
341 - bashcomp_alias virsh virt-admin
342 -
343 - use libvirtd || return 0
344 - # From here, only libvirtd-related instructions, be warned!
345 -
346 - systemd_newtmpfilesd "${FILESDIR}"/libvirtd.tmpfiles.conf libvirtd.conf
347 -
348 - newinitd "${S}/libvirtd.init" libvirtd
349 - newinitd "${FILESDIR}/libvirt-guests.init-r4" libvirt-guests
350 - newinitd "${FILESDIR}/virtlockd.init-r2" virtlockd
351 - newinitd "${FILESDIR}/virtlogd.init-r2" virtlogd
352 -
353 - newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd
354 - newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests
355 -
356 - DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r3")
357 - DISABLE_AUTOFORMATTING=true
358 - readme.gentoo_create_doc
359 -}
360 -
361 -pkg_preinst() {
362 - # we only ever want to generate this once
363 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
364 - rm -rf "${D}"/etc/libvirt/qemu/networks/default.xml || die
365 - fi
366 -}
367 -
368 -pkg_postinst() {
369 - if [[ -e "${ROOT}"/etc/libvirt/qemu/networks/default.xml ]]; then
370 - touch "${ROOT}"/etc/libvirt/qemu/networks/default.xml || die
371 - fi
372 -
373 - use libvirtd || return 0
374 - # From here, only libvirtd-related instructions, be warned!
375 -
376 - readme.gentoo_print_elog
377 -}