diff options
author | Christopher Clark <christopher.w.clark@gmail.com> | 2020-02-25 16:15:59 -0800 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2020-02-27 16:59:23 -0500 |
commit | f4eec68635bc516ce99c804bdc876f74dd4523fc (patch) | |
tree | 149b04d3a85851703a72346b9b9247e5ce025b3c /recipes-extended/xen/xen-tools.inc | |
parent | 593df044c6a18ac3594215f5b93ecbc3ceab9f44 (diff) | |
download | meta-virtualization-f4eec68635bc516ce99c804bdc876f74dd4523fc.tar.gz |
xen, xen-tools: update recipes for python3
Adds patches for packaged scripts to enable deployment with python3
where they have been ported to python 3 upstream.
setuptools3 inherits distutils3 which modifies ${B}, so cd ${S} is
needed in the do_configure, do_compile and do_install steps.
Remove python 2 dependency from the Xen recipes by adding a new
separate recipe, xen-python2, for packaging the remaining optional
scripts which are yet to be ported to python 3. Package naming in
the separate recipe is chosen to support transition back into the
xen-tools recipe if the scripts are ported later.
Use RSUGGESTS to support inclusion of the xen-python2 scripts in
images that include python 2.
Drop the remus package python dependency since the script was removed
in 2014: commit 5b66f84e37a45038f9e5dae7a5768a5525d1e6ba
Add python3 RDEPENDS needed to run xenmon.
Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended/xen/xen-tools.inc')
-rw-r--r-- | recipes-extended/xen/xen-tools.inc | 57 |
1 files changed, 37 insertions, 20 deletions
diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc index e166c74b..a6f12090 100644 --- a/recipes-extended/xen/xen-tools.inc +++ b/recipes-extended/xen/xen-tools.inc | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "Xen hypervisor tools" | 1 | SUMMARY = "Xen hypervisor tools" |
2 | DESCRIPTION = "Tools and utility software for the Xen hypervisor" | 2 | DESCRIPTION = "Tools and utility software for the Xen hypervisor" |
3 | 3 | ||
4 | inherit setuptools update-rc.d systemd deploy | 4 | inherit setuptools3 update-rc.d systemd deploy |
5 | require xen-blktap.inc | 5 | require xen-blktap.inc |
6 | 6 | ||
7 | RDEPENDS_${PN} = "\ | 7 | RDEPENDS_${PN} = "\ |
@@ -47,21 +47,25 @@ RDEPENDS_${PN}-fsimage = " \ | |||
47 | 47 | ||
48 | RDEPENDS_${PN}-misc = " \ | 48 | RDEPENDS_${PN}-misc = " \ |
49 | perl \ | 49 | perl \ |
50 | python \ | 50 | python3 \ |
51 | ${PN}-xencov \ | ||
52 | " | ||
53 | |||
54 | RSUGGESTS_${PN}-misc = " \ | ||
55 | ${PN}-xencons \ | ||
56 | ${PN}-xenpvnetboot \ | ||
51 | " | 57 | " |
52 | 58 | ||
53 | RDEPENDS_${PN}-python = " \ | 59 | RDEPENDS_${PN}-python = " \ |
54 | python \ | 60 | python3 \ |
55 | " | 61 | " |
56 | 62 | ||
57 | RDEPENDS_${PN}-pygrub = " \ | 63 | RDEPENDS_${PN}-pygrub = " \ |
64 | python3 \ | ||
58 | ${PN}-python \ | 65 | ${PN}-python \ |
59 | " | 66 | " |
60 | 67 | ||
61 | RDEPENDS_${PN}-remus = " \ | 68 | RDEPENDS_${PN}-remus = "bash" |
62 | bash \ | ||
63 | python \ | ||
64 | " | ||
65 | 69 | ||
66 | RDEPENDS_${PN}-scripts-block = "\ | 70 | RDEPENDS_${PN}-scripts-block = "\ |
67 | bash \ | 71 | bash \ |
@@ -78,6 +82,8 @@ RDEPENDS_${PN}-scripts-network = "\ | |||
78 | ${PN}-volatiles \ | 82 | ${PN}-volatiles \ |
79 | " | 83 | " |
80 | 84 | ||
85 | RSUGGESTS_${PN}-xencov = "${PN}-xencov-split" | ||
86 | |||
81 | RDEPENDS_${PN}-xencommons = "\ | 87 | RDEPENDS_${PN}-xencommons = "\ |
82 | bash \ | 88 | bash \ |
83 | ${PN}-console \ | 89 | ${PN}-console \ |
@@ -97,7 +103,11 @@ RDEPENDS_${PN}-xendomains = "\ | |||
97 | 103 | ||
98 | RDEPENDS_${PN}-xl = "libgcc" | 104 | RDEPENDS_${PN}-xl = "libgcc" |
99 | 105 | ||
100 | RDEPENDS_${PN}-xentrace = "python" | 106 | RDEPENDS_${PN}-xenmon = " \ |
107 | python3 \ | ||
108 | " | ||
109 | |||
110 | RSUGGESTS_${PN}-xentrace = "${PN}-xentrace-format" | ||
101 | 111 | ||
102 | RDEPENDS_${PN}-xen-watchdog = "bash" | 112 | RDEPENDS_${PN}-xen-watchdog = "bash" |
103 | 113 | ||
@@ -160,6 +170,7 @@ PACKAGES = " \ | |||
160 | ${PN}-volatiles \ | 170 | ${PN}-volatiles \ |
161 | ${PN}-xcutils \ | 171 | ${PN}-xcutils \ |
162 | ${PN}-xencommons \ | 172 | ${PN}-xencommons \ |
173 | ${PN}-xencov \ | ||
163 | ${PN}-xend \ | 174 | ${PN}-xend \ |
164 | ${PN}-xend-examples \ | 175 | ${PN}-xend-examples \ |
165 | ${PN}-xendomains \ | 176 | ${PN}-xendomains \ |
@@ -188,8 +199,8 @@ RPROVIDES_${PN}-xenstored = "virtual/xenstored" | |||
188 | 199 | ||
189 | FILES_${PN}-dbg += "\ | 200 | FILES_${PN}-dbg += "\ |
190 | ${libdir}/xen/bin/.debug \ | 201 | ${libdir}/xen/bin/.debug \ |
191 | ${libdir}/python2.7/site-packages/.debug \ | 202 | ${libdir}/${PYTHON_DIR}/site-packages/.debug \ |
192 | ${libdir}/python2.7/site-packages/xen/lowlevel/.debug \ | 203 | ${libdir}/${PYTHON_DIR}/site-packages/xen/lowlevel/.debug \ |
193 | ${libdir}/fs/xfs/.debug \ | 204 | ${libdir}/fs/xfs/.debug \ |
194 | ${libdir}/fs/ufs/.debug \ | 205 | ${libdir}/fs/ufs/.debug \ |
195 | ${libdir}/fs/ext2fs-lib/.debug \ | 206 | ${libdir}/fs/ext2fs-lib/.debug \ |
@@ -202,8 +213,8 @@ FILES_${PN}-dbg += "\ | |||
202 | ${libdir}exec/.debug \ | 213 | ${libdir}exec/.debug \ |
203 | ${libdir}/xen/libexec/.debug \ | 214 | ${libdir}/xen/libexec/.debug \ |
204 | ${bindir}/.debug \ | 215 | ${bindir}/.debug \ |
205 | ${libdir}/python2.7/dist-packages/.debug \ | 216 | ${libdir}/${PYTHON_DIR}/dist-packages/.debug \ |
206 | ${libdir}/python2.7/dist-packages/xen/lowlevel/.debug \ | 217 | ${libdir}/${PYTHON_DIR}/dist-packages/xen/lowlevel/.debug \ |
207 | " | 218 | " |
208 | 219 | ||
209 | FILES_${PN}-dev = "\ | 220 | FILES_${PN}-dev = "\ |
@@ -404,15 +415,11 @@ FILES_${PN}-livepatch += " \ | |||
404 | " | 415 | " |
405 | 416 | ||
406 | FILES_${PN}-misc = "\ | 417 | FILES_${PN}-misc = "\ |
407 | ${bindir}/xencons \ | ||
408 | ${bindir}/xencov_split \ | ||
409 | ${bindir}/xen-detect \ | 418 | ${bindir}/xen-detect \ |
410 | ${libdir}/xen/bin/xenpvnetboot \ | ||
411 | ${libdir}/xen/bin/depriv-fd-checker \ | 419 | ${libdir}/xen/bin/depriv-fd-checker \ |
412 | ${sbindir}/gtracestat \ | 420 | ${sbindir}/gtracestat \ |
413 | ${sbindir}/gtraceview \ | 421 | ${sbindir}/gtraceview \ |
414 | ${sbindir}/xen-bugtool \ | 422 | ${sbindir}/xen-bugtool \ |
415 | ${sbindir}/xencov \ | ||
416 | ${sbindir}/xenperf \ | 423 | ${sbindir}/xenperf \ |
417 | ${sbindir}/xenpm \ | 424 | ${sbindir}/xenpm \ |
418 | ${sbindir}/xsview \ | 425 | ${sbindir}/xsview \ |
@@ -436,11 +443,10 @@ FILES_${PN}-pygrub = "\ | |||
436 | " | 443 | " |
437 | 444 | ||
438 | FILES_${PN}-python = "\ | 445 | FILES_${PN}-python = "\ |
439 | ${libdir}/python2.7 \ | 446 | ${libdir}/${PYTHON_DIR} \ |
440 | " | 447 | " |
441 | 448 | ||
442 | FILES_${PN}-remus = "\ | 449 | FILES_${PN}-remus = "\ |
443 | ${bindir}/remus \ | ||
444 | ${sysconfdir}/xen/scripts/remus-netbuf-setup \ | 450 | ${sysconfdir}/xen/scripts/remus-netbuf-setup \ |
445 | " | 451 | " |
446 | 452 | ||
@@ -500,6 +506,10 @@ FILES_${PN}-xcutils = "\ | |||
500 | ${libdir}/xen/bin/xc_save \ | 506 | ${libdir}/xen/bin/xc_save \ |
501 | " | 507 | " |
502 | 508 | ||
509 | FILES_${PN}-xencov = "\ | ||
510 | ${sbindir}/xencov \ | ||
511 | " | ||
512 | |||
503 | FILES_${PN}-xend-examples = "\ | 513 | FILES_${PN}-xend-examples = "\ |
504 | ${sysconfdir}/xen/xend-config.sxp \ | 514 | ${sysconfdir}/xen/xend-config.sxp \ |
505 | ${sysconfdir}/xen/xend-pci-permissive.sxp \ | 515 | ${sysconfdir}/xen/xend-pci-permissive.sxp \ |
@@ -539,7 +549,6 @@ FILES_${PN}-xenstored = "\ | |||
539 | 549 | ||
540 | FILES_${PN}-xentrace = "\ | 550 | FILES_${PN}-xentrace = "\ |
541 | ${bindir}/xentrace \ | 551 | ${bindir}/xentrace \ |
542 | ${bindir}/xentrace_format \ | ||
543 | ${bindir}/xentrace_setsize \ | 552 | ${bindir}/xentrace_setsize \ |
544 | ${libdir}/xen/bin/xenctx \ | 553 | ${libdir}/xen/bin/xenctx \ |
545 | ${bindir}/xenalyze \ | 554 | ${bindir}/xenalyze \ |
@@ -665,12 +674,20 @@ do_stubs() { | |||
665 | addtask stubs after do_configure before do_compile | 674 | addtask stubs after do_configure before do_compile |
666 | 675 | ||
667 | do_compile() { | 676 | do_compile() { |
668 | oe_runmake tools | 677 | cd ${S} |
678 | oe_runmake tools PYTHON="${PYTHON}" | ||
669 | } | 679 | } |
670 | 680 | ||
671 | do_install() { | 681 | do_install() { |
682 | cd ${S} | ||
672 | oe_runmake DESTDIR="${D}" install-tools | 683 | oe_runmake DESTDIR="${D}" install-tools |
673 | 684 | ||
685 | # Remove unported python 2 scripts -- see the separate xen-python2 recipe | ||
686 | rm -f ${D}${bindir}/xentrace_format \ | ||
687 | ${D}${bindir}/xencons \ | ||
688 | ${D}${bindir}/xencov_split \ | ||
689 | ${D}${libdir}/xen/bin/xenpvnetboot | ||
690 | |||
674 | # remove installed volatiles | 691 | # remove installed volatiles |
675 | rm -rf ${D}${base_prefix}/run \ | 692 | rm -rf ${D}${base_prefix}/run \ |
676 | ${D}${localstatedir}/run \ | 693 | ${D}${localstatedir}/run \ |