public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/deskflow] rawhide: Fixes F45FTBFS due OpenSSL4 incompatibility with current deskflow
@ 2026-08-05 17:22 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-08-05 17:22 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/deskflow
            Branch : rawhide
            Commit : c9302cd332602ae9ca7d3856a7d94e2a7620e967
            Author : Filipe Rosset <rosset.filipe@gmail.com>
            Date   : 2026-08-05T14:21:06-03:00
            Stats  : +52/-0 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/deskflow/c/c9302cd332602ae9ca7d3856a7d94e2a7620e967?branch=rawhide

            Log:
            Fixes F45FTBFS due OpenSSL4 incompatibility with current deskflow

Resolves: rhbz#2503846 - deskflow: FTBFS in Fedora rawhide/f45

---
diff --git a/deskflow-1.26.0-openssl4-compat.patch b/deskflow-1.26.0-openssl4-compat.patch
new file mode 100644
index 0000000..cb1991f
--- /dev/null
+++ b/deskflow-1.26.0-openssl4-compat.patch
@@ -0,0 +1,49 @@
+From fdb100649b44af1ac7f0a9ec83dc7805430aada8 Mon Sep 17 00:00:00 2001
+From: Kentaro Hayashi <kenhys@xdump.org>
+Date: Sun, 31 May 2026 12:28:10 +0900
+Subject: [PATCH] fix: invalid type conversion for OpenSSL 4.0.0
+
+Since OpenSSL 4.0.0, X509_get_subject_name returns const X509_NAME
+pointer, thus X509_NAME_add_entry_by_txt does not accept it anymore.
+
+See /usr/include/openssl/x509.h.
+
+Instead, explicitly operates it via mutable X509_NAME object.
+
+It is safe operation without using X509_get_subject_name() because
+subject name was not modified after cert = X509_new() assignment.
+
+It will fix the following error.
+
+  error: invalid conversion from 'const X509_name_st*' to 'X509_NAME*' {aka 'X509_name
+  _st*'} [-fpermissive]
+     87 |   X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, reinterpret_cast<const unsigned char *>("Deskflow"), -1, -1, 0);
+        |                              ^~~~
+        |                              |
+        |                              const X509_name_st*
+
+Signed-off-by: Kentaro Hayashi <kenhys@xdump.org>
+---
+ src/lib/net/SecureUtils.cpp | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/net/SecureUtils.cpp b/src/lib/net/SecureUtils.cpp
+index f47e437..31436d8 100644
+--- a/src/lib/net/SecureUtils.cpp
++++ b/src/lib/net/SecureUtils.cpp
+@@ -85,9 +85,14 @@ void generatePemSelfSignedCert(const QString &path, int keyLength)
+   X509_gmtime_adj(X509_get_notAfter(cert), expirationDays * 24 * 3600);
+   X509_set_pubkey(cert, privateKey);
+ 
+-  auto *name = X509_get_subject_name(cert);
++  auto *name = X509_NAME_new();
++  if (!name) {
++    throw std::runtime_error("could not allocate subject name");
++  }
+   X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, reinterpret_cast<const unsigned char *>("Deskflow"), -1, -1, 0);
++  X509_set_subject_name(cert, name);
+   X509_set_issuer_name(cert, name);
++  X509_NAME_free(name);
+ 
+   X509_sign(cert, privateKey, EVP_sha256());
+ 

diff --git a/deskflow.spec b/deskflow.spec
index c1968ad..6b08c65 100644
--- a/deskflow.spec
+++ b/deskflow.spec
@@ -12,6 +12,9 @@ Summary:	Share mouse and keyboard between multiple computers over the network
 License:	GPL-2.0-only
 URL:		https://github.com/%{name}/%{name}
 Source:		%{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Backported from upstream patch, our downstream patch is slightly different
+# https://github.com/deskflow/deskflow/commit/fdb100649b44af1ac7f0a9ec83dc7805430aada8.patch
+Patch:		deskflow-1.26.0-openssl4-compat.patch
 ExcludeArch:	%{ix86}
 
 BuildRequires:	cmake >= 3.24

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

only message in thread, other threads:[~2026-08-05 17:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-05 17:22 [rpms/deskflow] rawhide: Fixes F45FTBFS due OpenSSL4 incompatibility with current deskflow Filipe Rosset

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