forked from bobtfish/puppet-omnibus
-
Notifications
You must be signed in to change notification settings - Fork 2
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
PEREL-2701: build for ubuntu jammy #16
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not really a fan of this. Do we have an idea of if/when this might be fixed upstream? I'd rather wait a couple weeks than merge this now. If we do merge this we probably want a ticket to clean this up that blocks finishing the jammy project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...I guess if this is just to build the package it's not too bad, as long as we don't need to pull in the impish package to run this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's only as a build-time dependency (it uses
libssl1.1
at runtime), and I'm definitely not a fan either... I wish they published bothlibssl1.1-dev
andlibssl3-dev
or something like they do for runtime packages (libssl1.1 and libssl3 do both exist alongside each other).The problem is that I'm not sure how long this will take before it's fixed, and if it is fixed I expect it will only be for the latest ruby version (3.1.0 I suppose?). Since ruby releases come out on Christmas, I'm happy to wait until after this one and try out 3.1.0, but without ruby/openssl#369 and something like ruby/ruby#4904 merged in and released as a version I don't think it'll work yet. There's active work on this though, as ruby/openssl#399 (comment) was added just yesterday (!)
Another option I was toying with was unvendoring ruby itself from this package and using the system ruby instead. I think that'd be nice, but seems like a big undertaking to do (and especially if doing so for all OS releases, not just jammy). I think that also somewhat defeats the original purpose of using an omnibus package here to include all the dependencies all together, although there are things like libssl/libxml/libxslt/virt-what that this depends on anyway, so maybe that's not that big of a difference. As far as I know, ruby doesn't have something like virtualenvs to make a more self-contained runtime with a specific set of gems, but maybe bundler into a separate directory would accomplish something similar.