fix(ci/debianrepo): avoid running docker arm64 (#551)
The issue at https://github.com/ooni/probe/issues/1741 is that running `docker --platform linux/arm64` segfaults when running `sudo apt-get update -q` inside the `arm64` docker environment. As far as the `debianrepo` rule is concerned, we can fix the issue by taking advantage of Debian multi-arch. We now configure Debian multi-arch and install the package inside a `debian:stable` environment. We keep using docker. In principle we could not. But the Ubuntu environment provided by GitHub actions does not support multi-arch for arm. Also, I'd like testing this rule to be possible also locally (where I don't have Debian).
This commit is contained in:
+7
-5
@@ -8,12 +8,14 @@ set -e
|
||||
install_flow() {
|
||||
set -x
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
dpkg --add-architecture "$1"
|
||||
apt-get update
|
||||
apt-get install --yes gnupg
|
||||
apt-key adv --verbose --keyserver hkp://keyserver.ubuntu.com --recv-keys 'B5A08F01796E7F521861B449372D1FF271F2DD50'
|
||||
echo "deb http://deb.ooni.org/ unstable main" | tee /etc/apt/sources.list.d/ooniprobe.list
|
||||
echo "deb [arch=$1] http://deb.ooni.org/ unstable main" | tee /etc/apt/sources.list.d/ooniprobe.list
|
||||
apt-get update
|
||||
apt-get install --yes ooniprobe-cli
|
||||
dpkg -l | grep ooniprobe-cli > DEBIAN_INSTALLED_PACKAGE.txt
|
||||
}
|
||||
|
||||
docker_flow() {
|
||||
@@ -23,8 +25,8 @@ docker_flow() {
|
||||
exit 1
|
||||
}
|
||||
set -x
|
||||
docker pull --platform "linux/$1" debian:stable
|
||||
docker run --platform "linux/$1" -v "$(pwd):/ooni" -w /ooni debian:stable ./E2E/debian.sh install
|
||||
docker pull debian:stable
|
||||
docker run -v "$(pwd):/ooni" -w /ooni debian:stable ./E2E/debian.sh install "$1"
|
||||
}
|
||||
|
||||
if [ "$1" = "docker" ]; then
|
||||
@@ -35,10 +37,10 @@ if [ "$1" = "docker" ]; then
|
||||
docker_flow "$2"
|
||||
|
||||
elif [ "$1" = "install" ]; then
|
||||
install_flow
|
||||
install_flow "$2"
|
||||
|
||||
else
|
||||
echo "usage: $0 docker {i386,amd64,armhf,arm64}" 1>&2
|
||||
echo " $0 install" 1>&2
|
||||
echo " $0 install {i386,amd64,armhf,arm64}" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user