public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/galera] f43: Added a patch fixing the build with openssl4 by using the opaque
@ 2026-06-09 18:59 Pavol Sloboda
  0 siblings, 0 replies; only message in thread
From: Pavol Sloboda @ 2026-06-09 18:59 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/galera
            Branch : f43
            Commit : c5eaade43a71ba2694108b0ad983fa5e53de39bd
            Author : Pavol Sloboda <psloboda@redhat.com>
            Date   : 2026-05-13T12:05:55+02:00
            Stats  : +30/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/galera/c/c5eaade43a71ba2694108b0ad983fa5e53de39bd?branch=f43

            Log:
            Added a patch fixing the build with openssl4 by using the opaque
implementation of the X509_name_st struct as X509_NAME

The failure looked like this:
/builddir/build/BUILD/galera-26.4.25-build/galera-26.4.25/galerautils/tests/gu_asio_test.cpp:1244:32: error: invalid conversion from ‘const X509_name_st*’ to ‘X509_NAME*’ {aka ‘X509_name_st*’} [-fpermissive]
 1244 |     X509_NAME_add_entry_by_txt(name, "C",  MBSTRING_ASC, C_str,  -1, -1, 0);
      |                                ^~~~
      |                                |
      |                                const X509_name_st*

For more information about openssl4:
https://fedoraproject.org/wiki/Changes/OpenSSL40

---
diff --git a/galera.spec b/galera.spec
index 03889c1..50cf21d 100644
--- a/galera.spec
+++ b/galera.spec
@@ -19,6 +19,7 @@ Patch0:         cmake_paths.patch
 Patch1:         docs.patch
 Patch2:         network.patch
 Patch3:         asio-1.33-compat.patch
+Patch4:         upstream_810f3589742ecb8c4f32d44c363d30488582a9f6.patch
 
 BuildRequires:  boost-devel check-devel openssl-devel cmake systemd gcc-c++ asio-devel
 Requires:       nmap-ncat
@@ -40,6 +41,7 @@ description of Galera replication engine see https://www.galeracluster.com web.
 %patch -P1 -p1
 %patch -P2 -p1
 %patch -P3 -p1
+%patch -P4 -p1
 
 # Create a sysusers.d config file
 cat >galera.sysusers.conf <<EOF

diff --git a/upstream_810f3589742ecb8c4f32d44c363d30488582a9f6.patch b/upstream_810f3589742ecb8c4f32d44c363d30488582a9f6.patch
new file mode 100644
index 0000000..ec379ca
--- /dev/null
+++ b/upstream_810f3589742ecb8c4f32d44c363d30488582a9f6.patch
@@ -0,0 +1,28 @@
+From 810f3589742ecb8c4f32d44c363d30488582a9f6 Mon Sep 17 00:00:00 2001
+From: Pavol Sloboda <127213124+PavolSloboda@users.noreply.github.com>
+Date: Wed, 13 May 2026 09:16:17 +0200
+Subject: [PATCH] Added a fix when building with openssl4 by using the opaque
+ (#55)
+
+implementation of the X509_name_st struct as X509_NAME
+which was introduced in openssl-1.1.0 as can be seen here:
+https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
+this means that the fix is applicable in openssl versions older than 4.0
+as well and won't break anything
+---
+ galerautils/tests/gu_asio_test.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/galerautils/tests/gu_asio_test.cpp b/galerautils/tests/gu_asio_test.cpp
+index a16a08e75..d9c30d861 100644
+--- a/galerautils/tests/gu_asio_test.cpp
++++ b/galerautils/tests/gu_asio_test.cpp
+@@ -1235,7 +1235,7 @@ static X509* create_x509(EVP_PKEY* pkey, X509* issuer, const char* cn,
+     X509_gmtime_adj(X509_get_notAfter(x509), 31536000L);
+     X509_set_pubkey(x509, pkey);
+ 
+-    auto* name = X509_get_subject_name(x509);
++    X509_NAME* name = (X509_NAME*)X509_get_subject_name(x509);
+     static const unsigned char C_str [] = "FI";
+     static const unsigned char ST_str[] = "Uusimaa";
+     static const unsigned char L_str [] = "Helsinki";

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-09 18:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-09 18:59 [rpms/galera] f43: Added a patch fixing the build with openssl4 by using the opaque Pavol Sloboda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox