-
Notifications
You must be signed in to change notification settings - Fork 27
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
Document zlib install #113
Changes from 7 commits
805cd72
e1a2030
c3e44c7
b2c6214
5735acf
74a6189
c540540
a19dc1a
8f93de1
284e29a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,26 +71,18 @@ RUN mkdir -p ${BUILD_DIR} \ | |
|
||
############################################################################### | ||
# ZLIB Build | ||
# We compile a newer version because Lambda uses an old version (1.2.7) that | ||
# has a security vulnerability (CVE-2022-37434). | ||
# See https://github.com/brefphp/aws-lambda-layers/pull/110 | ||
# Can be removed once Lambda updates their version. | ||
# https://github.com/madler/zlib/releases | ||
# Needed for: | ||
# - openssl | ||
# - curl | ||
# - php | ||
# Used By: | ||
# - xml2 | ||
ENV VERSION_ZLIB=1.3 | ||
ENV ZLIB_BUILD_DIR=${BUILD_DIR}/xml2 | ||
|
||
ENV ZLIB_BUILD_DIR=${BUILD_DIR}/zlib | ||
RUN set -xe; \ | ||
mkdir -p ${ZLIB_BUILD_DIR}; \ | ||
# Download and upack the source code | ||
curl -Ls http://zlib.net/zlib-${VERSION_ZLIB}.tar.xz \ | ||
| tar xJC ${ZLIB_BUILD_DIR} --strip-components=1 | ||
|
||
# Move into the unpackaged code directory | ||
WORKDIR ${ZLIB_BUILD_DIR}/ | ||
|
||
# Configure the build | ||
RUN set -xe; \ | ||
make distclean \ | ||
&& CFLAGS="" \ | ||
|
@@ -99,7 +91,6 @@ RUN set -xe; \ | |
./configure \ | ||
--prefix=${INSTALL_DIR} \ | ||
--64 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GrahamCampbell I removed this line (after reading madler/zlib#143) at it seemed to do the trick. Do you see any reason to be worried? If not I'll merge and release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yeh, I think i did something similar when making vapor work with arm. This is fine. 👍 |
||
|
||
RUN set -xe; \ | ||
make install \ | ||
&& rm ${INSTALL_DIR}/lib/libz.a | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,26 +72,18 @@ RUN mkdir -p ${BUILD_DIR} \ | |
|
||
############################################################################### | ||
# ZLIB Build | ||
# We compile a newer version because Lambda uses an old version (1.2.7) that | ||
# has a security vulnerability (CVE-2022-37434). | ||
# See https://github.com/brefphp/aws-lambda-layers/pull/110 | ||
# Can be removed once Lambda updates their version. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think they ever will, for BC reasons. We'll likely have to wait till Lambda gets AL 2023, if that ever happens. ;) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @GrahamCampbell yep these are my notes for AL2023 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was there a reason you used the HTTP URL and not HTTPS? I'm trying to debug why the build is failing now… The HTTPS Url worked fine for me, I assumed it was all the same There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just copied this from bref v1. I didn't notice the http/s. |
||
# https://github.com/madler/zlib/releases | ||
# Needed for: | ||
# - openssl | ||
# - curl | ||
# - php | ||
# Used By: | ||
# - xml2 | ||
ENV VERSION_ZLIB=1.3 | ||
ENV ZLIB_BUILD_DIR=${BUILD_DIR}/xml2 | ||
|
||
ENV ZLIB_BUILD_DIR=${BUILD_DIR}/zlib | ||
RUN set -xe; \ | ||
mkdir -p ${ZLIB_BUILD_DIR}; \ | ||
# Download and upack the source code | ||
curl -Ls http://zlib.net/zlib-${VERSION_ZLIB}.tar.xz \ | ||
curl -Ls https://zlib.net/zlib-${VERSION_ZLIB}.tar.xz \ | ||
| tar xJC ${ZLIB_BUILD_DIR} --strip-components=1 | ||
|
||
# Move into the unpackaged code directory | ||
WORKDIR ${ZLIB_BUILD_DIR}/ | ||
|
||
# Configure the build | ||
RUN set -xe; \ | ||
make distclean \ | ||
&& CFLAGS="" \ | ||
|
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.
We could try
https://github.com/madler/zlib/releases/download/v${VERSION_ZLIB}/zlib-${VERSION_ZLIB}.tar.gz
instead?