Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

zlib1g #23

Merged
merged 1 commit into from Jun 24, 2020
Merged

zlib1g #23

merged 1 commit into from Jun 24, 2020

Conversation

nebhale
Copy link
Member

@nebhale nebhale commented Jun 15, 2020

Previously, Java applications could not run on the tiny run image. With the advent of the GraalVM Native Image functionality, this is now a possibility. Native Images have few, but some library dependencies. Most of these libraries are already on the tiny run image, and two of the three that are not (libstdc++ and libgcc_s) can be statically compiled into the native image binary. However, there is a single library dependency on libz that cannot be compiled into the binary.

This change adds the zlib1g package to the base images and the tiny run image. There are good reasons to minimize the collection of packages on base and especially tiny, but given that this library is quite commonly used and is the only barrier to Java native images on tiny I think it's a trade-off worth making. In addition, the list of libraries required by GraalVM native images has been constant for some time, and while it's impossible to predict the future, it is currently unlikely that any further libraries would need to be added to tiny.

Copy link

@martyspiewak martyspiewak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the detailed explanation of the motivation behind this PR- that was super helpful!

Everything looks good to me- I'm going to throw something in our backlog to actually merge the PR once it is approved by everyone, just to maintain team context

@martyspiewak martyspiewak marked this pull request as ready for review June 15, 2020 20:40
@martyspiewak martyspiewak marked this pull request as draft June 15, 2020 20:41
@nebhale
Copy link
Member Author

nebhale commented Jun 15, 2020

@martyspiewak Thanks for the quick review. I'm going to leave it in draft for a little while longer as I chase down a couple more leads to see if we can get GraalVM to change enough for us to not need it. I'll make sure to update as I learn more.

@nebhale nebhale marked this pull request as ready for review June 15, 2020 20:55
@martyspiewak
Copy link

@nebhale Sure! That makes sense- I didn't mean to to change it, sorry about that.

@nebhale
Copy link
Member Author

nebhale commented Jun 22, 2020

@martyspiewak and @kvedurmu, I'd like this merged please.

Previously, Java applications could not run on the tiny run image.  With the
advent of the GraalVM[1] Native Image[2] functionality, this is now a
possibility.  Native Images have few, but some library dependencies.  Most of
these libraries are already on the tiny run image, and two of the three that
are not (libstdc++ and libgcc_s) can be statically compiled into the native
image binary.  However, there is a single library dependency on libz that
cannot be compiled into the binary.

This change adds the zlib1g package to the base images and the tiny run image.
There are good reasons to minimize the collection of packages on base and
especially tiny, but given that this library is quite commonly used and is the
only barrier to Java native images on tiny I think it's a trade-off worth
making.  In addition, the list of libraries required by GraalVM native images
has been constant for some time, and while it's impossible to predict the
future, it is currently unlikely that any further libraries would need to be
added to tiny.

[1]: https://www.graalvm.org
[2]: https://www.graalvm.org/docs/reference-manual/native-image/

Signed-off-by: Ben Hale <bhale@vmware.com>
@sclevine
Copy link
Member

Have we evaluated advantages / disadvantages of adding zlib1g in a launch layer vs. the stack?

@nebhale
Copy link
Member Author

nebhale commented Jun 23, 2020

@sclevine Bringing it along compiled for each stack. Rebasing for libz vulnerabilities.

@mdelillo mdelillo merged commit b4a3401 into paketo-buildpacks:master Jun 24, 2020
@nebhale nebhale deleted the zlib1g branch July 9, 2020 16:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants