diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2018-11-28 11:17:32 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2018-11-29 12:05:18 -0500 |
commit | 9ad042c295179a99f2f774cc42faea6fd42badcd (patch) | |
tree | 2fc93e11f4769cd0c45bd63f89e54de5316eeefc /recipes-extended/libvirt/libvirt_4.7.0.bb | |
parent | 885e8770585d4010f19a5b462764e8cc8455c2fd (diff) | |
download | meta-virtualization-9ad042c295179a99f2f774cc42faea6fd42badcd.tar.gz |
libvirt: uprev from 4.7.0 to 4.9.0
Minor update bringing in new features such as better support for
cgroup v2, vfio AP support, support for XEN suspend/wakeup.
Basic usecases pass and the ptest return similar results we have been
achieving with the last few uprevs:
====================================
Testsuite summary for libvirt 4.9.0
====================================
# TOTAL: 120
# PASS: 117
# SKIP: 0
# XFAIL: 0
# FAIL: 3
# XPASS: 0
# ERROR: 0
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Diffstat (limited to 'recipes-extended/libvirt/libvirt_4.7.0.bb')
-rw-r--r-- | recipes-extended/libvirt/libvirt_4.7.0.bb | 327 |
1 files changed, 0 insertions, 327 deletions
diff --git a/recipes-extended/libvirt/libvirt_4.7.0.bb b/recipes-extended/libvirt/libvirt_4.7.0.bb deleted file mode 100644 index 51367985..00000000 --- a/recipes-extended/libvirt/libvirt_4.7.0.bb +++ /dev/null | |||
@@ -1,327 +0,0 @@ | |||
1 | DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." | ||
2 | HOMEPAGE = "http://libvirt.org" | ||
3 | LICENSE = "LGPLv2.1+ & GPLv2+" | ||
4 | LICENSE_${PN}-ptest = "GPLv2+ & LGPLv2.1+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
6 | file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" | ||
7 | SECTION = "console/tools" | ||
8 | |||
9 | DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \ | ||
10 | iptables dnsmasq readline libtasn1 libxslt-native acl libdevmapper libtirpc \ | ||
11 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'shadow-native', '', d)}" | ||
12 | |||
13 | # libvirt-guests.sh needs gettext.sh | ||
14 | # | ||
15 | RDEPENDS_${PN} = "gettext-runtime" | ||
16 | |||
17 | RDEPENDS_${PN}-ptest += "make gawk perl bash" | ||
18 | |||
19 | RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd" | ||
20 | RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" | ||
21 | RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" | ||
22 | |||
23 | #connman blocks the 53 port and libvirtd can't start its DNS service | ||
24 | RCONFLICTS_${PN}_libvirtd = "connman" | ||
25 | |||
26 | SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ | ||
27 | file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \ | ||
28 | file://libvirtd.sh \ | ||
29 | file://libvirtd.conf \ | ||
30 | file://dnsmasq.conf \ | ||
31 | file://runptest.patch \ | ||
32 | file://run-ptest \ | ||
33 | file://libvirt-use-pkg-config-to-locate-libcap.patch \ | ||
34 | file://0001-to-fix-build-error.patch \ | ||
35 | file://install-missing-file.patch \ | ||
36 | file://0001-ptest-Remove-Windows-1252-check-from-esxutilstest.patch \ | ||
37 | file://configure.ac-search-for-rpc-rpc.h-in-the-sysroot.patch \ | ||
38 | file://lxc_monitor-Avoid-AB-BA-lock-race.patch \ | ||
39 | " | ||
40 | |||
41 | SRC_URI[libvirt.md5sum] = "38da6c33250dcbc0a6d68de5c758262b" | ||
42 | SRC_URI[libvirt.sha256sum] = "92c279f7321624ac5a37a81f8bbe8c8d2a16781da04c63c99c92d3de035767e4" | ||
43 | |||
44 | inherit autotools gettext update-rc.d pkgconfig ptest systemd | ||
45 | |||
46 | # Override the default set in autotools.bbclass so that we will use relative pathnames | ||
47 | # to our local m4 files. This prevents an "Argument list too long" error during configuration | ||
48 | # if our project is in a directory with an absolute pathname of more than about 125 characters. | ||
49 | # | ||
50 | acpaths = "-I ./m4" | ||
51 | |||
52 | CACHED_CONFIGUREVARS += "\ | ||
53 | ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ | ||
54 | ac_cv_path_AUGPARSE=/usr/bin/augparse \ | ||
55 | ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ | ||
56 | ac_cv_path_BRCTL=/usr/sbin/brctl \ | ||
57 | ac_cv_path_TC=/sbin/tc \ | ||
58 | ac_cv_path_UDEVADM=/sbin/udevadm \ | ||
59 | ac_cv_path_MODPROBE=/sbin/modprobe \ | ||
60 | ac_cv_path_IP_PATH=/bin/ip \ | ||
61 | ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ | ||
62 | ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ | ||
63 | ac_cv_path_MOUNT=/bin/mount \ | ||
64 | ac_cv_path_UMOUNT=/bin/umount \ | ||
65 | ac_cv_path_MKFS=/usr/sbin/mkfs \ | ||
66 | ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ | ||
67 | ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ | ||
68 | ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ | ||
69 | ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ | ||
70 | ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ | ||
71 | ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ | ||
72 | ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ | ||
73 | ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ | ||
74 | ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ | ||
75 | ac_cv_path_VGSCAN=/usr/sbin/vgscan \ | ||
76 | ac_cv_path_PVS=/usr/sbin/pvs \ | ||
77 | ac_cv_path_VGS=/usr/sbin/vgs \ | ||
78 | ac_cv_path_LVS=/usr/sbin/lvs \ | ||
79 | ac_cv_path_PARTED=/usr/sbin/parted \ | ||
80 | ac_cv_path_DMSETUP=/usr/sbin/dmsetup" | ||
81 | |||
82 | # Ensure that libvirt uses polkit rather than policykit, whether the host has | ||
83 | # pkcheck installed or not, and ensure the path is correct per our config. | ||
84 | CACHED_CONFIGUREVARS += "ac_cv_path_PKCHECK_PATH=${bindir}/pkcheck" | ||
85 | |||
86 | # Some other possible paths we are not yet setting | ||
87 | #ac_cv_path_RPCGEN= | ||
88 | #ac_cv_path_XSLTPROC= | ||
89 | #ac_cv_path_RADVD= | ||
90 | #ac_cv_path_UDEVSETTLE= | ||
91 | #ac_cv_path_EBTABLES_PATH= | ||
92 | #ac_cv_path_PKG_CONFIG= | ||
93 | #ac_cv_path_ac_pt_PKG_CONFIG | ||
94 | #ac_cv_path_POLKIT_AUTH= | ||
95 | #ac_cv_path_DTRACE= | ||
96 | #ac_cv_path_ISCSIADM= | ||
97 | #ac_cv_path_MSGFMT= | ||
98 | #ac_cv_path_GMSGFMT= | ||
99 | #ac_cv_path_XGETTEXT= | ||
100 | #ac_cv_path_MSGMERGE= | ||
101 | #ac_cv_path_SCRUB= | ||
102 | #ac_cv_path_PYTHON= | ||
103 | |||
104 | ALLOW_EMPTY_${PN} = "1" | ||
105 | |||
106 | PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" | ||
107 | |||
108 | ALLOW_EMPTY_${PN}-libvirtd = "1" | ||
109 | |||
110 | FILES_${PN}-libvirtd = " \ | ||
111 | ${sysconfdir}/init.d \ | ||
112 | ${sysconfdir}/sysctl.d \ | ||
113 | ${sysconfdir}/logrotate.d \ | ||
114 | ${sysconfdir}/libvirt/libvirtd.conf \ | ||
115 | /usr/lib/sysctl.d/60-libvirtd.conf \ | ||
116 | ${sbindir}/libvirtd \ | ||
117 | ${systemd_unitdir}/system/* \ | ||
118 | ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \ | ||
119 | " | ||
120 | |||
121 | FILES_${PN}-virsh = " \ | ||
122 | ${bindir}/virsh \ | ||
123 | ${datadir}/bash-completion/completions/virsh \ | ||
124 | " | ||
125 | |||
126 | FILES_${PN} += "${libdir}/libvirt/connection-driver \ | ||
127 | ${datadir}/augeas \ | ||
128 | ${@bb.utils.contains('PACKAGECONFIG', 'polkit', '${datadir}/polkit-1', '', d)} \ | ||
129 | ${datadir}/bash-completion/completions/vsh \ | ||
130 | ${datadir}/bash-completion/completions/virt-admin \ | ||
131 | " | ||
132 | |||
133 | FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" | ||
134 | FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" | ||
135 | |||
136 | CONFFILES_${PN} += "${sysconfdir}/libvirt/libvirt.conf \ | ||
137 | ${sysconfdir}/libvirt/lxc.conf \ | ||
138 | ${sysconfdir}/libvirt/qemu-lockd.conf \ | ||
139 | ${sysconfdir}/libvirt/qemu.conf \ | ||
140 | ${sysconfdir}/libvirt/virt-login-shell.conf \ | ||
141 | ${sysconfdir}/libvirt/virtlockd.conf" | ||
142 | |||
143 | CONFFILES_${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ | ||
144 | ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \ | ||
145 | ${sysconfdir}/libvirt/libvirtd.conf \ | ||
146 | /usr/lib/sysctl.d/libvirtd.conf" | ||
147 | |||
148 | INITSCRIPT_PACKAGES = "${PN}-libvirtd" | ||
149 | INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" | ||
150 | INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" | ||
151 | |||
152 | SYSTEMD_PACKAGES = "${PN}-libvirtd" | ||
153 | SYSTEMD_SERVICE_${PN}-libvirtd = " \ | ||
154 | libvirtd.service \ | ||
155 | virtlockd.service \ | ||
156 | libvirt-guests.service \ | ||
157 | virtlockd.socket \ | ||
158 | " | ||
159 | |||
160 | |||
161 | PRIVATE_LIBS_${PN}-ptest = " \ | ||
162 | libvirt-lxc.so.0 \ | ||
163 | libvirt.so.0 \ | ||
164 | libvirt-qemu.so.0 \ | ||
165 | lockd.so \ | ||
166 | libvirt_driver_secret.so \ | ||
167 | libvirt_driver_nodedev.so \ | ||
168 | libvirt_driver_vbox.so \ | ||
169 | libvirt_driver_interface.so \ | ||
170 | libvirt_driver_uml.so \ | ||
171 | libvirt_driver_network.so \ | ||
172 | libvirt_driver_nwfilter.so \ | ||
173 | libvirt_driver_qemu.so \ | ||
174 | libvirt_driver_storage.so \ | ||
175 | libvirt_driver_lxc.so \ | ||
176 | " | ||
177 | |||
178 | # xen-minimal config | ||
179 | #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" | ||
180 | |||
181 | # full config | ||
182 | PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \ | ||
183 | remote macvtap libvirtd netcf udev python ebtables \ | ||
184 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ | ||
185 | ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ | ||
186 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \ | ||
187 | " | ||
188 | |||
189 | # qemu is NOT compatible with mips64 | ||
190 | PACKAGECONFIG_remove_mipsarchn32 = "qemu" | ||
191 | PACKAGECONFIG_remove_mipsarchn64 = "qemu" | ||
192 | |||
193 | # enable,disable,depends,rdepends | ||
194 | # | ||
195 | PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu," | ||
196 | PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" | ||
197 | PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi,," | ||
198 | PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,libxl," | ||
199 | PACKAGECONFIG[uml] = "--with-uml, --without-uml,," | ||
200 | PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,," | ||
201 | PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,," | ||
202 | PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp,," | ||
203 | PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,," | ||
204 | PACKAGECONFIG[esx] = "--with-esx,--without-esx,," | ||
205 | PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,," | ||
206 | PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" | ||
207 | PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc," | ||
208 | PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,," | ||
209 | PACKAGECONFIG[remote] = "--with-remote,--without-remote,," | ||
210 | PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl" | ||
211 | PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,," | ||
212 | PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf" | ||
213 | PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,," | ||
214 | PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess," | ||
215 | PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," | ||
216 | PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables" | ||
217 | PACKAGECONFIG[python] = ",,python," | ||
218 | PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl" | ||
219 | PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2" | ||
220 | PACKAGECONFIG[numactl] = "--with-numactl,--without-numactl,numactl," | ||
221 | PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse," | ||
222 | PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," | ||
223 | PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng," | ||
224 | PACKAGECONFIG[wireshark] = "--with-wireshark-dissector,--without-wireshark-dissector,wireshark libwsutil," | ||
225 | |||
226 | # Enable the Python tool support | ||
227 | require libvirt-python.inc | ||
228 | |||
229 | do_install_append() { | ||
230 | install -d ${D}/etc/init.d | ||
231 | install -d ${D}/etc/libvirt | ||
232 | install -d ${D}/etc/dnsmasq.d | ||
233 | |||
234 | install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd | ||
235 | install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf | ||
236 | |||
237 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | ||
238 | # This will wind up in the libvirtd package, but will NOT be invoked by default. | ||
239 | # | ||
240 | mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d | ||
241 | fi | ||
242 | |||
243 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
244 | # This variable is used by libvirtd.service to start libvirtd in the right mode | ||
245 | sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd | ||
246 | |||
247 | # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. | ||
248 | sed -i -e 's/Type=notify/Type=forking/' \ | ||
249 | -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \ | ||
250 | ${D}/${systemd_unitdir}/system/libvirtd.service | ||
251 | fi | ||
252 | |||
253 | # The /var/run/libvirt directories created by the Makefile | ||
254 | # are wiped out in volatile, we need to create these at boot. | ||
255 | rm -rf ${D}${localstatedir}/run | ||
256 | install -d ${D}${sysconfdir}/default/volatiles | ||
257 | echo "d root root 0755 ${localstatedir}/run/libvirt none" \ | ||
258 | > ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
259 | echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \ | ||
260 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
261 | echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \ | ||
262 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
263 | echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \ | ||
264 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
265 | echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \ | ||
266 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | ||
267 | |||
268 | # Manually set permissions and ownership to match polkit recipe | ||
269 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
270 | install -d -m 0700 ${D}/${datadir}/polkit-1/rules.d | ||
271 | chown polkitd ${D}/${datadir}/polkit-1/rules.d | ||
272 | chgrp root ${D}/${datadir}/polkit-1/rules.d | ||
273 | else | ||
274 | rm -rf ${D}/${datadir}/polkit-1 | ||
275 | fi | ||
276 | |||
277 | # disable seccomp_sandbox | ||
278 | if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then | ||
279 | sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \ | ||
280 | ${D}${sysconfdir}/libvirt/qemu.conf | ||
281 | fi | ||
282 | |||
283 | # Add hook support for libvirt | ||
284 | mkdir -p ${D}/etc/libvirt/hooks | ||
285 | |||
286 | # Force the main dnsmasq instance to bind only to specified interfaces and | ||
287 | # to not bind to virbr0. Libvirt will run its own instance on this interface. | ||
288 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon | ||
289 | |||
290 | # remove .la references to our working diretory | ||
291 | for i in `find ${D}${libdir} -type f -name *.la`; do | ||
292 | sed -i -e 's#-L${B}/src/.libs##g' $i | ||
293 | done | ||
294 | } | ||
295 | |||
296 | EXTRA_OECONF += " \ | ||
297 | --with-init-script=systemd \ | ||
298 | --with-test-suite \ | ||
299 | " | ||
300 | |||
301 | EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH} SYSTEMD_UNIT_DIR=${systemd_system_unitdir}" | ||
302 | |||
303 | do_compile_ptest() { | ||
304 | oe_runmake -C tests buildtest-TESTS | ||
305 | } | ||
306 | |||
307 | do_install_ptest() { | ||
308 | oe_runmake -C tests install-ptest | ||
309 | |||
310 | find ${S}/tests -maxdepth 1 -type d -exec cp -r {} ${D}${PTEST_PATH}/tests/ \; | ||
311 | |||
312 | # remove .la files for ptest, they aren't required and can trigger QA errors | ||
313 | for i in `find ${D}${PTEST_PATH} -type f \( -name *.la -o -name *.o \)`; do | ||
314 | rm -f $i | ||
315 | done | ||
316 | } | ||
317 | |||
318 | pkg_postinst_${PN}() { | ||
319 | if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then | ||
320 | /etc/init.d/populate-volatile.sh update | ||
321 | fi | ||
322 | } | ||
323 | |||
324 | python () { | ||
325 | if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
326 | d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") | ||
327 | } | ||