From ce959b444d591ea5e15efdbdb886205ed34b85d3 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Thu, 30 Jul 2020 07:20:19 +0000 Subject: [PATCH] 10.13.0-debian-10-r69 release --- bitnami/postgresql/10/debian-10/Dockerfile | 4 +- .../opt/bitnami/.bitnami_components.json | 1 + .../opt/bitnami/scripts/libcomponent.sh | 4 - .../opt/bitnami/scripts/libwebserver.sh | 258 ++++++++++-------- bitnami/postgresql/README.md | 2 +- 5 files changed, 144 insertions(+), 125 deletions(-) create mode 100644 bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json diff --git a/bitnami/postgresql/10/debian-10/Dockerfile b/bitnami/postgresql/10/debian-10/Dockerfile index d895b183ee76..d021fe37cdcc 100644 --- a/bitnami/postgresql/10/debian-10/Dockerfile +++ b/bitnami/postgresql/10/debian-10/Dockerfile @@ -9,7 +9,7 @@ ENV HOME="/" \ COPY prebuildfs / # Install required system packages and dependencies RUN install_packages acl ca-certificates curl gzip libbsd0 libc6 libedit2 libffi6 libgcc1 libgmp10 libgnutls30 libhogweed4 libicu63 libidn2-0 libldap-2.4-2 liblzma5 libnettle6 libp11-kit0 libsasl2-2 libsqlite3-0 libssl1.1 libstdc++6 libtasn1-6 libtinfo6 libunistring2 libuuid1 libxml2 libxslt1.1 locales procps tar zlib1g -RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "postgresql" "10.13.0-9" --checksum 879ec7573bd4be62b37bc381379b56ea3699f161105654e1aadf0f93b8ed1ac8 +RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "postgresql" "10.13.0-10" --checksum 59fb0324c6577297997bb3ef3adb539e85b26b16b8ef46a3e476e73f8e620ded RUN . /opt/bitnami/scripts/libcomponent.sh && component_unpack "gosu" "1.12.0-1" --checksum 51cfb1b7fd7b05b8abd1df0278c698103a9b1a4964bdacd87ca1d5c01631d59c RUN apt-get update && apt-get upgrade -y && \ rm -r /var/lib/apt/lists /var/cache/apt/archives @@ -24,7 +24,7 @@ COPY rootfs / RUN /opt/bitnami/scripts/postgresql/postunpack.sh RUN /opt/bitnami/scripts/locales/add-extra-locales.sh ENV BITNAMI_APP_NAME="postgresql" \ - BITNAMI_IMAGE_VERSION="10.13.0-debian-10-r68" \ + BITNAMI_IMAGE_VERSION="10.13.0-debian-10-r69" \ LANG="en_US.UTF-8" \ LANGUAGE="en_US:en" \ NSS_WRAPPER_LIB="/opt/bitnami/common/lib/libnss_wrapper.so" \ diff --git a/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json new file mode 100644 index 000000000000..3b53fd23894d --- /dev/null +++ b/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/.bitnami_components.json @@ -0,0 +1 @@ +{"gosu": {"arch": "amd64", "digest": "51cfb1b7fd7b05b8abd1df0278c698103a9b1a4964bdacd87ca1d5c01631d59c", "distro": "debian-10", "type": "NAMI", "version": "1.12.0-1"}, "postgresql": {"arch": "amd64", "digest": "59fb0324c6577297997bb3ef3adb539e85b26b16b8ef46a3e476e73f8e620ded", "distro": "debian-10", "type": "NAMI", "version": "10.13.0-10"}} \ No newline at end of file diff --git a/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libcomponent.sh b/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libcomponent.sh index 76083e1e0a1d..1d8c6bf24375 100644 --- a/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libcomponent.sh +++ b/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libcomponent.sh @@ -62,8 +62,4 @@ component_unpack() { fi tar --directory "${directory}" --extract --gunzip --file "${base_name}.tar.gz" --no-same-owner --strip-components=2 "${base_name}/files/" rm "${base_name}.tar.gz" - - # Include metadata about the package - touch "${directory}/.bitnami_packages" - echo "$base_name" >> "${directory}/.bitnami_packages" } diff --git a/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libwebserver.sh b/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libwebserver.sh index 4aefa86cd862..7fce9bb4a9a0 100644 --- a/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libwebserver.sh +++ b/bitnami/postgresql/10/debian-10/prebuildfs/opt/bitnami/scripts/libwebserver.sh @@ -2,19 +2,35 @@ # # Bitnami web server handler library -# shellcheck disable=SC1091 +# shellcheck disable=SC1090,SC1091 # Load generic libraries . /opt/bitnami/scripts/liblog.sh -# Load web server libraries -[[ -f "/opt/bitnami/scripts/libapache.sh" ]] && . /opt/bitnami/scripts/libapache.sh -[[ -f "/opt/bitnami/scripts/libnginx.sh" ]] && . /opt/bitnami/scripts/libnginx.sh +######################## +# Execute a command (or list of commands) with the web server environment and library loaded +# Globals: +# * +# Arguments: +# None +# Returns: +# None +######################### +web_server_execute() { + local -r web_server="${1:?missing web server}" + shift + # Run program in sub-shell to avoid web server environment getting loaded when not necessary + ( + . "/opt/bitnami/scripts/lib${web_server}.sh" + . "/opt/bitnami/scripts/${web_server}-env.sh" + "$@" + ) +} ######################## # Prints the list of enabled web servers # Globals: -# WEB_SERVER_TYPE +# None # Arguments: # None # Returns: @@ -32,7 +48,7 @@ web_server_list() { ######################## # Prints the currently-enabled web server type (only one, in order of preference) # Globals: -# WEB_SERVER_TYPE +# None # Arguments: # None # Returns: @@ -47,7 +63,7 @@ web_server_type() { ######################## # Validate that a supported web server is configured # Globals: -# WEB_SERVER_* +# None # Arguments: # None # Returns: @@ -65,7 +81,7 @@ web_server_validate() { if [[ -z "$(web_server_type)" || ! " ${supported_web_servers[*]} " == *" $(web_server_type) "* ]]; then print_validation_error "Could not detect any supported web servers. It must be one of: ${supported_web_servers[*]}" - elif ! type -t "is_$(web_server_type)_running" >/dev/null; then + elif ! web_server_execute "$(web_server_type)" type -t "is_$(web_server_type)_running" >/dev/null; then print_validation_error "Could not load the $(web_server_type) web server library from /opt/bitnami/scripts. Check that it exists and is readable." fi @@ -170,53 +186,56 @@ web_server_reload() { ######################## ensure_web_server_app_configuration_exists() { local app="${1:?missing app}" - local -a web_servers args + shift + local -a apache_args nginx_args web_servers args_var + apache_args=("$app") + nginx_args=("$app") + # Validate arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + # Common flags + --hosts \ + | --type \ + | --allow-remote-connections \ + | --disabled \ + | --enable-https \ + | --http-port \ + | --https-port \ + | --document-root \ + ) + apache_args+=("$1" "${2:?missing value}") + nginx_args+=("$1" "${2:?missing value}") + shift + ;; + + # Specific Apache flags + --apache-additional-configuration \ + | --apache-before-vhost-configuration \ + | --apache-allow-override \ + | --apache-extra-directory-configuration \ + | --apache-move-htaccess \ + ) + apache_args+=("${1//apache-/}" "${2:?missing value}") + shift + ;; + + # Specific NGINX flags + --nginx-additional-configuration) + nginx_args+=("${1//nginx-/}" "${2:?missing value}") + shift + ;; + + *) + echo "Invalid command line flag $1" >&2 + return 1 + ;; + esac + shift + done read -r -a web_servers <<< "$(web_server_list)" for web_server in "${web_servers[@]}"; do - args=("$app") - # Validate arguments - shift - while [[ "$#" -gt 0 ]]; do - case "$1" in - # Common flags - --hosts \ - | --type \ - | --allow-remote-connections \ - | --disabled \ - | --enable-https \ - | --http-port \ - | --https-port \ - | --document-root \ - ) - args+=("$1" "${2:?missing value}") - shift - ;; - - # Specific Apache flags - --apache-additional-configuration \ - | --apache-before-vhost-configuration \ - | --apache-allow-override \ - | --apache-extra-directory-configuration \ - | --apache-move-htaccess \ - ) - [[ "$web_server" == "apache" ]] && args+=("${1//apache-/}" "${2:?missing value}") - shift - ;; - - # Specific NGINX flags - --nginx-additional-configuration) - [[ "$web_server" == "nginx" ]] && args+=("${1//nginx-/}" "${2:?missing value}") - shift - ;; - - *) - echo "Invalid command line flag $1" >&2 - return 1 - ;; - esac - shift - done - "ensure_${web_server}_app_configuration_exists" "${args[@]}" + args_var="${web_server}_args[@]" + web_server_execute "$web_server" "ensure_${web_server}_app_configuration_exists" "${!args_var}" done } @@ -235,7 +254,7 @@ ensure_web_server_app_configuration_not_exists() { local -a web_servers read -r -a web_servers <<< "$(web_server_list)" for web_server in "${web_servers[@]}"; do - "ensure_${web_server}_app_configuration_not_exists" "$app" + web_server_execute "$web_server" "ensure_${web_server}_app_configuration_not_exists" "$app" done } @@ -263,48 +282,51 @@ ensure_web_server_app_configuration_not_exists() { ######################## ensure_web_server_prefix_configuration_exists() { local app="${1:?missing app}" - local -a web_servers args + shift + local -a apache_args nginx_args web_servers args_var + apache_args=("$app") + nginx_args=("$app") + # Validate arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + # Common flags + --allow-remote-connections \ + | --document-root \ + | --prefix \ + | --type \ + ) + apache_args+=("$1" "${2:?missing value}") + nginx_args+=("$1" "${2:?missing value}") + shift + ;; + + # Specific Apache flags + --apache-additional-configuration \ + | --apache-allow-override \ + | --apache-extra-directory-configuration \ + | --apache-move-htaccess \ + ) + apache_args+=("${1//apache-/}" "$2") + shift + ;; + + # Specific NGINX flags + --nginx-additional-configuration) + nginx_args+=("${1//nginx-/}" "$2") + shift + ;; + + *) + echo "Invalid command line flag $1" >&2 + return 1 + ;; + esac + shift + done read -r -a web_servers <<< "$(web_server_list)" for web_server in "${web_servers[@]}"; do - args=("$app") - # Validate arguments - shift - while [[ "$#" -gt 0 ]]; do - case "$1" in - # Common flags - --allow-remote-connections \ - | --document-root \ - | --prefix \ - | --type \ - ) - args+=("$1" "${2:?missing value}") - shift - ;; - - # Specific Apache flags - --apache-additional-configuration \ - | --apache-allow-override \ - | --apache-extra-directory-configuration \ - | --apache-move-htaccess \ - ) - [[ "$web_server" == "apache" ]] && args+=("${1//apache-/}" "$2") - shift - ;; - - # Specific NGINX flags - --nginx-additional-configuration) - [[ "$web_server" == "nginx" ]] && args+=("${1//nginx-/}" "$2") - shift - ;; - - *) - echo "Invalid command line flag $1" >&2 - return 1 - ;; - esac - shift - done - "ensure_${web_server}_prefix_configuration_exists" "${args[@]}" + args_var="${web_server}_args[@]" + web_server_execute "$web_server" "ensure_${web_server}_prefix_configuration_exists" "${!args_var}" done } @@ -325,32 +347,32 @@ ensure_web_server_prefix_configuration_exists() { ######################## web_server_update_app_configuration() { local app="${1:?missing app}" - local -a web_servers args + shift + local -a args web_servers + args=("$app") + # Validate arguments + while [[ "$#" -gt 0 ]]; do + case "$1" in + # Common flags + --hosts \ + | --enable-https \ + | --http-port \ + | --https-port \ + ) + args+=("$1" "${2:?missing value}") + shift + ;; + + *) + echo "Invalid command line flag $1" >&2 + return 1 + ;; + esac + shift + done read -r -a web_servers <<< "$(web_server_list)" for web_server in "${web_servers[@]}"; do - args=("$app") - # Validate arguments - shift - while [[ "$#" -gt 0 ]]; do - case "$1" in - # Common flags - --hosts \ - | --enable-https \ - | --http-port \ - | --https-port \ - ) - args+=("$1" "${2:?missing value}") - shift - ;; - - *) - echo "Invalid command line flag $1" >&2 - return 1 - ;; - esac - shift - done - "${web_server}_update_app_configuration" "${args[@]}" + web_server_execute "$web_server" "${web_server}_update_app_configuration" "${args[@]}" done } diff --git a/bitnami/postgresql/README.md b/bitnami/postgresql/README.md index 0cdc7f8064c8..9f081f2c4716 100644 --- a/bitnami/postgresql/README.md +++ b/bitnami/postgresql/README.md @@ -44,7 +44,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t * [`12-debian-10`, `12.3.0-debian-10-r72`, `12`, `12.3.0` (12/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/12.3.0-debian-10-r72/12/debian-10/Dockerfile) * [`11-debian-10`, `11.8.0-debian-10-r72`, `11`, `11.8.0`, `latest` (11/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/11.8.0-debian-10-r72/11/debian-10/Dockerfile) -* [`10-debian-10`, `10.13.0-debian-10-r68`, `10`, `10.13.0` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.13.0-debian-10-r68/10/debian-10/Dockerfile) +* [`10-debian-10`, `10.13.0-debian-10-r69`, `10`, `10.13.0` (10/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/10.13.0-debian-10-r69/10/debian-10/Dockerfile) * [`9.6-debian-10`, `9.6.18-debian-10-r71`, `9.6`, `9.6.18` (9.6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-postgresql/blob/9.6.18-debian-10-r71/9.6/debian-10/Dockerfile) Subscribe to project updates by watching the [bitnami/postgresql GitHub repo](https://github.com/bitnami/bitnami-docker-postgresql).