From 5b82a9a6ae6feb1efba10bd035dfd94cff865f3a Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sat, 2 Oct 2021 20:43:31 +0900 Subject: [PATCH] Fix postgres update for arm7 --- Generated/postgres/migrate-docker-entrypoint.sh | 5 +++++ Production/postgres/migrate-docker-entrypoint.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/Generated/postgres/migrate-docker-entrypoint.sh b/Generated/postgres/migrate-docker-entrypoint.sh index 6557a66..f574ec8 100755 --- a/Generated/postgres/migrate-docker-entrypoint.sh +++ b/Generated/postgres/migrate-docker-entrypoint.sh @@ -18,6 +18,7 @@ if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ # On arm32, postgres doesn't ship those packages, so we download # the binaries from an archive we built from the postgres 9.6.20 image's binaries FALLBACK="https://aois.blob.core.windows.net/public/$CURRENT_PGVERSION-$(uname -m).tar.gz" + FALLBACK_SHARE="https://aois.blob.core.windows.net/public/share-$CURRENT_PGVERSION-$(uname -m).tar.gz" echo "Failure to install postgresql-$CURRENT_PGVERSION and postgresql-contrib-$CURRENT_PGVERSION trying fallback $FALLBACK" apt-get install -y wget pushd . > /dev/null @@ -25,6 +26,10 @@ if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ wget $FALLBACK tar -xvf *.tar.gz rm -f *.tar.gz + cd /usr/share/postgresql + wget $FALLBACK_SHARE + tar -xvf *.tar.gz + rm -f *.tar.gz popd > /dev/null echo "Successfully installed PG utilities via the fallback" fi diff --git a/Production/postgres/migrate-docker-entrypoint.sh b/Production/postgres/migrate-docker-entrypoint.sh index 6557a66..f574ec8 100755 --- a/Production/postgres/migrate-docker-entrypoint.sh +++ b/Production/postgres/migrate-docker-entrypoint.sh @@ -18,6 +18,7 @@ if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ # On arm32, postgres doesn't ship those packages, so we download # the binaries from an archive we built from the postgres 9.6.20 image's binaries FALLBACK="https://aois.blob.core.windows.net/public/$CURRENT_PGVERSION-$(uname -m).tar.gz" + FALLBACK_SHARE="https://aois.blob.core.windows.net/public/share-$CURRENT_PGVERSION-$(uname -m).tar.gz" echo "Failure to install postgresql-$CURRENT_PGVERSION and postgresql-contrib-$CURRENT_PGVERSION trying fallback $FALLBACK" apt-get install -y wget pushd . > /dev/null @@ -25,6 +26,10 @@ if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ wget $FALLBACK tar -xvf *.tar.gz rm -f *.tar.gz + cd /usr/share/postgresql + wget $FALLBACK_SHARE + tar -xvf *.tar.gz + rm -f *.tar.gz popd > /dev/null echo "Successfully installed PG utilities via the fallback" fi