From f4eec68635bc516ce99c804bdc876f74dd4523fc Mon Sep 17 00:00:00 2001 From: Christopher Clark Date: Tue, 25 Feb 2020 16:15:59 -0800 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-extended/xen/xen-tools.inc | 57 +++++++++++++++++++++++++------------- 1 file changed, 37 insertions(+), 20 deletions(-) (limited to 'recipes-extended/xen/xen-tools.inc') 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 @@ SUMMARY = "Xen hypervisor tools" DESCRIPTION = "Tools and utility software for the Xen hypervisor" -inherit setuptools update-rc.d systemd deploy +inherit setuptools3 update-rc.d systemd deploy require xen-blktap.inc RDEPENDS_${PN} = "\ @@ -47,21 +47,25 @@ RDEPENDS_${PN}-fsimage = " \ RDEPENDS_${PN}-misc = " \ perl \ - python \ + python3 \ + ${PN}-xencov \ + " + +RSUGGESTS_${PN}-misc = " \ + ${PN}-xencons \ + ${PN}-xenpvnetboot \ " RDEPENDS_${PN}-python = " \ - python \ + python3 \ " RDEPENDS_${PN}-pygrub = " \ + python3 \ ${PN}-python \ " -RDEPENDS_${PN}-remus = " \ - bash \ - python \ - " +RDEPENDS_${PN}-remus = "bash" RDEPENDS_${PN}-scripts-block = "\ bash \ @@ -78,6 +82,8 @@ RDEPENDS_${PN}-scripts-network = "\ ${PN}-volatiles \ " +RSUGGESTS_${PN}-xencov = "${PN}-xencov-split" + RDEPENDS_${PN}-xencommons = "\ bash \ ${PN}-console \ @@ -97,7 +103,11 @@ RDEPENDS_${PN}-xendomains = "\ RDEPENDS_${PN}-xl = "libgcc" -RDEPENDS_${PN}-xentrace = "python" +RDEPENDS_${PN}-xenmon = " \ + python3 \ + " + +RSUGGESTS_${PN}-xentrace = "${PN}-xentrace-format" RDEPENDS_${PN}-xen-watchdog = "bash" @@ -160,6 +170,7 @@ PACKAGES = " \ ${PN}-volatiles \ ${PN}-xcutils \ ${PN}-xencommons \ + ${PN}-xencov \ ${PN}-xend \ ${PN}-xend-examples \ ${PN}-xendomains \ @@ -188,8 +199,8 @@ RPROVIDES_${PN}-xenstored = "virtual/xenstored" FILES_${PN}-dbg += "\ ${libdir}/xen/bin/.debug \ - ${libdir}/python2.7/site-packages/.debug \ - ${libdir}/python2.7/site-packages/xen/lowlevel/.debug \ + ${libdir}/${PYTHON_DIR}/site-packages/.debug \ + ${libdir}/${PYTHON_DIR}/site-packages/xen/lowlevel/.debug \ ${libdir}/fs/xfs/.debug \ ${libdir}/fs/ufs/.debug \ ${libdir}/fs/ext2fs-lib/.debug \ @@ -202,8 +213,8 @@ FILES_${PN}-dbg += "\ ${libdir}exec/.debug \ ${libdir}/xen/libexec/.debug \ ${bindir}/.debug \ - ${libdir}/python2.7/dist-packages/.debug \ - ${libdir}/python2.7/dist-packages/xen/lowlevel/.debug \ + ${libdir}/${PYTHON_DIR}/dist-packages/.debug \ + ${libdir}/${PYTHON_DIR}/dist-packages/xen/lowlevel/.debug \ " FILES_${PN}-dev = "\ @@ -404,15 +415,11 @@ FILES_${PN}-livepatch += " \ " FILES_${PN}-misc = "\ - ${bindir}/xencons \ - ${bindir}/xencov_split \ ${bindir}/xen-detect \ - ${libdir}/xen/bin/xenpvnetboot \ ${libdir}/xen/bin/depriv-fd-checker \ ${sbindir}/gtracestat \ ${sbindir}/gtraceview \ ${sbindir}/xen-bugtool \ - ${sbindir}/xencov \ ${sbindir}/xenperf \ ${sbindir}/xenpm \ ${sbindir}/xsview \ @@ -436,11 +443,10 @@ FILES_${PN}-pygrub = "\ " FILES_${PN}-python = "\ - ${libdir}/python2.7 \ + ${libdir}/${PYTHON_DIR} \ " FILES_${PN}-remus = "\ - ${bindir}/remus \ ${sysconfdir}/xen/scripts/remus-netbuf-setup \ " @@ -500,6 +506,10 @@ FILES_${PN}-xcutils = "\ ${libdir}/xen/bin/xc_save \ " +FILES_${PN}-xencov = "\ + ${sbindir}/xencov \ + " + FILES_${PN}-xend-examples = "\ ${sysconfdir}/xen/xend-config.sxp \ ${sysconfdir}/xen/xend-pci-permissive.sxp \ @@ -539,7 +549,6 @@ FILES_${PN}-xenstored = "\ FILES_${PN}-xentrace = "\ ${bindir}/xentrace \ - ${bindir}/xentrace_format \ ${bindir}/xentrace_setsize \ ${libdir}/xen/bin/xenctx \ ${bindir}/xenalyze \ @@ -665,12 +674,20 @@ do_stubs() { addtask stubs after do_configure before do_compile do_compile() { - oe_runmake tools + cd ${S} + oe_runmake tools PYTHON="${PYTHON}" } do_install() { + cd ${S} oe_runmake DESTDIR="${D}" install-tools + # Remove unported python 2 scripts -- see the separate xen-python2 recipe + rm -f ${D}${bindir}/xentrace_format \ + ${D}${bindir}/xencons \ + ${D}${bindir}/xencov_split \ + ${D}${libdir}/xen/bin/xenpvnetboot + # remove installed volatiles rm -rf ${D}${base_prefix}/run \ ${D}${localstatedir}/run \ -- cgit v1.2.3-54-g00ecf