summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/xen-tools.inc
diff options
context:
space:
mode:
authorChristopher Clark <christopher.w.clark@gmail.com>2020-02-25 16:15:59 -0800
committerBruce Ashfield <bruce.ashfield@gmail.com>2020-02-27 16:59:23 -0500
commitf4eec68635bc516ce99c804bdc876f74dd4523fc (patch)
tree149b04d3a85851703a72346b9b9247e5ce025b3c /recipes-extended/xen/xen-tools.inc
parent593df044c6a18ac3594215f5b93ecbc3ceab9f44 (diff)
downloadmeta-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.inc57
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 @@
1SUMMARY = "Xen hypervisor tools" 1SUMMARY = "Xen hypervisor tools"
2DESCRIPTION = "Tools and utility software for the Xen hypervisor" 2DESCRIPTION = "Tools and utility software for the Xen hypervisor"
3 3
4inherit setuptools update-rc.d systemd deploy 4inherit setuptools3 update-rc.d systemd deploy
5require xen-blktap.inc 5require xen-blktap.inc
6 6
7RDEPENDS_${PN} = "\ 7RDEPENDS_${PN} = "\
@@ -47,21 +47,25 @@ RDEPENDS_${PN}-fsimage = " \
47 47
48RDEPENDS_${PN}-misc = " \ 48RDEPENDS_${PN}-misc = " \
49 perl \ 49 perl \
50 python \ 50 python3 \
51 ${PN}-xencov \
52 "
53
54RSUGGESTS_${PN}-misc = " \
55 ${PN}-xencons \
56 ${PN}-xenpvnetboot \
51 " 57 "
52 58
53RDEPENDS_${PN}-python = " \ 59RDEPENDS_${PN}-python = " \
54 python \ 60 python3 \
55 " 61 "
56 62
57RDEPENDS_${PN}-pygrub = " \ 63RDEPENDS_${PN}-pygrub = " \
64 python3 \
58 ${PN}-python \ 65 ${PN}-python \
59 " 66 "
60 67
61RDEPENDS_${PN}-remus = " \ 68RDEPENDS_${PN}-remus = "bash"
62 bash \
63 python \
64 "
65 69
66RDEPENDS_${PN}-scripts-block = "\ 70RDEPENDS_${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
85RSUGGESTS_${PN}-xencov = "${PN}-xencov-split"
86
81RDEPENDS_${PN}-xencommons = "\ 87RDEPENDS_${PN}-xencommons = "\
82 bash \ 88 bash \
83 ${PN}-console \ 89 ${PN}-console \
@@ -97,7 +103,11 @@ RDEPENDS_${PN}-xendomains = "\
97 103
98RDEPENDS_${PN}-xl = "libgcc" 104RDEPENDS_${PN}-xl = "libgcc"
99 105
100RDEPENDS_${PN}-xentrace = "python" 106RDEPENDS_${PN}-xenmon = " \
107 python3 \
108 "
109
110RSUGGESTS_${PN}-xentrace = "${PN}-xentrace-format"
101 111
102RDEPENDS_${PN}-xen-watchdog = "bash" 112RDEPENDS_${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
189FILES_${PN}-dbg += "\ 200FILES_${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
209FILES_${PN}-dev = "\ 220FILES_${PN}-dev = "\
@@ -404,15 +415,11 @@ FILES_${PN}-livepatch += " \
404 " 415 "
405 416
406FILES_${PN}-misc = "\ 417FILES_${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
438FILES_${PN}-python = "\ 445FILES_${PN}-python = "\
439 ${libdir}/python2.7 \ 446 ${libdir}/${PYTHON_DIR} \
440 " 447 "
441 448
442FILES_${PN}-remus = "\ 449FILES_${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
509FILES_${PN}-xencov = "\
510 ${sbindir}/xencov \
511 "
512
503FILES_${PN}-xend-examples = "\ 513FILES_${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
540FILES_${PN}-xentrace = "\ 550FILES_${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() {
665addtask stubs after do_configure before do_compile 674addtask stubs after do_configure before do_compile
666 675
667do_compile() { 676do_compile() {
668 oe_runmake tools 677 cd ${S}
678 oe_runmake tools PYTHON="${PYTHON}"
669} 679}
670 680
671do_install() { 681do_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 \