From 4d3ba8e690d94ed10b09d9418bf3e25dc0de3625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Fei?= Date: Tue, 8 Oct 2024 12:20:19 +0200 Subject: [PATCH] feat: add wal2json extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Niccolò Fei --- UBI/Dockerfile-multiarch.template | 8 ++++++-- UBI/Dockerfile-multilang.template | 1 + UBI/Dockerfile-postgis-multiarch.template | 8 ++++++-- UBI/Dockerfile-postgis-multilang.template | 1 + UBI/Dockerfile-postgis.template | 1 + UBI/Dockerfile.template | 1 + 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/UBI/Dockerfile-multiarch.template b/UBI/Dockerfile-multiarch.template index 25678c4b..ca6d8626 100644 --- a/UBI/Dockerfile-multiarch.template +++ b/UBI/Dockerfile-multiarch.template @@ -21,6 +21,7 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="pg_squeeze_%%PG_MAJOR%%" ; \ pgvector="pgvector_%%PG_MAJOR%%" ; \ pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ + wal2json_pkg="wal2json_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-%%UBI_MAJOR_VERSION%%-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ @@ -36,14 +37,16 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ;; \ s390x) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/edb/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ; \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ;; \ *) \ exit 1 ;; \ esac ; \ @@ -60,6 +63,7 @@ RUN --mount=type=secret,id=cs_token \ "$pg_squeeze_pkg" \ "$pg_failover_slots_pkg" \ "$pgvector" \ + "$wal2json_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ rm -fr /tmp/* ; \ diff --git a/UBI/Dockerfile-multilang.template b/UBI/Dockerfile-multilang.template index 5c07db7b..4ffa2f5f 100644 --- a/UBI/Dockerfile-multilang.template +++ b/UBI/Dockerfile-multilang.template @@ -40,6 +40,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis-multiarch.template b/UBI/Dockerfile-postgis-multiarch.template index 7a5131c4..784cba48 100644 --- a/UBI/Dockerfile-postgis-multiarch.template +++ b/UBI/Dockerfile-postgis-multiarch.template @@ -22,6 +22,7 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="pg_squeeze_%%PG_MAJOR%%" ; \ pgvector="pgvector_%%PG_MAJOR%%" ; \ pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ + wal2json_pkg="wal2json_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-%%UBI_MAJOR_VERSION%%-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ @@ -37,14 +38,16 @@ RUN --mount=type=secret,id=cs_token \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ;; \ s390x) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/edb/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ; \ pg_squeeze_pkg="edb-pg%%PG_MAJOR%%-pg-squeeze1" ; \ pgvector="edb-pg%%PG_MAJOR%%-pgvector0" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ; \ + wal2json_pkg="edb-pg%%PG_MAJOR%%-wal2json2" ;; \ *) \ exit 1 ;; \ esac ; \ @@ -61,6 +64,7 @@ RUN --mount=type=secret,id=cs_token \ "$pg_squeeze_pkg" \ "$pg_failover_slots_pkg" \ "$pgvector" \ + "$wal2json_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ rm -fr /tmp/* ; \ diff --git a/UBI/Dockerfile-postgis-multilang.template b/UBI/Dockerfile-postgis-multilang.template index aaafe3e2..17beb283 100644 --- a/UBI/Dockerfile-postgis-multilang.template +++ b/UBI/Dockerfile-postgis-multilang.template @@ -41,6 +41,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis.template b/UBI/Dockerfile-postgis.template index cab508e7..5f997670 100644 --- a/UBI/Dockerfile-postgis.template +++ b/UBI/Dockerfile-postgis.template @@ -40,6 +40,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile.template b/UBI/Dockerfile.template index 8bb9c6b0..9260045e 100644 --- a/UBI/Dockerfile.template +++ b/UBI/Dockerfile.template @@ -39,6 +39,7 @@ RUN set -xe ; \ pg_squeeze_%%PG_MAJOR%% \ "$pg_audit_pkg" \ pgvector_%%PG_MAJOR%% \ + wal2json_%%PG_MAJOR%% \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*'