aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJate Sujjavanich <jatedev@gmail.com>2021-08-13 16:20:47 +0000
committerArmin Kuster <akuster808@gmail.com>2021-08-15 07:14:11 -0700
commita64eec177151a7076a2fd6937e4abdb8e2264a59 (patch)
tree951428717f29fa5b281cae3a3a6f2fdb243a90ee
parentb472160c77dcfdf46e4d4eca69428b971238f4a9 (diff)
downloadmeta-openembedded-a64eec177151a7076a2fd6937e4abdb8e2264a59.tar.gz
meta-openembedded-a64eec177151a7076a2fd6937e4abdb8e2264a59.tar.bz2
meta-openembedded-a64eec177151a7076a2fd6937e4abdb8e2264a59.zip
ufw: Fix interpreter for installed ufw and test ufw
Revert patch to setup-only-make-one-reference-to-env.patch and make patch for python3 interpreter fix apply to runs of setup.py during self test as well as installs. Reported-by: Kenta Nakamura <Nakamura.Kenta@bp.MitsubishiElectric.co.jp> Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/ufw/ufw/Add-code-to-detect-openembedded-python-interpreter.patch8
-rw-r--r--meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch14
2 files changed, 6 insertions, 16 deletions
diff --git a/meta-networking/recipes-connectivity/ufw/ufw/Add-code-to-detect-openembedded-python-interpreter.patch b/meta-networking/recipes-connectivity/ufw/ufw/Add-code-to-detect-openembedded-python-interpreter.patch
index 85d51ca21..e1fcf0ca5 100644
--- a/meta-networking/recipes-connectivity/ufw/ufw/Add-code-to-detect-openembedded-python-interpreter.patch
+++ b/meta-networking/recipes-connectivity/ufw/ufw/Add-code-to-detect-openembedded-python-interpreter.patch
@@ -1,7 +1,7 @@
Add code to detect openembedded python interpreter
-OE does not use /usr/bin/env as part of the interpreter, so it does not
-update ufw with the interpreter name.
+OE does not use /usr/bin/env as part of the interpreter, Instead, it's a
+full path in sys.executable.
Upstream-Status: Inappropriate (Embedded)
Signed-off-by: Jate Sujjavanich <jatedev@gmail.com>
@@ -17,9 +17,9 @@ index 75c1105..3f9a5e0 100644
"-i.jjm",
"1s%^#.*python.*%#! " + sys.executable + "%g",
'staging/ufw'])
-+ elif '-native/python' in sys.executable and \
++ elif '/python' in sys.executable and \
+ os.path.basename(sys.executable) in ['python', 'python3']:
-+ print("Detected oe native python " + os.path.basename(sys.executable))
++ print("Detected full path " + sys.executable + ". substituting " + os.path.basename(sys.executable))
+ subprocess.call(["sed",
+ "-i.jjm",
+ "1s%python$%"
diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch b/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch
index f487a6fd6..ff704b5a4 100644
--- a/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch
+++ b/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch
@@ -14,10 +14,6 @@ detected or specified on the build line.
Upstream-Status: Inappropriate [ embedded specific ]
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-
-Added conditional to handle sys.executable without env on python3
-
-Signed-off-by Jate Sujjavanich <jatedev@gmail.com>
---
setup.py | 34 ++++++++++++++++++++++++++++------
1 file changed, 28 insertions(+), 6 deletions(-)
@@ -47,7 +43,7 @@ index b13d11c..73acdef 100644
# Now byte-compile everything
super(Install, self).run()
-@@ -107,12 +112,29 @@ class Install(_install, object):
+@@ -107,12 +112,23 @@ class Install(_install, object):
for f in [ script, manpage, manpage_f ]:
self.mkpath(os.path.dirname(f))
@@ -66,13 +62,7 @@ index b13d11c..73acdef 100644
- 'staging/ufw'])
+ print("Updating staging/ufw to use (%s)" % (sys.executable))
+
-+ if not re.search("(/usr/bin/env)", sys.executable):
-+ print("Did not find 'env' in sys.executable (%s)" % (sys.executable))
-+ subprocess.call(["sed",
-+ "-i",
-+ "1s%^#.*python.*%#! /usr/bin/env " + sys.executable + "%g",
-+ 'staging/ufw'])
-+ elif re.search("(/usr/bin/env)", sys.executable):
++ if re.search("(/usr/bin/env)", sys.executable):
+ print("found 'env' in sys.executable (%s)" % (sys.executable))
+ subprocess.call(["sed",
+ "-i.jjm",