From 0c5948bcce84b1829a554209c777f0ef6a357dd2 Mon Sep 17 00:00:00 2001 From: J0WI Date: Wed, 16 Jun 2021 23:04:12 +0200 Subject: [PATCH] Add Alpine 3.14 Also add "g++" during compilation (the upstream configure script looks for it, even though it doesn't appear to be used). --- 2.6/alpine3.13/Dockerfile | 1 + 2.6/{alpine3.12 => alpine3.14}/Dockerfile | 10 +++++++++- 2.6/slim-buster/Dockerfile | 1 + 2.6/slim-stretch/Dockerfile | 1 + 2.7/alpine3.13/Dockerfile | 1 + 2.7/{alpine3.12 => alpine3.14}/Dockerfile | 3 ++- 2.7/slim-buster/Dockerfile | 1 + 3.0/alpine3.13/Dockerfile | 1 + 3.0/{alpine3.12 => alpine3.14}/Dockerfile | 3 ++- 3.0/slim-buster/Dockerfile | 1 + Dockerfile.template | 19 +++++++++++++++++++ versions.json | 12 ++++++------ versions.sh | 4 ++-- 13 files changed, 47 insertions(+), 11 deletions(-) rename 2.6/{alpine3.12 => alpine3.14}/Dockerfile (89%) rename 2.7/{alpine3.12 => alpine3.14}/Dockerfile (99%) rename 3.0/{alpine3.12 => alpine3.14}/Dockerfile (99%) diff --git a/2.6/alpine3.13/Dockerfile b/2.6/alpine3.13/Dockerfile index 7d623a886..1c1feafe1 100644 --- a/2.6/alpine3.13/Dockerfile +++ b/2.6/alpine3.13/Dockerfile @@ -43,6 +43,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ diff --git a/2.6/alpine3.12/Dockerfile b/2.6/alpine3.14/Dockerfile similarity index 89% rename from 2.6/alpine3.12/Dockerfile rename to 2.6/alpine3.14/Dockerfile index f1a226b48..53d1aef8a 100644 --- a/2.6/alpine3.12/Dockerfile +++ b/2.6/alpine3.14/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.14 RUN set -eux; \ apk add --no-cache \ @@ -43,6 +43,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ @@ -82,6 +83,13 @@ RUN set -eux; \ patch -p1 -i thread-stack-fix.patch; \ rm thread-stack-fix.patch; \ \ +# https://bugs.ruby-lang.org/issues/17723 (building with autoconf 2.70+ fails) +# https://github.com/ruby/ruby/pull/3773 + wget -O 'autoconf-2.70.patch' 'https://github.com/ruby/ruby/commit/fcc88da5eb162043adcba552646677d2ab5adf55.patch'; \ + echo '62eefa55030788d409003eccd945ccc408f02fe0d71616ed1c1bdcaf7a2f8a54 *autoconf-2.70.patch' | sha256sum --check --strict; \ + patch -p1 -i autoconf-2.70.patch; \ + rm autoconf-2.70.patch; \ + \ # the configure script does not detect isnan/isinf as macros export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \ \ diff --git a/2.6/slim-buster/Dockerfile b/2.6/slim-buster/Dockerfile index 2925c5159..0c3b1a98f 100644 --- a/2.6/slim-buster/Dockerfile +++ b/2.6/slim-buster/Dockerfile @@ -45,6 +45,7 @@ RUN set -eux; \ libgdbm-dev \ ruby \ autoconf \ + g++ \ gcc \ libbz2-dev \ libglib2.0-dev \ diff --git a/2.6/slim-stretch/Dockerfile b/2.6/slim-stretch/Dockerfile index b4be19356..88d1609db 100644 --- a/2.6/slim-stretch/Dockerfile +++ b/2.6/slim-stretch/Dockerfile @@ -45,6 +45,7 @@ RUN set -eux; \ libgdbm-dev \ ruby \ autoconf \ + g++ \ gcc \ libbz2-dev \ libglib2.0-dev \ diff --git a/2.7/alpine3.13/Dockerfile b/2.7/alpine3.13/Dockerfile index 090e0fc71..38cc86ca7 100644 --- a/2.7/alpine3.13/Dockerfile +++ b/2.7/alpine3.13/Dockerfile @@ -43,6 +43,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ diff --git a/2.7/alpine3.12/Dockerfile b/2.7/alpine3.14/Dockerfile similarity index 99% rename from 2.7/alpine3.12/Dockerfile rename to 2.7/alpine3.14/Dockerfile index b3328fa46..31be848cb 100644 --- a/2.7/alpine3.12/Dockerfile +++ b/2.7/alpine3.14/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.14 RUN set -eux; \ apk add --no-cache \ @@ -43,6 +43,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ diff --git a/2.7/slim-buster/Dockerfile b/2.7/slim-buster/Dockerfile index c8edc041b..e63c04726 100644 --- a/2.7/slim-buster/Dockerfile +++ b/2.7/slim-buster/Dockerfile @@ -45,6 +45,7 @@ RUN set -eux; \ libgdbm-dev \ ruby \ autoconf \ + g++ \ gcc \ libbz2-dev \ libglib2.0-dev \ diff --git a/3.0/alpine3.13/Dockerfile b/3.0/alpine3.13/Dockerfile index 76a77f9c9..ba573d215 100644 --- a/3.0/alpine3.13/Dockerfile +++ b/3.0/alpine3.13/Dockerfile @@ -43,6 +43,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ diff --git a/3.0/alpine3.12/Dockerfile b/3.0/alpine3.14/Dockerfile similarity index 99% rename from 3.0/alpine3.12/Dockerfile rename to 3.0/alpine3.14/Dockerfile index ea092b9cd..e574b85d6 100644 --- a/3.0/alpine3.12/Dockerfile +++ b/3.0/alpine3.14/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM alpine:3.12 +FROM alpine:3.14 RUN set -eux; \ apk add --no-cache \ @@ -43,6 +43,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ diff --git a/3.0/slim-buster/Dockerfile b/3.0/slim-buster/Dockerfile index 91affedd3..88b4e0242 100644 --- a/3.0/slim-buster/Dockerfile +++ b/3.0/slim-buster/Dockerfile @@ -45,6 +45,7 @@ RUN set -eux; \ libgdbm-dev \ ruby \ autoconf \ + g++ \ gcc \ libbz2-dev \ libglib2.0-dev \ diff --git a/Dockerfile.template b/Dockerfile.template index cdbe4aa3b..666ae9b91 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -68,6 +68,7 @@ RUN set -eux; \ ca-certificates \ coreutils \ dpkg-dev dpkg \ + g++ \ gcc \ gdbm-dev \ glib-dev \ @@ -99,6 +100,7 @@ RUN set -eux; \ ruby \ {{ if is_slim then ( -}} autoconf \ + g++ \ gcc \ libbz2-dev \ libglib2.0-dev \ @@ -136,6 +138,23 @@ RUN set -eux; \ patch -p1 -i thread-stack-fix.patch; \ rm thread-stack-fix.patch; \ \ +{{ + { + "2.6": { + url: "https://github.com/ruby/ruby/pull/3773", + commit: "fcc88da5eb162043adcba552646677d2ab5adf55", + sha256: "62eefa55030788d409003eccd945ccc408f02fe0d71616ed1c1bdcaf7a2f8a54", + }, + }[env.version] | if . and env.variant != "alpine3.13" then ( +-}} +# https://bugs.ruby-lang.org/issues/17723 (building with autoconf 2.70+ fails) +# {{ .url }} + wget -O 'autoconf-2.70.patch' 'https://github.com/ruby/ruby/commit/{{ .commit }}.patch'; \ + echo '{{ .sha256 }} *autoconf-2.70.patch' | sha256sum --check --strict; \ + patch -p1 -i autoconf-2.70.patch; \ + rm autoconf-2.70.patch; \ + \ +{{ ) else "" end -}} # the configure script does not detect isnan/isinf as macros export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \ \ diff --git a/versions.json b/versions.json index 1c50698e8..729a7acb4 100644 --- a/versions.json +++ b/versions.json @@ -6,8 +6,8 @@ "slim-buster", "stretch", "slim-stretch", - "alpine3.13", - "alpine3.12" + "alpine3.14", + "alpine3.13" ], "version": "2.6.8" }, @@ -16,8 +16,8 @@ "variants": [ "buster", "slim-buster", - "alpine3.13", - "alpine3.12" + "alpine3.14", + "alpine3.13" ], "version": "2.7.4" }, @@ -26,8 +26,8 @@ "variants": [ "buster", "slim-buster", - "alpine3.13", - "alpine3.12" + "alpine3.14", + "alpine3.13" ], "version": "3.0.2" } diff --git a/versions.sh b/versions.sh index 6f55ed7aa..92290eb34 100755 --- a/versions.sh +++ b/versions.sh @@ -74,8 +74,8 @@ for version in "${versions[@]}"; do else empty end | ., "slim-" + .), # https://github.com/docker-library/ruby/pull/142#issuecomment-320012893 ( - "3.13", - "3.12" + "3.14", + "3.13" | "alpine" + .) ], }