diff --git a/compute/compute-node.Dockerfile b/compute/compute-node.Dockerfile index 1fe2570e87..a53b380b3f 100644 --- a/compute/compute-node.Dockerfile +++ b/compute/compute-node.Dockerfile @@ -369,7 +369,7 @@ FROM build-deps AS plv8-src ARG PG_VERSION WORKDIR /ext-src -COPY compute/patches/plv8-3.1.10.patch . +COPY compute/patches/plv8* . # plv8 3.2.3 supports v17 # last release v3.2.3 - Sep 7, 2024 @@ -393,7 +393,7 @@ RUN case "${PG_VERSION:?}" in \ git clone --recurse-submodules --depth 1 --branch ${PLV8_TAG} https://github.com/plv8/plv8.git plv8-src && \ tar -czf plv8.tar.gz --exclude .git plv8-src && \ cd plv8-src && \ - if [[ "${PG_VERSION:?}" < "v17" ]]; then patch -p1 < /ext-src/plv8-3.1.10.patch; fi + if [[ "${PG_VERSION:?}" < "v17" ]]; then patch -p1 < /ext-src/plv8_v3.1.10.patch; else patch -p1 < /ext-src/plv8_v3.2.3.patch; fi # Step 1: Build the vendored V8 engine. It doesn't depend on PostgreSQL, so use # 'build-deps' as the base. This enables caching and avoids unnecessary rebuilds. diff --git a/compute/patches/plv8-3.1.10.patch b/compute/patches/plv8_v3.1.10.patch similarity index 80% rename from compute/patches/plv8-3.1.10.patch rename to compute/patches/plv8_v3.1.10.patch index 43cdb479f7..5cf96426d0 100644 --- a/compute/patches/plv8-3.1.10.patch +++ b/compute/patches/plv8_v3.1.10.patch @@ -1,12 +1,6 @@ -commit 46b38d3e46f9cd6c70d9b189dd6ff4abaa17cf5e -Author: Alexander Bayandin -Date: Sat Nov 30 18:29:32 2024 +0000 - - Fix v8 9.7.37 compilation on Debian 12 - diff --git a/patches/code/84cf3230a9680aac3b73c410c2b758760b6d3066.patch b/patches/code/84cf3230a9680aac3b73c410c2b758760b6d3066.patch new file mode 100644 -index 0000000..f0a5dc7 +index 0000000..fae1cb3 --- /dev/null +++ b/patches/code/84cf3230a9680aac3b73c410c2b758760b6d3066.patch @@ -0,0 +1,30 @@ @@ -35,8 +29,21 @@ index 0000000..f0a5dc7 +@@ -5,6 +5,7 @@ + #ifndef V8_HEAP_CPPGC_PREFINALIZER_HANDLER_H_ + #define V8_HEAP_CPPGC_PREFINALIZER_HANDLER_H_ -+ ++ ++#include + #include -+ ++ + #include "include/cppgc/prefinalizer.h" +diff --git a/plv8.cc b/plv8.cc +index c1ce883..6e47e94 100644 +--- a/plv8.cc ++++ b/plv8.cc +@@ -379,7 +379,7 @@ _PG_init(void) + NULL, + &plv8_v8_flags, + NULL, +- PGC_USERSET, 0, ++ PGC_SUSET, 0, + #if PG_VERSION_NUM >= 90100 + NULL, + #endif diff --git a/compute/patches/plv8_v3.2.3.patch b/compute/patches/plv8_v3.2.3.patch new file mode 100644 index 0000000000..5cf4ae2fa2 --- /dev/null +++ b/compute/patches/plv8_v3.2.3.patch @@ -0,0 +1,13 @@ +diff --git a/plv8.cc b/plv8.cc +index edfa2aa..623e7f2 100644 +--- a/plv8.cc ++++ b/plv8.cc +@@ -385,7 +385,7 @@ _PG_init(void) + NULL, + &plv8_v8_flags, + NULL, +- PGC_USERSET, 0, ++ PGC_SUSET, 0, + #if PG_VERSION_NUM >= 90100 + NULL, + #endif