From 044deb933576361c60c1ee18d6a70acc9a48266f Mon Sep 17 00:00:00 2001 From: tdrz Date: Tue, 3 Jun 2025 16:38:30 +0200 Subject: [PATCH 1/4] allow incremental builds by storing objs files on the host filesystem --- pglite-REL_17_4_WASM/build.sh | 2 +- tmp/.gitignore | 4 ++++ wasm-build/build-pgcore.sh | 3 ++- wasm-build/build-with-docker.sh | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 tmp/.gitignore diff --git a/pglite-REL_17_4_WASM/build.sh b/pglite-REL_17_4_WASM/build.sh index 71b209c0521db..2262fd6910a82 100755 --- a/pglite-REL_17_4_WASM/build.sh +++ b/pglite-REL_17_4_WASM/build.sh @@ -11,7 +11,7 @@ fi echo "pglite/build-$BUILD: begin target BUILD_PATH=$BUILD_PATH" WORKSPACE=$(pwd) -PGROOT=/tmp/pglite +PGROOT=${PGROOT:-/tmp/pglite} if [ -d ${WORKSPACE}/src/fe_utils ] then diff --git a/tmp/.gitignore b/tmp/.gitignore new file mode 100644 index 0000000000000..86d0cb2726c6c --- /dev/null +++ b/tmp/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore \ No newline at end of file diff --git a/wasm-build/build-pgcore.sh b/wasm-build/build-pgcore.sh index ace44bb3b1b9b..9a459d29aa0ce 100755 --- a/wasm-build/build-pgcore.sh +++ b/wasm-build/build-pgcore.sh @@ -217,6 +217,7 @@ END echo configure failed exit 218 fi +fi echo " @@ -422,7 +423,7 @@ END echo "TODO: node/wasi cmdline initdb for PGDATA=${PGDATA} " popd -fi +# fi echo "build-pgcore: end($BUILD) diff --git a/wasm-build/build-with-docker.sh b/wasm-build/build-with-docker.sh index fb90c67ac0b3c..276c837e53957 100755 --- a/wasm-build/build-with-docker.sh +++ b/wasm-build/build-with-docker.sh @@ -25,6 +25,9 @@ cat .buildconfig mkdir -p dist/pglite dist/extensions-emsdk +# needed to be able to do incremental builds with docker +mkdir -p ${WORKSPACE}/postgres-pglite/tmp/sdk/build /postgres-pglite/tmp/pglite + if echo -n $@|grep -q it$ then PROMPT="&& bash ) || bash" @@ -37,6 +40,8 @@ docker run $@ \ --env-file .buildconfig \ -e DEBUG=${DEBUG:-false} \ --workdir=${DOCKER_WORKSPACE} \ + -v ${WORKSPACE}/postgres-pglite/tmp/sdk/build:/tmp/sdk/build \ + -v ${WORKSPACE}/postgres-pglite/tmp/pglite:/tmp/pglite \ -v ${WORKSPACE}/postgres-pglite:${DOCKER_WORKSPACE}:rw \ -v ${WORKSPACE}/postgres-pglite/dist:/tmp/sdk/dist:rw \ $IMG_NAME:$IMG_TAG \ From 16af3a9429d1614eb1e50309c5554ba25427a876 Mon Sep 17 00:00:00 2001 From: tdrz Date: Tue, 3 Jun 2025 16:53:46 +0200 Subject: [PATCH 2/4] remove commented line --- wasm-build/build-pgcore.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/wasm-build/build-pgcore.sh b/wasm-build/build-pgcore.sh index 9a459d29aa0ce..300197068f158 100755 --- a/wasm-build/build-pgcore.sh +++ b/wasm-build/build-pgcore.sh @@ -423,8 +423,6 @@ END echo "TODO: node/wasi cmdline initdb for PGDATA=${PGDATA} " popd -# fi - echo "build-pgcore: end($BUILD) From b8de6adad6bc72a39bb6e3abac50b169279e9208 Mon Sep 17 00:00:00 2001 From: tdrz Date: Tue, 3 Jun 2025 16:58:15 +0200 Subject: [PATCH 3/4] bug fix --- wasm-build/build-with-docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wasm-build/build-with-docker.sh b/wasm-build/build-with-docker.sh index 276c837e53957..06439a2c9d276 100755 --- a/wasm-build/build-with-docker.sh +++ b/wasm-build/build-with-docker.sh @@ -26,7 +26,7 @@ cat .buildconfig mkdir -p dist/pglite dist/extensions-emsdk # needed to be able to do incremental builds with docker -mkdir -p ${WORKSPACE}/postgres-pglite/tmp/sdk/build /postgres-pglite/tmp/pglite +mkdir -p ${WORKSPACE}/postgres-pglite/tmp/sdk/build ${WORKSPACE}/postgres-pglite/tmp/pglite if echo -n $@|grep -q it$ then From fa90762c33a78e8bf16586071c23b998367e1e17 Mon Sep 17 00:00:00 2001 From: tdrz Date: Wed, 4 Jun 2025 10:27:37 +0200 Subject: [PATCH 4/4] explicit rw mapping --- wasm-build/build-with-docker.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wasm-build/build-with-docker.sh b/wasm-build/build-with-docker.sh index 06439a2c9d276..b6b546ddffcc4 100755 --- a/wasm-build/build-with-docker.sh +++ b/wasm-build/build-with-docker.sh @@ -40,8 +40,8 @@ docker run $@ \ --env-file .buildconfig \ -e DEBUG=${DEBUG:-false} \ --workdir=${DOCKER_WORKSPACE} \ - -v ${WORKSPACE}/postgres-pglite/tmp/sdk/build:/tmp/sdk/build \ - -v ${WORKSPACE}/postgres-pglite/tmp/pglite:/tmp/pglite \ + -v ${WORKSPACE}/postgres-pglite/tmp/sdk/build:/tmp/sdk/build:rw \ + -v ${WORKSPACE}/postgres-pglite/tmp/pglite:/tmp/pglite:rw \ -v ${WORKSPACE}/postgres-pglite:${DOCKER_WORKSPACE}:rw \ -v ${WORKSPACE}/postgres-pglite/dist:/tmp/sdk/dist:rw \ $IMG_NAME:$IMG_TAG \