diff --git a/contrib/pgaudit/Dockerfile b/contrib/pgaudit/Dockerfile new file mode 100644 index 00000000..2caea8b6 --- /dev/null +++ b/contrib/pgaudit/Dockerfile @@ -0,0 +1,31 @@ +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_VERSION=15 + +RUN cd postgres && \ + git fetch origin REL_${PG_VERSION}_STABLE && \ + git checkout REL_${PG_VERSION}_STABLE && \ + ./configure && \ + cd contrib && \ + git clone https://github.com/pgaudit/pgaudit.git && \ + cd pgaudit && \ + make USE_PGXS=1 diff --git a/contrib/pgaudit/Trunk.toml b/contrib/pgaudit/Trunk.toml new file mode 100644 index 00000000..5f77b737 --- /dev/null +++ b/contrib/pgaudit/Trunk.toml @@ -0,0 +1,20 @@ +[extension] +name = "pgaudit" +version = "1.7.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"] + +[build] +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 + """