From 2297378a070dbf8c81cbade85d405b2188e21122 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Sun, 17 Jul 2022 11:47:43 +0900 Subject: [PATCH 1/3] Fix GraalVM images error on AArch64 systems This one trick makes it build on AArch64 systems, tested on Oracle Cloud A1.Flex instance. --- build/ol/install-gosu.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build/ol/install-gosu.sh b/build/ol/install-gosu.sh index 9a7a4d04c5d..f7c6be84518 100755 --- a/build/ol/install-gosu.sh +++ b/build/ol/install-gosu.sh @@ -1,5 +1,4 @@ #!/bin/bash -[[ $(uname -m) == "aarch64" ]] && curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64 && chmod +x /bin/gosu -[[ $(uname -m) == "x86_64" ]] && curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64 && chmod +x /bin/gosu - +[[ $(uname -m) == "aarch64" ]] && curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64 && chmod +x /bin/gosu || echo "not aarch64" +[[ $(uname -m) == "x86_64" ]] && curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64 && chmod +x /bin/gosu || echo "not x86_64" From 6cda76ac1a932b69bdabcf1aad64ff57b591f437 Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Sun, 17 Jul 2022 23:09:45 +0900 Subject: [PATCH 2/3] use if-else --- build/ol/install-gosu.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build/ol/install-gosu.sh b/build/ol/install-gosu.sh index f7c6be84518..d8954f7e7f0 100755 --- a/build/ol/install-gosu.sh +++ b/build/ol/install-gosu.sh @@ -1,4 +1,11 @@ #!/bin/bash -[[ $(uname -m) == "aarch64" ]] && curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64 && chmod +x /bin/gosu || echo "not aarch64" -[[ $(uname -m) == "x86_64" ]] && curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64 && chmod +x /bin/gosu || echo "not x86_64" +if [[ $(uname -m) == "aarch64" ]]; then + curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-arm64 + chmod +x /bin/gosu +elif [[ $(uname -m) == "x86_64" ]]; then + curl -sL -o /bin/gosu https://github.com/tianon/gosu/releases/download/1.14/gosu-amd64 + chmod +x /bin/gosu +else + echo "Not supported!" +fi From 046b519238642a549163839ce2b8a121285f5b4b Mon Sep 17 00:00:00 2001 From: Noa Himesaka Date: Mon, 18 Jul 2022 00:01:46 +0900 Subject: [PATCH 3/3] exit 1 when not supported --- build/ol/install-gosu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build/ol/install-gosu.sh b/build/ol/install-gosu.sh index d8954f7e7f0..0fcc1cb66d3 100755 --- a/build/ol/install-gosu.sh +++ b/build/ol/install-gosu.sh @@ -8,4 +8,5 @@ elif [[ $(uname -m) == "x86_64" ]]; then chmod +x /bin/gosu else echo "Not supported!" + exit 1 fi