Skip to content

Commit

Permalink
Trac #29105: tox.ini, build/bin/write-dockerfile.sh: Add gentoo linux…
Browse files Browse the repository at this point in the history
…, add more gentoo packages

As a followup to #29053 and #29273, we
- extend `build/bin/write-dockerfile.sh` to generate a Dockerfile using
https://hub.docker.com/r/sheerluck/sage-on-gentoo-stage4
- add `build/pkgs/gentoo*.txt`
- extend `bin/sage-print-system-package-command` to handle gentoo
- add gentoo to the platforms tested in GitHub CI.

To test: `tox -e docker-gentoo-standard`

This is a part of:
- #29060: Meta-ticket: Add Dockerfiles and CI scripts for integration
testing of source and binary distributions and of downstream packages

-----------

Resources:
- https://forums.gentoo.org/viewtopic-t-969278-start-0.html
- cschwan/sage-on-gentoo: (Unofficial) Gentoo Overlay for Sage- and
Sage-related ebuilds: https://github.com/cschwan/sage-on-gentoo
- Project:Overlays/Old User Guide - Gentoo Wiki:
https://wiki.gentoo.org/wiki/Project:Overlays/Old_User_Guide
- Layman - Gentoo Wiki: https://wiki.gentoo.org/wiki/Layman

URL: https://trac.sagemath.org/29105
Reported by: mkoeppe
Ticket author(s): Andrey Belgorodski
Reviewer(s): Matthias Koeppe
  • Loading branch information
Release Manager committed Jun 26, 2020
2 parents 4e23884 + 9959ee9 commit 4896a87
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tox-optional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fail-fast: false
max-parallel: 6
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, centos-7, centos-8, gentoo, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [maximal]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
fail-fast: false
max-parallel: 20
matrix:
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_system_factor: [ubuntu-trusty, ubuntu-xenial, ubuntu-bionic, ubuntu-eoan, ubuntu-focal, debian-jessie, debian-stretch, debian-buster, debian-bullseye, debian-sid, linuxmint-17, linuxmint-18, linuxmint-19, linuxmint-19.3, fedora-26, fedora-27, fedora-28, fedora-29, fedora-30, fedora-31, fedora-32, centos-7, centos-8, gentoo, archlinux-latest, slackware-14.2, conda-forge, ubuntu-bionic-i386, ubuntu-eoan-i386, debian-buster-i386, centos-7-i386]
tox_packages_factor: [minimal, standard]
env:
TOX_ENV: docker-${{ matrix.tox_system_factor }}-${{ matrix.tox_packages_factor }}
Expand Down
3 changes: 3 additions & 0 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ case $system:$command in
@(fedora*|redhat*|centos*):install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}yum install $system_packages"
;;
gentoo*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}emerge $system_packages"
;;
arch*:install)
[ -n "$system_packages" ] && echo "${PROMPT}${SUDO}pacman -S $system_packages"
;;
Expand Down
9 changes: 9 additions & 0 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ EOF
EXISTS="2>/dev/null >/dev/null yum install -y --downloadonly"
INSTALL="yum install -y"
;;
gentoo*)
cat <<EOF
ARG BASE_IMAGE=sheerluck/sage-on-gentoo-stage4:latest
FROM \${BASE_IMAGE} as with-system-packages
EOF
EXISTS="2>/dev/null >/dev/null emerge -f"
UPDATE="" # not needed. "FROM gentoo/portage" used instead
INSTALL="emerge -DNut --with-bdeps=y --complete-graph=y"
;;
slackware*)
# https://docs.slackware.com/slackbook:package_management
cat <<EOF
Expand Down
3 changes: 3 additions & 0 deletions build/pkgs/gentoo-bootstrap.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sys-devel/autoconf
sys-devel/automake
sys-devel/libtool
22 changes: 22 additions & 0 deletions build/pkgs/gentoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
sys-devel/binutils
sys-libs/binutils-libs
sys-devel/make
dev-scheme/guile
dev-libs/libffi
app-arch/tar
sys-devel/gcc
dev-libs/mpc
sys-libs/glibc
sys-kernel/linux-headers
dev-lang/perl
sys-devel/m4
sys-devel/bc
dev-lang/python
sys-devel/flex
app-misc/ca-certificates
sys-devel/gettext
dev-libs/libcroco
dev-libs/libxml2
sys-apps/findutils
sys-apps/which
sys-apps/diffutils
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ setenv =
centos-7: BASE_TAG=centos7
centos-8: BASE_TAG=centos8
#
# https://hub.docker.com/r/sheerluck/sage-on-gentoo-stage4/tags
#
gentoo: SYSTEM=gentoo
gentoo: BASE_IMAGE=sheerluck/sage-on-gentoo-stage4
#
# https://hub.docker.com/_/archlinux/
#
archlinux: SYSTEM=arch
Expand Down

0 comments on commit 4896a87

Please sign in to comment.