Debian Codegraph @

etc/ci/setup-debian-chroot.sh

raw symbols SCIP
1 #/bin/sh
2 set -e -u -x
3 debian="$1"
4
5 # This script is intended to be called from github hosted runners only.
6 # It does not clean up after itself.
7
8 sudo mkdir /chroot
9 sudo apt-get -q -y -o Acquire::Retries=30 update
10 sudo apt-get -q -y -o Acquire::Retries=30 install debootstrap
11 sudo debootstrap --variant=minbase "$debian" /chroot http://debian-archive.trafficmanager.net/debian/ || ( cat /tmp/tmp.*/debootstrap/debootstrap.log ; exit 1 )
12 sudo mount proc /chroot/proc -t proc
13 sudo mount sysfs /chroot/sys -t sysfs
14 sudo chroot /chroot apt-get -q -y -o Acquire::Retries=30 install sudo git make time jq python3 python-is-python3 ocaml coq libcoq-core-ocaml-dev libfindlib-ocaml-dev ocaml-findlib cabal-install js-of-ocaml
15 sudo chroot /chroot groupadd -g "$(id -g)" "$(id -g -n)"
16 sudo chroot /chroot useradd -g "$(id -g)" -u "$(id -u)" "$(id -u -n)"
17 printf "%s ALL=(ALL) NOPASSWD: ALL\n" "$(id -u -n)" | sudo tee /chroot/etc/sudoers.d/root
18 sudo mkdir -p "/chroot/$HOME"
19 sudo chown "$(id -u):$(id -g)" "/chroot/$HOME"
20 sudo mount --bind "$HOME" "/chroot/$HOME"
21
22 ( cd "$(dirname "$0")" && pwd ) | tee -a "$GITHUB_PATH"