From b6d051a19770e65bd23bccbd2fc6e948092a6f16 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Fri, 13 Jan 2017 16:49:56 -0500 Subject: openvswitch: fix build host contamination There is only a single PYTHON variable for configure and yet python is used for the build as well as scripts installed on the target. If we set a path in PYTHON as we had we end up using this same path during the build and since it isn't to the sysroot we end up with host contamination (as demonstrated by python failing to import 'six' on build hosts without python-six installed. The best approach is to set PYTHON to "python" when calling configure, ie. without a path. This will use 'python' from the path during build time and by ensuring all the installed scripts use '/usr/bin/env' we can ensure python will be found on the target when the scripts are run. Since 'six' is used as part of the build we have to ensure it is -native'ly buildable and we set all the required build and runtime dependencies. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- recipes-networking/openvswitch/openvswitch.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'recipes-networking/openvswitch/openvswitch.inc') diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc index ab1f8feb..71c746fc 100644 --- a/recipes-networking/openvswitch/openvswitch.inc +++ b/recipes-networking/openvswitch/openvswitch.inc @@ -11,11 +11,11 @@ HOMEPAGE = "http://openvswitch.org/" SECTION = "networking" LICENSE = "Apache-2" -DEPENDS += "bridge-utils openssl python perl" +DEPENDS += "bridge-utils openssl python perl python-six-native" RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ python perl perl-module-strict ${PN}-switch \ - bash python-twisted" + bash python-twisted python-six" RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki" RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" RDEPENDS_${PN}-pki = "${PN}" @@ -34,8 +34,8 @@ SRC_URI = "\ " EXTRA_OECONF += "\ - PYTHON=${bindir}/python \ - PYTHON3=${bindir}/python3 \ + PYTHON=python \ + PYTHON3=python3 \ PERL=${bindir}/perl \ " CONFIGUREOPT_DEPTRACK = "" @@ -70,7 +70,7 @@ FILES_${PN} += "${datadir}/ovsdbmonitor" FILES_${PN} += "/run" FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" -inherit autotools update-rc.d systemd python-dir +inherit autotools update-rc.d systemd pythonnative SYSTEMD_PACKAGES = "${PN}-switch" SYSTEMD_SERVICE_${PN}-switch = " \ -- cgit v1.2.3-54-g00ecf