Skip to content

Commit

Permalink
[bitnami/phpbb] Release 3.3.12-debian-12-r5 (#70608)
Browse files Browse the repository at this point in the history
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
  • Loading branch information
bitnami-bot authored Aug 6, 2024
1 parent 1b56ef7 commit bdebcd9
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 13 deletions.
10 changes: 5 additions & 5 deletions bitnami/phpbb/3/debian-12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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-07-25T06:47:59Z" \
org.opencontainers.image.created="2024-08-06T10:36:34Z" \
org.opencontainers.image.description="Application packaged by Broadcom, Inc." \
org.opencontainers.image.documentation="https://github.com/bitnami/containers/tree/main/bitnami/phpbb/README.md" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.ref.name="3.3.12-debian-12-r4" \
org.opencontainers.image.ref.name="3.3.12-debian-12-r5" \
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/phpbb" \
org.opencontainers.image.title="phpbb" \
org.opencontainers.image.vendor="Broadcom, Inc." \
Expand All @@ -29,10 +29,10 @@ RUN install_packages acl ca-certificates curl jq libaudit1 libbrotli1 libbsd0 li
RUN mkdir -p /tmp/bitnami/pkg/cache/ ; cd /tmp/bitnami/pkg/cache/ ; \
COMPONENTS=( \
"render-template-1.0.7-2-linux-${OS_ARCH}-debian-12" \
"php-8.2.21-2-linux-${OS_ARCH}-debian-12" \
"php-8.2.22-0-linux-${OS_ARCH}-debian-12" \
"apache-2.4.62-0-linux-${OS_ARCH}-debian-12" \
"mysql-client-10.11.8-1-linux-${OS_ARCH}-debian-12" \
"libphp-8.2.21-2-linux-${OS_ARCH}-debian-12" \
"mysql-client-10.11.8-2-linux-${OS_ARCH}-debian-12" \
"libphp-8.2.22-0-linux-${OS_ARCH}-debian-12" \
"phpbb-3.3.12-0-linux-${OS_ARCH}-debian-12" \
) ; \
for COMPONENT in "${COMPONENTS[@]}"; do \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
"arch": "amd64",
"distro": "debian-12",
"type": "NAMI",
"version": "8.2.21-2"
"version": "8.2.22-0"
},
"mysql-client": {
"arch": "amd64",
"distro": "debian-12",
"type": "NAMI",
"version": "10.11.8-1"
"version": "10.11.8-2"
},
"php": {
"arch": "amd64",
"distro": "debian-12",
"type": "NAMI",
"version": "8.2.21-2"
"version": "8.2.22-0"
},
"phpbb": {
"arch": "amd64",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
. /opt/bitnami/scripts/liblog.sh
. /opt/bitnami/scripts/libos.sh
. /opt/bitnami/scripts/libvalidations.sh
. /opt/bitnami/scripts/libversion.sh

########################
# Validate settings in MYSQL_CLIENT_* environment variables
Expand Down Expand Up @@ -466,6 +467,98 @@ mysql_migrate_old_configuration() {
fi
}

########################
# Ensure a db user exists with the given password for the '%' host
# Globals:
# DB_*
# Flags:
# -p|--password - database password
# -u|--user - database user
# --auth-plugin - authentication plugin
# --use-ldap - authenticate user via LDAP
# --host - database host
# --port - database host
# Arguments:
# $1 - database user
# Returns:
# None
#########################
mysql_ensure_user_exists() {
local -r user="${1:?user is required}"
local password=""
local auth_plugin=""
local use_ldap="no"
local hosts
local auth_string=""
# For accessing an external database
local db_host=""
local db_port=""

# Validate arguments
shift 1
while [ "$#" -gt 0 ]; do
case "$1" in
-p|--password)
shift
password="${1:?missing database password}"
;;
--auth-plugin)
shift
auth_plugin="${1:?missing authentication plugin}"
;;
--use-ldap)
use_ldap="yes"
;;
--host)
shift
db_host="${1:?missing database host}"
;;
--port)
shift
db_port="${1:?missing database port}"
;;
*)
echo "Invalid command line flag $1" >&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" <<EOF
${mysql_create_user_cmd} '${user}'@'%' ${auth_string};
EOF
debug "Removing all other hosts for the user"
hosts=$("${mysql_execute_print_output_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
select Host from user where User='${user}' and Host!='%';
EOF
)
for host in $hosts; do
"${mysql_execute_cmd[@]}" "mysql" "$DB_ROOT_USER" "$DB_ROOT_PASSWORD" <<EOF
drop user '$user'@'$host';
EOF
done
}

########################
# Ensure a db user does not exist
# Globals:
Expand Down Expand Up @@ -703,7 +796,7 @@ mysql_ensure_optional_user_exists() {
flags+=("-p" "$password")
[[ -n "$auth_plugin" ]] && flags=("${flags[@]}" "--auth-plugin" "$auth_plugin")
fi
"${DB_FLAVOR}"_ensure_user_exists "${flags[@]}"
mysql_ensure_user_exists "${flags[@]}"
}

########################
Expand Down Expand Up @@ -934,6 +1027,22 @@ mysql_client_extra_opts() {
value="$(mysql_client_env_value "SSL_${key^^}_FILE")"
[[ -n "${value}" ]] && opts+=("--ssl-${key}=${value}")
done
else
# Skip SSL validation
if [[ "$(mysql_client_flavor)" = "mysql" ]]; then
opts+=("--ssl-mode=DISABLED")
else
# SSL connections are enabled by default in MariaDB >=10.11
local mysql_version=""
local major_version=""
local minor_version=""
mysql_version="$(mysql_get_version)"
major_version="$(get_sematic_version "${mysql_version}" 1)"
minor_version="$(get_sematic_version "${mysql_version}" 2)"
if [[ "${major_version}" -gt 10 ]] || [[ "${major_version}" -eq 10 && "${minor_version}" -eq 11 ]]; then
opts+=("--skip-ssl")
fi
fi
fi
echo "${opts[@]:-}"
}
4 changes: 0 additions & 4 deletions bitnami/phpbb/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Bitnami package for phpBB

## Deprecation Notice

The phpBB container will no longer be released in our catalog, but already released container images will still persist in the registries.

## What is phpBB?

> phpBB is a popular bulletin board that features robust messaging capabilities such as flat message structure, subforums, topic split/merge/lock, user groups, full-text search, and attachments.
Expand Down

0 comments on commit bdebcd9

Please sign in to comment.