Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build for debian bookworm #7

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ${image} AS builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update

RUN apt-get install -y curl build-essential pkg-config ruby binutils autoconf libwxbase3.0-dev \
RUN apt-get install -y curl build-essential pkg-config ruby binutils autoconf \
libssl-dev libtinfo-dev zlib1g-dev libsnmp-dev && \
(ruby -e "exit RUBY_VERSION.to_f > 2.5" || gem install --no-document public_suffix -v 4.0.7) && \
(ruby -e "exit RUBY_VERSION.to_f >= 3.0" || gem install --no-document dotenv -v 2.8.1 ) && \
Expand All @@ -30,7 +30,7 @@ WORKDIR /tmp/erlang
RUN curl -fL https://api.github.com/repos/erlang/otp/tarball/refs/tags/OTP-${erlang_version} | tar zx --strip-components=1

# erlang before 24.1 requires gcc-9 and autoconf-2.69
RUN if (grep -q jammy /etc/os-release && dpkg --compare-versions "$erlang_version" lt 24.1); then \
RUN if (grep -q -e jammy -e bullseye /etc/os-release && dpkg --compare-versions "$erlang_version" lt 24.1); then \
apt-get install -y gcc-9 autoconf2.69 && \
ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \
ln -sf /usr/bin/autoconf2.69 /usr/bin/autoconf; \
Expand Down
10 changes: 7 additions & 3 deletions bin/missing-versions
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
require_relative "../lib/github"
require_relative "../lib/packagecloud"

DISTS = %w[ubuntu/jammy ubuntu/focal].freeze
DISTS = %w[ubuntu/jammy ubuntu/focal debian/bookworm debian/bullseye].freeze
PLATFORMS = %w[amd64 arm64].freeze
# 24.2 supports OpenSSL 3 and modern gcc/autoconf versions
FIRST_SANE_VERSION = Gem::Version.new("24.2")

packagecloud = Packagecloud.new
github = Github.new
Expand All @@ -15,6 +17,8 @@ github.releases do |r|
next if r["tag_name"].include? "-rc"
version = r["tag_name"].sub("OTP-", "")
DISTS.each do |dist|
# Debian Bookworm doesn't have gcc 9 which is required for erlang <24.2
next if dist == "debian/bookworm" && Gem::Version.new(version) < FIRST_SANE_VERSION
PLATFORMS.each do |platform|
filename = "esl-erlang_#{version}-1_#{platform}.deb"
next if packagecloud.exists? dist, filename
Expand All @@ -23,9 +27,9 @@ github.releases do |r|
end
end
end

missing.sort_by! { |v| v[:version] }
# Output for Github Action
JSON.dump(missing.take(256), $stdout)

# Github Actions support maximum 256 jobs
warn "Result truncated to 256, actual missing versions: #{to_build.size}" if to_build.size > 256
warn "Result truncated to 256, actual missing versions: #{missing.size}" if missing.size > 256
Loading