From 24424c468af894a453b2d9cdeb46cde8ac88c489 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Wed, 18 Dec 2024 16:32:18 -0500 Subject: [PATCH] Update pgaudit and other six other extensions (#864) Update the following extension build scripts, build from PGXN where possible, and upgrade the versions: * pg_text_semver v1.2.1 * pg_timeit at specific commit * pg_tle v1.2.0 * pg_track_settings * pg_uuidv7 v1.6.0 * pg_wait_sampling v1.1.6 Add separate build configurations for pgaudit, which has different versions for different major Postgres releases, but keep the extension name the same. Teach the extensions workflow not to build it on the wrong major versions, just like with pg_hint_plan. --- .github/workflows/extensions.yaml | 22 ++++++++++++++-- contrib/pg_text_semver/Dockerfile | 20 ++++++--------- contrib/pg_text_semver/Trunk.toml | 11 +++----- contrib/pg_timeit/Dockerfile | 15 ++++++----- contrib/pg_timeit/Trunk.toml | 9 ++----- contrib/pg_tle/Dockerfile | 18 ++++++------- contrib/pg_tle/Trunk.toml | 12 +++------ contrib/pg_track_settings/Dockerfile | 20 ++++++--------- contrib/pg_track_settings/Trunk.toml | 9 ++----- contrib/pg_uuidv7/Dockerfile | 19 +++++++------- contrib/pg_uuidv7/Trunk.toml | 9 ++----- contrib/pg_wait_sampling/Dockerfile | 18 +++++-------- contrib/pg_wait_sampling/Trunk.toml | 11 +++----- contrib/pg_walinspect/Trunk.toml | 1 - contrib/pgaudit/Dockerfile | 31 ----------------------- contrib/pgaudit14/Dockerfile | 12 +++++++++ contrib/pgaudit14/Trunk.toml | 18 +++++++++++++ contrib/pgaudit15/Dockerfile | 12 +++++++++ contrib/{pgaudit => pgaudit15}/Trunk.toml | 7 +---- contrib/pgaudit16/Dockerfile | 13 ++++++++++ contrib/pgaudit16/Trunk.toml | 18 +++++++++++++ contrib/pgaudit17/Dockerfile | 13 ++++++++++ contrib/pgaudit17/Trunk.toml | 18 +++++++++++++ 23 files changed, 189 insertions(+), 147 deletions(-) delete mode 100644 contrib/pgaudit/Dockerfile create mode 100644 contrib/pgaudit14/Dockerfile create mode 100644 contrib/pgaudit14/Trunk.toml create mode 100644 contrib/pgaudit15/Dockerfile rename contrib/{pgaudit => pgaudit15}/Trunk.toml (69%) create mode 100644 contrib/pgaudit16/Dockerfile create mode 100644 contrib/pgaudit16/Trunk.toml create mode 100644 contrib/pgaudit17/Dockerfile create mode 100644 contrib/pgaudit17/Trunk.toml diff --git a/.github/workflows/extensions.yaml b/.github/workflows/extensions.yaml index 4985db32..e2ff3a24 100644 --- a/.github/workflows/extensions.yaml +++ b/.github/workflows/extensions.yaml @@ -67,10 +67,14 @@ jobs: ext: ${{ fromJson(needs.find_directories.outputs.directories).include }} pg: [15] exclude: - # pg_hint_plabn has separate extensions for each major version + # pg_hint_plan has separate extensions for each major version - { ext: { name: pg_hint_plan14 } } - { ext: { name: pg_hint_plan16 } } - { ext: { name: pg_hint_plan17 } } + # pgaudit has separate configs for each major version + - { ext: { name: pgaudit14 } } + - { ext: { name: pgaudit16 } } + - { ext: { name: pgaudit17 } } steps: - uses: actions/checkout@v4 - name: Install system dependencies @@ -98,11 +102,12 @@ jobs: ext: ${{ fromJson(needs.find_directories.outputs.directories).include }} pg: [17, 16, 15, 14] exclude: + - { pg: 14, ext: { name: pg_walinspect } } # Added in Postgres 17 - { pg: 17, ext: { name: adminpack } } # Removed from Postgres 17 - { pg: 17, ext: { name: old_snapshot } } # Removed from Postgres 17 - { pg: 17, ext: { name: pg_lakehouse } } # Renamed pg_analytics - { pg: 17, ext: { name: pg_sparse } } # Removed after v0.7.0 - # pg_hint_plabn has separate extensions for each major version + # pg_hint_plan has separate extensions for each major version - { pg: 17, ext: { name: pg_hint_plan14 } } - { pg: 17, ext: { name: pg_hint_plan15 } } - { pg: 17, ext: { name: pg_hint_plan16 } } @@ -115,6 +120,19 @@ jobs: - { pg: 14, ext: { name: pg_hint_plan15 } } - { pg: 14, ext: { name: pg_hint_plan16 } } - { pg: 14, ext: { name: pg_hint_plan17 } } + # pgaudit has separate configs for each major version + - { pg: 17, ext: { name: pgaudit14 } } + - { pg: 17, ext: { name: pgaudit15 } } + - { pg: 17, ext: { name: pgaudit16 } } + - { pg: 16, ext: { name: pgaudit14 } } + - { pg: 16, ext: { name: pgaudit15 } } + - { pg: 16, ext: { name: pgaudit17 } } + - { pg: 15, ext: { name: pgaudit14 } } + - { pg: 15, ext: { name: pgaudit16 } } + - { pg: 15, ext: { name: pgaudit17 } } + - { pg: 14, ext: { name: pgaudit15 } } + - { pg: 14, ext: { name: pgaudit16 } } + - { pg: 14, ext: { name: pgaudit17 } } env: TRUNK_API_TOKEN: ${{ secrets.TRUNK_AUTH_TOKEN }} PGHOST: "localhost" diff --git a/contrib/pg_text_semver/Dockerfile b/contrib/pg_text_semver/Dockerfile index 1d0ef4df..e719a65f 100644 --- a/contrib/pg_text_semver/Dockerfile +++ b/contrib/pg_text_semver/Dockerfile @@ -1,15 +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/bigsmoke/pg_text_semver.git - -# Set project version -ARG RELEASE=v0.1.4 - -# Build extension -RUN cd pg_text_semver && \ - 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/pg_text_semver/Trunk.toml b/contrib/pg_text_semver/Trunk.toml index 00101a5a..fb1d3848 100644 --- a/contrib/pg_text_semver/Trunk.toml +++ b/contrib/pg_text_semver/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pg_text_semver" -version = "0.1.4" +version = "1.2.1" repository = "https://github.com/bigsmoke/pg_text_semver" license = "Copyright" description = "PostgreSQL semantic versioning extension, with comparison functions and operators." @@ -8,12 +8,7 @@ documentation = "https://github.com/bigsmoke/pg_text_semver" categories = ["data_transformations"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg_text_semver && 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/pg_timeit/Dockerfile b/contrib/pg_timeit/Dockerfile index 19bd57ef..bc0bdc1b 100644 --- a/contrib/pg_timeit/Dockerfile +++ b/contrib/pg_timeit/Dockerfile @@ -1,8 +1,11 @@ -ARG PG_VERSION=15 +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -# Clone repository -RUN git clone https://github.com/joelonsql/pg-timeit.git - -RUN cd pg-timeit && \ - make +# Clone and build the extension. +# ARG EXTENSION_NAME +# ARG EXTENSION_VERSION +ARG RELEASE=d83ab65 +RUN git clone https://github.com/joelonsql/pg-timeit.git \ + && cd pg-timeit \ + && git checkout ${RELEASE} \ + && make diff --git a/contrib/pg_timeit/Trunk.toml b/contrib/pg_timeit/Trunk.toml index 6b2a7dc8..80239595 100644 --- a/contrib/pg_timeit/Trunk.toml +++ b/contrib/pg_timeit/Trunk.toml @@ -11,12 +11,7 @@ categories = ["metrics"] apt = ["libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg-timeit && 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 pg-timeit install" diff --git a/contrib/pg_tle/Dockerfile b/contrib/pg_tle/Dockerfile index 22514e98..220c5c74 100644 --- a/contrib/pg_tle/Dockerfile +++ b/contrib/pg_tle/Dockerfile @@ -1,12 +1,12 @@ -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/pg_tle.git +# Extension build dependencies +USER root +RUN apt-get update && apt-get install -y libkrb5-dev -ARG RELEASE=v1.0.4 - -RUN cd pg_tle && \ - 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/aws/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} diff --git a/contrib/pg_tle/Trunk.toml b/contrib/pg_tle/Trunk.toml index 27b392bd..a6f25397 100644 --- a/contrib/pg_tle/Trunk.toml +++ b/contrib/pg_tle/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pg_tle" -version = "1.0.4" +version = "1.2.0" repository = "https://github.com/aws/pg_tle" license = "Apache-2.0" description = "Framework for building trusted language extensions for PostgreSQL." @@ -13,13 +13,7 @@ preload_libraries = ["pg_tle"] apt = ["libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg_tle && 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 pg_tle install" diff --git a/contrib/pg_track_settings/Dockerfile b/contrib/pg_track_settings/Dockerfile index 4da220fe..e719a65f 100644 --- a/contrib/pg_track_settings/Dockerfile +++ b/contrib/pg_track_settings/Dockerfile @@ -1,15 +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/rjuju/pg_track_settings.git - -# Set project version -ARG RELEASE=2.1.2 - -# Build extension -RUN cd pg_track_settings && \ - 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/pg_track_settings/Trunk.toml b/contrib/pg_track_settings/Trunk.toml index 23786bbb..07595aa5 100644 --- a/contrib/pg_track_settings/Trunk.toml +++ b/contrib/pg_track_settings/Trunk.toml @@ -8,12 +8,7 @@ documentation = "https://github.com/rjuju/pg_track_settings" categories = ["auditing_logging"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg_track_settings && 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/pg_uuidv7/Dockerfile b/contrib/pg_uuidv7/Dockerfile index 5352763f..e719a65f 100644 --- a/contrib/pg_uuidv7/Dockerfile +++ b/contrib/pg_uuidv7/Dockerfile @@ -1,12 +1,11 @@ -ARG PG_VERSION=15 +# Set PostgreSQL version +ARG PG_VERSION FROM quay.io/coredb/c-builder:pg${PG_VERSION} -# Clone repository -RUN git clone https://github.com/fboulnois/pg_uuidv7.git - -ARG RELEASE=v1.0.2 - -RUN cd pg_uuidv7 && \ - 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/pg_uuidv7/Trunk.toml b/contrib/pg_uuidv7/Trunk.toml index 34a9da21..6efc76d9 100644 --- a/contrib/pg_uuidv7/Trunk.toml +++ b/contrib/pg_uuidv7/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pg_uuidv7" -version = "1.0.0" +version = "1.6.0" repository = "https://github.com/fboulnois/pg_uuidv7" license = "MPL-2.0" description = "Create valid version 7 UUIDs in Postgres." @@ -15,9 +15,4 @@ apt = ["libc6"] postgres_version = "15" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg_uuidv7 && 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/pg_wait_sampling/Dockerfile b/contrib/pg_wait_sampling/Dockerfile index d39e7850..a532e1d9 100644 --- a/contrib/pg_wait_sampling/Dockerfile +++ b/contrib/pg_wait_sampling/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/postgrespro/pg_wait_sampling.git - -# Set project version -ARG RELEASE=v1.1.4 - -# Build extension -RUN cd pg_wait_sampling && \ - git fetch origin ${RELEASE} && \ - git checkout ${RELEASE} && \ - make USE_PGXS=1 +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "v${EXTENSION_VERSION}" https://github.com/postgrespro/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/pg_wait_sampling/Trunk.toml b/contrib/pg_wait_sampling/Trunk.toml index 3657a6d1..08dd35e9 100644 --- a/contrib/pg_wait_sampling/Trunk.toml +++ b/contrib/pg_wait_sampling/Trunk.toml @@ -1,6 +1,6 @@ [extension] name = "pg_wait_sampling" -version = "1.1.0" +version = "1.1.6" repository = "https://github.com/postgrespro/pg_wait_sampling" license = "PostgreSQL" description = "Sampling based statistics of wait events." @@ -12,12 +12,7 @@ preload_libraries = ["pg_wait_sampling"] apt = ["libc6"] [build] -postgres_version = "15" +postgres_version = "17" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd pg_wait_sampling && 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 pg_wait_sampling USE_PGXS=1 install" diff --git a/contrib/pg_walinspect/Trunk.toml b/contrib/pg_walinspect/Trunk.toml index 2026b681..a815e568 100644 --- a/contrib/pg_walinspect/Trunk.toml +++ b/contrib/pg_walinspect/Trunk.toml @@ -8,7 +8,6 @@ homepage = "https://www.postgresql.org" documentation = "https://www.postgresql.org/docs/current/pgwalinspect.html" categories = ["metrics"] - [dependencies] apt = ["libc6"] diff --git a/contrib/pgaudit/Dockerfile b/contrib/pgaudit/Dockerfile deleted file mode 100644 index de6634e4..00000000 --- a/contrib/pgaudit/Dockerfile +++ /dev/null @@ -1,31 +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 \ - libreadline-dev \ - zlib1g-dev \ - flex bison \ - libxml2-dev \ - libxslt-dev \ - libssl-dev \ - libxml2-utils \ - xsltproc \ - ccache \ - libkrb5-dev - -# Clone repository -RUN git clone https://github.com/postgres/postgres.git - -ARG PG_RELEASE=REL_15_3 - -RUN cd postgres && \ - git fetch origin ${PG_RELEASE} && \ - git checkout ${PG_RELEASE} && \ - ./configure && \ - cd contrib && \ - git clone https://github.com/pgaudit/pgaudit.git && \ - cd pgaudit && \ - make USE_PGXS=1 diff --git a/contrib/pgaudit14/Dockerfile b/contrib/pgaudit14/Dockerfile new file mode 100644 index 00000000..57fc6346 --- /dev/null +++ b/contrib/pgaudit14/Dockerfile @@ -0,0 +1,12 @@ +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 libkrb5-dev + +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "${EXTENSION_VERSION}" https://github.com/${EXTENSION_NAME}/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/pgaudit14/Trunk.toml b/contrib/pgaudit14/Trunk.toml new file mode 100644 index 00000000..f3ffb359 --- /dev/null +++ b/contrib/pgaudit14/Trunk.toml @@ -0,0 +1,18 @@ +[extension] +name = "pgaudit" +version = "1.6.2" +repository = "https://github.com/pgaudit/pgaudit" +license = "PostgreSQL" +description = "The PostgreSQL Audit Extension (pgAudit) provides detailed session and/or object audit logging via the standard PostgreSQL logging facility." +homepage = "https://www.pgaudit.org/" +documentation = "https://github.com/pgaudit/pgaudit/blob/master/README.md" +categories = ["auditing_logging"] + +[dependencies] +apt = ["libc6"] + +[build] +postgres_version = "14" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = "make -C pgaudit USE_PGXS=1 install" diff --git a/contrib/pgaudit15/Dockerfile b/contrib/pgaudit15/Dockerfile new file mode 100644 index 00000000..57fc6346 --- /dev/null +++ b/contrib/pgaudit15/Dockerfile @@ -0,0 +1,12 @@ +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 libkrb5-dev + +# Clone and build the extension. +ARG EXTENSION_NAME +ARG EXTENSION_VERSION +RUN git clone --depth 1 --branch "${EXTENSION_VERSION}" https://github.com/${EXTENSION_NAME}/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/pgaudit/Trunk.toml b/contrib/pgaudit15/Trunk.toml similarity index 69% rename from contrib/pgaudit/Trunk.toml rename to contrib/pgaudit15/Trunk.toml index 9741420b..a2fc55b1 100644 --- a/contrib/pgaudit/Trunk.toml +++ b/contrib/pgaudit15/Trunk.toml @@ -15,9 +15,4 @@ apt = ["libc6"] postgres_version = "15" platform = "linux/amd64" dockerfile = "Dockerfile" -install_command = """ - cd postgres/contrib/pgaudit && 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 pgaudit USE_PGXS=1 install" diff --git a/contrib/pgaudit16/Dockerfile b/contrib/pgaudit16/Dockerfile new file mode 100644 index 00000000..6e5e0327 --- /dev/null +++ b/contrib/pgaudit16/Dockerfile @@ -0,0 +1,13 @@ +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 libkrb5-dev + +# Clone and build the extension. +ARG EXTENSION_NAME +# ARG EXTENSION_VERSION +ARG PG_VERSION +RUN git clone --depth 1 --branch "${PG_VERSION}.0" https://github.com/${EXTENSION_NAME}/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/pgaudit16/Trunk.toml b/contrib/pgaudit16/Trunk.toml new file mode 100644 index 00000000..ebe1d930 --- /dev/null +++ b/contrib/pgaudit16/Trunk.toml @@ -0,0 +1,18 @@ +[extension] +name = "pgaudit" +version = "16.0" +repository = "https://github.com/pgaudit/pgaudit" +license = "PostgreSQL" +description = "The PostgreSQL Audit Extension (pgAudit) provides detailed session and/or object audit logging via the standard PostgreSQL logging facility." +homepage = "https://www.pgaudit.org/" +documentation = "https://github.com/pgaudit/pgaudit/blob/master/README.md" +categories = ["auditing_logging"] + +[dependencies] +apt = ["libc6"] + +[build] +postgres_version = "16" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = "make -C pgaudit USE_PGXS=1 install" diff --git a/contrib/pgaudit17/Dockerfile b/contrib/pgaudit17/Dockerfile new file mode 100644 index 00000000..6e5e0327 --- /dev/null +++ b/contrib/pgaudit17/Dockerfile @@ -0,0 +1,13 @@ +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 libkrb5-dev + +# Clone and build the extension. +ARG EXTENSION_NAME +# ARG EXTENSION_VERSION +ARG PG_VERSION +RUN git clone --depth 1 --branch "${PG_VERSION}.0" https://github.com/${EXTENSION_NAME}/${EXTENSION_NAME}.git \ + && make -C ${EXTENSION_NAME} USE_PGXS=1 diff --git a/contrib/pgaudit17/Trunk.toml b/contrib/pgaudit17/Trunk.toml new file mode 100644 index 00000000..6ab26711 --- /dev/null +++ b/contrib/pgaudit17/Trunk.toml @@ -0,0 +1,18 @@ +[extension] +name = "pgaudit" +version = "17.0" +repository = "https://github.com/pgaudit/pgaudit" +license = "PostgreSQL" +description = "The PostgreSQL Audit Extension (pgAudit) provides detailed session and/or object audit logging via the standard PostgreSQL logging facility." +homepage = "https://www.pgaudit.org/" +documentation = "https://github.com/pgaudit/pgaudit/blob/master/README.md" +categories = ["auditing_logging"] + +[dependencies] +apt = ["libc6"] + +[build] +postgres_version = "17" +platform = "linux/amd64" +dockerfile = "Dockerfile" +install_command = "make -C pgaudit USE_PGXS=1 install"