From 13c527a86680cacf06db430a8222695333d9e1e9 Mon Sep 17 00:00:00 2001 From: Bitnami Bot Date: Sat, 6 Jul 2024 11:58:58 +0200 Subject: [PATCH] [bitnami/percona-mysql] Release 8.2.0-1-debian-12-r10 (#69049) Signed-off-by: Bitnami Containers --- .../percona-mysql/8.2/debian-12/Dockerfile | 6 +- .../opt/bitnami/.bitnami_components.json | 2 +- .../rootfs/opt/bitnami/scripts/libmysql.sh | 290 ++++++++---------- .../rootfs/opt/bitnami/scripts/mysql-env.sh | 3 + bitnami/percona-mysql/README.md | 1 + 5 files changed, 141 insertions(+), 161 deletions(-) diff --git a/bitnami/percona-mysql/8.2/debian-12/Dockerfile b/bitnami/percona-mysql/8.2/debian-12/Dockerfile index 86a76b9f1905c..cddc1957a7d66 100644 --- a/bitnami/percona-mysql/8.2/debian-12/Dockerfile +++ b/bitnami/percona-mysql/8.2/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-29T17:08:47Z" \ + org.opencontainers.image.created="2024-07-06T09:22:22Z" \ org.opencontainers.image.description="Application packaged by Broadcom, Inc." \ org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql/README.md" \ org.opencontainers.image.licenses="Apache-2.0" \ - org.opencontainers.image.ref.name="8.2.0-1-debian-12-r9" \ + org.opencontainers.image.ref.name="8.2.0-1-debian-12-r10" \ org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/percona-mysql" \ org.opencontainers.image.title="percona-mysql" \ org.opencontainers.image.vendor="Broadcom, Inc." \ @@ -29,7 +29,7 @@ RUN install_packages ca-certificates curl libaio1 libaudit1 libbz2-1.0 libcap-ng RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \ COMPONENTS=( \ "mysql-shell-8.2.1-1-linux-${OS_ARCH}-debian-12" \ - "ini-file-1.4.6-14-linux-${OS_ARCH}-debian-12" \ + "ini-file-1.4.7-2-linux-${OS_ARCH}-debian-12" \ "percona-mysql-8.2.0-1-2-linux-${OS_ARCH}-debian-12" \ ) ; \ for COMPONENT in "${COMPONENTS[@]}"; do \ diff --git a/bitnami/percona-mysql/8.2/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json b/bitnami/percona-mysql/8.2/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json index 4db21e4fcc63f..5efd5c503a52a 100644 --- a/bitnami/percona-mysql/8.2/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json +++ b/bitnami/percona-mysql/8.2/debian-12/prebuildfs/opt/bitnami/.bitnami_components.json @@ -3,7 +3,7 @@ "arch": "amd64", "distro": "debian-12", "type": "NAMI", - "version": "1.4.6-14" + "version": "1.4.7-2" }, "mysql-shell": { "arch": "amd64", diff --git a/bitnami/percona-mysql/8.2/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh b/bitnami/percona-mysql/8.2/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh index b36648e973597..2fe2d93bf9192 100644 --- a/bitnami/percona-mysql/8.2/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh +++ b/bitnami/percona-mysql/8.2/debian-12/rootfs/opt/bitnami/scripts/libmysql.sh @@ -296,6 +296,47 @@ flush privileges; EOF } +######################## +# Initialize database data +# Globals: +# BITNAMI_DEBUG +# DB_* +# Arguments: +# None +# Returns: +# None +######################### +mysql_install_db() { + local command="${DB_BIN_DIR}/mysql_install_db" + local -a args=("--defaults-file=${DB_CONF_FILE}" "--basedir=${DB_BASE_DIR}" "--datadir=${DB_DATA_DIR}") + + # Add flags specified via the 'DB_EXTRA_FLAGS' environment variable + read -r -a db_extra_flags <<< "$(mysql_extra_flags)" + [[ "${#db_extra_flags[@]}" -gt 0 ]] && args+=("${db_extra_flags[@]}") + + am_i_root && args=("${args[@]}" "--user=$DB_DAEMON_USER") + command="${DB_BIN_DIR}/mysqld" + args+=("--initialize-insecure") + + debug_execute "$command" "${args[@]}" +} + +######################## +# Upgrade Database Schema +# Globals: +# BITNAMI_DEBUG +# DB_* +# Arguments: +# None +# Returns: +# None +######################### +mysql_upgrade() { + info "Running mysql_upgrade" + mysql_stop + mysql_start_bg "--upgrade=${DB_UPGRADE}" +} + ######################## # Ensure MySQL/MariaDB is initialized # Globals: @@ -354,7 +395,7 @@ mysql_initialize() { # commands can still be executed until we restart or run 'flush privileges' info "Configuring authentication" mysql_execute "mysql" <&2 + return 1 + ;; + esac + shift + done + if is_boolean_yes "$use_ldap"; then + auth_string="identified via pam using '$DB_FLAVOR'" + elif [[ -n "$password" ]]; then + if [[ -n "$auth_plugin" ]]; then + auth_string="identified with $auth_plugin by '$password'" + else + auth_string="identified by '$password'" + fi + fi + debug "creating database user \'$user\'" + + local -a mysql_execute_cmd=("mysql_execute") + local -a mysql_execute_print_output_cmd=("mysql_execute_print_output") + if [[ -n "$db_host" && -n "$db_port" ]]; then + mysql_execute_cmd=("mysql_remote_execute" "$db_host" "$db_port") + mysql_execute_print_output_cmd=("mysql_remote_execute_print_output" "$db_host" "$db_port") + fi + + "${mysql_execute_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <&2 - return 1 - ;; - esac - shift - done - if is_boolean_yes "$use_ldap"; then - auth_string="identified via pam using '$DB_FLAVOR'" - elif [[ -n "$password" ]]; then - if [[ -n "$auth_plugin" ]]; then - auth_string="identified with $auth_plugin by '$password'" - else - auth_string="identified by '$password'" - fi - fi - debug "creating database user \'$user\'" - - local -a mysql_execute_cmd=("mysql_execute") - local -a mysql_execute_print_output_cmd=("mysql_execute_print_output") - if [[ -n "$db_host" && -n "$db_port" ]]; then - mysql_execute_cmd=("mysql_remote_execute" "$db_host" "$db_port") - mysql_execute_print_output_cmd=("mysql_remote_execute_print_output" "$db_host" "$db_port") - fi - - 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_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <