1
0

Fix postgres update for arm7

This commit is contained in:
nicolas.dorier
2021-10-02 20:43:31 +09:00
parent c6d45bfa04
commit 5b82a9a6ae
2 changed files with 10 additions and 0 deletions

View File

@@ -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

View File

@@ -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