From 980458d3f870baf2d31d788f2f48e76a69010a0f Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 05:58:04 -1000 Subject: [PATCH 01/12] minor bumps webp/libde265 --- layer/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index b07924d..231f476 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -1,6 +1,6 @@ # Library Versions -WEBP_VERSION=1.2.4 -LIBDE265_VERSION=1.0.8 +WEBP_VERSION=1.3.2 +LIBDE265_VERSION=1.0.12 LIBHEIF_VERSION=1.12.0 VIPS_VERSION=8.12.2 SHARP_VERSION=0.30.7 From 8b0a3e23137b6c700bf00e87c815f47c0d3c123f Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 06:29:55 -1000 Subject: [PATCH 02/12] bump libheif/vips/sharp --- layer/Makefile | 6 +++--- layer/src/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index 231f476..9247ac2 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -1,9 +1,9 @@ # Library Versions WEBP_VERSION=1.3.2 LIBDE265_VERSION=1.0.12 -LIBHEIF_VERSION=1.12.0 -VIPS_VERSION=8.12.2 -SHARP_VERSION=0.30.7 +LIBHEIF_VERSION=1.16.2 +VIPS_VERSION=8.14.5 +SHARP_VERSION=0.32.6 PREFIX_PATH=/opt diff --git a/layer/src/package.json b/layer/src/package.json index 5b44a6a..cee8dab 100644 --- a/layer/src/package.json +++ b/layer/src/package.json @@ -11,6 +11,6 @@ "node": ">=16.0" }, "dependencies": { - "sharp": "^0.30.7" + "sharp": "^0.32.6" } } From 1da28661546bd93e9da035a6ce57f9e4bd6b7103 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 06:37:32 -1000 Subject: [PATCH 03/12] update build commands --- layer/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index 9247ac2..e6d620d 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -30,12 +30,12 @@ libde265: libheif: libde265 # libheif curl -L https://github.com/strukturag/libheif/releases/download/v$(LIBHEIF_VERSION)/libheif-$(LIBHEIF_VERSION).tar.gz | tar zx - cd libheif-$(LIBHEIF_VERSION) && ./autogen.sh && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install + cd libheif-$(LIBHEIF_VERSION) && mkdir build && cd build && cmake -DCMAKE_INSTALL_LIBDIR=$(LIB_PATH) --preset=release .. && make && make install libvips: installLib libheif libwebp # libvips - curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.gz | tar zx - cd vips-$(VIPS_VERSION) && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install + curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.xz | tar xJ + cd vips-$(VIPS_VERSION) && meson setup build -Dexamples=true -Dheif=enabled -Dlcms=enabled && cd build && meson compile && meson test && meson install installLib: yum install -y yum-plugin-ovl && \ From 0af51a8b52968d26d5e49e86c830b8fa13b02391 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 06:52:05 -1000 Subject: [PATCH 04/12] add cmake/meson/dev tools --- layer/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/layer/Makefile b/layer/Makefile index e6d620d..edf5a25 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -38,6 +38,7 @@ libvips: installLib libheif libwebp cd vips-$(VIPS_VERSION) && meson setup build -Dexamples=true -Dheif=enabled -Dlcms=enabled && cd build && meson compile && meson test && meson install installLib: + yum groupinstall -y "Development Tools" -x system-rpm-config && \ yum install -y yum-plugin-ovl && \ yum install -y \ glib2-devel \ @@ -49,4 +50,9 @@ installLib: libexif-devel \ librsvg2-devel \ libtiff-devel \ - lcms2-devel + lcms2-devel \ + gobject-introspection-devel \ + cmake \ + pkgconfig \ + meson \ + ninja-build From f57fc0da03e218e0a316496594457fe3166b0a93 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:01:46 -1000 Subject: [PATCH 05/12] back to last libvips with old build system (and matching sharp) --- layer/Makefile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index edf5a25..e16e16d 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -2,8 +2,8 @@ WEBP_VERSION=1.3.2 LIBDE265_VERSION=1.0.12 LIBHEIF_VERSION=1.16.2 -VIPS_VERSION=8.14.5 -SHARP_VERSION=0.32.6 +VIPS_VERSION=8.13.3 +SHARP_VERSION=0.31.0 PREFIX_PATH=/opt @@ -34,8 +34,8 @@ libheif: libde265 libvips: installLib libheif libwebp # libvips - curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.xz | tar xJ - cd vips-$(VIPS_VERSION) && meson setup build -Dexamples=true -Dheif=enabled -Dlcms=enabled && cd build && meson compile && meson test && meson install + curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.gz | tar zx + cd vips-$(VIPS_VERSION) && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install installLib: yum groupinstall -y "Development Tools" -x system-rpm-config && \ @@ -53,6 +53,4 @@ installLib: lcms2-devel \ gobject-introspection-devel \ cmake \ - pkgconfig \ - meson \ - ninja-build + pkgconfig From 1914e5aa7783a82c0e8f719ba6dd6b36197f170e Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:13:42 -1000 Subject: [PATCH 06/12] switch to new CodeBuild image --- README.md | 2 +- buildspec.yaml | 3 ++- layer/Makefile | 9 +++++---- sample-buildproject.yaml | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e5ad2e2..34f15ad 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Due to potential license concerns for the HEVC patent group, this repo can't be But you can compile and deploy this lambda layer yourself at your own risk and use it wihin your own accounts. All you need is an S3 bucket to deploy the compiled code to (replace `your-s3-bucket` in the code snippet below). Please see the note below regarding the build process. -It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below. The base image that should be used is `aws/codebuild/amazonlinux2-x86_64-standard:4.0`. +It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below. The base image that should be used is `aws/codebuild/amazonlinux2-x86_64-standard:5.0`. A sample CloudFormation template is provided to setup the CodeBuild project, [sample-buildproject.yaml](sample-buildproject.yaml). diff --git a/buildspec.yaml b/buildspec.yaml index efe568a..d6691fa 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -9,8 +9,9 @@ env: phases: install: runtime-versions: - nodejs: 16 + nodejs: 18 # this is the only runtime version in the CodeBuild container commands: + - n 16 # switch back to node 16 - pip3 install aws-sam-cli --upgrade --user pre_build: commands: diff --git a/layer/Makefile b/layer/Makefile index e16e16d..dbc3da6 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -38,9 +38,8 @@ libvips: installLib libheif libwebp cd vips-$(VIPS_VERSION) && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install installLib: - yum groupinstall -y "Development Tools" -x system-rpm-config && \ - yum install -y yum-plugin-ovl && \ - yum install -y \ + dnf groupinstall -y "Development Tools" -x system-rpm-config && \ + dnf install -y \ glib2-devel \ expat-devel \ libjpeg-devel \ @@ -53,4 +52,6 @@ installLib: lcms2-devel \ gobject-introspection-devel \ cmake \ - pkgconfig + pkgconfig \ + meson \ + ninja-build diff --git a/sample-buildproject.yaml b/sample-buildproject.yaml index 7ebdb3a..4b04e7d 100644 --- a/sample-buildproject.yaml +++ b/sample-buildproject.yaml @@ -39,7 +39,7 @@ Resources: Environment: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_MEDIUM - Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 ImagePullCredentialsType: CODEBUILD PrivilegedMode: true EnvironmentVariables: From d9e4f064c1cb561bb586c913df862db53ed4e1fa Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:27:28 -1000 Subject: [PATCH 07/12] Revert "switch to new CodeBuild image" This reverts commit 1914e5aa7783a82c0e8f719ba6dd6b36197f170e. --- README.md | 2 +- buildspec.yaml | 3 +-- layer/Makefile | 9 ++++----- sample-buildproject.yaml | 2 +- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 34f15ad..e5ad2e2 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Due to potential license concerns for the HEVC patent group, this repo can't be But you can compile and deploy this lambda layer yourself at your own risk and use it wihin your own accounts. All you need is an S3 bucket to deploy the compiled code to (replace `your-s3-bucket` in the code snippet below). Please see the note below regarding the build process. -It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below. The base image that should be used is `aws/codebuild/amazonlinux2-x86_64-standard:5.0`. +It is recommended to automate this process using AWS CodeBuild. A buildspec file is provided in the repo. In that case you'll have to set the `SAM_BUCKET` environment variable in CodeBuild. For other environment variables see the table below. The base image that should be used is `aws/codebuild/amazonlinux2-x86_64-standard:4.0`. A sample CloudFormation template is provided to setup the CodeBuild project, [sample-buildproject.yaml](sample-buildproject.yaml). diff --git a/buildspec.yaml b/buildspec.yaml index d6691fa..efe568a 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -9,9 +9,8 @@ env: phases: install: runtime-versions: - nodejs: 18 # this is the only runtime version in the CodeBuild container + nodejs: 16 commands: - - n 16 # switch back to node 16 - pip3 install aws-sam-cli --upgrade --user pre_build: commands: diff --git a/layer/Makefile b/layer/Makefile index dbc3da6..e16e16d 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -38,8 +38,9 @@ libvips: installLib libheif libwebp cd vips-$(VIPS_VERSION) && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install installLib: - dnf groupinstall -y "Development Tools" -x system-rpm-config && \ - dnf install -y \ + yum groupinstall -y "Development Tools" -x system-rpm-config && \ + yum install -y yum-plugin-ovl && \ + yum install -y \ glib2-devel \ expat-devel \ libjpeg-devel \ @@ -52,6 +53,4 @@ installLib: lcms2-devel \ gobject-introspection-devel \ cmake \ - pkgconfig \ - meson \ - ninja-build + pkgconfig diff --git a/sample-buildproject.yaml b/sample-buildproject.yaml index 4b04e7d..7ebdb3a 100644 --- a/sample-buildproject.yaml +++ b/sample-buildproject.yaml @@ -39,7 +39,7 @@ Resources: Environment: Type: LINUX_CONTAINER ComputeType: BUILD_GENERAL1_MEDIUM - Image: aws/codebuild/amazonlinux2-x86_64-standard:5.0 + Image: aws/codebuild/amazonlinux2-x86_64-standard:4.0 ImagePullCredentialsType: CODEBUILD PrivilegedMode: true EnvironmentVariables: From d9f78cecf14c4b22e16bdd0685fd829a060fefa9 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:27:56 -1000 Subject: [PATCH 08/12] Revert "back to last libvips with old build system (and matching sharp)" This reverts commit f57fc0da03e218e0a316496594457fe3166b0a93. --- layer/Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index e16e16d..edf5a25 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -2,8 +2,8 @@ WEBP_VERSION=1.3.2 LIBDE265_VERSION=1.0.12 LIBHEIF_VERSION=1.16.2 -VIPS_VERSION=8.13.3 -SHARP_VERSION=0.31.0 +VIPS_VERSION=8.14.5 +SHARP_VERSION=0.32.6 PREFIX_PATH=/opt @@ -34,8 +34,8 @@ libheif: libde265 libvips: installLib libheif libwebp # libvips - curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.gz | tar zx - cd vips-$(VIPS_VERSION) && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install + curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.xz | tar xJ + cd vips-$(VIPS_VERSION) && meson setup build -Dexamples=true -Dheif=enabled -Dlcms=enabled && cd build && meson compile && meson test && meson install installLib: yum groupinstall -y "Development Tools" -x system-rpm-config && \ @@ -53,4 +53,6 @@ installLib: lcms2-devel \ gobject-introspection-devel \ cmake \ - pkgconfig + pkgconfig \ + meson \ + ninja-build From 58788d083b65c981ecdf2be28319a8e14586a3e7 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:28:02 -1000 Subject: [PATCH 09/12] Revert "add cmake/meson/dev tools" This reverts commit 0af51a8b52968d26d5e49e86c830b8fa13b02391. --- layer/Makefile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index edf5a25..e6d620d 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -38,7 +38,6 @@ libvips: installLib libheif libwebp cd vips-$(VIPS_VERSION) && meson setup build -Dexamples=true -Dheif=enabled -Dlcms=enabled && cd build && meson compile && meson test && meson install installLib: - yum groupinstall -y "Development Tools" -x system-rpm-config && \ yum install -y yum-plugin-ovl && \ yum install -y \ glib2-devel \ @@ -50,9 +49,4 @@ installLib: libexif-devel \ librsvg2-devel \ libtiff-devel \ - lcms2-devel \ - gobject-introspection-devel \ - cmake \ - pkgconfig \ - meson \ - ninja-build + lcms2-devel From cadd9e5c32ac0f80c0229a49437d6d0df84c23b6 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:28:19 -1000 Subject: [PATCH 10/12] Revert "update build commands" This reverts commit 1da28661546bd93e9da035a6ce57f9e4bd6b7103. --- layer/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index e6d620d..9247ac2 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -30,12 +30,12 @@ libde265: libheif: libde265 # libheif curl -L https://github.com/strukturag/libheif/releases/download/v$(LIBHEIF_VERSION)/libheif-$(LIBHEIF_VERSION).tar.gz | tar zx - cd libheif-$(LIBHEIF_VERSION) && mkdir build && cd build && cmake -DCMAKE_INSTALL_LIBDIR=$(LIB_PATH) --preset=release .. && make && make install + cd libheif-$(LIBHEIF_VERSION) && ./autogen.sh && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install libvips: installLib libheif libwebp # libvips - curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.xz | tar xJ - cd vips-$(VIPS_VERSION) && meson setup build -Dexamples=true -Dheif=enabled -Dlcms=enabled && cd build && meson compile && meson test && meson install + curl -L https://github.com/libvips/libvips/releases/download/v$(VIPS_VERSION)/vips-$(VIPS_VERSION).tar.gz | tar zx + cd vips-$(VIPS_VERSION) && ./configure --prefix=$(PREFIX_PATH) && make V=0 && make install installLib: yum install -y yum-plugin-ovl && \ From 26b7e0b1859a58d4bdd8dbd617b67233d5d6b5d5 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:28:26 -1000 Subject: [PATCH 11/12] Revert "bump libheif/vips/sharp" This reverts commit 8b0a3e23137b6c700bf00e87c815f47c0d3c123f. --- layer/Makefile | 6 +++--- layer/src/package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layer/Makefile b/layer/Makefile index 9247ac2..231f476 100644 --- a/layer/Makefile +++ b/layer/Makefile @@ -1,9 +1,9 @@ # Library Versions WEBP_VERSION=1.3.2 LIBDE265_VERSION=1.0.12 -LIBHEIF_VERSION=1.16.2 -VIPS_VERSION=8.14.5 -SHARP_VERSION=0.32.6 +LIBHEIF_VERSION=1.12.0 +VIPS_VERSION=8.12.2 +SHARP_VERSION=0.30.7 PREFIX_PATH=/opt diff --git a/layer/src/package.json b/layer/src/package.json index cee8dab..5b44a6a 100644 --- a/layer/src/package.json +++ b/layer/src/package.json @@ -11,6 +11,6 @@ "node": ">=16.0" }, "dependencies": { - "sharp": "^0.32.6" + "sharp": "^0.30.7" } } From 275c9b84e680790bcb67f823beda8a5d2fd5e106 Mon Sep 17 00:00:00 2001 From: Andreas Zoellner Date: Tue, 31 Oct 2023 07:45:16 -1000 Subject: [PATCH 12/12] update readme --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e5ad2e2..526089c 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,14 @@ This lambda layer contains the node module [sharp](https://github.com/lovell/sha ### Dependencies The following table lists the release version of this repo together with the version of each dependency. Patch versions are related to the build process or documentation and have the same dependencies as the minor version. -| release | sharp | libvips | libheif | libwebp | libde265 | nodejs | -|---------|--------|---------|---------|---------|----------|--------| -| 1.1.0 | 0.27.0 | 8.10.5 | 1.10.0 | 1.1.0 | 1.0.8 | 12 | -| 1.2.0 | 0.28.2 | 8.10.6 | 1.12.0 | 1.2.0 | 1.0.8 | 12 | -| 2.0.0 | 0.29.1 | 8.11.3 | 1.12.0 | 1.2.1 | 1.0.8 | 14 | -| 3.0.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.2.4 | 1.0.8 | 16 | -| 3.1.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.2.4 | 1.0.8 | 16 | +| release | sharp | libvips | libheif | libwebp | libde265 | nodejs | +|---------|--------|---------|---------|---------|-----------|--------| +| 1.1.0 | 0.27.0 | 8.10.5 | 1.10.0 | 1.1.0 | 1.0.8 | 12 | +| 1.2.0 | 0.28.2 | 8.10.6 | 1.12.0 | 1.2.0 | 1.0.8 | 12 | +| 2.0.0 | 0.29.1 | 8.11.3 | 1.12.0 | 1.2.1 | 1.0.8 | 14 | +| 3.0.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.2.4 | 1.0.8 | 16 | +| 3.1.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.2.4 | 1.0.8 | 16 | +| 3.2.0 | 0.30.7 | 8.12.2 | 1.12.0 | 1.3.2 | 1.0.12 | 16 | ### CompatibleRuntimes - `nodejs12.x` (v1.x)