Skip to content

Commit

Permalink
PEREL-2701: Build for Ubuntu Jammy (22.04), upgrade ruby-build
Browse files Browse the repository at this point in the history
  • Loading branch information
jvperrin committed Dec 18, 2021
1 parent 2a8f3aa commit 8950f7e
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.bionic
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN rm -f /bin/sh && \
cp /etc/gemrc /root/.gemrc && \
cp /etc/gemrc /package/.gemrc

ADD vendor/ruby-build-20200722.tar.gz /tmp
ADD vendor/ruby-build-20211203.tar.gz /tmp

RUN mkdir -p /opt/puppet-omnibus/embedded && \
export MAKE_OPTS="-j3 -s" && \
Expand All @@ -28,7 +28,7 @@ RUN mkdir -p /opt/puppet-omnibus/embedded && \
export RUBY_CONFIGURE_OPTS="--without-gdbm --without-dbm \
--with-readline-dir=/usr/lib/x86_64-linux-gnu --with-openssl-dir=/usr/lib/x86_64-linux-gnu \
--disable-install-doc --without-tcl --without-tk" && \
/tmp/ruby-build-20200722/bin/ruby-build -p 2.2.10 /opt/puppet-omnibus/embedded
/tmp/ruby-build-20211203/bin/ruby-build -p 2.2.10 /opt/puppet-omnibus/embedded

RUN /opt/puppet-omnibus/embedded/bin/gem install rubygems-update -v '<3' && \
/opt/puppet-omnibus/embedded/bin/update_rubygems && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.focal
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN rm -f /bin/sh && \
cp /etc/gemrc /root/.gemrc && \
cp /etc/gemrc /package/.gemrc

ADD vendor/ruby-build-20200722.tar.gz /tmp
ADD vendor/ruby-build-20211203.tar.gz /tmp

RUN mkdir -p /opt/puppet-omnibus/embedded && \
export MAKE_OPTS="-j3 -s" && \
Expand All @@ -28,7 +28,7 @@ RUN mkdir -p /opt/puppet-omnibus/embedded && \
export RUBY_CONFIGURE_OPTS="--without-gdbm --without-dbm \
--with-readline-dir=/usr/lib/x86_64-linux-gnu --with-openssl-dir=/usr/lib/x86_64-linux-gnu \
--disable-install-doc --without-tcl --without-tk" && \
/tmp/ruby-build-20200722/bin/ruby-build -p 2.4.10 /opt/puppet-omnibus/embedded
/tmp/ruby-build-20211203/bin/ruby-build -p 2.4.10 /opt/puppet-omnibus/embedded

RUN /opt/puppet-omnibus/embedded/bin/gem install rubygems-update -v '<3' && \
/opt/puppet-omnibus/embedded/bin/update_rubygems && \
Expand Down
44 changes: 44 additions & 0 deletions Dockerfile.jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM docker-dev.yelpcorp.com/jammy_yelp:latest

RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install \
autoconf bison build-essential curl fakeroot gawk git-core libffi-dev \
libffi7 libgdbm-dev libncurses5-dev libpcre3-dev \
libreadline-dev libsqlite3-dev libxml2-dev libxslt1-dev \
pkg-config ruby screen sudo wget zlib1g zlib1g-dev && \
apt-get clean

RUN rm -f /bin/sh && \
ln -s /bin/bash /bin/sh && \
touch "/etc/default/puppet" && \
mkdir -p /opt /package /etc/puppet /var/lib/puppet /var/cache/omnibus && \
echo 'gem: --no-document' > /etc/gemrc && \
echo 'install: --no-ri --no-rdoc' >> /etc/gemrc && \
echo 'update: --no-ri --no-rdoc' >> /etc/gemrc && \
cp /etc/gemrc /.gemrc && \
cp /etc/gemrc /root/.gemrc && \
cp /etc/gemrc /package/.gemrc

ADD vendor/ruby-build-20211203.tar.gz /tmp

# PEREL-2701: Download and install libssl-dev 1.1 from impish, since jammy
# moves to 3.0 and Ruby doesn't support that at all yet. Jammy does include a
# runtime edition of 1.1 in libssl1.1 though, just doesn't have development headers
#
# Admittedly, this is a hack, and hopefully the situation here is better later
# on in jammy's release.
RUN wget http://mirrors.kernel.org/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1l-1ubuntu1_amd64.deb
RUN dpkg -i libssl-dev_1.1.1l-1ubuntu1_amd64.deb

RUN mkdir -p /opt/puppet-omnibus/embedded && \
export MAKE_OPTS="-j3 -s" && \
export RUBY_CFLAGS=-Os && \
export RUBY_BUILD_CACHE_PATH=/tmp && \
export RUBY_CONFIGURE_OPTS="--without-gdbm --without-dbm \
--with-readline-dir=/usr/lib/x86_64-linux-gnu --with-openssl-dir=/usr/lib/x86_64-linux-gnu \
--disable-install-doc --without-tcl --without-tk" && \
/tmp/ruby-build-20211203/bin/ruby-build -p 2.4.10 /opt/puppet-omnibus/embedded

RUN /opt/puppet-omnibus/embedded/bin/gem install rubygems-update -v '<3' && \
/opt/puppet-omnibus/embedded/bin/update_rubygems && \
rm -rf /opt/puppet-omnibus/embedded/share/*
4 changes: 2 additions & 2 deletions Dockerfile.trusty
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ RUN rm -f /bin/sh && \
cp /etc/gemrc /root/.gemrc && \
cp /etc/gemrc /package/.gemrc

ADD vendor/ruby-build-20200722.tar.gz /tmp
ADD vendor/ruby-build-20211203.tar.gz /tmp

RUN mkdir -p /opt/puppet-omnibus/embedded && \
export MAKE_OPTS="-j3 -s" && \
export RUBY_CFLAGS=-Os && \
export RUBY_BUILD_CACHE_PATH=/tmp && \
export RUBY_CONFIGURE_OPTS="--without-gdbm --without-dbm --disable-install-doc --without-tcl --without-tk" && \
/tmp/ruby-build-20200722/bin/ruby-build -p 2.2.10 /opt/puppet-omnibus/embedded
/tmp/ruby-build-20211203/bin/ruby-build -p 2.2.10 /opt/puppet-omnibus/embedded

RUN /opt/puppet-omnibus/embedded/bin/gem install rubygems-update -v '<3' && \
/opt/puppet-omnibus/embedded/bin/update_rubygems && \
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.xenial
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ RUN rm -f /bin/sh && \
cp /etc/gemrc /root/.gemrc && \
cp /etc/gemrc /package/.gemrc

ADD vendor/ruby-build-20200722.tar.gz /tmp
ADD vendor/ruby-build-20211203.tar.gz /tmp

RUN mkdir -p /opt/puppet-omnibus/embedded && \
export MAKE_OPTS="-j3 -s" && \
export RUBY_CFLAGS=-Os && \
export RUBY_BUILD_CACHE_PATH=/tmp && \
export RUBY_CONFIGURE_OPTS="--without-gdbm --without-dbm --disable-install-doc --without-tcl --without-tk" && \
/tmp/ruby-build-20200722/bin/ruby-build -p 2.2.10 /opt/puppet-omnibus/embedded
/tmp/ruby-build-20211203/bin/ruby-build -p 2.2.10 /opt/puppet-omnibus/embedded

RUN /opt/puppet-omnibus/embedded/bin/gem install rubygems-update -v '<3' && \
/opt/puppet-omnibus/embedded/bin/update_rubygems && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ itest: require_os package
-v `pwd`/itest:/itest:ro \
-v `pwd`/dist:/dist:ro \
docker-dev.yelpcorp.com/$(OS)_yelp \
/itest/$(OS).sh \
/itest/ubuntu.sh \
/dist/$(OS)/$(PACKAGE_NAME)_$(VERSION)-$(PKG_ITERATION)_amd64.deb \
$(VERSION)

Expand Down
1 change: 0 additions & 1 deletion itest/bionic.sh

This file was deleted.

1 change: 0 additions & 1 deletion itest/focal.sh

This file was deleted.

1 change: 0 additions & 1 deletion itest/lucid.sh

This file was deleted.

1 change: 0 additions & 1 deletion itest/trusty.sh

This file was deleted.

1 change: 0 additions & 1 deletion itest/xenial.sh

This file was deleted.

Binary file removed vendor/ruby-build-20200722.tar.gz
Binary file not shown.
Binary file added vendor/ruby-build-20211203.tar.gz
Binary file not shown.

0 comments on commit 8950f7e

Please sign in to comment.