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