Brad Bishop | bec4ebc | 2022-08-03 09:55:16 -0400 | [diff] [blame] | 1 | From 11610debf750f15c7a104db7315dcd7d69e282a8 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> |
| 3 | Date: Sat, 26 Feb 2022 01:52:26 +0000 |
| 4 | Subject: [PATCH] Makefile: Fix non-portable sh check for plugins |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | We previously held a patch that used "=" for comparison, but when |
| 9 | that patch got upstreamed it was changed to "==" which is non-portable, |
| 10 | resulting in an error: |
| 11 | |
| 12 | /bin/sh: 6: [: acipher: unexpected operator |
| 13 | /bin/sh: 6: [: plugins: unexpected operator |
| 14 | /bin/sh: 6: [: hello_world: unexpected operator |
| 15 | /bin/sh: 6: [: hotp: unexpected operator |
| 16 | /bin/sh: 6: [: aes: unexpected operator |
| 17 | /bin/sh: 6: [: random: unexpected operator |
| 18 | /bin/sh: 6: [: secure_storage: unexpected operator |
| 19 | |
| 20 | if /bin/sh doesnt point to bash. |
| 21 | |
| 22 | Which in turn causes our do_install task to fail since plugins arent |
| 23 | where we expect them to be. |
| 24 | |
| 25 | |
| 26 | Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com> |
| 27 | --- |
| 28 | Makefile | 2 +- |
| 29 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 30 | |
| 31 | diff --git a/Makefile b/Makefile |
| 32 | index b3f16aa..9359d95 100644 |
| 33 | --- a/Makefile |
| 34 | +++ b/Makefile |
| 35 | @@ -31,7 +31,7 @@ prepare-for-rootfs: examples |
| 36 | cp -p $$example/host/optee_example_$$example $(OUTPUT_DIR)/ca/; \ |
| 37 | fi; \ |
| 38 | cp -pr $$example/ta/*.ta $(OUTPUT_DIR)/ta/; \ |
| 39 | - if [ $$example == plugins ]; then \ |
| 40 | + if [ $$example = plugins ]; then \ |
| 41 | cp -p plugins/syslog/*.plugin $(OUTPUT_DIR)/plugins/; \ |
| 42 | fi; \ |
| 43 | done |
| 44 | -- |
| 45 | 2.25.1 |
| 46 | |