1
0

[info=848177a7d868a1e77acb7449e52b886a]

OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/postgres-12-image?expand=0&rev=55
This commit is contained in:
Dan Čermák 2024-01-02 08:31:12 +00:00 committed by Git OBS Bridge
parent 1085b59d51
commit c1230a61fb
3 changed files with 21 additions and 11 deletions

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed

View File

@ -103,20 +103,24 @@ docker_init_database_dir() {
# print large warning if POSTGRES_HOST_AUTH_METHOD is set to 'trust'
# assumes database is not set up, ie: [ -z "$DATABASE_ALREADY_EXISTS" ]
docker_verify_minimum_env() {
# check password first so we can output the warning before postgres
# messes it up
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
case "${PG_MAJOR:-}" in
12 | 13) # https://github.com/postgres/postgres/commit/67a472d71c98c3d2fa322a1b4013080b20720b98
# check password first so we can output the warning before postgres
# messes it up
if [ "${#POSTGRES_PASSWORD}" -ge 100 ]; then
cat >&2 <<-'EOWARN'
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
WARNING: The supplied POSTGRES_PASSWORD is 100+ characters.
This will not work if used via PGPASSWORD with "psql".
This will not work if used via PGPASSWORD with "psql".
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
https://www.postgresql.org/message-id/flat/E1Rqxp2-0004Qt-PL%40wrigleys.postgresql.org (BUG #6412)
https://github.com/docker-library/postgres/issues/507
EOWARN
fi
EOWARN
fi
;;
esac
if [ -z "$POSTGRES_PASSWORD" ] && [ 'trust' != "$POSTGRES_HOST_AUTH_METHOD" ]; then
# The - option suppresses leading tabs but *not* spaces. :)
cat >&2 <<-'EOE'
@ -225,6 +229,7 @@ docker_setup_env() {
: "${POSTGRES_HOST_AUTH_METHOD:=}"
declare -g DATABASE_ALREADY_EXISTS
: "${DATABASE_ALREADY_EXISTS:=}"
# look specifically for PG_VERSION, as it is expected in the DB dir
if [ -s "$PGDATA/PG_VERSION" ]; then
DATABASE_ALREADY_EXISTS='true'

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 2 08:26:58 UTC 2024 - Dirk Mueller <dmueller@suse.com>
- update year to 2024
-------------------------------------------------------------------
Wed Oct 25 15:40:55 UTC 2023 - Dirk Mueller <dmueller@suse.com>