From b34b76eb883ea262db762517947e2cb2776f112b Mon Sep 17 00:00:00 2001
From: Daniel Black <daniel@mariadb.org>
Date: Thu, 15 Aug 2024 14:16:58 +1000
Subject: [PATCH] Hack 11.5/11.6 latest versions without API

---
 11.5-ubi/Dockerfile           |  6 +++---
 11.5-ubi/docker-entrypoint.sh |  2 +-
 11.5/Dockerfile               |  6 +++---
 11.5/docker-entrypoint.sh     |  2 +-
 11.6-ubi/Dockerfile           |  6 +++---
 11.6-ubi/docker-entrypoint.sh |  2 +-
 11.6/Dockerfile               |  6 +++---
 11.6/docker-entrypoint.sh     |  2 +-
 update.sh                     | 11 ++++++++++-
 versions.json                 | 16 ++++++++--------
 10 files changed, 34 insertions(+), 25 deletions(-)

diff --git a/11.5-ubi/Dockerfile b/11.5-ubi/Dockerfile
index 6dbc85c..32355e7 100644
--- a/11.5-ubi/Dockerfile
+++ b/11.5-ubi/Dockerfile
@@ -36,7 +36,7 @@ COPY MariaDB.repo /etc/yum.repos.d/
 # https://access.redhat.com/documentation/en-us/red_hat_software_certification/2024/html/red_hat_openshift_software_certification_policy_guide/assembly-requirements-for-container-images_openshift-sw-cert-policy-introduction#con-image-metadata-requirements_openshift-sw-cert-policy-container-images
 LABEL name="MariaDB Server" \
 	vendor="MariaDB Community" \
-	version="11.5.1" \
+	version="11.5.2" \
 	release="Refer to Annotations org.opencontainers.image.{revision,source}" \
 	summary="MariaDB Database" \
 	description="MariaDB Database for relational SQL"
@@ -50,11 +50,11 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \
       org.opencontainers.image.licenses="GPL-2.0" \
       org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \
       org.opencontainers.image.vendor="MariaDB Community" \
-      org.opencontainers.image.version="11.5.1" \
+      org.opencontainers.image.version="11.5.2" \
       org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker"
 
 # bashbrew-architectures: amd64 arm64v8 ppc64le s390x
-ARG MARIADB_VERSION=11.5.1
+ARG MARIADB_VERSION=11.5.2
 ENV MARIADB_VERSION=$MARIADB_VERSION
 # release-status:Stable
 # release-support-type:Short Term Support
diff --git a/11.5-ubi/docker-entrypoint.sh b/11.5-ubi/docker-entrypoint.sh
index c610865..833b08b 100755
--- a/11.5-ubi/docker-entrypoint.sh
+++ b/11.5-ubi/docker-entrypoint.sh
@@ -224,7 +224,7 @@ docker_create_db_directories() {
 }
 
 _mariadb_version() {
-	echo -n "11.5.1-MariaDB"
+	echo -n "11.5.2-MariaDB"
 }
 
 # initializes the database directory
diff --git a/11.5/Dockerfile b/11.5/Dockerfile
index 6a04d06..a394eb8 100644
--- a/11.5/Dockerfile
+++ b/11.5/Dockerfile
@@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \
       org.opencontainers.image.licenses="GPL-2.0" \
       org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \
       org.opencontainers.image.vendor="MariaDB Community" \
-      org.opencontainers.image.version="11.5.1" \
+      org.opencontainers.image.version="11.5.2" \
       org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker"
 
 # bashbrew-architectures: amd64 arm64v8 ppc64le s390x
-ARG MARIADB_VERSION=1:11.5.1+maria~ubu2404
+ARG MARIADB_VERSION=1:11.5.2+maria~ubu2404
 ENV MARIADB_VERSION $MARIADB_VERSION
 # release-status:Stable
 # release-support-type:Short Term Support
 # (https://downloads.mariadb.org/rest-api/mariadb/)
 
 # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions
-ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.5.1/repo/ubuntu/ noble main main/debug"
+ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.5.2/repo/ubuntu/ noble main main/debug"
 
 RUN set -e;\
 	echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \
diff --git a/11.5/docker-entrypoint.sh b/11.5/docker-entrypoint.sh
index c610865..833b08b 100755
--- a/11.5/docker-entrypoint.sh
+++ b/11.5/docker-entrypoint.sh
@@ -224,7 +224,7 @@ docker_create_db_directories() {
 }
 
 _mariadb_version() {
-	echo -n "11.5.1-MariaDB"
+	echo -n "11.5.2-MariaDB"
 }
 
 # initializes the database directory
diff --git a/11.6-ubi/Dockerfile b/11.6-ubi/Dockerfile
index a059b83..d205b3f 100644
--- a/11.6-ubi/Dockerfile
+++ b/11.6-ubi/Dockerfile
@@ -36,7 +36,7 @@ COPY MariaDB.repo /etc/yum.repos.d/
 # https://access.redhat.com/documentation/en-us/red_hat_software_certification/2024/html/red_hat_openshift_software_certification_policy_guide/assembly-requirements-for-container-images_openshift-sw-cert-policy-introduction#con-image-metadata-requirements_openshift-sw-cert-policy-container-images
 LABEL name="MariaDB Server" \
 	vendor="MariaDB Community" \
-	version="11.6.0" \
+	version="11.6.1" \
 	release="Refer to Annotations org.opencontainers.image.{revision,source}" \
 	summary="MariaDB Database" \
 	description="MariaDB Database for relational SQL"
@@ -50,11 +50,11 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \
       org.opencontainers.image.licenses="GPL-2.0" \
       org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \
       org.opencontainers.image.vendor="MariaDB Community" \
-      org.opencontainers.image.version="11.6.0" \
+      org.opencontainers.image.version="11.6.1" \
       org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker"
 
 # bashbrew-architectures: amd64 arm64v8 ppc64le s390x
-ARG MARIADB_VERSION=11.6.0
+ARG MARIADB_VERSION=11.6.1
 ENV MARIADB_VERSION=$MARIADB_VERSION
 # release-status:RC
 # release-support-type:Short Term Support
diff --git a/11.6-ubi/docker-entrypoint.sh b/11.6-ubi/docker-entrypoint.sh
index ddb2874..754d4db 100755
--- a/11.6-ubi/docker-entrypoint.sh
+++ b/11.6-ubi/docker-entrypoint.sh
@@ -224,7 +224,7 @@ docker_create_db_directories() {
 }
 
 _mariadb_version() {
-	echo -n "11.6.0-MariaDB"
+	echo -n "11.6.1-MariaDB"
 }
 
 # initializes the database directory
diff --git a/11.6/Dockerfile b/11.6/Dockerfile
index e3f5b28..ffc341a 100644
--- a/11.6/Dockerfile
+++ b/11.6/Dockerfile
@@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \
       org.opencontainers.image.licenses="GPL-2.0" \
       org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \
       org.opencontainers.image.vendor="MariaDB Community" \
-      org.opencontainers.image.version="11.6.0" \
+      org.opencontainers.image.version="11.6.1" \
       org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker"
 
 # bashbrew-architectures: amd64 arm64v8 ppc64le s390x
-ARG MARIADB_VERSION=1:11.6.0+maria~ubu2404
+ARG MARIADB_VERSION=1:11.6.1+maria~ubu2404
 ENV MARIADB_VERSION $MARIADB_VERSION
 # release-status:RC
 # release-support-type:Short Term Support
 # (https://downloads.mariadb.org/rest-api/mariadb/)
 
 # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions
-ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.6.0/repo/ubuntu/ noble main main/debug"
+ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.6.1/repo/ubuntu/ noble main main/debug"
 
 RUN set -e;\
 	echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \
diff --git a/11.6/docker-entrypoint.sh b/11.6/docker-entrypoint.sh
index ddb2874..754d4db 100755
--- a/11.6/docker-entrypoint.sh
+++ b/11.6/docker-entrypoint.sh
@@ -224,7 +224,7 @@ docker_create_db_directories() {
 }
 
 _mariadb_version() {
-	echo -n "11.6.0-MariaDB"
+	echo -n "11.6.1-MariaDB"
 }
 
 # initializes the database directory
diff --git a/update.sh b/update.sh
index 7467700..61de896 100755
--- a/update.sh
+++ b/update.sh
@@ -240,7 +240,16 @@ for version in "${versions[@]}"; do
 	if [ ! -d "$version" ]; then
 		version=${version%.[[:digit:]]*}
 	else
-		mariaversion
+		case "$version" in
+			11.5*)
+				mariaVersion=11.5.2
+				;;
+			11.6*)
+				mariaVersion=11.6.1
+				;;
+			*)
+				mariaversion
+		esac
 	fi
 	readarray -t release <<< "$(curl -fsSL "$DOWNLOADS_REST_API/mariadb/" \
 		| jq -r --arg version "${version%-*}" '.major_releases[] | select(.release_id == $version) | [ .release_status ] , [ .release_support_type ] | @tsv')"
diff --git a/versions.json b/versions.json
index b469b44..d1d5c27 100644
--- a/versions.json
+++ b/versions.json
@@ -113,8 +113,8 @@
   },
   "11.5": {
     "milestone": "11.5",
-    "version": "11.5.1",
-    "fullVersion": "1:11.5.1+maria~ubu2404",
+    "version": "11.5.2",
+    "fullVersion": "1:11.5.2+maria~ubu2404",
     "releaseStatus": "Stable",
     "supportType": "Short Term Support",
     "base": "ubuntu:noble",
@@ -127,8 +127,8 @@
   },
   "11.5-ubi": {
     "milestone": "11.5",
-    "version": "11.5.1",
-    "fullVersion": "11.5.1",
+    "version": "11.5.2",
+    "fullVersion": "11.5.2",
     "releaseStatus": "Stable",
     "supportType": "Short Term Support",
     "base": "ubi9",
@@ -141,8 +141,8 @@
   },
   "11.6": {
     "milestone": "11.6",
-    "version": "11.6.0",
-    "fullVersion": "1:11.6.0+maria~ubu2404",
+    "version": "11.6.1",
+    "fullVersion": "1:11.6.1+maria~ubu2404",
     "releaseStatus": "RC",
     "supportType": "Short Term Support",
     "base": "ubuntu:noble",
@@ -155,8 +155,8 @@
   },
   "11.6-ubi": {
     "milestone": "11.6",
-    "version": "11.6.0",
-    "fullVersion": "11.6.0",
+    "version": "11.6.1",
+    "fullVersion": "11.6.1",
     "releaseStatus": "RC",
     "supportType": "Short Term Support",
     "base": "ubi9",
-- 
GitLab