[packages/irssi] Rel 6; various patches from distros/upstream

arekm arekm at pld-linux.org
Tue Aug 18 00:10:16 CEST 2026


commit 58d7b16e13a5575c07d186fe9b517ac5b10baf32
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Aug 18 00:10:09 2026 +0200

    Rel 6; various patches from distros/upstream

 chatnet-slash-unix-socket.patch | 33 ++++++++++++++
 gethostbyname-eai-noname.patch  | 26 +++++++++++
 glib-log-domains-level.patch    | 72 ++++++++++++++++++++++++++++++
 glib-log-no-debug.patch         | 18 ++++++++
 irssi.spec                      | 16 ++++++-
 openssl3-deprecated-ec.patch    | 99 +++++++++++++++++++++++++++++++++++++++++
 sasl-multiple-cap-ack.patch     | 29 ++++++++++++
 tls-verify-proxy-hostname.patch | 22 +++++++++
 8 files changed, 314 insertions(+), 1 deletion(-)
---
diff --git a/irssi.spec b/irssi.spec
index a61ef2e..9071e80 100644
--- a/irssi.spec
+++ b/irssi.spec
@@ -17,7 +17,7 @@ Summary(hu.UTF-8):	Irssi egy IRC kliens
 Summary(pl.UTF-8):	Irssi - wygodny w użyciu klient IRC
 Name:		irssi
 Version:	1.4.5
-Release:	5
+Release:	6
 License:	GPL
 Group:		Applications/Communications
 Source0:	https://github.com/irssi/irssi/releases/download/%{version}/%{name}-%{version}.tar.gz
@@ -42,6 +42,13 @@ Patch8:		am.patch
 Patch9:		%{name}-idea-glib.patch
 Patch10:	%{name}-xmpp.patch
 Patch11:	types.patch
+Patch12:	glib-log-domains-level.patch
+Patch13:	glib-log-no-debug.patch
+Patch14:	sasl-multiple-cap-ack.patch
+Patch15:	openssl3-deprecated-ec.patch
+Patch16:	chatnet-slash-unix-socket.patch
+Patch17:	gethostbyname-eai-noname.patch
+Patch18:	tls-verify-proxy-hostname.patch
 URL:		http://www.irssi.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -142,6 +149,13 @@ cd ..
 %patch -P9 -p0
 %patch -P10 -p0
 %patch -P11 -p1
+%patch -P12 -p1
+%patch -P13 -p1
+%patch -P14 -p1
+%patch -P15 -p1
+%patch -P16 -p1
+%patch -P17 -p1
+%patch -P18 -p1
 
 # hack
 %{__sed} -i -e 's#\./libtool#%{_bindir}/libtool#g' 'configure.ac'
diff --git a/chatnet-slash-unix-socket.patch b/chatnet-slash-unix-socket.patch
new file mode 100644
index 0000000..7fa33b9
--- /dev/null
+++ b/chatnet-slash-unix-socket.patch
@@ -0,0 +1,33 @@
+From e295caa86691fe1172b5a9048da511655fb9e03e Mon Sep 17 00:00:00 2001
+From: Andrej Kacian <andrej at kacian.sk>
+Date: Mon, 1 Apr 2024 01:44:08 +0200
+Subject: [PATCH] Fix github issue #1504 - irssi switches to af_unix if network
+ name contains /
+
+In addition to looking for a /, we also check if the network name is
+known.
+---
+ src/core/chat-commands.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c
+index faeec4519..10da0d2c0 100644
+--- a/src/core/chat-commands.c
++++ b/src/core/chat-commands.c
+@@ -30,6 +30,7 @@
+ #include <irssi/src/core/servers-setup.h>
+ #include <irssi/src/core/servers-reconnect.h>
+ #include <irssi/src/core/channels.h>
++#include <irssi/src/core/chatnets.h>
+ #include <irssi/src/core/queries.h>
+ #include <irssi/src/core/window-item-def.h>
+ #include <irssi/src/core/rawlog.h>
+@@ -91,7 +92,7 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
+ 		return NULL;
+ 	}
+ 
+-	if (strchr(addr, '/') != NULL)
++	if (strchr(addr, '/') != NULL && chatnet_find(addr) == NULL)
+ 		conn->unix_socket = TRUE;
+ 
+ 	/* TLS options are handled in server_create_conn_opt ... -> server_setup_fill_optlist */
diff --git a/gethostbyname-eai-noname.patch b/gethostbyname-eai-noname.patch
new file mode 100644
index 0000000..562889e
--- /dev/null
+++ b/gethostbyname-eai-noname.patch
@@ -0,0 +1,26 @@
+From f24d859c801b58068eb1121157f637f28f16249c Mon Sep 17 00:00:00 2001
+From: Jonas 'Sortie' Termansen <sortie at maxsi.org>
+Date: Fri, 1 Nov 2024 22:23:46 +0100
+Subject: [PATCH] Fix using HOST_NOT_FOUND instead of EAI_NONAME.
+
+HOST_NOT_FOUND is a gethostbyname(3) error condition rather than a
+getaddrinfo(3) error condition and cannot be passed to net_gethosterror
+as documented as it calls gai_strerror(3). EAI_NONAME is the appropriate
+similar error condition as standardized by POSIX for getaddrinfo(3).
+---
+ src/core/network.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/network.c b/src/core/network.c
+index 85fe98963..01ce00b54 100644
+--- a/src/core/network.c
++++ b/src/core/network.c
+@@ -430,7 +430,7 @@ int net_gethostbyname(const char *addr, IPADDR *ip4, IPADDR *ip6)
+ 	}
+ 
+ 	if (count_v4 == 0 && count_v6 == 0)
+-		return HOST_NOT_FOUND; /* shouldn't happen? */
++		return EAI_NONAME; /* shouldn't happen? */
+ 
+ 	/* if there are multiple addresses, return random one */
+ 	use_v4 = count_v4 <= 1 ? 0 : rand() % count_v4;
diff --git a/glib-log-domains-level.patch b/glib-log-domains-level.patch
new file mode 100644
index 0000000..afb9667
--- /dev/null
+++ b/glib-log-domains-level.patch
@@ -0,0 +1,72 @@
+Backport of upstream commit 51f2a4f7f: make glib_log_domains accept a
+"domain:level" syntax so single log levels can be filtered instead of
+whole domains. Drop when irssi 1.5 is released.
+
+https://github.com/irssi/irssi/commit/51f2a4f7f
+
+--- irssi-1.4.5/src/fe-common/core/fe-common-core.c.orig
++++ irssi-1.4.5/src/fe-common/core/fe-common-core.c
+@@ -166,7 +166,7 @@
+ 	settings_add_bool("lookandfeel", "use_msgs_window", FALSE);
+ 	g_get_charset(&str);
+ 	settings_add_str("lookandfeel", "term_charset", str);
+-	settings_add_str("lookandfeel", "glib_log_domains", "all");
++	settings_add_str("lookandfeel", "glib_log_domains", "all -glib-gio:debug");
+ 	themes_init();
+         theme_register(fecommon_core_formats);
+ 
+@@ -258,13 +258,19 @@
+ 	g_log_set_default_handler(logger_old, NULL);
+ }
+ 
+-static gboolean glib_domain_wanted(const char *domain)
++static gboolean glib_domain_wanted(const char *domain, const char *level)
+ {
+ 	const char *domains;
+ 	char *c, *cur;
+ 	int len = 0;
+ 	int print_it = 0; /* -1 for exclude, 0 for undecided, 1 for include */
+ 	int incl;
++	char *domainlevel, *alllevel, *starlevel, *domainstar;
++
++	domainlevel = g_strdup_printf("%s:%s", domain, level);
++	alllevel = g_strdup_printf("all:%s", level);
++	starlevel = g_strdup_printf("*:%s", level);
++	domainstar = g_strdup_printf("%s:*", domain);
+ 
+ 	/* Go through each item in glib_log_domains setting to determine whether
+ 	 * or not we want to print message from this domain */
+@@ -287,8 +293,10 @@
+ 		}
+ 
+ 		/* If we got a valid item, process it */
+-		if (len > 0 && (!strncmp(domain, c, len) || !strncasecmp("all", c, len) ||
+-		                !strncmp("*", c, len)))
++		if (len > 0 && (!strncasecmp(domain, c, len) || !strncasecmp("all", c, len) ||
++		                !strncmp("*", c, len) || !strncasecmp(domainstar, c, len) ||
++		                !strncasecmp(domainlevel, c, len) ||
++		                !strncasecmp(alllevel, c, len) || !strncasecmp(starlevel, c, len)))
+ 			print_it = incl;
+ 
+ 		/* Go past any spaces towards the next item */
+@@ -300,6 +308,11 @@
+ 		len = 0;
+ 	} while (*c != '\0' && print_it != -1);
+ 
++	g_free(domainlevel);
++	g_free(alllevel);
++	g_free(starlevel);
++	g_free(domainstar);
++
+ 	return (print_it == 1);
+ }
+ 
+@@ -333,7 +346,7 @@
+ 	domain = (log_domain ? log_domain : "default");
+ 
+ 	/* Only print the message if we decided to */
+-	if (!glib_domain_wanted(domain))
++	if (!glib_domain_wanted(domain, reason))
+ 		return;
+ 
+ 	if (windows == NULL)
diff --git a/glib-log-no-debug.patch b/glib-log-no-debug.patch
new file mode 100644
index 0000000..26a3520
--- /dev/null
+++ b/glib-log-no-debug.patch
@@ -0,0 +1,18 @@
+GLib logs at debug level things that are none of the user's business,
+e.g. "pidfd_open(1234) failed with error: Function not implemented" once
+per forked child on kernels without pidfd, right after it has already
+fallen back to SIGCHLD. irssi replaces GLib's default log handler, which
+would have dropped debug/info unless G_MESSAGES_DEBUG asked for them, so
+that noise ends up in the window. irssi itself never calls g_debug().
+
+--- irssi-1.4.5/src/fe-common/core/fe-common-core.c.orig
++++ irssi-1.4.5/src/fe-common/core/fe-common-core.c
+@@ -166,7 +166,7 @@
+ 	settings_add_bool("lookandfeel", "use_msgs_window", FALSE);
+ 	g_get_charset(&str);
+ 	settings_add_str("lookandfeel", "term_charset", str);
+-	settings_add_str("lookandfeel", "glib_log_domains", "all -glib-gio:debug");
++	settings_add_str("lookandfeel", "glib_log_domains", "all -*:debug");
+ 	themes_init();
+         theme_register(fecommon_core_formats);
+ 
diff --git a/openssl3-deprecated-ec.patch b/openssl3-deprecated-ec.patch
new file mode 100644
index 0000000..94924ce
--- /dev/null
+++ b/openssl3-deprecated-ec.patch
@@ -0,0 +1,99 @@
+From 455dcb18ecfa125469bf913655c5a9c1b31a7dd5 Mon Sep 17 00:00:00 2001
+From: Ailin Nemui <ailin at d5421s.localdomain>
+Date: Mon, 1 Apr 2024 22:03:33 +0200
+Subject: [PATCH] deprecated openssl3 function
+
+---
+ src/core/network-openssl.c | 62 +++++++++++++++++++++-----------------
+ 1 file changed, 34 insertions(+), 28 deletions(-)
+
+diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c
+index 9956f217a..5104e7dd9 100644
+--- a/src/core/network-openssl.c
++++ b/src/core/network-openssl.c
+@@ -28,6 +28,7 @@
+ #include <irssi/src/core/tls.h>
+ 
+ #include <openssl/crypto.h>
++#include <openssl/objects.h>
+ #include <openssl/x509.h>
+ #include <openssl/x509v3.h>
+ #include <openssl/pem.h>
+@@ -751,44 +752,49 @@ static void set_server_temporary_key_info(TLS_REC *tls, SSL *ssl)
+ #ifdef SSL_get_server_tmp_key
+ 	/* Show ephemeral key information. */
+ 	EVP_PKEY *ephemeral_key = NULL;
+-
+-	/* OPENSSL_NO_EC is for solaris 11.3 (2016), github ticket #598 */
+-#ifndef OPENSSL_NO_EC
+-	EC_KEY *ec_key = NULL;
+-#endif
+ 	char *ephemeral_key_algorithm = NULL;
+-	char *cname = NULL;
+-	int nid;
+ 
+ 	g_return_if_fail(tls != NULL);
+ 	g_return_if_fail(ssl != NULL);
+ 
+ 	if (SSL_get_server_tmp_key(ssl, &ephemeral_key)) {
+-		switch (EVP_PKEY_id(ephemeral_key)) {
+-			case EVP_PKEY_DH:
+-				tls_rec_set_ephemeral_key_algorithm(tls, "DH");
+-				tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
+-				break;
++		int keytype = EVP_PKEY_id(ephemeral_key);
++		switch (keytype) {
++		case EVP_PKEY_DH:
++			tls_rec_set_ephemeral_key_algorithm(tls, "DH");
++			tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
++			break;
+ 
++			/* OPENSSL_NO_EC is for solaris 11.3 (2016), github ticket #598 */
+ #ifndef OPENSSL_NO_EC
+-			case EVP_PKEY_EC:
+-				ec_key = EVP_PKEY_get1_EC_KEY(ephemeral_key);
+-				nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec_key));
+-				EC_KEY_free(ec_key);
+-				cname = (char *)OBJ_nid2sn(nid);
+-				ephemeral_key_algorithm = g_strdup_printf("ECDH: %s", cname);
+-
+-				tls_rec_set_ephemeral_key_algorithm(tls, ephemeral_key_algorithm);
+-				tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
+-
+-				g_free_and_null(ephemeral_key_algorithm);
+-				break;
++		case EVP_PKEY_EC: {
++#if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
++			char cname[50];
++			EVP_PKEY_get_group_name(ephemeral_key, cname, sizeof(cname), NULL);
++#else
++			EC_KEY *ec_key = NULL;
++			char *cname = NULL;
++			int nid;
++
++			ec_key = EVP_PKEY_get1_EC_KEY(ephemeral_key);
++			nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(ec_key));
++			EC_KEY_free(ec_key);
++			cname = (char *) OBJ_nid2sn(nid);
+ #endif
++			ephemeral_key_algorithm = g_strdup_printf("ECDH: %s", cname);
+ 
+-			default:
+-				tls_rec_set_ephemeral_key_algorithm(tls, "Unknown");
+-				tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
+-				break;
++			tls_rec_set_ephemeral_key_algorithm(tls, ephemeral_key_algorithm);
++			tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
++
++			g_free_and_null(ephemeral_key_algorithm);
++			break;
++		}
++#endif
++
++		default:
++			tls_rec_set_ephemeral_key_algorithm(tls, OBJ_nid2ln(keytype));
++			tls_rec_set_ephemeral_key_size(tls, EVP_PKEY_bits(ephemeral_key));
++			break;
+ 		}
+ 
+ 		EVP_PKEY_free(ephemeral_key);
diff --git a/sasl-multiple-cap-ack.patch b/sasl-multiple-cap-ack.patch
new file mode 100644
index 0000000..85921aa
--- /dev/null
+++ b/sasl-multiple-cap-ack.patch
@@ -0,0 +1,29 @@
+From 49d7302e986dc41724f6ee9dfba97d950d3ce555 Mon Sep 17 00:00:00 2001
+From: steering7253 <steering7253 at proton.me>
+Date: Mon, 7 Apr 2025 13:53:39 -0600
+Subject: [PATCH] fix irssi SASL negotiation with multiple CAP ACK
+
+when attempting SASL, if multiple CAP ACK were received (for example,
+because a script sent an additional CAP REQ), then any not containing
+`sasl` would cause SASL to fail (immediately aborting the connection
+with no message, depending on sasl_disconnect_on_failure setting)
+
+check not only if SASL is set in this line, but also if we've already
+seen it in a previous line.
+---
+ src/irc/core/irc-cap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/irc/core/irc-cap.c b/src/irc/core/irc-cap.c
+index ce7e16165..2c2df7f9b 100644
+--- a/src/irc/core/irc-cap.c
++++ b/src/irc/core/irc-cap.c
+@@ -234,7 +234,7 @@ static void event_cap (IRC_SERVER_REC *server, char *args, char *nick, char *add
+ 		}
+ 	}
+ 	else if (!g_ascii_strcasecmp(evt, "ACK")) {
+-		int got_sasl = FALSE;
++		int got_sasl = (i_slist_find_string(server->cap_active, "sasl") != NULL);
+ 
+ 		/* Emit a signal for every ack'd cap */
+ 		for (i = 0; i < caps_length; i++) {
diff --git a/tls-verify-proxy-hostname.patch b/tls-verify-proxy-hostname.patch
new file mode 100644
index 0000000..5181d8a
--- /dev/null
+++ b/tls-verify-proxy-hostname.patch
@@ -0,0 +1,22 @@
+Description: fix SSL CN check for proxy setup
+Origin: Ubuntu, https://bugs.launchpad.net/ubuntu/+source/irssi/+bug/565182
+Author: Steve Langasek
+
+With use_proxy the TLS handshake runs right after the TCP connect to the
+proxy, and proxy_string ("CONNECT %s %d") is only sent inside the finished
+encrypted stream, so the TLS peer is the proxy - but irssi verifies the
+certificate against the target server name. Upstream master still does this.
+SNI (SSL_set_tlsext_host_name) is left on the target name by this patch.
+
+--- a/src/core/network-openssl.c
++++ b/src/core/network-openssl.c
+@@ -236,6 +236,9 @@
+ {
+ 	long result;
+ 
++	if (server->connrec->proxy != NULL)
++		hostname = server->connrec->proxy;
++
+ 	result = SSL_get_verify_result(ssl);
+ 	if (result != X509_V_OK) {
+ 		g_warning("Could not verify TLS servers certificate: %s", X509_verify_cert_error_string(result));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/irssi.git/commitdiff/58d7b16e13a5575c07d186fe9b517ac5b10baf32



More information about the pld-cvs-commit mailing list