Skip to content

Commit

Permalink
Update extensions P-S for Postgres 17 (#869)
Browse files Browse the repository at this point in the history
Update the build scripting for the following extensions for PostgreSQL 17, and
upgrade the version as marked.

*   pointcloud
*   postgres_decoderbufs
*   postgresbson 2.0.2
*   postgresql_anonymizer 1.3.2
*   postgresql_hll 2.18.0
*   postgresql_logfdw
*   postgresql_topn 2.7.0
*   powa 5.0.0
*   prefix 1.2.9
*   quantile
*   random
*   rum 1.3.14
*   sequential_uuids
*   set_user 4.1.0
*   smlar
*   sslutils 1.4.0
*   supautils 2.6.0
*   system_stats 3.2.0
  • Loading branch information
theory committed Dec 19, 2024
1 parent ffbff62 commit 7f148ee
Show file tree
Hide file tree
Showing 37 changed files with 197 additions and 358 deletions.
28 changes: 0 additions & 28 deletions contrib/pgpointcloud/Dockerfile

This file was deleted.

23 changes: 23 additions & 0 deletions contrib/pointcloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Set PostgreSQL version
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Extension build dependencies
USER root
RUN apt-get update && apt-get install -y \
cmake \
autoconf \
automake \
libtool \
zlib1g-dev \
libxml2-dev \
libcunit1-dev

# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/pg${EXTENSION_NAME}/${EXTENSION_NAME}.git \
&& cd ${EXTENSION_NAME} \
&& ./autogen.sh \
&& ./configure \
&& make
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@ preload_libraries = ["postgis"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd pointcloud && 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 pointcloud install"
21 changes: 11 additions & 10 deletions contrib/postgres_decoderbufs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# 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 \
libprotobuf-c-dev

# Clone repository
RUN git clone https://github.com/debezium/postgres-decoderbufs.git
USER root
RUN apt-get update && apt-get install -y libprotobuf-c-dev

# Build extension
RUN cd postgres-decoderbufs && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
# ARG EXTENSION_VERSION
ARG RELEASE=84f30f3
RUN git clone https://github.com/debezium/postgres-decoderbufs.git ${EXTENSION_NAME} \
&& cd ${EXTENSION_NAME} \
&& git checkout ${RELEASE} \
&& make
7 changes: 1 addition & 6 deletions contrib/postgres_decoderbufs/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ apt = ["libc6", "libprotobuf-c1"]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgres-decoderbufs && 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 postgres_decoderbufs install"
27 changes: 15 additions & 12 deletions contrib/postgresbson/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
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 \
libbson-dev
# Clone repository
RUN git clone https://github.com/buzzm/postgresbson.git
RUN mkdir -p ~/projects/bson/include
# For some reason these need to be in ~/projects/bson/include/ and postgresbson/
RUN cp -r /usr/include/libbson-1.0/* ~/projects/bson/include/
RUN cp -r /usr/include/libbson-1.0/* postgresbson/
USER root
RUN apt-get update && apt-get install -y libbson-dev

# Replacing BSON_SHLIB with the path to libbson-1.0.so (https://github.com/buzzm/postgresbson/blob/5b442c42642075c43edbfc41c1e2e7e6d1034758/Makefile#L9)
RUN cd postgresbson && make BSON_SHLIB=/usr/lib/x86_64-linux-gnu/libbson-1.0.so
# Extension build dependencies
# ARG EXTENSION_NAME
ARG EXTENSION_VERSION
RUN curl -O https://api.pgxn.org/dist/bson/${EXTENSION_VERSION}/bson-${EXTENSION_VERSION}.zip \
&& unzip bson-${EXTENSION_VERSION}.zip \
&& cd bson-${EXTENSION_VERSION} \
# For some reason these need to be in ~/projects/bson/include/ and ./
&& mkdir -p ~/projects/bson \
&& cp -r /usr/include/libbson-1.0 ~/projects/bson/include \
&& cp -r /usr/include/libbson-1.0/* ./ \
&& make BSON_SHLIB=/usr/lib/x86_64-linux-gnu/libbson-1.0.so
WORKDIR /app/bson-${EXTENSION_VERSION}
12 changes: 3 additions & 9 deletions contrib/postgresbson/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "postgresbson"
version = "2.0.0"
version = "2.0.2"
repository = "https://github.com/buzzm/postgresbson"
license = "MIT"
description = "This PostgreSQL extension realizes the BSON data type, together with functions to create and inspect BSON objects for the purposes of expressive and performant querying."
Expand All @@ -12,13 +12,7 @@ categories = ["data_transformations"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgresbson && 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"
18 changes: 6 additions & 12 deletions contrib/postgresql_anonymizer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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://gitlab.com/dalibo/postgresql_anonymizer.git

# Set project version
ARG RELEASE=1.3.1

# Build extension
RUN cd postgresql_anonymizer && \
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 "${EXTENSION_VERSION}" https://gitlab.com/dalibo/${EXTENSION_NAME}.git \
&& make -C ${EXTENSION_NAME}
11 changes: 3 additions & 8 deletions contrib/postgresql_anonymizer/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "postgresql_anonymizer"
version = "1.3.1"
version = "1.3.2"
repository = "https://gitlab.com/dalibo/postgresql_anonymizer"
license = "PostgreSQL"
description = "Anonymization & Data Masking for PostgreSQL."
Expand All @@ -12,12 +12,7 @@ loadable_libraries = [{ library_name = "anon", requires_restart = true }]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgresql_anonymizer && 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 postgresql_anonymizer install"
16 changes: 6 additions & 10 deletions contrib/postgresql_hll/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/citusdata/postgresql-hll.git

ARG RELEASE=v2.17

RUN cd postgresql-hll && \
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/citusdata/postgresql-hll.git ${EXTENSION_NAME} \
&& make -C ${EXTENSION_NAME}
11 changes: 3 additions & 8 deletions contrib/postgresql_hll/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "postgresql_hll"
version = "2.16.0"
version = "2.18.0"
repository = "https://github.com/citusdata/postgresql-hll"
license = "Apache-2.0"
description = "HyperLogLog data structures as a native data type."
Expand All @@ -12,12 +12,7 @@ categories = ["analytics"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgresql-hll && 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 postgresql_hll install"
15 changes: 8 additions & 7 deletions contrib/postgresql_logfdw/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# 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/aws/postgresql-logfdw.git

# Build extension
RUN cd postgresql-logfdw && \
make USE_PGXS=1
ARG EXTENSION_NAME
# ARG EXTENSION_VERSION
ARG RELEASE=a6d7f62
RUN git clone https://github.com/aws/postgresql-logfdw.git ${EXTENSION_NAME} \
&& cd ${EXTENSION_NAME} \
&& git checkout ${RELEASE} \
&& make USE_PGXS=1
7 changes: 1 addition & 6 deletions contrib/postgresql_logfdw/Trunk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,4 @@ apt = ["libc6"]
postgres_version = "15"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgresql-logfdw && make USE_PGXS=1 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 postgresql_logfdw USE_PGXS=1 install"
16 changes: 6 additions & 10 deletions contrib/postgresql_topn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}

# Clone repository
RUN git clone https://github.com/citusdata/postgresql-topn.git

ARG RELEASE=v2.4.0

RUN cd postgresql-topn && \
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/citusdata/postgresql-topn.git ${EXTENSION_NAME} \
&& make -C ${EXTENSION_NAME}
11 changes: 3 additions & 8 deletions contrib/postgresql_topn/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "postgresql_topn"
version = "2.4.0"
version = "2.7.0"
repository = "https://github.com/citusdata/postgresql-topn"
license = "AGPL-3.0"
description = "TopN is an open source PostgreSQL extension that returns the top values in a database according to some criteria."
Expand All @@ -12,12 +12,7 @@ categories = ["data_transformations"]
apt = ["libc6"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgresql-topn && 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 postgresql_topn install"
28 changes: 8 additions & 20 deletions contrib/powa/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Set the PostgreSQL version
ARG PG_VERSION=15
ARG PG_VERSION
FROM quay.io/coredb/c-builder:pg${PG_VERSION}
USER root

# Extension build dependencies
USER root
RUN apt-get update && apt-get install -y \
build-essential \
libreadline-dev \
Expand All @@ -22,21 +22,9 @@ RUN apt-get update && apt-get install -y \
python3-pip && \
apt-get clean && rm -rf /var/lib/apt/lists/*

# Clone repository
RUN git clone https://github.com/postgres/postgres.git

# Use argument to specify PostgreSQL release
ARG PG_RELEASE=REL_15_3
ARG RELEASE=REL_4_2_1

# Configure and build PostgreSQL
RUN cd postgres && \
git fetch origin ${PG_RELEASE} && \
git checkout ${PG_RELEASE} && \
./configure && \
cd contrib && \
git clone https://github.com/powa-team/powa-archivist.git && \
cd powa-archivist && \
git fetch origin ${RELEASE} && \
git checkout ${RELEASE} && \
make
# Clone and build the extension.
ARG EXTENSION_NAME
ARG EXTENSION_VERSION
ARG PG_VERSION
RUN git clone --depth 1 --branch "REL_$(perl -E 'print shift =~ s/[.]/_/gr' "${EXTENSION_VERSION}")" https://github.com/${EXTENSION_NAME}-team/${EXTENSION_NAME}-archivist.git ${EXTENSION_NAME} \
&& make -C ${EXTENSION_NAME}
11 changes: 3 additions & 8 deletions contrib/powa/Trunk.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[extension]
name = "powa"
version = "4.2.1"
version = "5.0.0"
repository = "https://github.com/powa-team/powa-archivist"
license = "PostgreSQL"
description = "PostgreSQL Workload Analyser-core."
Expand All @@ -9,12 +9,7 @@ documentation = "https://powa.readthedocs.io/en/latest/"
categories = ["metrics"]

[build]
postgres_version = "15"
postgres_version = "17"
platform = "linux/amd64"
dockerfile = "Dockerfile"
install_command = """
cd postgres/contrib/powa-archivist && 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 powa install"
Loading

0 comments on commit 7f148ee

Please sign in to comment.