From 23c0cdefee3764fca366e133c93d319c76f58f9b Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 11 Jun 2024 14:06:08 +0200 Subject: [PATCH] [bitnami/postgresql-repmgr] Release 16.3.0-debian-12-r11 (#67785) Signed-off-by: Bitnami Containers --- bitnami/postgresql-repmgr/16/debian-12/Dockerfile | 6 +++--- .../prebuildfs/opt/bitnami/.bitnami_components.json | 2 +- .../rootfs/opt/bitnami/scripts/libpostgresql.sh | 13 ++++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/bitnami/postgresql-repmgr/16/debian-12/Dockerfile b/bitnami/postgresql-repmgr/16/debian-12/Dockerfile index 76d1a4a9c1b3..57833757834c 100644 --- a/bitnami/postgresql-repmgr/16/debian-12/Dockerfile +++ b/bitnami/postgresql-repmgr/16/debian-12/Dockerfile @@ -7,11 +7,11 @@ ARG TARGETARCH LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-06-06T10:33:12Z" \ + org.opencontainers.image.created="2024-06-11T11:37:22Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="16.3.0-debian-12-r10" \ + org.opencontainers.image.ref.name="16.3.0-debian-12-r11" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/postgresql-repmgr" \ org.opencontainers.image.title="postgresql-repmgr" \ org.opencontainers.image.vendor="Broadcom, Inc." \ @@ -28,7 +28,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] RUN install_packages ca-certificates curl libbrotli1 libbsd0 libcom-err2 libcurl4 libedit2 libffi8 libgcc-s1 libgmp10 libgnutls30 libgssapi-krb5-2 libhogweed6 libicu72 libidn2-0 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.5-0 liblz4-1 liblzma5 libmd0 libnettle8 libnghttp2-14 libp11-kit0 libpcre3 libpsl5 libreadline8 librtmp1 libsasl2-2 libsqlite3-0 libssh2-1 libssl3 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libuuid1 libxml2 libxslt1.1 libzstd1 locales procps zlib1g RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ COMPONENTS=( \ - "postgresql-repmgr-16.3.0-9-linux-${OS_ARCH}-debian-12" \ + "postgresql-repmgr-16.3.0-10-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ diff --git a/bitnami/postgresql-repmgr/16/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/postgresql-repmgr/16/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json index c78af528537b..68fc546f6f56 100644 --- a/bitnami/postgresql-repmgr/16/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/postgresql-repmgr/16/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,6 +3,6 @@ "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "16.3.0-9" + "version": "16.3.0-10" } } \ No newline at end of file diff --git a/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh b/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh index 076c39251a10..8608fbe269bb 100644 --- a/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh +++ b/bitnami/postgresql-repmgr/16/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh @@ -364,8 +364,10 @@ postgresql_set_property() { ######################### postgresql_create_replication_user() { local -r escaped_password="${POSTGRESQL_REPLICATION_PASSWORD//\'/\'\'}" + local -r postgres_password="${POSTGRESQL_POSTGRES_PASSWORD:-$POSTGRESQL_PASSWORD}" + info "Creating replication user $POSTGRESQL_REPLICATION_USER" - echo "CREATE ROLE \"$POSTGRESQL_REPLICATION_USER\" REPLICATION LOGIN ENCRYPTED PASSWORD '$escaped_password'" | postgresql_execute + echo "CREATE ROLE \"$POSTGRESQL_REPLICATION_USER\" REPLICATION LOGIN ENCRYPTED PASSWORD '$escaped_password'" | postgresql_execute "" "postgres" "$postgres_password" } ######################## @@ -496,17 +498,18 @@ postgresql_alter_postgres_user() { ######################### postgresql_create_admin_user() { local -r escaped_password="${POSTGRESQL_PASSWORD//\'/\'\'}" + local -r postgres_password="${POSTGRESQL_POSTGRES_PASSWORD:-$POSTGRESQL_PASSWORD}" info "Creating user ${POSTGRESQL_USERNAME}" local connlimit_string="" if [[ -n "$POSTGRESQL_USERNAME_CONNECTION_LIMIT" ]]; then connlimit_string="CONNECTION LIMIT ${POSTGRESQL_USERNAME_CONNECTION_LIMIT}" fi - echo "CREATE ROLE \"${POSTGRESQL_USERNAME}\" WITH LOGIN ${connlimit_string} CREATEDB PASSWORD '${escaped_password}';" | postgresql_execute + echo "CREATE ROLE \"${POSTGRESQL_USERNAME}\" WITH LOGIN ${connlimit_string} CREATEDB PASSWORD '${escaped_password}';" | postgresql_execute "" "postgres" "$postgres_password" info "Granting access to \"${POSTGRESQL_USERNAME}\" to the database \"${POSTGRESQL_DATABASE}\"" - echo "GRANT ALL PRIVILEGES ON DATABASE \"${POSTGRESQL_DATABASE}\" TO \"${POSTGRESQL_USERNAME}\"\;" | postgresql_execute "" "postgres" "$POSTGRESQL_PASSWORD" - echo "ALTER DATABASE \"${POSTGRESQL_DATABASE}\" OWNER TO \"${POSTGRESQL_USERNAME}\"\;" | postgresql_execute "" "postgres" "$POSTGRESQL_PASSWORD" + echo "GRANT ALL PRIVILEGES ON DATABASE \"${POSTGRESQL_DATABASE}\" TO \"${POSTGRESQL_USERNAME}\"\;" | postgresql_execute "" "postgres" "$postgres_password" + echo "ALTER DATABASE \"${POSTGRESQL_DATABASE}\" OWNER TO \"${POSTGRESQL_USERNAME}\"\;" | postgresql_execute "" "postgres" "$postgres_password" info "Setting ownership for the 'public' schema database \"${POSTGRESQL_DATABASE}\" to \"${POSTGRESQL_USERNAME}\"" - echo "ALTER SCHEMA public OWNER TO \"${POSTGRESQL_USERNAME}\"\;" | postgresql_execute "$POSTGRESQL_DATABASE" "postgres" "$POSTGRESQL_PASSWORD" + echo "ALTER SCHEMA public OWNER TO \"${POSTGRESQL_USERNAME}\"\;" | postgresql_execute "$POSTGRESQL_DATABASE" "postgres" "$postgres_password" } ########################