From cfb3148e13d2952e0a88863719959a6ec0ff0098 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Wed, 22 May 2024 22:21:55 +0200 Subject: [PATCH] Drop Ruby 3.0 It's EOL since 23 Apr 2024 and makes issues since it uses alpine 3.16 --- 3.0/alpine3.16/Dockerfile | 151 ----------------------------------- 3.0/bullseye/Dockerfile | 96 ---------------------- 3.0/buster/Dockerfile | 96 ---------------------- 3.0/slim-bullseye/Dockerfile | 123 ---------------------------- 3.0/slim-buster/Dockerfile | 123 ---------------------------- Dockerfile.template | 32 +------- versions.json | 37 --------- versions.sh | 26 ++---- 8 files changed, 11 insertions(+), 673 deletions(-) delete mode 100644 3.0/alpine3.16/Dockerfile delete mode 100644 3.0/bullseye/Dockerfile delete mode 100644 3.0/buster/Dockerfile delete mode 100644 3.0/slim-bullseye/Dockerfile delete mode 100644 3.0/slim-buster/Dockerfile diff --git a/3.0/alpine3.16/Dockerfile b/3.0/alpine3.16/Dockerfile deleted file mode 100644 index 76f99ef7d..000000000 --- a/3.0/alpine3.16/Dockerfile +++ /dev/null @@ -1,151 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.16 - -RUN set -eux; \ - apk add --no-cache \ - bzip2 \ - ca-certificates \ - gmp-dev \ - libffi-dev \ - procps \ - yaml-dev \ - zlib-dev \ - ; - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/ -ENV RUBY_MAJOR 3.0 -ENV RUBY_VERSION 3.0.7 -ENV RUBY_DOWNLOAD_SHA256 1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - apk add --no-cache --virtual .ruby-builddeps \ - autoconf \ - bison \ - bzip2 \ - bzip2-dev \ - ca-certificates \ - coreutils \ - dpkg-dev dpkg \ - g++ \ - gcc \ - gdbm-dev \ - glib-dev \ - libc-dev \ - libffi-dev \ - libxml2-dev \ - libxslt-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl \ - openssl-dev \ - patch \ - procps \ - readline-dev \ - ruby \ - tar \ - xz \ - yaml-dev \ - zlib-dev \ - ; \ - \ - wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# https://github.com/docker-library/ruby/issues/196 -# https://bugs.ruby-lang.org/issues/14387#note-13 (patch source) -# https://bugs.ruby-lang.org/issues/14387#note-16 ("Therefore ncopa's patch looks good for me in general." -- only breaks glibc which doesn't matter here) - wget -O 'thread-stack-fix.patch' 'https://bugs.ruby-lang.org/attachments/download/7081/0001-thread_pthread.c-make-get_main_stack-portable-on-lin.patch'; \ - echo '3ab628a51d92fdf0d2b5835e93564857aea73e0c1de00313864a94a6255cb645 *thread-stack-fix.patch' | sha256sum --check --strict; \ - patch -p1 -i thread-stack-fix.patch; \ - rm thread-stack-fix.patch; \ - \ -# the configure script does not detect isnan/isinf as macros - export ac_cv_func_isnan=yes ac_cv_func_isinf=yes; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - # fix builds on arm32v6/7 and s390x: https://github.com/docker-library/ruby/issues/308 - # and don't break the other arches: https://github.com/docker-library/ruby/issues/365 - apkArch="$(apk --print-arch)"; \ - case "$apkArch" in \ - s390x | armhf | armv7) \ - apk add --no-cache libucontext-dev; \ - export LIBS='-lucontext'; \ - ;; \ - esac; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - runDeps="$( \ - scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - )"; \ - apk add --no-network --virtual .ruby-rundeps $runDeps; \ - apk del --no-network .ruby-builddeps; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if \ - apk --no-network list --installed \ - | grep -v '^[.]ruby-rundeps' \ - | grep -i ruby \ - ; then \ - exit 1; \ - fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# don't create ".bundle" in all our apps -ENV GEM_HOME /usr/local/bundle -ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ - BUNDLE_APP_CONFIG="$GEM_HOME" -ENV PATH $GEM_HOME/bin:$PATH -# adjust permissions of a few directories for running "gem install" as an arbitrary user -RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.0/bullseye/Dockerfile b/3.0/bullseye/Dockerfile deleted file mode 100644 index 1bbb0cbfe..000000000 --- a/3.0/bullseye/Dockerfile +++ /dev/null @@ -1,96 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/ -ENV RUBY_MAJOR 3.0 -ENV RUBY_VERSION 3.0.7 -ENV RUBY_DOWNLOAD_SHA256 1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# don't create ".bundle" in all our apps -ENV GEM_HOME /usr/local/bundle -ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ - BUNDLE_APP_CONFIG="$GEM_HOME" -ENV PATH $GEM_HOME/bin:$PATH -# adjust permissions of a few directories for running "gem install" as an arbitrary user -RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.0/buster/Dockerfile b/3.0/buster/Dockerfile deleted file mode 100644 index ddf71619e..000000000 --- a/3.0/buster/Dockerfile +++ /dev/null @@ -1,96 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:buster - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/ -ENV RUBY_MAJOR 3.0 -ENV RUBY_VERSION 3.0.7 -ENV RUBY_DOWNLOAD_SHA256 1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# don't create ".bundle" in all our apps -ENV GEM_HOME /usr/local/bundle -ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ - BUNDLE_APP_CONFIG="$GEM_HOME" -ENV PATH $GEM_HOME/bin:$PATH -# adjust permissions of a few directories for running "gem install" as an arbitrary user -RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.0/slim-bullseye/Dockerfile b/3.0/slim-bullseye/Dockerfile deleted file mode 100644 index 7f8ba05ed..000000000 --- a/3.0/slim-bullseye/Dockerfile +++ /dev/null @@ -1,123 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bullseye-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/ -ENV RUBY_MAJOR 3.0 -ENV RUBY_VERSION 3.0.7 -ENV RUBY_DOWNLOAD_SHA256 1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libreadline-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# don't create ".bundle" in all our apps -ENV GEM_HOME /usr/local/bundle -ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ - BUNDLE_APP_CONFIG="$GEM_HOME" -ENV PATH $GEM_HOME/bin:$PATH -# adjust permissions of a few directories for running "gem install" as an arbitrary user -RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/3.0/slim-buster/Dockerfile b/3.0/slim-buster/Dockerfile deleted file mode 100644 index d2d74ca98..000000000 --- a/3.0/slim-buster/Dockerfile +++ /dev/null @@ -1,123 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:buster-slim - -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bzip2 \ - ca-certificates \ - libffi-dev \ - libgmp-dev \ - libssl-dev \ - libyaml-dev \ - procps \ - zlib1g-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -# skip installing gem documentation -RUN set -eux; \ - mkdir -p /usr/local/etc; \ - { \ - echo 'install: --no-document'; \ - echo 'update: --no-document'; \ - } >> /usr/local/etc/gemrc - -ENV LANG C.UTF-8 - -# https://www.ruby-lang.org/en/news/2024/04/23/ruby-3-0-7-released/ -ENV RUBY_MAJOR 3.0 -ENV RUBY_VERSION 3.0.7 -ENV RUBY_DOWNLOAD_SHA256 1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab - -# some of ruby's build scripts are written in ruby -# we purge system ruby later to make sure our final image uses what we just built -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - bison \ - dpkg-dev \ - libgdbm-dev \ - ruby \ - autoconf \ - g++ \ - gcc \ - libbz2-dev \ - libgdbm-compat-dev \ - libglib2.0-dev \ - libncurses-dev \ - libreadline-dev \ - libxml2-dev \ - libxslt-dev \ - make \ - wget \ - xz-utils \ - ; \ - rm -rf /var/lib/apt/lists/*; \ - \ - wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ - echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ - \ - mkdir -p /usr/src/ruby; \ - tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1; \ - rm ruby.tar.xz; \ - \ - cd /usr/src/ruby; \ - \ -# hack in "ENABLE_PATH_CHECK" disabling to suppress: -# warning: Insecure world writable dir - { \ - echo '#define ENABLE_PATH_CHECK 0'; \ - echo; \ - cat file.c; \ - } > file.c.new; \ - mv file.c.new file.c; \ - \ - autoconf; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --disable-install-doc \ - --enable-shared \ - ; \ - make -j "$(nproc)"; \ - make install; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark > /dev/null; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - \ - cd /; \ - rm -r /usr/src/ruby; \ -# verify we have no "ruby" packages installed - if dpkg -l | grep -i ruby; then exit 1; fi; \ - [ "$(command -v ruby)" = '/usr/local/bin/ruby' ]; \ -# rough smoke test - ruby --version; \ - gem --version; \ - bundle --version - -# don't create ".bundle" in all our apps -ENV GEM_HOME /usr/local/bundle -ENV BUNDLE_SILENCE_ROOT_WARNING=1 \ - BUNDLE_APP_CONFIG="$GEM_HOME" -ENV PATH $GEM_HOME/bin:$PATH -# adjust permissions of a few directories for running "gem install" as an arbitrary user -RUN mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" - -CMD [ "irb" ] diff --git a/Dockerfile.template b/Dockerfile.template index 5bbca8b1e..66466f944 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -52,15 +52,9 @@ RUN set -eux; \ ENV LANG C.UTF-8 # https://www.ruby-lang.org/{{ .post | ltrimstr("/") }} -{{ if env.version == "3.0" then ( -}} -ENV RUBY_MAJOR {{ env.version }} -ENV RUBY_VERSION {{ .version }} -ENV RUBY_DOWNLOAD_SHA256 {{ .sha256.xz }} -{{ ) else ( -}} ENV RUBY_VERSION {{ .version }} ENV RUBY_DOWNLOAD_URL {{ .url.xz }} ENV RUBY_DOWNLOAD_SHA256 {{ .sha256.xz }} -{{ ) end -}} # some of ruby's build scripts are written in ruby # we purge system ruby later to make sure our final image uses what we just built @@ -69,7 +63,7 @@ RUN set -eux; \ {{ if is_alpine then ( -}} apk add --no-cache --virtual .ruby-builddeps \ autoconf \ -{{ if [ "3.0", "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} +{{ if [ "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} {{ # https://github.com/docker-library/ruby/pull/438 -}} bison \ {{ ) else "" end -}} @@ -93,7 +87,7 @@ RUN set -eux; \ openssl-dev \ patch \ procps \ -{{ if [ "3.0", "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} +{{ if [ "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} readline-dev \ {{ ) else "" end -}} ruby \ @@ -106,7 +100,7 @@ RUN set -eux; \ savedAptMark="$(apt-mark showmanual)"; \ apt-get update; \ apt-get install -y --no-install-recommends \ -{{ if [ "3.0", "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} +{{ if [ "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} {{ # https://github.com/docker-library/ruby/pull/438 -}} bison \ {{ ) else "" end -}} @@ -121,7 +115,7 @@ RUN set -eux; \ libgdbm-compat-dev \ libglib2.0-dev \ libncurses-dev \ -{{ if [ "3.0", "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} +{{ if [ "3.1", "3.2" ] | index(env.version | rtrimstr("-rc")) then ( -}} libreadline-dev \ {{ ) else "" end -}} libxml2-dev \ @@ -203,12 +197,7 @@ RUN set -eux; \ fi; \ {{ ) else "" end -}} \ -{{ if env.version == "3.0" then ( -}} -{{ if .url.xz != "https://cache.ruby-lang.org/pub/ruby/\(env.version | rtrimstr("-rc"))/ruby-\(.version).tar.xz" then error("url for \(.version) is not as expected!") else "" end -}} - wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz"; \ -{{ ) else ( -}} wget -O ruby.tar.xz "$RUBY_DOWNLOAD_URL"; \ -{{ ) end -}} echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum --check --strict; \ \ mkdir -p /usr/src/ruby; \ @@ -240,19 +229,6 @@ RUN set -eux; \ mv file.c.new file.c; \ \ autoconf; \ -{{ if is_alpine and "3.0" == (env.version | rtrimstr("-rc")) then ( -}} - # fix builds on arm32v6/7 and s390x: https://github.com/docker-library/ruby/issues/308 - # and don't break the other arches: https://github.com/docker-library/ruby/issues/365 -{{ if .rust.version then "" else ( -}} - {{ archVar }}="$(apk --print-arch)"; \ -{{ ) end -}} - case "${{ archVar }}" in \ - s390x | armhf | armv7) \ - apk add --no-cache libucontext-dev; \ - export LIBS='-lucontext'; \ - ;; \ - esac; \ -{{ ) else "" end -}} gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ ./configure \ --build="$gnuArch" \ diff --git a/versions.json b/versions.json index 7bbdeaa5f..cc29bc2ad 100644 --- a/versions.json +++ b/versions.json @@ -1,41 +1,4 @@ { - "3.0": { - "version": "3.0.7", - "date": "2024-04-23", - "post": "/en/news/2024/04/23/ruby-3-0-7-released/", - "url": { - "gz": "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.7.tar.gz", - "xz": "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.7.tar.xz", - "zip": "https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.7.zip" - }, - "size": { - "gz": 21268288, - "xz": 15848768, - "zip": 25652209 - }, - "sha1": { - "gz": "ec95aee1364fc4d0ca0e8f83c525127016e05c86", - "xz": "efc97e609868a19f89653068c4915c162117b721", - "zip": "b258a1bfcd49fb801b83a0aec90a8bb3989e9e42" - }, - "sha256": { - "gz": "2a3411977f2850431136b0fab8ad53af09fb74df2ee2f4fb7f11b378fe034388", - "xz": "1748338373c4fad80129921080d904aca326e41bd9589b498aa5ee09fd575bab", - "zip": "163d752070a2ba1a015f004ae75e38ac9aa44bc4ebfafb55d5ff184cc72db5be" - }, - "sha512": { - "gz": "66e5116ddd027ab1b27d466104a5b440889318b4f2f74b5fdf3099812bf5f7ef77be62fe1df37e0dc7cd5b2f5efe7fee5b9096910ce815ca4126577cb2abfaa7", - "xz": "4760dc7d1345279b53cff30f3dd015b67f6a505e5028357f046dbf23b15a52d09f7d91fcfe5cb75d6c3222e7283aad12b97b36f5de0ff959f824bd42073f9c48", - "zip": "ed5e6d827ba981808bc4d914e400963b4443d522d52dd5d3f645db0cf38b50ab6c9baafac1b5e348e677500a16ceef1a5ac15c6a67003c2b2037cb86c1bd3654" - }, - "variants": [ - "bullseye", - "slim-bullseye", - "buster", - "slim-buster", - "alpine3.16" - ] - }, "3.1": { "version": "3.1.5", "date": "2024-04-23", diff --git a/versions.sh b/versions.sh index 65edfc8e5..c25e060ad 100755 --- a/versions.sh +++ b/versions.sh @@ -83,32 +83,20 @@ for version in "${versions[@]}"; do doc="$(jq <<<"$doc" -c ' .variants = [ ( - # https://bugs.ruby-lang.org/issues/18658 - # https://github.com/docker-library/ruby/pull/392#issuecomment-1329896174 - if "3.0" == env.version then - "bullseye", - "buster" - else - "bookworm", - "bullseye", - empty # trailing comma hack - end + "bookworm", + "bullseye", + empty # trailing comma hack | ., "slim-" + .), # https://github.com/docker-library/ruby/pull/142#issuecomment-320012893 ( - # Alpine 3.17+ defaults to OpenSSL 3 which is not supported by Ruby 3.0 - # https://bugs.ruby-lang.org/issues/18658 - # https://github.com/docker-library/ruby/pull/392#issuecomment-1329896174 - if "3.0" == env.version then "3.16" else - "3.19", - "3.18", - empty # trailing comma hack - end + "3.19", + "3.18", + empty # trailing comma hack | "alpine" + .) ] ')" case "$rcVersion" in - 3.0 | 3.1) ;; + 3.1) ;; *) # YJIT doc="$(jq <<<"$doc" -sc '