sagemath/sage

tox.ini update: Fix breakage caused by src/ext move, add 32-bit linux environments and other architectures supported by docker

mkoeppe opened this issue · 35 comments

#29053 added tox.ini to support testing the sage distribution in isolated environments via docker.

In 9.1.beta6, the generated docker files do not work due to #21785.

This ticket fixes it and also adds linux environments for various other architectures supported by docker (see https://github.com/docker-library/official-images#architectures-other-than-amd64).

Examples:

$ tox -e docker-debian-buster-standard-i386
$ tox -e docker-ubuntu-bionic-standard-arm64
$ tox -e docker-ubuntu-bionic-minimal-armhf
$ tox -e docker-fedora-31-standard-arm64v8         # Docker for Mac only
$ tox -e docker-ubuntu-latest-standard-s390x       # Docker for Mac only

(The last two work with macOS Docker Desktop because it has binfmt_misc with qemu enabled.)

See also: https://trac.sagemath.org/wiki/ExoticPorts


Resources:

CC: @vbraun @sagetrac-tmonteil @kiwifb @dimpase

Component: porting

Author: Matthias Koeppe

Branch/Commit: 7f122bd

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/29143

Description changed:

--- 
+++ 
@@ -2,3 +2,4 @@
 
 This ticket adds some 32-bit linux environments such as https://hub.docker.com/r/i386/ubuntu/
 
+https://github.com/docker-library/official-images#architectures-other-than-amd64

Dependencies: #29053, #29104

comment:2

on top of #29104 to avoid merge conflicts

Commit: 839d6fb

Last 10 new commits:

98edff6Add build/pkgs/gfortran/distros/fedora.txt
843ca76build/pkgs/fedora.txt: Add python3
bd6a545tox.ini: Add debian stretch, put sid last
23c6334build/pkgs/openblas/distros/arch.txt: Add lapack, cblas
fca6654tox.ini: Add toxenvs local-homebrew-macos-minimal, local-homebrew-macos-standard
e0e8a4ctox.ini [local-homebrew]: Fixup PATH, PKG_CONFIG_PATH, set LDFLAGS, CPPFLAGS; [local-direct]: New
16ca88ftox.ini: Use {envlogdir}; use ln -sf
6a1803dtox.ini [local]: First build the base-toolchain
4b72987tox.ini [local-homebrew]: Set PATH earlier and set ACLOCAL_PATH for bootstrapping
839d6fbtox.ini: Add other archs supported by docker

Description changed:

--- 
+++ 
@@ -1,5 +1,13 @@
 #29053 adds `tox.ini` to support testing the sage distribution in isolated environments via docker.
 
-This ticket adds some 32-bit linux environments such as https://hub.docker.com/r/i386/ubuntu/
+This ticket adds linux environments for various other architectures supported by docker (see https://github.com/docker-library/official-images#architectures-other-than-amd64).
 
-https://github.com/docker-library/official-images#architectures-other-than-amd64
+Examples:
+
+```
+$ tox -e docker-fedora-31-standard-arm64v8
+$ tox -e docker-debian-buster-standard-i386
+$ tox -e docker-ubuntu-latest-standard-s390x
+```
+
+}}}

Author: Matthias Koeppe

Branch pushed to git repo; I updated commit sha1. New commits:

67e14cefixup for llocal

Changed commit from 839d6fb to 67e14ce

comment:7

This works on macOS because it is running everything in a virtualbox.

I haven't succeeded in getting it to work on github actions yet. last attempt: https://github.com/mkoeppe/sage/runs/422184737?check_suite_focus=true

Description changed:

--- 
+++ 
@@ -10,4 +10,3 @@
 $ tox -e docker-ubuntu-latest-standard-s390x
 ```
 
-}}}

Description changed:

--- 
+++ 
@@ -10,3 +10,9 @@
 $ tox -e docker-ubuntu-latest-standard-s390x
 ```
 
+This works out of the box with macOS Docker Desktop because it has `binfmt_misc` with `qemu` enabled.
+- How to Build and Run ARM Docker Containers on x86 Hosts · MatchboxBlog - https://matchboxdorry.gitbooks.io/matchboxblog/content/blogs/build_and_run_arm_images.html
+- Cross Building and Running Multi-Arch Docker Images – Micheal Waltz – DevOps Engineer - https://www.ecliptik.com/Cross-Building-and-Running-Multi-Arch-Docker-Images/
+- multiarch/qemu-user-static - Docker Hub - https://hub.docker.com/r/multiarch/qemu-user-static/
+- multiarch/ubuntu-core - Docker Hub - https://hub.docker.com/r/multiarch/ubuntu-core/
+

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

2141b75Merge tag '9.1.beta3' into t/29104/tox-homebrew
2b0a25etox.ini: Add other archs supported by docker
e3f832cfixup for llocal
b5361e2tox.ini: Restructure docker image:tag construction, add multiarch for Linux Docker

Changed commit from 67e14ce to b5361e2

Description changed:

--- 
+++ 
@@ -5,9 +5,11 @@
 Examples:
 
 ```
-$ tox -e docker-fedora-31-standard-arm64v8
 $ tox -e docker-debian-buster-standard-i386
-$ tox -e docker-ubuntu-latest-standard-s390x
+$ tox -e docker-ubuntu-bionic-standard-arm64
+$ tox -e docker-ubuntu-bionic-minimal-armhf
+$ tox -e docker-fedora-31-standard-arm64v8         # Docker for Mac only
+$ tox -e docker-ubuntu-latest-standard-s390x       # Docker for Mac only
 ```
 
 This works out of the box with macOS Docker Desktop because it has `binfmt_misc` with `qemu` enabled.

Changed dependencies from #29053, #29104 to #29104

Description changed:

--- 
+++ 
@@ -12,7 +12,13 @@
 $ tox -e docker-ubuntu-latest-standard-s390x       # Docker for Mac only
 ```
 
-This works out of the box with macOS Docker Desktop because it has `binfmt_misc` with `qemu` enabled.
+(The last two work with macOS Docker Desktop because it has `binfmt_misc` with `qemu` enabled.)
+
+The branch is on top of #29104 (homebrew).
+
+---
+
+Resources:
 - How to Build and Run ARM Docker Containers on x86 Hosts · MatchboxBlog - https://matchboxdorry.gitbooks.io/matchboxblog/content/blogs/build_and_run_arm_images.html
 - Cross Building and Running Multi-Arch Docker Images – Micheal Waltz – DevOps Engineer - https://www.ecliptik.com/Cross-Building-and-Running-Multi-Arch-Docker-Images/
 - multiarch/qemu-user-static - Docker Hub - https://hub.docker.com/r/multiarch/qemu-user-static/

Description changed:

--- 
+++ 
@@ -16,6 +16,8 @@
 
 The branch is on top of #29104 (homebrew).
 
+See also: https://trac.sagemath.org/wiki/ExoticPorts
+
 ---
 
 Resources:

Branch pushed to git repo; I updated commit sha1. New commits:

4350d0atox.ini: Add raspbian

Changed commit from b5361e2 to 4350d0a

comment:16

Also this ticket needs review and would facilitate testing on 32bit x86 and ARM

Branch pushed to git repo; I updated commit sha1. New commits:

59e1d6fMerge tag '9.1.beta4' into t/29143/add_to_tox_ini_some_32_bit_linux_environments

Changed commit from 4350d0a to 59e1d6f

Branch pushed to git repo; I updated commit sha1. New commits:

4eb201bMerge tag '9.1.beta4' into t/29104/tox-homebrew
254753dMerge branch 't/29104/tox-homebrew' into t/29143/add_to_tox_ini_some_32_bit_linux_environments

Changed commit from 59e1d6f to 254753d

Changed commit from 254753d to 7f122bd

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

749f83etox.ini: Add other archs supported by docker
e941bd5fixup for llocal
2441fe9tox.ini: Restructure docker image:tag construction, add multiarch for Linux Docker
2f057cbtox.ini: Add raspbian
7f122bdbuild/bin/write-dockerfile.sh: src/ext has moved and is no longer needed for the configure phase

Changed dependencies from #29104 to none

Description changed:

--- 
+++ 
@@ -1,6 +1,8 @@
-#29053 adds `tox.ini` to support testing the sage distribution in isolated environments via docker.
+#29053 added `tox.ini` to support testing the sage distribution in isolated environments via docker.
 
-This ticket adds linux environments for various other architectures supported by docker (see https://github.com/docker-library/official-images#architectures-other-than-amd64).
+In 9.1.beta6, the generated docker files do not work due to #21785.
+
+This ticket fixes it and also adds linux environments for various other architectures supported by docker (see https://github.com/docker-library/official-images#architectures-other-than-amd64).
 
 Examples:
 
@@ -14,8 +16,6 @@
 
 (The last two work with macOS Docker Desktop because it has `binfmt_misc` with `qemu` enabled.)
 
-The branch is on top of #29104 (homebrew).
-
 See also: https://trac.sagemath.org/wiki/ExoticPorts
 
 ---
comment:20

The branch is no longer on top of #29104 (homebrew).

Needs review.

Reviewer: Volker Braun

comment:22

Thanks!