diff --git a/UBI/12/Dockerfile b/UBI/12/Dockerfile index f0ba27a5..94074792 100644 --- a/UBI/12/Dockerfile +++ b/UBI/12/Dockerfile @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit14_12" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -33,7 +36,7 @@ RUN set -xe ; \ postgresql12-server-12.17 \ postgresql12-libs-12.17 \ pg_failover_slots_12 \ - pgaudit14_12 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/12/Dockerfile.multiarch b/UBI/12/Dockerfile.multiarch index aaa6d298..6a9fe3cd 100644 --- a/UBI/12/Dockerfile.multiarch +++ b/UBI/12/Dockerfile.multiarch @@ -22,20 +22,22 @@ RUN --mount=type=secret,id=cs_token \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ arm64) \ yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg12-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg12-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg12-pgaudit"; fi ;; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="edb-pg12-pgaudit12"; fi ;; \ 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-pg12-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg12-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg12-pgaudit"; fi ;; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="edb-pg12-pgaudit12"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -48,7 +50,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql12-contrib-12.17 \ postgresql12-server-12.17 \ postgresql12-libs-12.17 \ - "pg_audit_pkg" \ + "$pg_audit_pkg" \ "$pg_failover_slots_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ diff --git a/UBI/12/Dockerfile.multilang b/UBI/12/Dockerfile.multilang index e04f78b6..a72305b8 100644 --- a/UBI/12/Dockerfile.multilang +++ b/UBI/12/Dockerfile.multilang @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit14_12" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql12-server-12.17 \ postgresql12-libs-12.17 \ pg_failover_slots_12 \ - pgaudit14_12 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/12/Dockerfile.postgis b/UBI/12/Dockerfile.postgis index 4c89f5e7..4d5aea90 100644 --- a/UBI/12/Dockerfile.postgis +++ b/UBI/12/Dockerfile.postgis @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit14_12" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql12-server-12.17 \ postgresql12-libs-12.17 \ pg_failover_slots_12 \ - pgaudit14_12 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/12/Dockerfile.postgis-multilang b/UBI/12/Dockerfile.postgis-multilang index b1751fac..c6c5c7a8 100644 --- a/UBI/12/Dockerfile.postgis-multilang +++ b/UBI/12/Dockerfile.postgis-multilang @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit14_12" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "12" -gt "15" ]; then pg_audit_pkg="pgaudit_12"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -35,7 +38,7 @@ RUN set -xe ; \ postgresql12-server-12.17 \ postgresql12-libs-12.17 \ pg_failover_slots_12 \ - pgaudit14_12 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/13/Dockerfile b/UBI/13/Dockerfile index c179b790..370b2cb7 100644 --- a/UBI/13/Dockerfile +++ b/UBI/13/Dockerfile @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit15_13" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -33,7 +36,7 @@ RUN set -xe ; \ postgresql13-server-13.13 \ postgresql13-libs-13.13 \ pg_failover_slots_13 \ - pgaudit15_13 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/13/Dockerfile.multiarch b/UBI/13/Dockerfile.multiarch index c82192a5..c92e4cda 100644 --- a/UBI/13/Dockerfile.multiarch +++ b/UBI/13/Dockerfile.multiarch @@ -22,20 +22,22 @@ RUN --mount=type=secret,id=cs_token \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ arm64) \ yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg13-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg13-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg13-pgaudit"; fi ;; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="edb-pg13-pgaudit13"; fi ;; \ 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-pg13-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg13-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg13-pgaudit"; fi ;; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="edb-pg13-pgaudit13"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -48,7 +50,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql13-contrib-13.13 \ postgresql13-server-13.13 \ postgresql13-libs-13.13 \ - "pg_audit_pkg" \ + "$pg_audit_pkg" \ "$pg_failover_slots_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ diff --git a/UBI/13/Dockerfile.multilang b/UBI/13/Dockerfile.multilang index aca9da9c..1089a292 100644 --- a/UBI/13/Dockerfile.multilang +++ b/UBI/13/Dockerfile.multilang @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit15_13" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql13-server-13.13 \ postgresql13-libs-13.13 \ pg_failover_slots_13 \ - pgaudit15_13 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/13/Dockerfile.postgis b/UBI/13/Dockerfile.postgis index db7b28c1..6884fa07 100644 --- a/UBI/13/Dockerfile.postgis +++ b/UBI/13/Dockerfile.postgis @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit15_13" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql13-server-13.13 \ postgresql13-libs-13.13 \ pg_failover_slots_13 \ - pgaudit15_13 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/13/Dockerfile.postgis-multilang b/UBI/13/Dockerfile.postgis-multilang index 80c06644..ebadb93f 100644 --- a/UBI/13/Dockerfile.postgis-multilang +++ b/UBI/13/Dockerfile.postgis-multilang @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit15_13" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "13" -gt "15" ]; then pg_audit_pkg="pgaudit_13"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -35,7 +38,7 @@ RUN set -xe ; \ postgresql13-server-13.13 \ postgresql13-libs-13.13 \ pg_failover_slots_13 \ - pgaudit15_13 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/14/Dockerfile b/UBI/14/Dockerfile index 2ec60346..739b2734 100644 --- a/UBI/14/Dockerfile +++ b/UBI/14/Dockerfile @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit16_14" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -33,7 +36,7 @@ RUN set -xe ; \ postgresql14-server-14.10 \ postgresql14-libs-14.10 \ pg_failover_slots_14 \ - pgaudit16_14 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/14/Dockerfile.multiarch b/UBI/14/Dockerfile.multiarch index bc64c61e..5dd8334d 100644 --- a/UBI/14/Dockerfile.multiarch +++ b/UBI/14/Dockerfile.multiarch @@ -22,20 +22,22 @@ RUN --mount=type=secret,id=cs_token \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ arm64) \ yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg14-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg14-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg14-pgaudit"; fi ;; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="edb-pg14-pgaudit14"; fi ;; \ 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-pg14-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg14-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg14-pgaudit"; fi ;; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="edb-pg14-pgaudit14"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -48,7 +50,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql14-contrib-14.10 \ postgresql14-server-14.10 \ postgresql14-libs-14.10 \ - "pg_audit_pkg" \ + "$pg_audit_pkg" \ "$pg_failover_slots_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ diff --git a/UBI/14/Dockerfile.multilang b/UBI/14/Dockerfile.multilang index d739189a..befd2a87 100644 --- a/UBI/14/Dockerfile.multilang +++ b/UBI/14/Dockerfile.multilang @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit16_14" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql14-server-14.10 \ postgresql14-libs-14.10 \ pg_failover_slots_14 \ - pgaudit16_14 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/14/Dockerfile.postgis b/UBI/14/Dockerfile.postgis index 9806b922..43b17d2a 100644 --- a/UBI/14/Dockerfile.postgis +++ b/UBI/14/Dockerfile.postgis @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit16_14" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql14-server-14.10 \ postgresql14-libs-14.10 \ pg_failover_slots_14 \ - pgaudit16_14 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/14/Dockerfile.postgis-multilang b/UBI/14/Dockerfile.postgis-multilang index e911f45b..f7c5eade 100644 --- a/UBI/14/Dockerfile.postgis-multilang +++ b/UBI/14/Dockerfile.postgis-multilang @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit16_14" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "14" -gt "15" ]; then pg_audit_pkg="pgaudit_14"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -35,7 +38,7 @@ RUN set -xe ; \ postgresql14-server-14.10 \ postgresql14-libs-14.10 \ pg_failover_slots_14 \ - pgaudit16_14 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/15/Dockerfile b/UBI/15/Dockerfile index 8c94d1c6..53ec9ad1 100644 --- a/UBI/15/Dockerfile +++ b/UBI/15/Dockerfile @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit17_15" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -33,7 +36,7 @@ RUN set -xe ; \ postgresql15-server-15.5 \ postgresql15-libs-15.5 \ pg_failover_slots_15 \ - pgaudit17_15 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/15/Dockerfile.multiarch b/UBI/15/Dockerfile.multiarch index eaabd730..b3d3957c 100644 --- a/UBI/15/Dockerfile.multiarch +++ b/UBI/15/Dockerfile.multiarch @@ -22,20 +22,22 @@ RUN --mount=type=secret,id=cs_token \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ arm64) \ yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg15-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg15-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg15-pgaudit"; fi ;; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="edb-pg15-pgaudit15"; fi ;; \ 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-pg15-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg15-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg15-pgaudit"; fi ;; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="edb-pg15-pgaudit15"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -48,7 +50,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql15-contrib-15.5 \ postgresql15-server-15.5 \ postgresql15-libs-15.5 \ - "pg_audit_pkg" \ + "$pg_audit_pkg" \ "$pg_failover_slots_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ diff --git a/UBI/15/Dockerfile.multilang b/UBI/15/Dockerfile.multilang index 0f835a2f..f68148ee 100644 --- a/UBI/15/Dockerfile.multilang +++ b/UBI/15/Dockerfile.multilang @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit17_15" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql15-server-15.5 \ postgresql15-libs-15.5 \ pg_failover_slots_15 \ - pgaudit17_15 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/15/Dockerfile.postgis b/UBI/15/Dockerfile.postgis index 90c114c4..07bfd018 100644 --- a/UBI/15/Dockerfile.postgis +++ b/UBI/15/Dockerfile.postgis @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit17_15" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql15-server-15.5 \ postgresql15-libs-15.5 \ pg_failover_slots_15 \ - pgaudit17_15 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/15/Dockerfile.postgis-multilang b/UBI/15/Dockerfile.postgis-multilang index 0f67e674..79fc18e5 100644 --- a/UBI/15/Dockerfile.postgis-multilang +++ b/UBI/15/Dockerfile.postgis-multilang @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit17_15" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "15" -gt "15" ]; then pg_audit_pkg="pgaudit_15"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -35,7 +38,7 @@ RUN set -xe ; \ postgresql15-server-15.5 \ postgresql15-libs-15.5 \ pg_failover_slots_15 \ - pgaudit17_15 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/16/Dockerfile b/UBI/16/Dockerfile index 90906537..d78eb6a7 100644 --- a/UBI/16/Dockerfile +++ b/UBI/16/Dockerfile @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit18_16" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -33,7 +36,7 @@ RUN set -xe ; \ postgresql16-server-16.1 \ postgresql16-libs-16.1 \ pg_failover_slots_16 \ - pgaudit18_16 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/16/Dockerfile.multiarch b/UBI/16/Dockerfile.multiarch index 3f3faab4..e2352938 100644 --- a/UBI/16/Dockerfile.multiarch +++ b/UBI/16/Dockerfile.multiarch @@ -22,20 +22,22 @@ RUN --mount=type=secret,id=cs_token \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ arm64) \ yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg16-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg16-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg16-pgaudit"; fi ;; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="edb-pg16-pgaudit16"; fi ;; \ 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-pg16-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg16-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg16-pgaudit"; fi ;; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="edb-pg16-pgaudit16"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -48,7 +50,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql16-contrib-16.1 \ postgresql16-server-16.1 \ postgresql16-libs-16.1 \ - "pg_audit_pkg" \ + "$pg_audit_pkg" \ "$pg_failover_slots_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ diff --git a/UBI/16/Dockerfile.multilang b/UBI/16/Dockerfile.multilang index 2905b7f2..6be67429 100644 --- a/UBI/16/Dockerfile.multilang +++ b/UBI/16/Dockerfile.multilang @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit18_16" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql16-server-16.1 \ postgresql16-libs-16.1 \ pg_failover_slots_16 \ - pgaudit18_16 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/16/Dockerfile.postgis b/UBI/16/Dockerfile.postgis index ce4f7e48..64932dee 100644 --- a/UBI/16/Dockerfile.postgis +++ b/UBI/16/Dockerfile.postgis @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit18_16" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql16-server-16.1 \ postgresql16-libs-16.1 \ pg_failover_slots_16 \ - pgaudit18_16 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/16/Dockerfile.postgis-multilang b/UBI/16/Dockerfile.postgis-multilang index 8d2f4358..64d70cd1 100644 --- a/UBI/16/Dockerfile.postgis-multilang +++ b/UBI/16/Dockerfile.postgis-multilang @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit18_16" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "16" -gt "15" ]; then pg_audit_pkg="pgaudit_16"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -35,7 +38,7 @@ RUN set -xe ; \ postgresql16-server-16.1 \ postgresql16-libs-16.1 \ pg_failover_slots_16 \ - pgaudit18_16 \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-multiarch.template b/UBI/Dockerfile-multiarch.template index d39df7b8..15e87160 100644 --- a/UBI/Dockerfile-multiarch.template +++ b/UBI/Dockerfile-multiarch.template @@ -22,20 +22,22 @@ RUN --mount=type=secret,id=cs_token \ case $ARCH in \ amd64) \ yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ arm64) \ yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ - curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ;; \ + curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ ppc64le) \ curl -u token:$(cat /run/secrets/cs_token) -1sLf https://downloads.enterprisedb.com/basic/enterprise/setup.rpm.sh | bash ; \ pg_failover_slots_pkg="edb-pg%%PG_MAJOR%%-pg-failover-slots1" ; \ pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ 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_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit1" ; \ - if [ "$PG_MAJOR" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit"; fi ;; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="edb-pg%%PG_MAJOR%%-pgaudit%%PG_MAJOR%%"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -48,7 +50,7 @@ RUN --mount=type=secret,id=cs_token \ postgresql%%PG_MAJOR%%-contrib-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ - "pg_audit_pkg" \ + "$pg_audit_pkg" \ "$pg_failover_slots_pkg" \ ; \ rm -fr /etc/yum.repos.d/enterprisedb-*.repo ; \ diff --git a/UBI/Dockerfile-multilang.template b/UBI/Dockerfile-multilang.template index 44452410..6b3e21ab 100644 --- a/UBI/Dockerfile-multilang.template +++ b/UBI/Dockerfile-multilang.template @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pg_failover_slots_%%PG_MAJOR%% \ - pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis-multilang.template b/UBI/Dockerfile-postgis-multilang.template index fba7a310..88650a59 100644 --- a/UBI/Dockerfile-postgis-multilang.template +++ b/UBI/Dockerfile-postgis-multilang.template @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -35,7 +38,7 @@ RUN set -xe ; \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pg_failover_slots_%%PG_MAJOR%% \ - pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile-postgis.template b/UBI/Dockerfile-postgis.template index 800dcc5c..e372b11a 100644 --- a/UBI/Dockerfile-postgis.template +++ b/UBI/Dockerfile-postgis.template @@ -17,11 +17,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -34,7 +37,7 @@ RUN set -xe ; \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pg_failover_slots_%%PG_MAJOR%% \ - pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*' diff --git a/UBI/Dockerfile.template b/UBI/Dockerfile.template index d3664ecb..da3c8dd4 100644 --- a/UBI/Dockerfile.template +++ b/UBI/Dockerfile.template @@ -16,11 +16,14 @@ ARG TARGETARCH RUN set -xe ; \ ARCH="${TARGETARCH}" ; \ base_url="https://download.postgresql.org/pub/repos/yum/reporpms" ; \ + pg_audit_pkg="pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%%" ; \ case $ARCH in \ amd64) \ - yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ arm64) \ - yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ;; \ + yum -y install "${base_url}/EL-8-aarch64/pgdg-redhat-repo-latest.noarch.rpm" ; \ + if [ "%%PG_MAJOR%%" -gt "15" ]; then pg_audit_pkg="pgaudit_%%PG_MAJOR%%"; fi ;; \ *) \ exit 1 ;; \ esac ; \ @@ -33,7 +36,7 @@ RUN set -xe ; \ postgresql%%PG_MAJOR%%-server-%%POSTGRES_VERSION%% \ postgresql%%PG_MAJOR%%-libs-%%POSTGRES_VERSION%% \ pg_failover_slots_%%PG_MAJOR%% \ - pgaudit%%PGAUDIT_VERSION%%_%%PG_MAJOR%% \ + "$pg_audit_pkg" \ ; \ rm -fr /tmp/* ; \ yum -y clean all --enablerepo='*'