Add Debian Bookworm images

This commit is contained in:
Clemens Beck 2024-01-18 10:20:04 +00:00 committed by Balasankar 'Balu' C
parent 5cc9de6b26
commit db6f2daec2
10 changed files with 55 additions and 24 deletions

View file

@ -16,6 +16,10 @@ JEMALLOC_DOWNLOAD_URL="https://github.com/jemalloc/jemalloc/releases/download/${
BUNDLER_VERSION=${3:-""}
RUBYGEMS_VERSION=${4:-""}
# only installed for Ruby 3.0 on debian bookworm
CUSTOM_OPENSSL_VERSION=1.1.1w
CUSTOM_OPENSSL_DIR=/usr/local/openssl_ruby
function build_common() {
# Download jemalloc
mkdir -p /usr/src/jemalloc
@ -90,6 +94,7 @@ function build_debian() {
apt-get update
apt-get install -y --no-install-recommends bison dpkg-dev libgdbm-dev autoconf
install_custom_openssl_if_needed
build_common
apt-get purge -y --auto-remove ruby
@ -115,6 +120,20 @@ function build_ubi() {
[ "$(command -v ruby)" = '/usr/local/bin/ruby' ]
}
function install_custom_openssl_if_needed() {
if [[ $RUBY_VERSION =~ "3.0" ]] && [[ $OS_VERSION =~ "bookworm" ]]; then
apt-get install -y --no-install-recommends perl make gcc
curl -fsSL "https://www.openssl.org/source/openssl-${CUSTOM_OPENSSL_VERSION}.tar.gz" | tar -xzC /tmp
cd /tmp/openssl-${CUSTOM_OPENSSL_VERSION}
./config --prefix="$CUSTOM_OPENSSL_DIR" --openssldir="$CUSTOM_OPENSSL_DIR" shared zlib
make
make install
rm -rf /tmp/openssl-${CUSTOM_OPENSSL_VERSION}
# set CONFIGURE_ARGS for ruby builds
export CONFIGURE_ARGS="${CONFIGURE_ARGS:-} --with-openssl-dir=$CUSTOM_OPENSSL_DIR"
fi
}
BUILD_OS=${BUILD_OS:-debian}
if [[ $BUILD_OS =~ debian ]]; then