c12s-kubespray/roles/bootstrap-os/files/bootstrap.sh
Christian Strack 250541d29d
Use proper pypy download url in bootstrap script (#6555)
The bootstrap-os role uses a bootstrap script to provision a
python interpreter on flatcar and container os hosts. As the
pypy project switched to another hoster, the download url changed.

If applied this will use the new proper pypy download url in bootstrap script
2020-08-21 00:09:47 -07:00

26 lines
584 B
Bash
Executable file

#!/bin/bash
set -e
BINDIR="/opt/bin"
PYPY_VERSION=7.3.1
PYPI_URL="https://downloads.python.org/pypy/pypy3.6-v${PYPY_VERSION}-linux64.tar.bz2"
PYPI_HASH=f67cf1664a336a3e939b58b3cabfe47d893356bdc01f2e17bc912aaa6605db12
mkdir -p $BINDIR
cd $BINDIR
if [[ -e $BINDIR/.bootstrapped ]]; then
exit 0
fi
TAR_FILE=pyp.tar.bz2
wget -O "${TAR_FILE}" "${PYPI_URL}"
echo "${PYPI_HASH} ${TAR_FILE}" | sha256sum -c -
tar -xjf "${TAR_FILE}" && rm "${TAR_FILE}"
mv -n "pypy3.6-v${PYPY_VERSION}-linux64" pypy3
ln -s ./pypy3/bin/pypy3 python
$BINDIR/python --version
touch $BINDIR/.bootstrapped