From 77e4902dfb7dfb327df73d5c7cd7c7c63e8c02de Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Sat, 22 Feb 2020 21:33:59 +0100 Subject: [PATCH] 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 --- .gitlab-ci/install_pmbootstrap.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/install_pmbootstrap.sh b/.gitlab-ci/install_pmbootstrap.sh index ff50f8fad..3e108bf9f 100755 --- a/.gitlab-ci/install_pmbootstrap.sh +++ b/.gitlab-ci/install_pmbootstrap.sh @@ -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