From 10fbcd16fc56def547b5e0fddf48120fb12b7309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20Meadows-J=C3=B6nsson?= Date: Sun, 31 Mar 2024 09:58:40 +0200 Subject: [PATCH] Constrain Ubuntu Noble builds --- lib/bob/job/docker_checker.ex | 3 +++ ...c.dockerfile => erlang-ubuntu-noble.dockerfile} | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) rename priv/scripts/docker/{erlang-ubuntu-bionic.dockerfile => erlang-ubuntu-noble.dockerfile} (74%) diff --git a/lib/bob/job/docker_checker.ex b/lib/bob/job/docker_checker.ex index ff2225f..9766e6f 100644 --- a/lib/bob/job/docker_checker.ex +++ b/lib/bob/job/docker_checker.ex @@ -129,6 +129,9 @@ defmodule Bob.Job.DockerChecker do defp build_erlang_ref?("ubuntu", "jammy-" <> _, "OTP-" <> version), do: build_openssl_3?(version) + defp build_erlang_ref?("ubuntu", "noble-" <> _, "OTP-" <> version), + do: build_openssl_3?(version) + defp build_erlang_ref?(_os, _os_version, _ref), do: true defp build_erlang_ref?("arm64", "ubuntu", "trusty-" <> _, "OTP-17" <> _), do: false diff --git a/priv/scripts/docker/erlang-ubuntu-bionic.dockerfile b/priv/scripts/docker/erlang-ubuntu-noble.dockerfile similarity index 74% rename from priv/scripts/docker/erlang-ubuntu-bionic.dockerfile rename to priv/scripts/docker/erlang-ubuntu-noble.dockerfile index 323f44b..3a64ee6 100644 --- a/priv/scripts/docker/erlang-ubuntu-bionic.dockerfile +++ b/priv/scripts/docker/erlang-ubuntu-noble.dockerfile @@ -2,8 +2,6 @@ ARG OS_VERSION FROM ubuntu:${OS_VERSION} AS build -ARG ERLANG - RUN apt-get update RUN apt-get -y --no-install-recommends install \ autoconf \ @@ -13,12 +11,14 @@ RUN apt-get -y --no-install-recommends install \ make \ libncurses-dev \ unixodbc-dev \ - $(bash -c 'if [ "${ERLANG:0:1}" = "1" ]; then echo "libssl1.0-dev"; else echo "libssl-dev"; fi') \ + libssl-dev \ libsctp-dev \ wget \ ca-certificates \ pax-utils +ARG ERLANG + RUN mkdir -p /OTP/subdir RUN wget -nv "https://github.com/erlang/otp/archive/OTP-${ERLANG}.tar.gz" && tar -zxf "OTP-${ERLANG}.tar.gz" -C /OTP/subdir --strip-components=1 WORKDIR /OTP/subdir @@ -26,8 +26,8 @@ RUN ./otp_build autoconf RUN ./configure --with-ssl --enable-dirty-schedulers RUN make -j$(getconf _NPROCESSORS_ONLN) RUN make -j$(getconf _NPROCESSORS_ONLN) install -RUN bash -c 'if [ "${ERLANG:0:2}" -ge "23" ]; then make -j$(getconf _NPROCESSORS_ONLN) docs DOC_TARGETS=chunks; else true; fi' -RUN bash -c 'if [ "${ERLANG:0:2}" -ge "23" ]; then make -j$(getconf _NPROCESSORS_ONLN) install-docs DOC_TARGETS=chunks; else true; fi' +RUN make -j$(getconf _NPROCESSORS_ONLN) docs DOC_TARGETS=chunks +RUN make -j$(getconf _NPROCESSORS_ONLN) install-docs DOC_TARGETS=chunks RUN find /usr/local -regex '/usr/local/lib/erlang/\(lib/\|erts-\).*/\(man\|obj\|c_src\|emacs\|info\|examples\)' | xargs rm -rf RUN find /usr/local -name src | xargs -r find | grep -v '\.hrl$' | xargs rm -v || true RUN find /usr/local -name src | xargs -r find | xargs rmdir -vp || true @@ -36,13 +36,11 @@ RUN scanelf --nobanner -E ET_DYN -BF '%F' --recursive /usr/local | xargs -r stri FROM ubuntu:${OS_VERSION} AS final -ARG ERLANG - RUN apt-get update && \ apt-get -y --no-install-recommends install \ ca-certificates \ libodbc1 \ - $(bash -c 'if [ "${ERLANG:0:1}" = "1" ]; then echo "libssl1.0.0"; else echo "libssl1.1"; fi') \ + libssl3 \ libsctp1 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/*