Index | Thread | Search

From:
Kirill A. Korinsky <kirill@openbsd.org>
Subject:
Re: net/tdesktop: remove libfido2 patches
To:
Nazarenko Mykyta <mn@superpc.suicide.solutions>
Cc:
ports@openbsd.org, kn@openbsd.org
Date:
Wed, 09 Sep 2026 00:47:27 +0200

Download raw body.

Thread
On Wed, 09 Sep 2026 00:21:58 +0200,
Nazarenko Mykyta <mn@superpc.suicide.solutions> wrote:
> 
> [1  <text/plain; US-ASCII (7bit)>]
> Hola ports@, kn@, kirill@!
> 
> I think we need to remove the patches for libfido2 because it has been
> updated in the base system, and there is now a correct pkgconfig for it.
>

It builds with new libfido2.pc as:

~ $ ldd /usr/local/bin/Telegram  | grep fido
        0000063811a2f000 0000063811a63000 rlib  0    1   0      /usr/lib/libfido2.so.9.0
~ $

don't use fido in telegram, can't test more but it reads OK

> With best regards,
> Nazarenko Mykyta
> [2 tdesktop_rfido2.diff <text/x-patch (7bit)>]
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/net/tdesktop/Makefile,v
> diff -u -p -u -r1.229 Makefile
> --- Makefile	3 Sep 2026 20:00:19 -0000	1.229
> +++ Makefile	8 Sep 2026 22:16:05 -0000
> @@ -6,7 +6,7 @@ NOT_FOR_ARCHS =		${BE_ARCHS} i386
>  COMMENT =		Telegram Desktop messenger
>  PORTROACH =		limit:-full$$
>  V =			7.1.3
> -REVISION =		0
> +REVISION =		1
>  DISTNAME =		tdesktop-${V}-full
>  PKGNAME =		${DISTNAME:-full=}
>  CATEGORIES =		net
> Index: patches/patch-Telegram_SourceFiles_webauthn_webauthn_common_cpp
> ===================================================================
> RCS file: patches/patch-Telegram_SourceFiles_webauthn_webauthn_common_cpp
> diff -N patches/patch-Telegram_SourceFiles_webauthn_webauthn_common_cpp
> --- patches/patch-Telegram_SourceFiles_webauthn_webauthn_common_cpp	29 Aug 2026 13:02:17 -0000	1.1
> +++ /dev/null	1 Jan 1970 00:00:00 -0000
> @@ -1,17 +0,0 @@
> -Replace `raw_ptr` and `raw_len` with `_ptr` and `_len` to ensure
> -compatibility with old libfido2 in base.
> -
> -Index: Telegram/SourceFiles/webauthn/webauthn_common.cpp
> ---- Telegram/SourceFiles/webauthn/webauthn_common.cpp.orig
> -+++ Telegram/SourceFiles/webauthn/webauthn_common.cpp
> -@@ -353,8 +353,8 @@ void CloseBox(const std::shared_ptr<State> &state) {
> - 				fido_assert_id_len(assert, 0));
> - 			out.authenticatorData = QByteArray(
> - 				reinterpret_cast<const char*>(
> --					fido_assert_authdata_raw_ptr(assert, 0)),
> --				fido_assert_authdata_raw_len(assert, 0));
> -+					fido_assert_authdata_ptr(assert, 0)),
> -+				fido_assert_authdata_len(assert, 0));
> - 			out.signature = QByteArray(
> - 				reinterpret_cast<const char*>(fido_assert_sig_ptr(assert, 0)),
> - 				fido_assert_sig_len(assert, 0));
> Index: patches/patch-Telegram_cmake_lib_fido2_cmake
> ===================================================================
> RCS file: patches/patch-Telegram_cmake_lib_fido2_cmake
> diff -N patches/patch-Telegram_cmake_lib_fido2_cmake
> --- patches/patch-Telegram_cmake_lib_fido2_cmake	29 Aug 2026 13:02:17 -0000	1.1
> +++ /dev/null	1 Jan 1970 00:00:00 -0000
> @@ -1,19 +0,0 @@
> -Fix libfido2 detection on OpenBSD
> -
> -Index: Telegram/cmake/lib_fido2.cmake
> ---- Telegram/cmake/lib_fido2.cmake.orig
> -+++ Telegram/cmake/lib_fido2.cmake
> -@@ -9,6 +9,13 @@
> - # On Windows it serves only systems without webauthn.dll (Win7/8/8.1,
> - # Win10 < 1903); winhello.c is left out.
> - 
> -+if (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
> -+   add_library(lib_fido2 INTERFACE)
> -+   add_library(tdesktop::lib_fido2 ALIAS lib_fido2)
> -+   target_link_libraries(lib_fido2 INTERFACE fido2)
> -+   return()
> -+endif()
> -+
> - if (DESKTOP_APP_USE_PACKAGED)
> -     find_package(PkgConfig)
> -     if (PkgConfig_FOUND)

-- 
wbr, Kirill