10.2.32-debian-10-r58 release

This commit is contained in:
Bitnami Bot 2020-07-09 21:19:03 +00:00
parent b303c182a3
commit 85d4aded25
6 changed files with 81 additions and 21 deletions

View File

@ -19,7 +19,7 @@ RUN mkdir /docker-entrypoint-initdb.d
COPY rootfs /
RUN /opt/bitnami/scripts/mariadb/postunpack.sh
ENV BITNAMI_APP_NAME="mariadb" \
BITNAMI_IMAGE_VERSION="10.2.32-debian-10-r57" \
BITNAMI_IMAGE_VERSION="10.2.32-debian-10-r58" \
PATH="/opt/bitnami/common/bin:/opt/bitnami/mariadb/bin:/opt/bitnami/mariadb/sbin:$PATH"
EXPOSE 3306

View File

@ -46,8 +46,9 @@ persist_app() {
file_to_persist_relative="$(relativize "$file_to_persist" "$install_dir")"
file_to_persist_destination="${persist_dir}/${file_to_persist_relative}"
file_to_persist_destination_folder="$(dirname "$file_to_persist_destination")"
# Get original permissions (except for the root directory, to avoid issues with volumes)
find "$file_to_persist_relative" | grep -E -v '^\.$' | xargs getfacl -R > "$tmp_file"
# Get original permissions for existing files, which will be applied later
# Exclude the root directory with 'sed', to avoid issues when copying the entirety of it to a volume
getfacl -R "$file_to_persist_relative" | sed -E '/# file: (\..+|[^.])/,$!d' > "$tmp_file"
# Copy directories to the volume
ensure_dir_exists "$file_to_persist_destination_folder"
cp -Lr --preserve=links "$file_to_persist_relative" "$file_to_persist_destination_folder"
@ -62,6 +63,7 @@ persist_app() {
popd >/dev/null
done
popd >/dev/null
rm -f "$tmp_file"
# Install the persisted files into the installation directory, via symlinks
restore_persisted_app "$@"
}

View File

@ -68,6 +68,64 @@ stop_service_using_pid() {
done
}
########################
# Start cron daemon
# Arguments:
# None
# Returns:
# true if started correctly, false otherwise
#########################
cron_start() {
if [[ -x "/usr/sbin/cron" ]]; then
/usr/sbin/cron
elif [[ -x "/usr/sbin/crond" ]]; then
/usr/sbin/crond
else
false
fi
}
########################
# Generate a cron configuration file for a given service
# Arguments:
# $1 - Service name
# $2 - Command
# Flags:
# --run-as - User to run as (default: root)
# --schedule - Cron schedule configuration (default: * * * * *)
# Returns:
# None
#########################
generate_cron_conf() {
local service_name="${1:?service name is missing}"
local cmd="${2:?command is missing}"
local run_as="root"
local schedule="* * * * *"
# Parse optional CLI flags
shift 2
while [[ "$#" -gt 0 ]]; do
case "$1" in
--run-as)
shift
run_as="$1"
;;
--schedule)
shift
schedule="$1"
;;
*)
echo "Invalid command line flag ${1}" >&2
return 1
;;
esac
shift
done
mkdir -p /etc/cron.d
echo "${schedule} ${run_as} ${cmd}" > /etc/cron.d/"$service_name"
}
########################
# Generate a monit configuration file for a given service
# Arguments:

View File

@ -150,7 +150,7 @@ web_server_reload() {
########################
ensure_web_server_app_configuration_exists() {
local app="${1:?missing app}"
local -a args=()
local -a args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
@ -165,7 +165,7 @@ ensure_web_server_app_configuration_exists() {
| --https-port \
| --document-root \
)
args+=("$1" "$2")
args+=("$1" "${2:?missing value}")
shift
;;
@ -176,13 +176,13 @@ ensure_web_server_app_configuration_exists() {
| --apache-extra-directory-configuration \
| --apache-move-htaccess \
)
[[ "$(web_server_type)" == "apache" ]] && args+=("${1//apache-/}" "$2")
[[ "$(web_server_type)" == "apache" ]] && args+=("${1//apache-/}" "${2:?missing value}")
shift
;;
# Specific NGINX flags
--nginx-additional-configuration)
[[ "$(web_server_type)" == "nginx" ]] && args+=("${1//nginx-/}" "$2")
[[ "$(web_server_type)" == "nginx" ]] && args+=("${1//nginx-/}" "${2:?missing value}")
shift
;;
@ -193,7 +193,7 @@ ensure_web_server_app_configuration_exists() {
esac
shift
done
"ensure_$(web_server_type)_app_configuration_exists" "$app" "${args[@]}"
"ensure_$(web_server_type)_app_configuration_exists" "${args[@]}"
}
########################
@ -235,7 +235,7 @@ ensure_web_server_app_configuration_not_exists() {
########################
ensure_web_server_prefix_configuration_exists() {
local app="${1:?missing app}"
local -a args=()
local -a args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
@ -246,7 +246,7 @@ ensure_web_server_prefix_configuration_exists() {
| --prefix \
| --type \
)
args+=("$1" "$2")
args+=("$1" "${2:?missing value}")
shift
;;
@ -273,7 +273,7 @@ ensure_web_server_prefix_configuration_exists() {
esac
shift
done
"ensure_$(web_server_type)_prefix_configuration_exists" "$app" "${args[@]}"
"ensure_$(web_server_type)_prefix_configuration_exists" "${args[@]}"
}
########################
@ -293,7 +293,7 @@ ensure_web_server_prefix_configuration_exists() {
########################
web_server_update_app_configuration() {
local app="${1:?missing app}"
local -a args=()
local -a args=("$app")
# Validate arguments
shift
while [[ "$#" -gt 0 ]]; do
@ -304,7 +304,7 @@ web_server_update_app_configuration() {
| --http-port \
| --https-port \
)
args+=("$1" "$2")
args+=("$1" "${2:?missing value}")
shift
;;
@ -315,7 +315,7 @@ web_server_update_app_configuration() {
esac
shift
done
"$(web_server_type)_update_app_configuration" "$app" "${args[@]}"
"$(web_server_type)_update_app_configuration" "${args[@]}"
}
########################

View File

@ -448,6 +448,7 @@ mysql_execute_print_output() {
local -r db="${1:-}"
local -r user="${2:-root}"
local -r pass="${3:-}"
local mysql_cmd opts
read -r -a opts <<<"${@:4}"
# Process mysql CLI arguments
@ -460,10 +461,7 @@ mysql_execute_print_output() {
[[ -n "${opts[*]:-}" ]] && args+=("${opts[@]:-}")
# Obtain the command specified via stdin
local mysql_cmd=""
if read -r -t 0; then
mysql_cmd="$(</dev/stdin)"
fi
mysql_cmd="$(</dev/stdin)"
debug "Executing SQL command:\n$mysql_cmd"
"$DB_BIN_DIR/mysql" "${args[@]}" <<<"$mysql_cmd"
}
@ -793,12 +791,14 @@ mysql_ensure_user_exists() {
[[ -n "$db_host" ]] && opts+=("-h" "${db_host}")
[[ -n "$db_port" ]] && opts+=("-P" "${db_port}")
[[ -n "$ssl_ca" ]] && opts+=("--ssl-ca" "$ssl_ca")
local mysql_create_user_cmd
[[ "$DB_FLAVOR" = "mariadb" ]] && mysql_create_user_cmd="create or replace user" || mysql_create_user_cmd="create user if not exists"
mysql_execute "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" "${opts[@]:-}" <<EOF
create $([[ "$DB_FLAVOR" = "mariadb" ]] && echo "or replace") user '$user'@'%' $auth_string;
${mysql_create_user_cmd} '${user}'@'%' ${auth_string};
EOF
debug "Removing all other hosts for the user"
hosts=$(mysql_execute_print_output "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" "${opts[@]:-}" <<EOF
select Host from user where User='$user' and Host!='%';
select Host from user where User='${user}' and Host!='%';
EOF
)
for host in $hosts; do

View File

@ -47,7 +47,7 @@ Learn more about the Bitnami tagging policy and the difference between rolling t
* [`10.5-debian-10`, `10.5.4-debian-10-r13`, `10.5`, `10.5.4`, `latest` (10.5/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mariadb/blob/10.5.4-debian-10-r13/10.5/debian-10/Dockerfile)
* [`10.4-debian-10`, `10.4.13-debian-10-r56`, `10.4`, `10.4.13` (10.4/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mariadb/blob/10.4.13-debian-10-r56/10.4/debian-10/Dockerfile)
* [`10.3-debian-10`, `10.3.23-debian-10-r57`, `10.3`, `10.3.23` (10.3/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mariadb/blob/10.3.23-debian-10-r57/10.3/debian-10/Dockerfile)
* [`10.2-debian-10`, `10.2.32-debian-10-r57`, `10.2`, `10.2.32` (10.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mariadb/blob/10.2.32-debian-10-r57/10.2/debian-10/Dockerfile)
* [`10.2-debian-10`, `10.2.32-debian-10-r58`, `10.2`, `10.2.32` (10.2/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mariadb/blob/10.2.32-debian-10-r58/10.2/debian-10/Dockerfile)
* [`10.1-debian-10`, `10.1.45-debian-10-r59`, `10.1`, `10.1.45` (10.1/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-mariadb/blob/10.1.45-debian-10-r59/10.1/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/mariadb GitHub repo](https://github.com/bitnami/bitnami-docker-mariadb).