From 7ba29f57e6621a7e43a60684e1c1575a593e01f6 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Tue, 11 Jun 2024 14:06:26 +0200 Subject: [PATCH] [bitnami/postgresql] Release 14.12.0-debian-12-r11 (#67786) Signed-off-by: Bitnami Containers --- bitnami/postgresql/14/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/14/debian-12/Dockerfile b/bitnami/postgresql/14/debian-12/Dockerfile index b8a9f60afc5e..421d798a6924 100644 --- a/bitnami/postgresql/14/debian-12/Dockerfile +++ b/bitnami/postgresql/14/debian-12/Dockerfile @@ -9,11 +9,11 @@ ARG WITH_ALL_LOCALES="no" LABEL com.vmware.cp.artifact.flavor="sha256:c50c90cfd9d12b445b011e6ad529f1ad3daea45c26d20b00732fae3cd71f6a83" \ org.opencontainers.image.base.name="docker.io/bitnami/minideb:bookworm" \ - org.opencontainers.image.created="2024-06-06T11:22:39Z" \ + org.opencontainers.image.created="2024-06-11T11:28:14Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/postgresql/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="14.12.0-debian-12-r10" \ + org.opencontainers.image.ref.name="14.12.0-debian-12-r11" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/postgresql" \ org.opencontainers.image.title="postgresql" \ org.opencontainers.image.vendor="Broadcom, Inc." \ @@ -30,7 +30,7 @@ SHELL ["/bin/bash", "-o", "errexit", "-o", "nounset", "-o", "pipefail", "-c"] RUN install_packages ca-certificates curl libbsd0 libbz2-1.0 libedit2 libffi8 libgcc-s1 libgmp10 libgnutls30 libhogweed6 libicu72 libidn2-0 libldap-2.5-0 liblz4-1 liblzma5 libmd0 libncurses6 libnettle8 libp11-kit0 libpcre3 libreadline8 libsasl2-2 libsqlite3-0 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-14.12.0-10-linux-${OS_ARCH}-debian-12" \ + "postgresql-14.12.0-11-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ if [ ! -f "${COMPONENT}.tar.gz" ]; then \ diff --git a/bitnami/postgresql/14/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/postgresql/14/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json index e54796ecf110..38052a4b945c 100644 --- a/bitnami/postgresql/14/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/postgresql/14/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,6 +3,6 @@ "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "14.12.0-10" + "version": "14.12.0-11" } } \ No newline at end of file diff --git a/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh b/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh index 076c39251a10..8608fbe269bb 100644 --- a/bitnami/postgresql/14/debian-12/rootfs/opt/bitnami/scripts/libpostgresql.sh +++ b/bitnami/postgresql/14/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" } ########################