Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Vlad Glagolev (30b0b7d034b2367c88050358d0cebfb8173462fb)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Vlad Glagolev (30b0b7d034b2367c88050358d0cebfb8173462fb)
  • Date: Thu, 2 May 2024 06:55:43 +0000

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

chat-irc/znc/BUILD | 4 ++
chat-irc/znc/HISTORY | 5 +++
chat-irc/znc/PRE_BUILD | 4 ++
chat-irc/znc/libressl.patch | 63
++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 76 insertions(+)

New commits:
commit 30b0b7d034b2367c88050358d0cebfb8173462fb
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

znc: fix build with libressl

diff --git a/chat-irc/znc/BUILD b/chat-irc/znc/BUILD
index 966e3c1..9927d00 100755
--- a/chat-irc/znc/BUILD
+++ b/chat-irc/znc/BUILD
@@ -1,3 +1,7 @@
OPTS="$ZNC_OPTS $OPTS" &&

+if spell_ok libressl && ! is_version_less $(installed_version libressl)
3.4.0; then
+ CXXFLAGS="-DHAVE_SSL_SESSION_get0_cipher ${CXXFLAGS}"
+fi &&
+
default_build
diff --git a/chat-irc/znc/HISTORY b/chat-irc/znc/HISTORY
index c5e703c..6537fb5 100644
--- a/chat-irc/znc/HISTORY
+++ b/chat-irc/znc/HISTORY
@@ -1,3 +1,8 @@
+2024-05-01 Vlad Glagolev <stealth AT sourcemage.org>
+ * BUILD: fixed build with libressl
+ * PRE_BUILD: added, to apply patch
+ * libressl.patch: added, to fix build with libressl (cmake)
+
2020-11-27 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 1.8.2
fixed WEB_SITE
diff --git a/chat-irc/znc/PRE_BUILD b/chat-irc/znc/PRE_BUILD
new file mode 100755
index 0000000..2af8029
--- /dev/null
+++ b/chat-irc/znc/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+patch -p1 < "${SPELL_DIRECTORY}/libressl.patch"
diff --git a/chat-irc/znc/libressl.patch b/chat-irc/znc/libressl.patch
new file mode 100644
index 0000000..0f99107
--- /dev/null
+++ b/chat-irc/znc/libressl.patch
@@ -0,0 +1,63 @@
+From dcb5f3df82fcfec48aab356252067dc897fb98cf Mon Sep 17 00:00:00 2001
+From: Alexey Sokolov <alexey+znc AT asokolov.org>
+Date: Sun, 14 Nov 2021 00:45:01 +0000
+Subject: [PATCH] Fix build with libressl
+
+It got another feature of openssl implemented, which broke this
+---
+ CMakeLists.txt | 14 ++++++++++++++
+ include/znc/zncconfig.h.cmake.in | 1 +
+ modules/schat.cpp | 3 +--
+ 3 files changed, 16 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0913ff2691..1f77f5632b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -82,6 +82,20 @@ endmacro()
+ tristate_option(OPENSSL "Support SSL")
+ if(WANT_OPENSSL)
+ find_package(OpenSSL ${TRISTATE_OPENSSL_REQUIRED})
++
++ if(OPENSSL_FOUND)
++ # SSL_SESSION was made opaque in OpenSSL 1.1.0;
++ # LibreSSL gained that function later too.
++ # TODO: maybe remove this check at some point, and stop
supporting old
++ # libssl versions
++ function(check_SSL_SESSION_get0_cipher)
++ set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES})
++ set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
++ check_cxx_symbol_exists(SSL_SESSION_get0_cipher
openssl/ssl.h
++ HAVE_SSL_SESSION_get0_cipher)
++ endfunction()
++ check_SSL_SESSION_get0_cipher()
++ endif()
+ endif()
+ set(HAVE_LIBSSL "${OPENSSL_FOUND}")
+
+diff --git a/include/znc/zncconfig.h.cmake.in
b/include/znc/zncconfig.h.cmake.in
+index 5426b828af..7b07b99aec 100644
+--- a/include/znc/zncconfig.h.cmake.in
++++ b/include/znc/zncconfig.h.cmake.in
+@@ -31,6 +31,7 @@
+ #define HAVE_PTHREAD 1
+ #cmakedefine HAVE_THREADED_DNS 1
+ #cmakedefine HAVE_LIBSSL 1
++#cmakedefine HAVE_SSL_SESSION_get0_cipher 1
+ #cmakedefine HAVE_IPV6 1
+ #cmakedefine HAVE_ZLIB 1
+ #cmakedefine HAVE_I18N 1
+diff --git a/modules/schat.cpp b/modules/schat.cpp
+index aa7a338dcd..66e67e695c 100644
+--- a/modules/schat.cpp
++++ b/modules/schat.cpp
+@@ -25,8 +25,7 @@
+ #include <znc/User.h>
+ #include <znc/IRCNetwork.h>
+
+-#if !defined(OPENSSL_VERSION_NUMBER) || defined(LIBRESSL_VERSION_NUMBER) ||
\
+- OPENSSL_VERSION_NUMBER < 0x10100007
++#ifndef HAVE_SSL_SESSION_get0_cipher
+ /* SSL_SESSION was made opaque in OpenSSL 1.1.0, cipher accessor was added 2
+ weeks before the public release.
+ See openssl/openssl@e92813234318635639dba0168c7ef5568757449b. */


  • [[SM-Commit] ] GIT changes to master grimoire by Vlad Glagolev (30b0b7d034b2367c88050358d0cebfb8173462fb), Vlad Glagolev, 05/02/2024

Archive powered by MHonArc 2.6.24.

Top of Page