From a12518200d6618f288e83c7264ba1975adb96ab0 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Thu, 19 Dec 2024 12:57:20 -0500 Subject: [PATCH] Update 8 extensions for Postgres 17 (#867) Update the build scripting and upgrade versions as denoted: * pgq 3.5.1 * pgrouting 3.7.0 * pgsodium 3.1.9 * pgsql_http 1.6.1 * pgsql_ogr_fdw 1.1.5 * pgtap * pgtelemetry * pgtt 4.0.0 Also, upgrade pg_squeeze to 1.7.0, with support for Postgres 16-17. --- contrib/pg-telemetry/Dockerfile | 12 ---------- contrib/pg_squeeze/Trunk.toml | 2 +- contrib/pgq/Dockerfile | 18 +++++---------- contrib/pgq/Trunk.toml | 11 +++------ contrib/pgrouting/Dockerfile | 18 +++++++-------- contrib/pgrouting/Trunk.toml | 12 +++------- contrib/pgsodium/Dockerfile | 23 +++++++------------ contrib/pgsodium/Trunk.toml | 11 +++------ contrib/pgsql_http/Dockerfile | 21 +++++++---------- contrib/pgsql_http/Trunk.toml | 11 +++------ contrib/pgsql_ogr_fdw/Dockerfile | 19 +++++---------- contrib/pgsql_ogr_fdw/Trunk.toml | 9 ++------ contrib/pgtap/Dockerfile | 18 +++++++-------- contrib/pgtap/Trunk.toml | 9 ++------ contrib/pgtelemetry/Dockerfile | 10 ++++++++ .../{pg-telemetry => pgtelemetry}/Trunk.toml | 9 ++------ contrib/pgtt/Dockerfile | 18 +++++---------- contrib/pgtt/Trunk.toml | 11 +++------ 18 files changed, 82 insertions(+), 160 deletions(-) delete mode 100644 contrib/pg-telemetry/Dockerfile create mode 100644 contrib/pgtelemetry/Dockerfile rename contrib/{pg-telemetry => pgtelemetry}/Trunk.toml (70%) diff --git a/contrib/pg-telemetry/Dockerfile b/contrib/pg-telemetry/Dockerfile deleted file mode 100644 index 6c7387ec..00000000 --- a/contrib/pg-telemetry/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -ARG PG_VERSION=15 -FROM quay.io/coredb/c-builder:pg${PG_VERSION} -USER root - -# Extension build dependencies -RUN apt-get update && apt-get install -y \ - build-essential - -# Clone repository -RUN git clone https://github.com/adjust/pg-telemetry.git - -RUN cd pg-telemetry && make \ No newline at end of file diff --git a/contrib/pg_squeeze/Trunk.toml b/contrib/pg_squeeze/Trunk.toml index 380dd623..317b2efb 100644 --- a/contrib/pg_squeeze/Trunk.toml +++ b/contrib/pg_squeeze/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pg_squeeze" -version = "1.5.0" +version = "1.7.0" repository = "https://github.com/cybertec-postgresql/pg_squeeze" license = "Copyright" description = "A PostgreSQL extension for automatic bloat cleanup." diff --git a/contrib/pgq/Dockerfile b/contrib/pgq/Dockerfile index 36ff757f..2a1d872f 100644 --- a/contrib/pgq/Dockerfile +++ b/contrib/pgq/Dockerfile @@ -1,15 +1,9 @@ # Set PostgreSQL version -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -# Clone repository -RUN git clone https://github.com/pgq/pgq.git - -# Set project version -ARG RELEASE=v3.5 - -# Build extension -RUN cd pgq && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/${EXTENSION_NAME}/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} diff --git a/contrib/pgq/Trunk.toml b/contrib/pgq/Trunk.toml index ffb38099..5f0deb0d 100644 --- a/contrib/pgq/Trunk.toml +++ b/contrib/pgq/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pgq" -version = "3.5.0" +version = "3.5.1" repository = "https://github.com/pgq/pgq" license = "ISC" description = "Generic Queue for PostgreSQL." @@ -11,12 +11,7 @@ categories = ["orchestration"] apt = ["libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgq && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ +install_command = "make -C pgq install" diff --git a/contrib/pgrouting/Dockerfile b/contrib/pgrouting/Dockerfile index a4758000..b9a1ac19 100644 --- a/contrib/pgrouting/Dockerfile +++ b/contrib/pgrouting/Dockerfile @@ -1,21 +1,19 @@ -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -USER root # Install the dependencies +USER root RUN apt-get update && apt-get install -y \ build-essential \ cmake \ libboost-all-dev \ - perl \ - postgresql-server-dev-13 \ python3-sphinx -# Clone pgRouting repository -RUN git clone https://github.com/pgRouting/pgrouting.git - -RUN cd pgrouting \ - && mkdir build \ - && cd build \ +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/${EXTENSION_NAME}/${EXTENSION_NAME}.git \ + && mkdir -p ${EXTENSION_NAME}/build \ + && cd ${EXTENSION_NAME}/build \ && cmake .. \ && make diff --git a/contrib/pgrouting/Trunk.toml b/contrib/pgrouting/Trunk.toml index 8725c25d..56f808d5 100644 --- a/contrib/pgrouting/Trunk.toml +++ b/contrib/pgrouting/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pgrouting" -version = "3.5.0" +version = "3.7.0" repository = "https://github.com/pgRouting/pgrouting" license = "GPL-2.0" description = "pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality." @@ -12,13 +12,7 @@ categories = ["data_transformations"] apt = ["libstdc++6", "libc6", "libgcc-s1"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgrouting/build && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ - +install_command = "make -C pgrouting/build install" diff --git a/contrib/pgsodium/Dockerfile b/contrib/pgsodium/Dockerfile index d4e9193a..25bb9727 100644 --- a/contrib/pgsodium/Dockerfile +++ b/contrib/pgsodium/Dockerfile @@ -1,20 +1,13 @@ # Set PostgreSQL version -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -USER root # Extension build dependencies -RUN apt-get update && apt-get install -y \ - libsodium-dev - -# Clone repository -RUN git clone https://github.com/michelp/pgsodium.git - -# Set project version -ARG RELEASE=v3.1.8 +USER root +RUN apt-get update && apt-get install -y libsodium-dev -# Build extension -RUN cd pgsodium && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/michelp/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} diff --git a/contrib/pgsodium/Trunk.toml b/contrib/pgsodium/Trunk.toml index b896339b..698fb01e 100644 --- a/contrib/pgsodium/Trunk.toml +++ b/contrib/pgsodium/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pgsodium" -version = "3.1.8" +version = "3.1.9" repository = "https://github.com/michelp/pgsodium" license = "Copyright" description = "Modern cryptography for PostgreSQL using libsodium." @@ -11,12 +11,7 @@ categories = ["security"] apt = ["libsodium23", "libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgsodium && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ +install_command = "make -C pgsodium install" diff --git a/contrib/pgsql_http/Dockerfile b/contrib/pgsql_http/Dockerfile index 24228f24..00e12059 100644 --- a/contrib/pgsql_http/Dockerfile +++ b/contrib/pgsql_http/Dockerfile @@ -1,17 +1,12 @@ -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -USER root # Extension build dependencies -RUN apt-get update && apt-get install -y \ - libcurl4-openssl-dev - -# Clone repository -RUN git clone https://github.com/pramsey/pgsql-http.git - -ARG RELEASE=v1.5.0 +USER root +RUN apt-get update && apt-get install -y libcurl4-openssl-dev -RUN cd pgsql-http && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make +# Clone and build the extension. +# ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/pramsey/pgsql-http.git \ + && make -C pgsql-http diff --git a/contrib/pgsql_http/Trunk.toml b/contrib/pgsql_http/Trunk.toml index d4027baf..ebe64a63 100644 --- a/contrib/pgsql_http/Trunk.toml +++ b/contrib/pgsql_http/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pgsql_http" -version = "1.5.0" +version = "1.6.1" repository = "https://github.com/pramsey/pgsql-http" license = "MIT" description = "HTTP client for PostgreSQL, retrieve a web page from inside the database." @@ -11,12 +11,7 @@ categories = ["connectors"] apt = ["libc6", "libcurl4"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgsql-http && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ +install_command = "make -C pgsql-http install" diff --git a/contrib/pgsql_ogr_fdw/Dockerfile b/contrib/pgsql_ogr_fdw/Dockerfile index 8a7673be..dba4f362 100644 --- a/contrib/pgsql_ogr_fdw/Dockerfile +++ b/contrib/pgsql_ogr_fdw/Dockerfile @@ -4,17 +4,10 @@ FROM quay.io/coredb/c-builder:pg${PG_VERSION} USER root # Extension build dependencies -RUN apt-get update && apt-get install -y \ - libgdal-dev +RUN apt-get update && apt-get install -y libgdal-dev -# Clone repository -RUN git clone https://github.com/pramsey/pgsql-ogr-fdw.git - -# Set project version -ARG RELEASE=v1.1.4 - -# Build extension -RUN cd pgsql-ogr-fdw && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make +# Clone and build the extension. +# ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/pramsey/pgsql-ogr-fdw.git \ + && make -C pgsql-ogr-fdw diff --git a/contrib/pgsql_ogr_fdw/Trunk.toml b/contrib/pgsql_ogr_fdw/Trunk.toml index 60f4367e..c159d299 100644 --- a/contrib/pgsql_ogr_fdw/Trunk.toml +++ b/contrib/pgsql_ogr_fdw/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pgsql_ogr_fdw" -version = "1.1.0" +version = "1.1.5" repository = "https://github.com/pramsey/pgsql-ogr-fdw" license = "MIT" description = "PostgreSQL foreign data wrapper for OGR." @@ -14,9 +14,4 @@ apt = ["libgdal30", "libc6"] postgres_version = "15" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgsql-ogr-fdw && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ +install_command = "make -C pgsql-ogr-fdw install" diff --git a/contrib/pgtap/Dockerfile b/contrib/pgtap/Dockerfile index 269e2fa4..6c41e7ff 100644 --- a/contrib/pgtap/Dockerfile +++ b/contrib/pgtap/Dockerfile @@ -1,12 +1,10 @@ -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -# Clone repository -RUN git clone https://github.com/theory/pgtap.git - -ARG RELEASE=v1.3.2 - -RUN cd pgtap && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make +# Extension build dependencies +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \ + && unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \ + && cd ${EXTENSION_NAME}-${EXTENSION_VERSION} && make +WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION} diff --git a/contrib/pgtap/Trunk.toml b/contrib/pgtap/Trunk.toml index f1241b2c..ee2bde64 100644 --- a/contrib/pgtap/Trunk.toml +++ b/contrib/pgtap/Trunk.toml @@ -9,12 +9,7 @@ documentation = "https://pgtap.org/documentation.html" categories = ["tooling_admin"] [build] -postgres_version = "16" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgtap && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/16/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/16/lib - """ +install_command = "make install" diff --git a/contrib/pgtelemetry/Dockerfile b/contrib/pgtelemetry/Dockerfile new file mode 100644 index 00000000..6c41e7ff --- /dev/null +++ b/contrib/pgtelemetry/Dockerfile @@ -0,0 +1,10 @@ +ARG PG_VERSION +FROM quay.io/coredb/c-builder:pg${PG_VERSION} + +# Extension build dependencies +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN curl -O https://api.pgxn.org/dist/${EXTENSION_NAME}/${EXTENSION_VERSION}/${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \ + && unzip ${EXTENSION_NAME}-${EXTENSION_VERSION}.zip \ + && cd ${EXTENSION_NAME}-${EXTENSION_VERSION} && make +WORKDIR /app/${EXTENSION_NAME}-${EXTENSION_VERSION} diff --git a/contrib/pg-telemetry/Trunk.toml b/contrib/pgtelemetry/Trunk.toml similarity index 70% rename from contrib/pg-telemetry/Trunk.toml rename to contrib/pgtelemetry/Trunk.toml index 090a6f65..9dbae7b3 100644 --- a/contrib/pg-telemetry/Trunk.toml +++ b/contrib/pgtelemetry/Trunk.toml @@ -13,12 +13,7 @@ categories = ["tooling_admin", "metrics"] apt = ["libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg-telemetry && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ +install_command = "make install" diff --git a/contrib/pgtt/Dockerfile b/contrib/pgtt/Dockerfile index b7123ed9..24d7625c 100644 --- a/contrib/pgtt/Dockerfile +++ b/contrib/pgtt/Dockerfile @@ -1,15 +1,9 @@ # Set PostgreSQL version -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -# Clone repository -RUN git clone https://github.com/darold/pgtt.git - -# Set project version -ARG RELEASE=v2.10 - -# Build extension -RUN cd pgtt && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v$(perl -E 'print shift =~ s/[.]0$//gr' "${EXTENSION_VERSION}")" https://github.com/darold/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} diff --git a/contrib/pgtt/Trunk.toml b/contrib/pgtt/Trunk.toml index 686fb804..82ea4cfd 100644 --- a/contrib/pgtt/Trunk.toml +++ b/contrib/pgtt/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pgtt" -version = "2.10.0" +version = "4.0.0" repository = "https://github.com/darold/pgtt" license = "ISC" description = "Extension to add Global Temporary Tables feature to PostgreSQL." @@ -11,12 +11,7 @@ categories = ["index_table_optimizations"] apt = ["libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pgtt && make install - set -x - mv /usr/local/pgsql/share/extension/* /usr/share/postgresql/15/extension - mv /usr/local/pgsql/lib/* /usr/lib/postgresql/15/lib - """ +install_command = "make -C pgtt install"