From 942e3c7fc594b4820a56118251a54fc97224dbe5 Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Mon, 6 Jan 2025 18:07:08 -0800 Subject: [PATCH] Patch Erlang build on Alpine Fixes #749 Code suggested by @tianon --- 3.13/alpine/Dockerfile | 5 +++++ 4.0/alpine/Dockerfile | 5 +++++ 4.1-rc/alpine/Dockerfile | 5 +++++ Dockerfile-alpine.template | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/3.13/alpine/Dockerfile b/3.13/alpine/Dockerfile index 6ebb602b..7bea9897 100644 --- a/3.13/alpine/Dockerfile +++ b/3.13/alpine/Dockerfile @@ -127,6 +127,11 @@ RUN set -eux; \ echo "$OTP_SOURCE_SHA256 *$OTP_PATH.tar.gz" | sha256sum -c -; \ tar --extract --file "$OTP_PATH.tar.gz" --directory "$OTP_PATH" --strip-components 1; \ \ +# https://github.com/erlang/otp/pull/9212 + wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'; \ + echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch' | sha256sum -c -; \ + patch --input="$PWD/otp-9212.patch" --directory="$OTP_PATH" --strip=1; \ + \ # Configure Erlang/OTP for compilation, disable unused features & applications # https://erlang.org/doc/applications.html # ERL_TOP is required for Erlang/OTP makefiles to find the absolute path for the installation diff --git a/4.0/alpine/Dockerfile b/4.0/alpine/Dockerfile index 9fa2a483..ff4802ae 100644 --- a/4.0/alpine/Dockerfile +++ b/4.0/alpine/Dockerfile @@ -127,6 +127,11 @@ RUN set -eux; \ echo "$OTP_SOURCE_SHA256 *$OTP_PATH.tar.gz" | sha256sum -c -; \ tar --extract --file "$OTP_PATH.tar.gz" --directory "$OTP_PATH" --strip-components 1; \ \ +# https://github.com/erlang/otp/pull/9212 + wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'; \ + echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch' | sha256sum -c -; \ + patch --input="$PWD/otp-9212.patch" --directory="$OTP_PATH" --strip=1; \ + \ # Configure Erlang/OTP for compilation, disable unused features & applications # https://erlang.org/doc/applications.html # ERL_TOP is required for Erlang/OTP makefiles to find the absolute path for the installation diff --git a/4.1-rc/alpine/Dockerfile b/4.1-rc/alpine/Dockerfile index c62419ff..2bee9df6 100644 --- a/4.1-rc/alpine/Dockerfile +++ b/4.1-rc/alpine/Dockerfile @@ -127,6 +127,11 @@ RUN set -eux; \ echo "$OTP_SOURCE_SHA256 *$OTP_PATH.tar.gz" | sha256sum -c -; \ tar --extract --file "$OTP_PATH.tar.gz" --directory "$OTP_PATH" --strip-components 1; \ \ +# https://github.com/erlang/otp/pull/9212 + wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'; \ + echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch' | sha256sum -c -; \ + patch --input="$PWD/otp-9212.patch" --directory="$OTP_PATH" --strip=1; \ + \ # Configure Erlang/OTP for compilation, disable unused features & applications # https://erlang.org/doc/applications.html # ERL_TOP is required for Erlang/OTP makefiles to find the absolute path for the installation diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index cb0b8c49..938bed72 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -134,6 +134,11 @@ RUN set -eux; \ echo "$OTP_SOURCE_SHA256 *$OTP_PATH.tar.gz" | sha256sum -c -; \ tar --extract --file "$OTP_PATH.tar.gz" --directory "$OTP_PATH" --strip-components 1; \ \ +# https://github.com/erlang/otp/pull/9212 + wget --output-document otp-9212.patch 'https://github.com/erlang/otp/commit/e2604aa7a92b3bb7c1293afd12705c7ce9c952a4.patch?full_index=1'; \ + echo '35ec51529bdd6cab4b173b4e1fe844efa82f74eba76a99a74f746778d64dffa7 *otp-9212.patch' | sha256sum -c -; \ + patch --input="$PWD/otp-9212.patch" --directory="$OTP_PATH" --strip=1; \ + \ # Configure Erlang/OTP for compilation, disable unused features & applications # https://erlang.org/doc/applications.html # ERL_TOP is required for Erlang/OTP makefiles to find the absolute path for the installation