CI: install_pmb: use git clone, not tarball (!980)

GitLab disabled downloads of tarballs currently, because it was being
exploited for DoS agains their infrastructure. Work around this by using
git clone for now. I've thought about using --depth=1, but that would
break the ability to choose different branches.

Related: https://status.gitlab.com
This commit is contained in:
Oliver Smith
2020-02-22 21:46:49 +01:00
parent fe5a332148
commit 77e4902dfb
+3 -4
View File
@@ -7,7 +7,7 @@
tag="master"
# Get download URL and pmaports path
url="https://gitlab.com/postmarketOS/pmbootstrap/-/archive/$tag/pmbootstrap-$tag.tar.bz2"
url="https://gitlab.com/postmarketOS/pmbootstrap.git"
pmaports="$(cd $(dirname $0)/..; pwd -P)"
# Set up depends and binfmt_misc
@@ -25,9 +25,8 @@ echo 'pmos ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Download pmbootstrap (to /tmp/pmbootstrap)
echo "Downloading pmbootstrap ($tag): $url"
cd /tmp
wget -q -O "pmb.tar.bz2" "$url"
tar -xf "pmb.tar.bz2"
mv pmbootstrap-* pmbootstrap
git clone -q "$url"
git -C pmbootstrap checkout -q "$tag"
# Install to $PATH and init
ln -s /tmp/pmbootstrap/pmbootstrap.py /usr/local/bin/pmbootstrap