From 9fa16bbeccd76b1c62f8449bd9973cc65bfb056f Mon Sep 17 00:00:00 2001
From: Michal Schorm <mschorm@redhat.com>
Date: Wed, 1 Dec 2021 14:24:29 +0100
Subject: [PATCH] Fix OpenSSL 3 patch It has to be applied AFTER the
 mariadb-ssl-cipher-tests.patch

---
 mariadb.spec | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/mariadb.spec b/mariadb.spec
index f939634..2e3dfaa 100644
--- a/mariadb.spec
+++ b/mariadb.spec
@@ -204,10 +204,6 @@ Source71:         LICENSE.clustercheck
 # https://jira.mariadb.org/browse/MDEV-12646
 Source72:         mariadb-server-galera.te
 
-#   Patch1: OpenSSL 3 patch
-#   Picked from the upstream developement branch for MariaDB 10.8.
-#   https://jira.mariadb.org/browse/MDEV-25785
-Patch1:           %{pkgnamepatch}-openssl3.patch
 #   Patch4: Red Hat distributions specific logrotate fix
 #   it would be big unexpected change, if we start shipping it now. Better wait for MariaDB 10.2
 Patch4:           %{pkgnamepatch}-logrotate.patch
@@ -219,6 +215,10 @@ Patch9:           %{pkgnamepatch}-ownsetup.patch
 Patch10:          %{pkgnamepatch}-ssl-cipher-tests.patch
 #   Patch11: Use PCDIR CMake option, if configured
 Patch11:          %{pkgnamepatch}-pcdir.patch
+#   Patch12: OpenSSL 3 patch
+#   Picked from the upstream developement branch for MariaDB 10.8.
+#   https://jira.mariadb.org/browse/MDEV-25785
+Patch12:           %{pkgnamepatch}-openssl3.patch
 #   Patch15:  Add option to edit groonga's and groonga-normalizer-mysql install path
 Patch15:          %{pkgnamepatch}-groonga.patch
 #   Patch16:  Fix port bug in mysql_setpermission perl script
@@ -745,14 +745,14 @@ rm -r storage/rocksdb/
 
 
 
-%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
-%patch1 -p1
-%endif
 %patch4 -p1
 %patch7 -p1
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%if 0%{?fedora} >= 35 || 0%{?rhel} >= 9
+%patch12 -p1
+%endif
 %patch15 -p1
 %patch16 -p1