diff options
4 files changed, 61 insertions, 5 deletions
diff --git a/recipes-devtools/python/python-six_1.10.0.bb b/recipes-devtools/python/python-six_1.10.0.bb index a84a4c49..c279f9f1 100644 --- a/recipes-devtools/python/python-six_1.10.0.bb +++ b/recipes-devtools/python/python-six_1.10.0.bb | |||
| @@ -15,3 +15,5 @@ SRC_URI[sha256sum] = "105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a | |||
| 15 | S = "${WORKDIR}/${SRCNAME}-${PV}" | 15 | S = "${WORKDIR}/${SRCNAME}-${PV}" |
| 16 | 16 | ||
| 17 | inherit setuptools | 17 | inherit setuptools |
| 18 | |||
| 19 | BBCLASSEXTEND = "native" \ No newline at end of file | ||
diff --git a/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch b/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch new file mode 100644 index 00000000..6091930e --- /dev/null +++ b/recipes-networking/openvswitch/files/python-make-remaining-scripts-use-usr-bin-env.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | From 33769657e951da855b9258eb91fa9838373023ad Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 3 | Date: Fri, 13 Jan 2017 16:12:55 -0500 | ||
| 4 | Subject: [PATCH] python: make remaining scripts use /usr/bin/env | ||
| 5 | |||
| 6 | Unfortunately there is no concept of a host python vs. target python | ||
| 7 | to facilitate cross compilation. There is only one PYTHON variable and | ||
| 8 | this is used during building and in the header of python scripts after | ||
| 9 | installation. The best approach for cross compilation is to thus to | ||
| 10 | ensure python is in the path and avoid passing a path as part of | ||
| 11 | PYTHON. To make this function smoothly all installed scripts should | ||
| 12 | make use of /usr/bin/env to increase the chances of finding python. | ||
| 13 | |||
| 14 | Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> | ||
| 15 | --- | ||
| 16 | ovsdb/ovsdb-dot.in | 2 +- | ||
| 17 | ovsdb/ovsdb-idlc.in | 2 +- | ||
| 18 | utilities/bugtool/ovs-bugtool.in | 2 +- | ||
| 19 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/ovsdb/ovsdb-dot.in b/ovsdb/ovsdb-dot.in | ||
| 22 | index 134ce22..893c408 100755 | ||
| 23 | --- a/ovsdb/ovsdb-dot.in | ||
| 24 | +++ b/ovsdb/ovsdb-dot.in | ||
| 25 | @@ -1,4 +1,4 @@ | ||
| 26 | -#! @PYTHON@ | ||
| 27 | +#! /usr/bin/env @PYTHON@ | ||
| 28 | |||
| 29 | from datetime import date | ||
| 30 | import ovs.db.error | ||
| 31 | diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in | ||
| 32 | index cd4532e..dceb02f 100755 | ||
| 33 | --- a/ovsdb/ovsdb-idlc.in | ||
| 34 | +++ b/ovsdb/ovsdb-idlc.in | ||
| 35 | @@ -1,4 +1,4 @@ | ||
| 36 | -#! @PYTHON@ | ||
| 37 | +#! /usr/bin/env @PYTHON@ | ||
| 38 | |||
| 39 | import getopt | ||
| 40 | import os | ||
| 41 | diff --git a/utilities/bugtool/ovs-bugtool.in b/utilities/bugtool/ovs-bugtool.in | ||
| 42 | index bb771b0..152d171 100755 | ||
| 43 | --- a/utilities/bugtool/ovs-bugtool.in | ||
| 44 | +++ b/utilities/bugtool/ovs-bugtool.in | ||
| 45 | @@ -1,4 +1,4 @@ | ||
| 46 | -#! @PYTHON@ | ||
| 47 | +#! /usr/bin/env @PYTHON@ | ||
| 48 | |||
| 49 | # This library is free software; you can redistribute it and/or | ||
| 50 | # modify it under the terms of version 2.1 of the GNU Lesser General Public | ||
| 51 | -- | ||
| 52 | 2.7.4 | ||
| 53 | |||
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/" | |||
| 11 | SECTION = "networking" | 11 | SECTION = "networking" |
| 12 | LICENSE = "Apache-2" | 12 | LICENSE = "Apache-2" |
| 13 | 13 | ||
| 14 | DEPENDS += "bridge-utils openssl python perl" | 14 | DEPENDS += "bridge-utils openssl python perl python-six-native" |
| 15 | 15 | ||
| 16 | RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ | 16 | RDEPENDS_${PN} += "util-linux-uuidgen util-linux-libuuid coreutils \ |
| 17 | python perl perl-module-strict ${PN}-switch \ | 17 | python perl perl-module-strict ${PN}-switch \ |
| 18 | bash python-twisted" | 18 | bash python-twisted python-six" |
| 19 | RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki" | 19 | RDEPENDS_${PN}-testcontroller = "${PN} lsb ${PN}-pki" |
| 20 | RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" | 20 | RDEPENDS_${PN}-switch = "${PN} openssl procps util-linux-uuidgen" |
| 21 | RDEPENDS_${PN}-pki = "${PN}" | 21 | RDEPENDS_${PN}-pki = "${PN}" |
| @@ -34,8 +34,8 @@ SRC_URI = "\ | |||
| 34 | " | 34 | " |
| 35 | 35 | ||
| 36 | EXTRA_OECONF += "\ | 36 | EXTRA_OECONF += "\ |
| 37 | PYTHON=${bindir}/python \ | 37 | PYTHON=python \ |
| 38 | PYTHON3=${bindir}/python3 \ | 38 | PYTHON3=python3 \ |
| 39 | PERL=${bindir}/perl \ | 39 | PERL=${bindir}/perl \ |
| 40 | " | 40 | " |
| 41 | CONFIGUREOPT_DEPTRACK = "" | 41 | CONFIGUREOPT_DEPTRACK = "" |
| @@ -70,7 +70,7 @@ FILES_${PN} += "${datadir}/ovsdbmonitor" | |||
| 70 | FILES_${PN} += "/run" | 70 | FILES_${PN} += "/run" |
| 71 | 71 | ||
| 72 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" | 72 | FILES_${PN} += "${libdir}/python${PYTHON_BASEVERSION}/" |
| 73 | inherit autotools update-rc.d systemd python-dir | 73 | inherit autotools update-rc.d systemd pythonnative |
| 74 | 74 | ||
| 75 | SYSTEMD_PACKAGES = "${PN}-switch" | 75 | SYSTEMD_PACKAGES = "${PN}-switch" |
| 76 | SYSTEMD_SERVICE_${PN}-switch = " \ | 76 | SYSTEMD_SERVICE_${PN}-switch = " \ |
diff --git a/recipes-networking/openvswitch/openvswitch_git.bb b/recipes-networking/openvswitch/openvswitch_git.bb index 55e3a9a2..455fab05 100644 --- a/recipes-networking/openvswitch/openvswitch_git.bb +++ b/recipes-networking/openvswitch/openvswitch_git.bb | |||
| @@ -24,6 +24,7 @@ SRC_URI += "\ | |||
| 24 | file://disable_m4_check.patch \ | 24 | file://disable_m4_check.patch \ |
| 25 | file://kernel_module.patch \ | 25 | file://kernel_module.patch \ |
| 26 | file://openvswitch-ptest-Fix-python-path.patch \ | 26 | file://openvswitch-ptest-Fix-python-path.patch \ |
| 27 | file://python-make-remaining-scripts-use-usr-bin-env.patch \ | ||
| 27 | " | 28 | " |
| 28 | 29 | ||
| 29 | LIC_FILES_CHKSUM = "file://COPYING;md5=17b2c9d4c70853a09c0e143137754b35" | 30 | LIC_FILES_CHKSUM = "file://COPYING;md5=17b2c9d4c70853a09c0e143137754b35" |
