From ec6f9cebc7f2e30cb359eb4dae961a46672aa984 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Thu, 26 Aug 2021 17:07:19 +0200 Subject: [PATCH 01/18] docker: update some dockerfiles The modified implementations have been tested on Debian bullseye. * prefer latest Ubuntu image, hopefully reducing the image count * for Ubuntu versions, prefer numerical versions to unsorted codenames * prefer packaged build systems to local rebuilds * prefer the current default version of each build system * delegate resolution of indirect dependencies to apt --- impls/ada.2/Dockerfile | 7 ++----- impls/ada/Dockerfile | 7 ++----- impls/awk/Dockerfile | 5 +---- impls/bash/Dockerfile | 5 +---- impls/c.2/Dockerfile | 11 ++--------- impls/clojure/Dockerfile | 11 ++--------- impls/coffee/Dockerfile | 22 ++-------------------- impls/elisp/Dockerfile | 9 ++------- impls/elixir/Dockerfile | 11 +---------- impls/erlang/Dockerfile | 18 ++---------------- impls/erlang/rebar.config | 2 -- impls/es6/Dockerfile | 17 ++--------------- impls/fsharp/Dockerfile | 8 +------- impls/gnu-smalltalk/Dockerfile | 9 ++------- impls/go/Dockerfile | 11 ++--------- impls/groovy/Dockerfile | 11 +---------- impls/guile/Dockerfile | 16 ++-------------- impls/haskell/Dockerfile | 18 ++---------------- impls/java/Dockerfile | 10 ++-------- impls/js/Dockerfile | 17 ++--------------- impls/make/Dockerfile | 3 --- impls/miniMAL/Dockerfile | 19 ++----------------- impls/nasm/Dockerfile | 5 +---- impls/nim/Dockerfile | 16 ++-------------- impls/objpascal/Dockerfile | 7 ++----- impls/ocaml/Dockerfile | 6 +----- impls/perl/Dockerfile | 7 ++----- impls/perl6/Dockerfile | 16 ++-------------- impls/php/Dockerfile | 7 ++----- impls/picolisp/Dockerfile | 8 ++------ impls/prolog/Dockerfile | 2 +- impls/ps/Dockerfile | 5 +---- impls/python/Dockerfile | 5 +---- impls/ruby/Dockerfile | 5 +---- impls/rust/Dockerfile | 22 ++++++++++++++++++++-- 35 files changed, 73 insertions(+), 285 deletions(-) diff --git a/impls/ada.2/Dockerfile b/impls/ada.2/Dockerfile index b05b41362e..4d90d543b7 100644 --- a/impls/ada.2/Dockerfile +++ b/impls/ada.2/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,4 +19,4 @@ WORKDIR /mal ########################################################## # GNU Ada compiler -RUN apt-get -y install gnat-8 +RUN apt-get -y install gnat libreadline-dev diff --git a/impls/ada/Dockerfile b/impls/ada/Dockerfile index 5eb272abe0..8d10f62380 100755 --- a/impls/ada/Dockerfile +++ b/impls/ada/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,4 +19,4 @@ WORKDIR /mal ########################################################## # GNU Ada compiler -RUN apt-get -y install gnat-4.9 +RUN apt-get -y install gnat diff --git a/impls/awk/Dockerfile b/impls/awk/Dockerfile index 9d0e12cee1..43a72f44b7 100644 --- a/impls/awk/Dockerfile +++ b/impls/awk/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/bash/Dockerfile b/impls/bash/Dockerfile index 71720eb5e5..367b0a0366 100644 --- a/impls/bash/Dockerfile +++ b/impls/bash/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/c.2/Dockerfile b/impls/c.2/Dockerfile index 79bab2ecad..3e34661b48 100644 --- a/impls/c.2/Dockerfile +++ b/impls/c.2/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 MAINTAINER Duncan Watts ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -#RUN apt-get -y install curl - RUN mkdir -p /mal WORKDIR /mal @@ -21,8 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Install gcc -RUN apt-get -y install gcc - -# Libraries needed for the C impl -RUN apt-get -y install libffi-dev libgc-dev libedit-dev +RUN apt-get -y install gcc libffi-dev libgc-dev libedit-dev diff --git a/impls/clojure/Dockerfile b/impls/clojure/Dockerfile index 2d1dea49a3..debfcddee9 100644 --- a/impls/clojure/Dockerfile +++ b/impls/clojure/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -25,13 +25,7 @@ WORKDIR /mal # Clojure (Java and lein) # -RUN apt-get -y install openjdk-8-jdk - -ADD https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein \ - /usr/local/bin/lein -RUN chmod 0755 /usr/local/bin/lein -ENV LEIN_HOME /mal/.lein -ENV LEIN_JVM_OPTS -Duser.home=/mal +RUN apt-get -y install leiningen # # ClojureScript (Node and Lumo) @@ -53,4 +47,3 @@ ENV NPM_CONFIG_CACHE /mal/.npm #RUN npm install -g ffi lumo-cljs ENV HOME=/mal - diff --git a/impls/coffee/Dockerfile b/impls/coffee/Dockerfile index 075c304e7f..96b4513ddf 100644 --- a/impls/coffee/Dockerfile +++ b/impls/coffee/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,19 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 10.x stable -RUN apt-get -y install gnupg -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install nodejs -RUN apt-get -y install nodejs - -ENV NPM_CONFIG_CACHE /mal/.npm - -# CoffeeScript specific -RUN npm install -g coffeescript -RUN touch /.coffee_history && chmod go+w /.coffee_history - +RUN apt-get -y install coffeescript g++ libreadline-dev npm diff --git a/impls/elisp/Dockerfile b/impls/elisp/Dockerfile index 1eefd6c0c8..7305a78611 100644 --- a/impls/elisp/Dockerfile +++ b/impls/elisp/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:wily +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,6 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Emacs 24 -RUN apt-get -y install emacs24-nox - +RUN apt-get -y install emacs-nox diff --git a/impls/elixir/Dockerfile b/impls/elixir/Dockerfile index 758c9036a6..8b403453e1 100644 --- a/impls/elixir/Dockerfile +++ b/impls/elixir/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,10 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Elixir -RUN apt-get install -y wget -RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb -RUN dpkg -i erlang-solutions_1.0_all.deb -RUN apt-get update -y -RUN apt-get install -y esl-erlang RUN apt-get install -y elixir diff --git a/impls/erlang/Dockerfile b/impls/erlang/Dockerfile index f2b907627c..1c1255faa4 100644 --- a/impls/erlang/Dockerfile +++ b/impls/erlang/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,15 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Erlang R17 (so I can use maps) -RUN apt-get -y install build-essential libncurses5-dev libssl-dev -RUN cd /tmp && curl -O http://www.erlang.org/download/otp_src_17.5.tar.gz \ - && tar -C /tmp -zxf /tmp/otp_src_17.5.tar.gz \ - && cd /tmp/otp_src_17.5 && ./configure && make && make install \ - && rm -rf /tmp/otp_src_17.5 /tmp/otp_src_17.5.tar.gz -# Rebar for building the Erlang implementation -RUN apt-get -y install git sudo -RUN cd /tmp/ && git clone -q https://github.com/rebar/rebar.git \ - && cd /tmp/rebar && ./bootstrap && cp rebar /usr/local/bin \ - && rm -rf /tmp/rebar - +RUN apt-get -y install erlang rebar diff --git a/impls/erlang/rebar.config b/impls/erlang/rebar.config index f18253f3d9..80e028cbac 100644 --- a/impls/erlang/rebar.config +++ b/impls/erlang/rebar.config @@ -2,8 +2,6 @@ %% rebar configuration file (https://github.com/rebar/rebar) %% -{require_otp_vsn, "17|18"}. - {erl_opts, [debug_info, fail_on_warning]}. {clean_files, [ diff --git a/impls/es6/Dockerfile b/impls/es6/Dockerfile index f7677e91c8..0fbab69408 100644 --- a/impls/es6/Dockerfile +++ b/impls/es6/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,14 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 10.x stable -RUN apt-get -y install gnupg -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install nodejs -RUN apt-get -y install nodejs - -ENV NPM_CONFIG_CACHE /mal/.npm +RUN apt-get install -y g++ libreadline-dev npm diff --git a/impls/fsharp/Dockerfile b/impls/fsharp/Dockerfile index 01cf8044c7..d0b6a74548 100644 --- a/impls/fsharp/Dockerfile +++ b/impls/fsharp/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,7 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Deps for Mono-based languages (C#, VB.Net) -RUN apt-get -y install mono-runtime mono-mcs mono-vbnc mono-devel - RUN apt-get -y install fsharp diff --git a/impls/gnu-smalltalk/Dockerfile b/impls/gnu-smalltalk/Dockerfile index 81b7cebc03..2c613518f0 100644 --- a/impls/gnu-smalltalk/Dockerfile +++ b/impls/gnu-smalltalk/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:wily +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,6 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# picolisp -RUN apt-get -y install gnu-smalltalk - +RUN apt-get -y install gnu-smalltalk libreadline-dev diff --git a/impls/go/Dockerfile b/impls/go/Dockerfile index 2be2be3f8a..00e343905a 100644 --- a/impls/go/Dockerfile +++ b/impls/go/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,8 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Install g++ for any C/C++ based implementations -RUN apt-get -y install g++ - -RUN apt-get -y install pkg-config -RUN apt-get -y install golang +RUN apt-get -y install g++ golang libedit-dev pkg-config diff --git a/impls/groovy/Dockerfile b/impls/groovy/Dockerfile index 196698ab78..2359596ee9 100644 --- a/impls/groovy/Dockerfile +++ b/impls/groovy/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,10 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Java and Groovy -RUN apt-get -y install openjdk-7-jdk -#RUN apt-get -y install maven2 -#ENV MAVEN_OPTS -Duser.home=/mal -RUN apt-get -y install ant - RUN apt-get -y install groovy diff --git a/impls/guile/Dockerfile b/impls/guile/Dockerfile index 0b4ae22bc3..b6ddf4565a 100644 --- a/impls/guile/Dockerfile +++ b/impls/guile/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,13 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Guile -RUN apt-get -y install libunistring-dev libgc-dev autoconf libtool flex gettext texinfo libgmp-dev -RUN apt-get -y install git pkg-config libffi-dev -# TODO: remove /tmp/guile in same command -RUN git clone git://git.sv.gnu.org/guile.git /tmp/guile \ - && cd /tmp/guile && ./autogen.sh && ./configure && make && make install -RUN ldconfig -# TODO: move this up with other deps -RUN apt-get -y install libpcre3 libpcre3-dev - +RUN apt-get -y install guile-3.0 libpcre3-dev diff --git a/impls/haskell/Dockerfile b/impls/haskell/Dockerfile index 73650f205a..53f4e74b0d 100644 --- a/impls/haskell/Dockerfile +++ b/impls/haskell/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:wily +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,15 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Haskell -RUN apt-get install -y software-properties-common && \ - add-apt-repository -y ppa:hvr/ghc && \ - apt-get update && \ - apt-get install -y cabal-install-1.22 ghc-7.10.3 - -ENV PATH /opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH - -RUN cabal update && cabal install --global readline -# TODO: editline when compile bug fixed -RUN cabal install --global parsec - +apt-get install -y ghc libghc-readline-dev diff --git a/impls/java/Dockerfile b/impls/java/Dockerfile index 7c9fdd4aea..62ea309ec8 100644 --- a/impls/java/Dockerfile +++ b/impls/java/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:10.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,7 +19,4 @@ WORKDIR /mal ########################################################## # Java and maven -RUN apt-get -y install openjdk-8-jdk -RUN apt-get -y install maven -ENV MAVEN_OPTS -Duser.home=/mal - +RUN apt-get -y install default-jdk-headless maven diff --git a/impls/js/Dockerfile b/impls/js/Dockerfile index f7677e91c8..685ce1f3cf 100644 --- a/impls/js/Dockerfile +++ b/impls/js/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,14 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 10.x stable -RUN apt-get -y install gnupg -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install nodejs -RUN apt-get -y install nodejs - -ENV NPM_CONFIG_CACHE /mal/.npm +RUN apt-get -y install g++ libreadline-dev nodejs npm diff --git a/impls/make/Dockerfile b/impls/make/Dockerfile index 5f61062ee3..41ff17169d 100644 --- a/impls/make/Dockerfile +++ b/impls/make/Dockerfile @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/miniMAL/Dockerfile b/impls/miniMAL/Dockerfile index fa54933ccb..31f42062d2 100644 --- a/impls/miniMAL/Dockerfile +++ b/impls/miniMAL/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,17 +18,5 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 10.x stable -RUN apt-get -y install gnupg -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install nodejs -RUN apt-get -y install nodejs - -ENV NPM_CONFIG_CACHE /mal/.npm - -# install miniMAL +RUN apt-get -y install g++ libreadline-dev nodejs npm RUN npm install -g minimal-lisp diff --git a/impls/nasm/Dockerfile b/impls/nasm/Dockerfile index 29008471ee..4964f13003 100644 --- a/impls/nasm/Dockerfile +++ b/impls/nasm/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/nim/Dockerfile b/impls/nim/Dockerfile index 6b30bad9a5..d32baaeaf7 100644 --- a/impls/nim/Dockerfile +++ b/impls/nim/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,15 +18,6 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Install g++ for any C/C++ based implementations -RUN apt-get -y install g++ - -# Nim -RUN apt-get -y install xz-utils -RUN cd /tmp && curl -O https://nim-lang.org/download/nim-1.0.4.tar.xz \ - && tar xvJf /tmp/nim-1.0.4.tar.xz && cd nim-1.0.4 \ - && make && sh install.sh /usr/local/bin \ - && cp bin/nim /usr/local/bin/ \ - && rm -r /tmp/nim-1.0.4 +RUN apt-get -y install gcc libc-dev nim ENV HOME /mal diff --git a/impls/objpascal/Dockerfile b/impls/objpascal/Dockerfile index 31bb193b10..029944dba8 100644 --- a/impls/objpascal/Dockerfile +++ b/impls/objpascal/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,4 +19,4 @@ WORKDIR /mal ########################################################## # Free Pascal -RUN apt-get -y install libc6-dev fp-compiler +RUN apt-get -y install libc-dev fp-compiler libedit-dev diff --git a/impls/ocaml/Dockerfile b/impls/ocaml/Dockerfile index 399553dbc3..ab587fb1d4 100644 --- a/impls/ocaml/Dockerfile +++ b/impls/ocaml/Dockerfile @@ -1,4 +1,4 @@ -[FROM ubuntu:vivid +[FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,4 +19,3 @@ WORKDIR /mal ########################################################## RUN apt-get -y install ocaml-batteries-included - diff --git a/impls/perl/Dockerfile b/impls/perl/Dockerfile index b36833e072..b3f1141f5d 100644 --- a/impls/perl/Dockerfile +++ b/impls/perl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,4 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install perl libapp-fatpacker-perl +RUN apt-get -y install perl diff --git a/impls/perl6/Dockerfile b/impls/perl6/Dockerfile index ea081e882a..19d1f714ca 100644 --- a/impls/perl6/Dockerfile +++ b/impls/perl6/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,13 +19,4 @@ WORKDIR /mal ########################################################## # Perl6 build deps -RUN apt-get -y install libfile-copy-recursive-perl build-essential git - -RUN curl -O http://rakudo.org/downloads/star/rakudo-star-2016.07.tar.gz && \ - tar xzf rakudo-star-2016.07.tar.gz && \ - cd rakudo-star-2016.07 && \ - perl Configure.pl --prefix=/usr --gen-moar --gen-nqp --backends=moar && \ - make && \ - make install && \ - cd .. && \ - rm -rf rakudo-star-2016.07* +RUN apt-get -y install rakudo diff --git a/impls/php/Dockerfile b/impls/php/Dockerfile index 87709d4d9a..c14b097856 100644 --- a/impls/php/Dockerfile +++ b/impls/php/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,4 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install php5-cli +RUN apt-get -y install php-cli diff --git a/impls/picolisp/Dockerfile b/impls/picolisp/Dockerfile index 36282ddb5e..7cbea6e14b 100644 --- a/impls/picolisp/Dockerfile +++ b/impls/picolisp/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:wily +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -22,5 +19,4 @@ WORKDIR /mal ########################################################## # picolisp -RUN apt-get -y install picolisp - +RUN apt-get -y install picolisp libreadline-dev diff --git a/impls/prolog/Dockerfile b/impls/prolog/Dockerfile index ead962ed50..e0478546cf 100644 --- a/impls/prolog/Dockerfile +++ b/impls/prolog/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## diff --git a/impls/ps/Dockerfile b/impls/ps/Dockerfile index d91f68e1ea..7c41d1f942 100644 --- a/impls/ps/Dockerfile +++ b/impls/ps/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/python/Dockerfile b/impls/python/Dockerfile index 3e64cc116c..6afda15e43 100644 --- a/impls/python/Dockerfile +++ b/impls/python/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/ruby/Dockerfile b/impls/ruby/Dockerfile index 3bda3bf706..13e9a3a613 100644 --- a/impls/ruby/Dockerfile +++ b/impls/ruby/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/rust/Dockerfile b/impls/rust/Dockerfile index 661df9e6ce..9fde8859d7 100644 --- a/impls/rust/Dockerfile +++ b/impls/rust/Dockerfile @@ -1,5 +1,23 @@ -FROM rust:1.38.0 +FROM ubuntu:20.04 +MAINTAINER Joel Martin -ENV CARGO_HOME /mal +########################################################## +# General requirements for testing or common across many +# implementations +########################################################## + +RUN apt-get -y update +# Required for running tests +RUN apt-get -y install make python + +RUN mkdir -p /mal WORKDIR /mal + +########################################################## +# Specific implementation requirements +########################################################## + +RUN apt-get -y install cargo + +ENV CARGO_HOME /mal From 8ea9dfbe8dc20750c28d0a7b16a73d6ab572c9fa Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sat, 28 Aug 2021 02:30:05 +0200 Subject: [PATCH 02/18] xslt: update Dockerfile --- impls/xslt/Dockerfile | 16 ++-------------- impls/xslt/harness.py | 7 +++++-- impls/xslt/run | 2 +- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/impls/xslt/Dockerfile b/impls/xslt/Dockerfile index 4e94d7a62a..e522c28a3d 100644 --- a/impls/xslt/Dockerfile +++ b/impls/xslt/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:bionic +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev libpcre3-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,13 +18,4 @@ WORKDIR /mal # Specific implementation requirements ######################################################### -RUN apt-get -y install python3.8 openjdk-8-jre -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.8 10 - -RUN curl https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/9.9.1-6/Saxon-HE-9.9.1-6.jar -O - -RUN mv Saxon-HE-9.9.1-6.jar /bin/Saxon-HE-9.9.1-6.jar - -RUN echo -n "#!/bin/sh\njava -Xmx2G -cp /bin/Saxon-HE-9.9.1-6.jar net.sf.saxon.Transform \"\$@\"" > /usr/bin/saxon && chmod +x /usr/bin/saxon - - +RUN apt-get -y install default-jdk-headless libsaxonhe-java python3 diff --git a/impls/xslt/harness.py b/impls/xslt/harness.py index 72bf8d8835..9c51bb2952 100644 --- a/impls/xslt/harness.py +++ b/impls/xslt/harness.py @@ -7,6 +7,9 @@ from threading import Lock from collections import deque +saxon_jar = '/usr/share/java/Saxon-HE-*.jar' +saxon = f'java -Xmx2G -cp {saxon_jar} net.sf.saxon.Transform' + fname = sys.argv[1] args = sys.argv[2:] tree = ET.Element('mal') @@ -88,7 +91,7 @@ def serve_one_request(res): with open('xsl-null.xml', 'w') as f: f.write(req.attrib['context']) - if os.system(f'saxon -xsl:xsl-eval.xslt -s:xsl-null.xml > xsl-eval_output.xml'): + if os.system(f'{saxon} -xsl:xsl-eval.xslt -s:xsl-null.xml > xsl-eval_output.xml'): x = '' else: with open('xsl-eval_output.xml', 'r') as f: @@ -113,7 +116,7 @@ def transform(do_print=True): setup_request_file() pid = os.fork() if pid == 0: - os.system(f'saxon -xsl:"{fname}" -s:xslt_input.xml -TP:perf.html > xslt_output.xml 2> xsl_error.xml') + os.system(f'{saxon} -xsl:"{fname}" -s:xslt_input.xml -TP:perf.html > xslt_output.xml 2> xsl_error.xml') HALT = True else: THE_PID = pid diff --git a/impls/xslt/run b/impls/xslt/run index 41f549b5bd..a01367c2f9 100755 --- a/impls/xslt/run +++ b/impls/xslt/run @@ -1,2 +1,2 @@ #!/bin/bash -exec python harness.py $(dirname $0)/${STEP:-stepA_mal}.xslt "${@}" +exec python3 harness.py $(dirname $0)/${STEP:-stepA_mal}.xslt "${@}" From 0844ed8c41084437e03c70deae7921bdcfdc5dd2 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 29 Aug 2021 00:26:36 +0200 Subject: [PATCH 03/18] pike: update Dockerfile --- impls/pike/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/impls/pike/Dockerfile b/impls/pike/Dockerfile index 121d2e8b73..c555bf0c60 100644 --- a/impls/pike/Dockerfile +++ b/impls/pike/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,4 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install pike8.0 pike8.0-pcre +RUN apt-get -y install pike8.0 From b6e2cf1fc4cbe066adf5dd45e97fa91bf92a4128 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 29 Aug 2021 00:35:35 +0200 Subject: [PATCH 04/18] tcl: update Dockerfile --- impls/tcl/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/impls/tcl/Dockerfile b/impls/tcl/Dockerfile index 2ad3f330c3..e72e37f3c9 100644 --- a/impls/tcl/Dockerfile +++ b/impls/tcl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal From 61d5c9167e25195a711ff274f776612f730ebdee Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 29 Aug 2021 10:44:24 +0200 Subject: [PATCH 05/18] ocaml: remove curious bracket form Dockerfile Spotted by dubek. The bracket was apparently ignored. --- impls/ocaml/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impls/ocaml/Dockerfile b/impls/ocaml/Dockerfile index ab587fb1d4..bf5d2b564b 100644 --- a/impls/ocaml/Dockerfile +++ b/impls/ocaml/Dockerfile @@ -1,4 +1,4 @@ -[FROM ubuntu:20.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## From 7bc4d67cc635e5f380065b2fb190b5e2558c2b0d Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 29 Aug 2021 11:16:24 +0200 Subject: [PATCH 06/18] xslt: remove intermediate run script The initial motivation is to provide an explicit path to the python3 interpreter, as the versioned executable is not always in PATH. --- impls/xslt/harness.py | 156 ---------------------------------------- impls/xslt/run | 163 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 161 insertions(+), 158 deletions(-) delete mode 100644 impls/xslt/harness.py diff --git a/impls/xslt/harness.py b/impls/xslt/harness.py deleted file mode 100644 index 9c51bb2952..0000000000 --- a/impls/xslt/harness.py +++ /dev/null @@ -1,156 +0,0 @@ -import time -import os -import readline -import sys -import xml.etree.ElementTree as ET -from threading import Thread -from threading import Lock -from collections import deque - -saxon_jar = '/usr/share/java/Saxon-HE-*.jar' -saxon = f'java -Xmx2G -cp {saxon_jar} net.sf.saxon.Transform' - -fname = sys.argv[1] -args = sys.argv[2:] -tree = ET.Element('mal') - -if len(args) > 0: - args0 = args[0] - ET.SubElement(tree, 'argv') - for a in tree.iter('mal'): - for a in a.iter('argv'): - for arg in args[1:]: - ET.SubElement(a, 'arg').text = arg - ET.SubElement(tree, 'no_repl') - -tree = ET.ElementTree(tree) -stdout = sys.stdout - -try: - readline.read_history_file('.xslt_mal_history') -except: - pass - -HALT = False -THE_PID = None -init_t = time.time() * 1000 -readline_queue = deque() -os.system('rm -rf xsl_error.xml') -os.system('mkfifo xsl_error.xml') - -def setup_request_file(): - os.system('rm -rf xsl_input-string') - os.system('mkfifo xsl_input-string') - - -def get_one(fd): - s = b"" - while True: - x = os.read(fd, 1) - if x == b'\n': - break - if x == b'': - break - s += x - if s == "": - return None - return s.decode('utf-8') - - -def serve_one_request(res): - global HALT - if len(res) == 0: - return - try: - xtree = ET.fromstring("" + res.strip('\x00') + "") - # stdout.write(xtree.attrib['kind']) - for req in xtree: - if req.attrib['kind'] == 'readline': - x = None - if len(readline_queue) > 0: - x = readline_queue.popleft() - else: - x = input(req.attrib['value']) - with open('xsl_input-string', 'w') as fx: - fx.write(x) - # stdout.write(' = ' + x) - elif req.attrib['kind'] == 'halt': - HALT = True - elif req.attrib['kind'] == 'display': - stdout.write(req.attrib['value'] + '\n') - elif req.attrib['kind'] == 'time': - x = time.time() * 1000 - init_t - # stdout.write(' = ' + str(int(x))) - with open('xsl_input-string', 'w') as fx: - fx.write(str(int(x))) - # stdout.write('\n') - elif req.attrib['kind'] == 'xpath-eval': - xpath = req.attrib['value'] - with open('xsl-eval.xslt', 'w') as f: - f.write(f'') - with open('xsl-null.xml', 'w') as f: - f.write(req.attrib['context']) - - if os.system(f'{saxon} -xsl:xsl-eval.xslt -s:xsl-null.xml > xsl-eval_output.xml'): - x = '' - else: - with open('xsl-eval_output.xml', 'r') as f: - x = f.read() - with open('xsl_input-string', 'w') as fx: - fx.write(x) - else: - stdout.write("UNKNOWN REQUEST " + req.attrib['kind']) - # stdout.write('\n') - except Exception as e: - # if str(e) != 'no element found: line 1, column 0': - # f.seek(0) - # print(e, list(x for x in f.read())) - return - # with open('xsl_error.xml', 'w') as f: - # f.write('') - -def transform(do_print=True): - global tree, HALT, THE_PID - - tree.write('xslt_input.xml') - setup_request_file() - pid = os.fork() - if pid == 0: - os.system(f'{saxon} -xsl:"{fname}" -s:xslt_input.xml -TP:perf.html > xslt_output.xml 2> xsl_error.xml') - HALT = True - else: - THE_PID = pid - fd = os.open('xsl_error.xml', os.O_RDONLY | os.O_CLOEXEC) - while True: - try: - if HALT: - os.kill(THE_PID, 9) - raise KeyboardInterrupt() - cmd = get_one(fd) - if cmd: - serve_one_request(cmd) - except KeyboardInterrupt: - exit() - except Exception as e: - print("Harness error:", e) - tree = ET.parse('xslt_output.xml') - if do_print: - stdout = '' - for a in tree.iter('mal'): - for a in a.iter('stdout'): - stdout = a - print(stdout.text) - stdout.clear() - del stdout - - -if len(args) > 0: - readline_queue.append(f'(do (load-file "{args0}") (xslt-halt))') - transform(do_print=False) -else: - if fname == 'stepA_mal.xslt': - readline_queue.append('(println (str "Mal [" *host-language* "]"))') - transform(do_print=False) - else: - transform() - readline.write_history_file('.xslt_mal_history') diff --git a/impls/xslt/run b/impls/xslt/run index a01367c2f9..3d3625f34c 100755 --- a/impls/xslt/run +++ b/impls/xslt/run @@ -1,2 +1,161 @@ -#!/bin/bash -exec python3 harness.py $(dirname $0)/${STEP:-stepA_mal}.xslt "${@}" +#!/usr/bin/python3 + +import time +import os.path +import readline +import sys +import xml.etree.ElementTree as ET +from threading import Thread +from threading import Lock +from collections import deque + +saxon_jar = '/usr/share/java/Saxon-HE-*.jar' +saxon = f'java -Xmx2G -cp {saxon_jar} net.sf.saxon.Transform' + +step_dir = os.path.dirname(sys.argv[0]) +step_base = os.getenv(key='STEP', default='stepA_mal') +fname = os.path.join(step_dir, step_base + '.xslt') + +args = sys.argv[1:] +tree = ET.Element('mal') + +if len(args) > 0: + args0 = args[0] + ET.SubElement(tree, 'argv') + for a in tree.iter('mal'): + for a in a.iter('argv'): + for arg in args[1:]: + ET.SubElement(a, 'arg').text = arg + ET.SubElement(tree, 'no_repl') + +tree = ET.ElementTree(tree) +stdout = sys.stdout + +try: + readline.read_history_file('.xslt_mal_history') +except: + pass + +HALT = False +THE_PID = None +init_t = time.time() * 1000 +readline_queue = deque() +os.system('rm -rf xsl_error.xml') +os.system('mkfifo xsl_error.xml') + +def setup_request_file(): + os.system('rm -rf xsl_input-string') + os.system('mkfifo xsl_input-string') + + +def get_one(fd): + s = b"" + while True: + x = os.read(fd, 1) + if x == b'\n': + break + if x == b'': + break + s += x + if s == "": + return None + return s.decode('utf-8') + + +def serve_one_request(res): + global HALT + if len(res) == 0: + return + try: + xtree = ET.fromstring("" + res.strip('\x00') + "") + # stdout.write(xtree.attrib['kind']) + for req in xtree: + if req.attrib['kind'] == 'readline': + x = None + if len(readline_queue) > 0: + x = readline_queue.popleft() + else: + x = input(req.attrib['value']) + with open('xsl_input-string', 'w') as fx: + fx.write(x) + # stdout.write(' = ' + x) + elif req.attrib['kind'] == 'halt': + HALT = True + elif req.attrib['kind'] == 'display': + stdout.write(req.attrib['value'] + '\n') + elif req.attrib['kind'] == 'time': + x = time.time() * 1000 - init_t + # stdout.write(' = ' + str(int(x))) + with open('xsl_input-string', 'w') as fx: + fx.write(str(int(x))) + # stdout.write('\n') + elif req.attrib['kind'] == 'xpath-eval': + xpath = req.attrib['value'] + with open('xsl-eval.xslt', 'w') as f: + f.write(f'') + with open('xsl-null.xml', 'w') as f: + f.write(req.attrib['context']) + + if os.system(f'{saxon} -xsl:xsl-eval.xslt -s:xsl-null.xml > xsl-eval_output.xml'): + x = '' + else: + with open('xsl-eval_output.xml', 'r') as f: + x = f.read() + with open('xsl_input-string', 'w') as fx: + fx.write(x) + else: + stdout.write("UNKNOWN REQUEST " + req.attrib['kind']) + # stdout.write('\n') + except Exception as e: + # if str(e) != 'no element found: line 1, column 0': + # f.seek(0) + # print(e, list(x for x in f.read())) + return + # with open('xsl_error.xml', 'w') as f: + # f.write('') + +def transform(do_print=True): + global tree, HALT, THE_PID + + tree.write('xslt_input.xml') + setup_request_file() + pid = os.fork() + if pid == 0: + os.system(f'{saxon} -xsl:"{fname}" -s:xslt_input.xml -TP:perf.html > xslt_output.xml 2> xsl_error.xml') + HALT = True + else: + THE_PID = pid + fd = os.open('xsl_error.xml', os.O_RDONLY | os.O_CLOEXEC) + while True: + try: + if HALT: + os.kill(THE_PID, 9) + raise KeyboardInterrupt() + cmd = get_one(fd) + if cmd: + serve_one_request(cmd) + except KeyboardInterrupt: + exit() + except Exception as e: + print("Harness error:", e) + tree = ET.parse('xslt_output.xml') + if do_print: + stdout = '' + for a in tree.iter('mal'): + for a in a.iter('stdout'): + stdout = a + print(stdout.text) + stdout.clear() + del stdout + + +if len(args) > 0: + readline_queue.append(f'(do (load-file "{args0}") (xslt-halt))') + transform(do_print=False) +else: + if fname == 'stepA_mal.xslt': + readline_queue.append('(println (str "Mal [" *host-language* "]"))') + transform(do_print=False) + else: + transform() + readline.write_history_file('.xslt_mal_history') From 6e8fa578b6b45aa78ddad214e69e6efbdc3cba88 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 29 Aug 2021 11:59:21 +0200 Subject: [PATCH 07/18] c++: update Dockerfile --- impls/cpp/Dockerfile | 8 ++------ impls/cpp/Makefile | 5 +---- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/impls/cpp/Dockerfile b/impls/cpp/Dockerfile index 8d01389900..43be67a6ec 100644 --- a/impls/cpp/Dockerfile +++ b/impls/cpp/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,5 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Install g++ for any C/C++ based implementations -RUN apt-get -y install g++ +RUN apt-get -y install g++ libreadline-dev diff --git a/impls/cpp/Makefile b/impls/cpp/Makefile index 2377031883..1c81812297 100644 --- a/impls/cpp/Makefile +++ b/impls/cpp/Makefile @@ -1,14 +1,11 @@ uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') +CXX=g++ ifeq ($(uname_S),Darwin) # Native build on yosemite. Requires: brew install readline - CXX=g++ READLINE=/usr/local/opt/readline INCPATHS=-I$(READLINE)/include LIBPATHS=-L$(READLINE)/lib -else - # Ubuntu 14.10 / docker - CXX=g++-4.9 endif LD=$(CXX) From d6d80ad46810158b54bcbfc0e5462da21ea01110 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 29 Aug 2021 13:37:46 +0200 Subject: [PATCH 08/18] ts: update Dockerfile --- impls/ts/Dockerfile | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/impls/ts/Dockerfile b/impls/ts/Dockerfile index ae21ee02cf..115244de92 100644 --- a/impls/ts/Dockerfile +++ b/impls/ts/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,14 +18,6 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 10.x stable -RUN apt-get -y install gnupg -RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - - -# Install nodejs -RUN apt-get -y install nodejs +RUN apt-get -y install libreadline-dev nodejs npm ENV NPM_CONFIG_CACHE /mal/.npm From c2f39660714faa424bde4ea36d96228d86f2718a Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Wed, 1 Sep 2021 19:26:47 +0200 Subject: [PATCH 09/18] r: update Dockerfile --- impls/r/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/impls/r/Dockerfile b/impls/r/Dockerfile index 42611aeca2..ce846ad5af 100644 --- a/impls/r/Dockerfile +++ b/impls/r/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,4 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install r-base-core +RUN apt-get -y install curl gcc libc-dev libreadline-dev r-base-core From 8dfde67c27b68100ac29826b6ba112df00ca62f5 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Wed, 1 Sep 2021 20:05:36 +0200 Subject: [PATCH 10/18] racket: update Dockerfile --- impls/racket/Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/impls/racket/Dockerfile b/impls/racket/Dockerfile index 1b05ee258b..e24c20abe9 100644 --- a/impls/racket/Dockerfile +++ b/impls/racket/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,5 +18,4 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Racket -RUN apt-get -y install racket +RUN apt-get -y install libedit-dev racket From 5f074ea5d88c43b58f32d4d4197044b03cb4d7a3 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Fri, 3 Sep 2021 08:16:43 +0200 Subject: [PATCH 11/18] bbc-basic: update Dockerfile --- impls/bbc-basic/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/impls/bbc-basic/Dockerfile b/impls/bbc-basic/Dockerfile index 32af593a86..e6d2527368 100644 --- a/impls/bbc-basic/Dockerfile +++ b/impls/bbc-basic/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 ########################################################## # General requirements for testing or common across many @@ -10,9 +10,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal From da47df08f6fcfb671e1aab337b9a8ac66023bc66 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 5 Sep 2021 17:58:48 +0200 Subject: [PATCH 12/18] factor: update Dockerfile --- impls/factor/Dockerfile | 16 ++++++---------- impls/factor/lib/printer/printer.factor | 2 +- impls/factor/step2_eval/step2_eval.factor | 2 +- impls/factor/step3_env/step3_env.factor | 2 +- .../factor/step4_if_fn_do/step4_if_fn_do.factor | 2 +- impls/factor/step5_tco/step5_tco.factor | 2 +- impls/factor/step6_file/step6_file.factor | 2 +- impls/factor/step7_quote/step7_quote.factor | 4 ++-- impls/factor/step8_macros/step8_macros.factor | 4 ++-- impls/factor/step9_try/step9_try.factor | 4 ++-- impls/factor/stepA_mal/stepA_mal.factor | 4 ++-- 11 files changed, 20 insertions(+), 24 deletions(-) diff --git a/impls/factor/Dockerfile b/impls/factor/Dockerfile index c213838156..5876def921 100644 --- a/impls/factor/Dockerfile +++ b/impls/factor/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,11 +18,10 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Factor -RUN apt-get -y install libgtkglext1 +RUN apt-get -y install ca-certificates curl libgtkglext1 libreadline-dev + RUN cd /usr/lib/x86_64-linux-gnu/ \ - && curl -O http://downloads.factorcode.org/releases/0.97/factor-linux-x86-64-0.97.tar.gz \ - && tar xvzf factor-linux-x86-64-0.97.tar.gz \ + && curl -O https://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz \ + && tar xvzf factor-linux-x86-64-0.98.tar.gz \ && ln -sf /usr/lib/x86_64-linux-gnu/factor/factor /usr/bin/factor \ - && rm factor-linux-x86-64-0.97.tar.gz - + && rm factor-linux-x86-64-0.98.tar.gz diff --git a/impls/factor/lib/printer/printer.factor b/impls/factor/lib/printer/printer.factor index 8ff4266afe..0739f473ef 100644 --- a/impls/factor/lib/printer/printer.factor +++ b/impls/factor/lib/printer/printer.factor @@ -5,7 +5,7 @@ lib.types math math.parser sequences splitting strings summary vectors ; IN: lib.printer -GENERIC# (pr-str) 1 ( maltype readably? -- str ) +GENERIC#: (pr-str) 1 ( maltype readably? -- str ) M: object (pr-str) drop summary ; M: malatom (pr-str) [ val>> ] dip (pr-str) "(atom " ")" surround ; M: malfn (pr-str) 2drop "#" ; diff --git a/impls/factor/step2_eval/step2_eval.factor b/impls/factor/step2_eval/step2_eval.factor index 8b73333126..d27c8b8301 100755 --- a/impls/factor/step2_eval/step2_eval.factor +++ b/impls/factor/step2_eval/step2_eval.factor @@ -14,7 +14,7 @@ CONSTANT: repl-env H{ DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast [ name>> ] dip ?at [ "no variable " prepend throw ] unless ; M: sequence eval-ast '[ _ EVAL ] map ; diff --git a/impls/factor/step3_env/step3_env.factor b/impls/factor/step3_env/step3_env.factor index 742c3f59f2..73c2b27bf1 100755 --- a/impls/factor/step3_env/step3_env.factor +++ b/impls/factor/step3_env/step3_env.factor @@ -16,7 +16,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step4_if_fn_do/step4_if_fn_do.factor b/impls/factor/step4_if_fn_do/step4_if_fn_do.factor index 37076e98f2..eccb64c14e 100755 --- a/impls/factor/step4_if_fn_do/step4_if_fn_do.factor +++ b/impls/factor/step4_if_fn_do/step4_if_fn_do.factor @@ -10,7 +10,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step5_tco/step5_tco.factor b/impls/factor/step5_tco/step5_tco.factor index aff1b9cf37..aaf8f279e9 100755 --- a/impls/factor/step5_tco/step5_tco.factor +++ b/impls/factor/step5_tco/step5_tco.factor @@ -10,7 +10,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step6_file/step6_file.factor b/impls/factor/step6_file/step6_file.factor index 290ee83333..fad99ed44a 100755 --- a/impls/factor/step6_file/step6_file.factor +++ b/impls/factor/step6_file/step6_file.factor @@ -10,7 +10,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; diff --git a/impls/factor/step7_quote/step7_quote.factor b/impls/factor/step7_quote/step7_quote.factor index eae1cc5de1..619b7a0c05 100755 --- a/impls/factor/step7_quote/step7_quote.factor +++ b/impls/factor/step7_quote/step7_quote.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -49,7 +49,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC: apply ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] diff --git a/impls/factor/step8_macros/step8_macros.factor b/impls/factor/step8_macros/step8_macros.factor index ef4bd07083..43c68e22a9 100755 --- a/impls/factor/step8_macros/step8_macros.factor +++ b/impls/factor/step8_macros/step8_macros.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -52,7 +52,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC: apply ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] diff --git a/impls/factor/step9_try/step9_try.factor b/impls/factor/step9_try/step9_try.factor index 490d1e3758..cea89708b9 100755 --- a/impls/factor/step9_try/step9_try.factor +++ b/impls/factor/step9_try/step9_try.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -63,7 +63,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC: apply ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] diff --git a/impls/factor/stepA_mal/stepA_mal.factor b/impls/factor/stepA_mal/stepA_mal.factor index 438111f5de..8bb3b0a45e 100755 --- a/impls/factor/stepA_mal/stepA_mal.factor +++ b/impls/factor/stepA_mal/stepA_mal.factor @@ -11,7 +11,7 @@ SYMBOL: repl-env DEFER: EVAL -GENERIC# eval-ast 1 ( ast env -- ast ) +GENERIC#: eval-ast 1 ( ast env -- ast ) M: malsymbol eval-ast env-get ; M: sequence eval-ast '[ _ EVAL ] map ; M: assoc eval-ast '[ _ EVAL ] assoc-map ; @@ -63,7 +63,7 @@ M: object eval-ast drop ; swapd [ over length cut [ zip ] dip ] dip [ swap 2array suffix ] [ drop ] if* >hashtable ; -GENERIC# apply 0 ( args fn -- maltype newenv/f ) +GENERIC: apply ( args fn -- maltype newenv/f ) M: malfn apply [ exprs>> nip ] From f92ae4fbf711e357dda0783e91c0a32d4ae90873 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Mon, 30 Aug 2021 22:43:38 +0200 Subject: [PATCH 13/18] cs: update Dockerfile --- impls/cs/Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/impls/cs/Dockerfile b/impls/cs/Dockerfile index f5f133484d..0f1ef1c80b 100644 --- a/impls/cs/Dockerfile +++ b/impls/cs/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal From 222405300114e65b5e715bb54fc1495f065bdc96 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Wed, 8 Sep 2021 01:57:06 +0200 Subject: [PATCH 14/18] haxe: update Dockerfile --- impls/haxe/Dockerfile | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/impls/haxe/Dockerfile b/impls/haxe/Dockerfile index a0b55723c8..8bf929fa32 100644 --- a/impls/haxe/Dockerfile +++ b/impls/haxe/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:18.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,33 +18,11 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -### -# Node - -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 10.x stable -RUN apt-get -y install gnupg -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - - -# Install nodejs -RUN apt-get -y install nodejs +RUN apt-get -y install g++ haxe libreadline-dev npm python3 ENV NPM_CONFIG_CACHE /mal/.npm - - -### -# Haxe - -RUN apt-get -y install software-properties-common && \ - add-apt-repository -y ppa:haxe/releases && \ - apt-get -y update - ENV HOME / -RUN apt-get install -y haxe && \ - mkdir /haxelib && haxelib setup /haxelib +RUN mkdir /haxelib && haxelib setup /haxelib # Install support for C++ compilation RUN haxelib install hxcpp - From eff4573fb8333fa1fcba2a1d9c42b2be2a37a141 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Wed, 8 Sep 2021 02:18:11 +0200 Subject: [PATCH 15/18] skew: update Dockerfile --- impls/skew/Dockerfile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/impls/skew/Dockerfile b/impls/skew/Dockerfile index 8e689fdadb..c3f958d83e 100644 --- a/impls/skew/Dockerfile +++ b/impls/skew/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -11,9 +11,6 @@ RUN apt-get -y update # Required for running tests RUN apt-get -y install make python -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev - RUN mkdir -p /mal WORKDIR /mal @@ -21,17 +18,7 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# For building node modules -RUN apt-get -y install g++ - -# Add nodesource apt repo config for 0.12 stable -RUN curl -sL https://deb.nodesource.com/setup_0.12 | bash - - -# Install nodejs -RUN apt-get -y install nodejs - -# Link common name -RUN ln -sf nodejs /usr/bin/node +RUN apt-get -y install npm ENV NPM_CONFIG_CACHE /mal/.npm From 5112c9cc2a2a5f02242ff6bd81fa797917615048 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 12 Sep 2021 18:40:38 +0200 Subject: [PATCH 16/18] factor: simplify Dockerfile --- impls/factor/Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/impls/factor/Dockerfile b/impls/factor/Dockerfile index 5876def921..656b95f751 100644 --- a/impls/factor/Dockerfile +++ b/impls/factor/Dockerfile @@ -18,10 +18,7 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install ca-certificates curl libgtkglext1 libreadline-dev +RUN apt-get -y install ca-certificates curl libgtkglext1-dev libreadline-dev -RUN cd /usr/lib/x86_64-linux-gnu/ \ - && curl -O https://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz \ - && tar xvzf factor-linux-x86-64-0.98.tar.gz \ - && ln -sf /usr/lib/x86_64-linux-gnu/factor/factor /usr/bin/factor \ - && rm factor-linux-x86-64-0.98.tar.gz +RUN curl https://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz | tar -xzC/mal +RUN ln -fst/usr/local/bin /mal/factor/factor From 2dd7f91222fa765f25b2515ed009b68db76f90cf Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Sun, 9 Jan 2022 17:06:32 +0100 Subject: [PATCH 17/18] Update Dockerfile for logo Debian/Ubuntu do not ship a python->python2 link by default. With the improved logo implementation in another branch, there is no need anymore to tweat the garbage collector settings. --- impls/logo/Dockerfile | 37 +++++++++++++++---------------------- impls/logo/run | 2 +- 2 files changed, 16 insertions(+), 23 deletions(-) diff --git a/impls/logo/Dockerfile b/impls/logo/Dockerfile index c9ca5c27f7..cd2f257d55 100644 --- a/impls/logo/Dockerfile +++ b/impls/logo/Dockerfile @@ -9,10 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python - -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev +RUN apt-get -y install make python2 +RUN ln -s /usr/bin/python2 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -21,29 +19,24 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Install g++ for any C/C++ based implementations -RUN apt-get -y install g++ - -# Install UCBLogo 6.0: -# * Fix the makefile to build correctly -# * Tweat GC settings to improve performance (it's still very slow) +# Rebuild ucblogo. +# * without X libraries so that the executable starts in text mode. # * Add the timems function implemented in C -RUN apt-get -y install libx11-dev \ - && cd /tmp \ - && curl -O -J -L http://www.cs.berkeley.edu/~bh/downloads/ucblogo.tar.gz \ - && tar xf ucblogo.tar.gz \ - && cd /tmp/ucblogo-6.0 \ - && rm -rf csls/CVS \ - && ./configure \ - && sed -i -e 's/svnversion/echo 206/' -e 's/^\s*(cd docs/#\0/' makefile \ - && echo "all: everything" >> makefile \ - && sed -i -e 's/^#define *SEG_SIZE *16000 /#define SEG_SIZE 6400000 /' logo.h \ - && sed -i -e 's/^#define GCMAX 16000$/#define GCMAX 16000000/' mem.c \ + +RUN echo 'deb-src http://deb.debian.org/debian stable main' > /etc/apt/sources.list.d/logo.list +RUN apt -y update +RUN apt -y install autoconf autoconf-archive automake dpkg-dev g++ libncurses-dev + +RUN cd /tmp \ + && apt source ucblogo \ + && cd /tmp/ucblogo-* \ + && autoreconf -f -i \ + && ./configure --disable-docs --disable-x11 \ && echo "extern NODE *ltimems(NODE *);" >> globals.h \ && echo "NODE *ltimems(NODE *args) { struct timeval tv; gettimeofday(&tv, NULL); return(make_floatnode(((FLONUM)tv.tv_sec) * 1000.0 + (tv.tv_usec / 1000))); }" >> coms.c \ && sed -i -e 's/^\(.*lthrow.*\)$/\1 {"timems", 0, 0, 0, PREFIX_PRIORITY, ltimems},/' init.c \ && make install \ && cd /tmp \ - && rm -rf /tmp/ucblogo.tar.gz /tmp/ucblogo-6.0 + && rm -rf /tmp/ucblogo* ENV HOME /mal diff --git a/impls/logo/run b/impls/logo/run index 5d90e8a7ab..b1e12231fc 100755 --- a/impls/logo/run +++ b/impls/logo/run @@ -1,2 +1,2 @@ #!/bin/bash -exec logo $(dirname $0)/${STEP:-stepA_mal}.lg - "${@}" +exec ucblogo $(dirname $0)/${STEP:-stepA_mal}.lg - "${@}" From c59ff0490d4a4d3b6270881b59364f60e7316c39 Mon Sep 17 00:00:00 2001 From: Nicolas Boulenguez Date: Tue, 1 Feb 2022 18:40:35 +0100 Subject: [PATCH 18/18] dockerfiles: improve consistency, link python to python3 Explictly select python 3. The `python2` and `python` packages will be removed from Ubuntu. Until each call site is fixed, install a /usr/local/bin/python symbolic link as a non-intrusive work-around (.deb packages do not interfer with /usr/local). Add an explicit maintainer for bbc-basic. Undo some cosmetic changes in order to reduce the global diff, this merge request will probably be sqashed before acceptance. Move lib{readline,edit}-dev out of the generic part. Use existing .deb packages for GHDL and vim. --- impls/ada.2/Dockerfile | 3 ++- impls/ada/Dockerfile | 3 ++- impls/awk/Dockerfile | 3 ++- impls/bash/Dockerfile | 3 ++- impls/bbc-basic/Dockerfile | 4 +++- impls/c.2/Dockerfile | 9 +++++++-- impls/clojure/Dockerfile | 10 ++++++---- impls/coffee/Dockerfile | 5 ++++- impls/common-lisp/Dockerfile | 11 ++++------- impls/cpp/Dockerfile | 4 +++- impls/cs/Dockerfile | 3 ++- impls/elisp/Dockerfile | 3 ++- impls/elixir/Dockerfile | 4 +++- impls/erlang/Dockerfile | 3 ++- impls/es6/Dockerfile | 5 ++++- impls/factor/Dockerfile | 8 ++++++-- impls/fsharp/Dockerfile | 3 ++- impls/gnu-smalltalk/Dockerfile | 3 ++- impls/go/Dockerfile | 3 ++- impls/groovy/Dockerfile | 3 ++- impls/guile/Dockerfile | 4 +++- impls/haskell/Dockerfile | 4 +++- impls/haxe/Dockerfile | 6 ++++-- impls/java/Dockerfile | 6 ++++-- impls/js/Dockerfile | 5 ++++- impls/logo/Dockerfile | 6 +++--- impls/miniMAL/Dockerfile | 3 ++- impls/nasm/Dockerfile | 4 ++-- impls/nim/Dockerfile | 6 ++++-- impls/objpascal/Dockerfile | 3 ++- impls/ocaml/Dockerfile | 3 ++- impls/perl/Dockerfile | 3 ++- impls/perl6/Dockerfile | 3 ++- impls/php/Dockerfile | 3 ++- impls/picolisp/Dockerfile | 3 ++- impls/pike/Dockerfile | 3 ++- impls/prolog/Dockerfile | 3 ++- impls/python/Dockerfile | 6 +++--- impls/r/Dockerfile | 3 ++- impls/racket/Dockerfile | 4 +++- impls/ruby/Dockerfile | 3 ++- impls/rust/Dockerfile | 3 ++- impls/skew/Dockerfile | 3 ++- impls/sml/Dockerfile | 8 ++------ impls/tcl/Dockerfile | 3 ++- impls/ts/Dockerfile | 3 ++- impls/vhdl/Dockerfile | 14 ++++---------- impls/vimscript/Dockerfile | 19 ++++++------------- impls/xslt/Dockerfile | 9 +++++---- 49 files changed, 142 insertions(+), 97 deletions(-) diff --git a/impls/ada.2/Dockerfile b/impls/ada.2/Dockerfile index 4d90d543b7..8b6e8c793a 100644 --- a/impls/ada.2/Dockerfile +++ b/impls/ada.2/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/ada/Dockerfile b/impls/ada/Dockerfile index 8d10f62380..36fc239937 100755 --- a/impls/ada/Dockerfile +++ b/impls/ada/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/awk/Dockerfile b/impls/awk/Dockerfile index 43a72f44b7..ee827698ad 100644 --- a/impls/awk/Dockerfile +++ b/impls/awk/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/bash/Dockerfile b/impls/bash/Dockerfile index 367b0a0366..db4ba29f1c 100644 --- a/impls/bash/Dockerfile +++ b/impls/bash/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/bbc-basic/Dockerfile b/impls/bbc-basic/Dockerfile index e6d2527368..b62ad192e7 100644 --- a/impls/bbc-basic/Dockerfile +++ b/impls/bbc-basic/Dockerfile @@ -1,4 +1,5 @@ FROM ubuntu:20.04 +MAINTAINER Joel Martin ########################################################## # General requirements for testing or common across many @@ -8,7 +9,8 @@ FROM ubuntu:20.04 RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/c.2/Dockerfile b/impls/c.2/Dockerfile index 3e34661b48..87a8e19d1c 100644 --- a/impls/c.2/Dockerfile +++ b/impls/c.2/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Duncan Watts RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,4 +19,8 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install gcc libffi-dev libgc-dev libedit-dev +# Install gcc +RUN apt-get -y install gcc + +# Libraries needed for the C impl +RUN apt-get -y install libffi-dev libgc-dev libedit-dev diff --git a/impls/clojure/Dockerfile b/impls/clojure/Dockerfile index debfcddee9..4c824b4247 100644 --- a/impls/clojure/Dockerfile +++ b/impls/clojure/Dockerfile @@ -9,10 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python - -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -21,11 +19,15 @@ WORKDIR /mal # Specific implementation requirements ########################################################## +RUN apt-get -y install curl libreadline-dev libedit-dev + # # Clojure (Java and lein) # RUN apt-get -y install leiningen +ENV LEIN_HOME /mal/.lein +ENV LEIN_JVM_OPTS -Duser.home=/mal # # ClojureScript (Node and Lumo) diff --git a/impls/coffee/Dockerfile b/impls/coffee/Dockerfile index 96b4513ddf..2a5c1395e3 100644 --- a/impls/coffee/Dockerfile +++ b/impls/coffee/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -19,3 +20,5 @@ WORKDIR /mal ########################################################## RUN apt-get -y install coffeescript g++ libreadline-dev npm +ENV NPM_CONFIG_CACHE /mal/.npm +RUN touch /.coffee_history && chmod go+w /.coffee_history diff --git a/impls/common-lisp/Dockerfile b/impls/common-lisp/Dockerfile index 447f413bbb..549a96227c 100644 --- a/impls/common-lisp/Dockerfile +++ b/impls/common-lisp/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -9,10 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python - -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -21,8 +19,7 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Install git, make -RUN apt-get -y install git make +RUN apt-get -y install curl git libreadline-dev libedit-dev # Install sbcl RUN apt-get -y install sbcl diff --git a/impls/cpp/Dockerfile b/impls/cpp/Dockerfile index 43be67a6ec..8c0e3f7931 100644 --- a/impls/cpp/Dockerfile +++ b/impls/cpp/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,4 +19,5 @@ WORKDIR /mal # Specific implementation requirements ########################################################## +# Install g++ for any C/C++ based implementations RUN apt-get -y install g++ libreadline-dev diff --git a/impls/cs/Dockerfile b/impls/cs/Dockerfile index 0f1ef1c80b..88e29c42cb 100644 --- a/impls/cs/Dockerfile +++ b/impls/cs/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/elisp/Dockerfile b/impls/elisp/Dockerfile index 7305a78611..0085431a6b 100644 --- a/impls/elisp/Dockerfile +++ b/impls/elisp/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/elixir/Dockerfile b/impls/elixir/Dockerfile index 8b403453e1..df27ab7797 100644 --- a/impls/elixir/Dockerfile +++ b/impls/elixir/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,4 +19,5 @@ WORKDIR /mal # Specific implementation requirements ########################################################## +# Elixir RUN apt-get install -y elixir diff --git a/impls/erlang/Dockerfile b/impls/erlang/Dockerfile index 1c1255faa4..ad9572b011 100644 --- a/impls/erlang/Dockerfile +++ b/impls/erlang/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/es6/Dockerfile b/impls/es6/Dockerfile index 0fbab69408..04639574a1 100644 --- a/impls/es6/Dockerfile +++ b/impls/es6/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -19,3 +20,5 @@ WORKDIR /mal ########################################################## RUN apt-get install -y g++ libreadline-dev npm + +ENV NPM_CONFIG_CACHE /mal/.npm diff --git a/impls/factor/Dockerfile b/impls/factor/Dockerfile index 656b95f751..55b5627436 100644 --- a/impls/factor/Dockerfile +++ b/impls/factor/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -21,4 +22,7 @@ WORKDIR /mal RUN apt-get -y install ca-certificates curl libgtkglext1-dev libreadline-dev RUN curl https://downloads.factorcode.org/releases/0.98/factor-linux-x86-64-0.98.tar.gz | tar -xzC/mal -RUN ln -fst/usr/local/bin /mal/factor/factor +ENV PATH $PATH:/mal/factor + +# Allow /mal/factor to create the $HOME/.cache directory. +ENV HOME /mal diff --git a/impls/fsharp/Dockerfile b/impls/fsharp/Dockerfile index d0b6a74548..5b51faad9a 100644 --- a/impls/fsharp/Dockerfile +++ b/impls/fsharp/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/gnu-smalltalk/Dockerfile b/impls/gnu-smalltalk/Dockerfile index 2c613518f0..d48238b785 100644 --- a/impls/gnu-smalltalk/Dockerfile +++ b/impls/gnu-smalltalk/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/go/Dockerfile b/impls/go/Dockerfile index 00e343905a..02083089bb 100644 --- a/impls/go/Dockerfile +++ b/impls/go/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/groovy/Dockerfile b/impls/groovy/Dockerfile index 2359596ee9..fc18e61d70 100644 --- a/impls/groovy/Dockerfile +++ b/impls/groovy/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/guile/Dockerfile b/impls/guile/Dockerfile index b6ddf4565a..60f3aef303 100644 --- a/impls/guile/Dockerfile +++ b/impls/guile/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,4 +19,5 @@ WORKDIR /mal # Specific implementation requirements ########################################################## +# Guile RUN apt-get -y install guile-3.0 libpcre3-dev diff --git a/impls/haskell/Dockerfile b/impls/haskell/Dockerfile index 53f4e74b0d..bfcfe90e33 100644 --- a/impls/haskell/Dockerfile +++ b/impls/haskell/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,4 +19,5 @@ WORKDIR /mal # Specific implementation requirements ########################################################## +RUN apt-get -y install make python apt-get install -y ghc libghc-readline-dev diff --git a/impls/haxe/Dockerfile b/impls/haxe/Dockerfile index 8bf929fa32..daa3e9bea8 100644 --- a/impls/haxe/Dockerfile +++ b/impls/haxe/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,7 +19,8 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install g++ haxe libreadline-dev npm python3 +# Haxe +RUN apt-get -y install g++ haxe libreadline-dev npm ENV NPM_CONFIG_CACHE /mal/.npm ENV HOME / diff --git a/impls/java/Dockerfile b/impls/java/Dockerfile index 62ea309ec8..a19397a0ac 100644 --- a/impls/java/Dockerfile +++ b/impls/java/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:10.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -20,3 +21,4 @@ WORKDIR /mal # Java and maven RUN apt-get -y install default-jdk-headless maven +ENV MAVEN_OPTS -Duser.home=/mal diff --git a/impls/js/Dockerfile b/impls/js/Dockerfile index 685ce1f3cf..0815fd3f2f 100644 --- a/impls/js/Dockerfile +++ b/impls/js/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -19,3 +20,5 @@ WORKDIR /mal ########################################################## RUN apt-get -y install g++ libreadline-dev nodejs npm + +ENV NPM_CONFIG_CACHE /mal/.npm diff --git a/impls/logo/Dockerfile b/impls/logo/Dockerfile index cd2f257d55..dd58217306 100644 --- a/impls/logo/Dockerfile +++ b/impls/logo/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -9,8 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python2 -RUN ln -s /usr/bin/python2 /usr/local/bin/python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/miniMAL/Dockerfile b/impls/miniMAL/Dockerfile index 31f42062d2..7842261250 100644 --- a/impls/miniMAL/Dockerfile +++ b/impls/miniMAL/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/nasm/Dockerfile b/impls/nasm/Dockerfile index 4964f13003..2927d80c03 100644 --- a/impls/nasm/Dockerfile +++ b/impls/nasm/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -20,4 +21,3 @@ WORKDIR /mal # Install nasm and ld RUN apt-get -y install nasm binutils - diff --git a/impls/nim/Dockerfile b/impls/nim/Dockerfile index d32baaeaf7..d25f78843e 100644 --- a/impls/nim/Dockerfile +++ b/impls/nim/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,6 +19,7 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install gcc libc-dev nim +# Nim +RUN apt-get -y install gcc libc-dev libreadline-dev nim ENV HOME /mal diff --git a/impls/objpascal/Dockerfile b/impls/objpascal/Dockerfile index 029944dba8..f49d343492 100644 --- a/impls/objpascal/Dockerfile +++ b/impls/objpascal/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/ocaml/Dockerfile b/impls/ocaml/Dockerfile index bf5d2b564b..a8f448f46e 100644 --- a/impls/ocaml/Dockerfile +++ b/impls/ocaml/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/perl/Dockerfile b/impls/perl/Dockerfile index b3f1141f5d..78dedbf843 100644 --- a/impls/perl/Dockerfile +++ b/impls/perl/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/perl6/Dockerfile b/impls/perl6/Dockerfile index 19d1f714ca..3bade4df13 100644 --- a/impls/perl6/Dockerfile +++ b/impls/perl6/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/php/Dockerfile b/impls/php/Dockerfile index c14b097856..eec64dd89d 100644 --- a/impls/php/Dockerfile +++ b/impls/php/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/picolisp/Dockerfile b/impls/picolisp/Dockerfile index 7cbea6e14b..a461e039ed 100644 --- a/impls/picolisp/Dockerfile +++ b/impls/picolisp/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/pike/Dockerfile b/impls/pike/Dockerfile index c555bf0c60..1d306c7eab 100644 --- a/impls/pike/Dockerfile +++ b/impls/pike/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/prolog/Dockerfile b/impls/prolog/Dockerfile index e0478546cf..985f4b438c 100644 --- a/impls/prolog/Dockerfile +++ b/impls/prolog/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/python/Dockerfile b/impls/python/Dockerfile index 6afda15e43..ee4d7777e5 100644 --- a/impls/python/Dockerfile +++ b/impls/python/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,8 +19,7 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -# Nothing additional needed for python -RUN apt-get -y install python3 +RUN apt-get -y install python2 # For dist packaging RUN apt-get -y install zip diff --git a/impls/r/Dockerfile b/impls/r/Dockerfile index ce846ad5af..72170c3beb 100644 --- a/impls/r/Dockerfile +++ b/impls/r/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/racket/Dockerfile b/impls/racket/Dockerfile index e24c20abe9..d2dedd9451 100644 --- a/impls/racket/Dockerfile +++ b/impls/racket/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -18,4 +19,5 @@ WORKDIR /mal # Specific implementation requirements ########################################################## +# Racket RUN apt-get -y install libedit-dev racket diff --git a/impls/ruby/Dockerfile b/impls/ruby/Dockerfile index 13e9a3a613..b5bb496972 100644 --- a/impls/ruby/Dockerfile +++ b/impls/ruby/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/rust/Dockerfile b/impls/rust/Dockerfile index 9fde8859d7..b132f22111 100644 --- a/impls/rust/Dockerfile +++ b/impls/rust/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/skew/Dockerfile b/impls/skew/Dockerfile index c3f958d83e..b3c85410c2 100644 --- a/impls/skew/Dockerfile +++ b/impls/skew/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/sml/Dockerfile b/impls/sml/Dockerfile index 36a2c90bf2..72a3adca9c 100644 --- a/impls/sml/Dockerfile +++ b/impls/sml/Dockerfile @@ -7,12 +7,8 @@ FROM ubuntu:focal ########################################################## RUN apt-get -y update - -# Required for running tests -RUN apt-get -y install make python - -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev +RUN apt-get -y install make python3 +RUN ln -s /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/tcl/Dockerfile b/impls/tcl/Dockerfile index e72e37f3c9..f1098d5eaa 100644 --- a/impls/tcl/Dockerfile +++ b/impls/tcl/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/ts/Dockerfile b/impls/ts/Dockerfile index 115244de92..5943c660a9 100644 --- a/impls/ts/Dockerfile +++ b/impls/ts/Dockerfile @@ -9,7 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal diff --git a/impls/vhdl/Dockerfile b/impls/vhdl/Dockerfile index 6b841c0d2c..4eb39aec50 100644 --- a/impls/vhdl/Dockerfile +++ b/impls/vhdl/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:14.04 +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -9,10 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python - -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -21,10 +19,6 @@ WORKDIR /mal # Specific implementation requirements ########################################################## -RUN apt-get -y install software-properties-common && \ - apt-add-repository -y ppa:pgavin/ghdl && \ - apt-get update -y - -RUN apt-get -y install ghdl +RUN apt-get -y install gcc ghdl ghdl-gcc ENV HOME /mal diff --git a/impls/vimscript/Dockerfile b/impls/vimscript/Dockerfile index 35345f57fd..b54ae7d61a 100644 --- a/impls/vimscript/Dockerfile +++ b/impls/vimscript/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:vivid +FROM ubuntu:20.04 MAINTAINER Joel Martin ########################################################## @@ -9,10 +9,8 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python - -# Some typical implementation and test requirements -RUN apt-get -y install curl libreadline-dev libedit-dev +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal @@ -22,13 +20,8 @@ WORKDIR /mal ########################################################## # To build the readline plugin -RUN apt-get -y install g++ - -# Vim 8.0 -RUN apt-get -y install bzip2 -RUN cd /tmp && curl -O ftp://ftp.vim.org/pub/vim/unix/vim-8.0.tar.bz2 \ - && tar xjf /tmp/vim-8.0.tar.bz2 \ - && cd vim80 && make && make install \ - && cd /tmp && rm -r /tmp/vim-8.0.tar.bz2 /tmp/vim80 +RUN apt-get -y install gcc libreadline-dev + +RUN apt-get -y install vim ENV HOME /mal diff --git a/impls/xslt/Dockerfile b/impls/xslt/Dockerfile index e522c28a3d..687fd84b87 100644 --- a/impls/xslt/Dockerfile +++ b/impls/xslt/Dockerfile @@ -9,13 +9,14 @@ MAINTAINER Joel Martin RUN apt-get -y update # Required for running tests -RUN apt-get -y install make python +RUN apt-get -y install make python3 +RUN ln -fs /usr/bin/python3 /usr/local/bin/python RUN mkdir -p /mal WORKDIR /mal -######################################################### +########################################################## # Specific implementation requirements -######################################################### +########################################################## -RUN apt-get -y install default-jdk-headless libsaxonhe-java python3 +RUN apt-get -y install default-jdk-headless libsaxonhe-java