From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id uCXQKe017mSS9gAA9RJhRA:P1 (envelope-from ) for ; Tue, 29 Aug 2023 20:16:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id uCXQKe017mSS9gAA9RJhRA (envelope-from ) for ; Tue, 29 Aug 2023 20:16:13 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6CCB35EAD3 for ; Tue, 29 Aug 2023 20:16:13 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=E5XeoH+h; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693332973; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=BmQQuf4IqRtjJBaAkPxu4XmVkUEGcumFzSzzwavhmP8=; b=Is5irfZe6St/+2zdiKWLWjBOAGCxq/XTNATO5p71t1G1X+tdkdDKG3RLEH8BI27SLh8b7r sgPd6/NZ1MrtTWF7O3JADJfkFZ28Zs3vouYSnRCXcZfK84z3AOYCNf6wXWe7p9TGB38VW7 IxkRqRpcV9LINB9C2yjOSSZQxJvIUsm95LxmBQiVtTyBHkciXRFQpDe5MKCFvmiHHpxO2i neoAtxnWclLhAK7nrXoU/awTKghuUGLEUtk3JPdDnTUBkxiEPhOPVTu2sVgSsRMV1xuRoY bukAHfqRtCZItJnOmz3jp0q8JMUyCzfaUKU5jdlvtgw9rRyocJjRH80DywvLYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693332973; a=rsa-sha256; cv=none; b=JUBs2bo1wGKOljRNgqGKIk+P8vIhVCystvflFWQmsBwjZJqyeZ01TG0lIrHWOd10KfmHPR NzEmng6fM/WSqKd3YQaZ6B8AEUjiWd4plDU/pE3qiSbFrZI/7zR8SM+B5BWJuH3aQb+jnw W9MRfMvFzgUs8jNv/wwdyADNhsehuh4wD0NXk9wFcKjwAzFzonx4mdLrMWH8NU4EGj74H6 pCA2NlvDrHd4bRPQB6WT6/GYtRYGvJlqsnAZn4WIY1dCpj438AdT4YU7o/v5LvTXlQ4QY9 vZbOSGTKbS4BzAPMLeJdJc8FMAlSUPWMofB1/xVjll0Tq62CoBkR3jJB+TsnCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=E5XeoH+h; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qb3Fs-0001Uz-Kb; Tue, 29 Aug 2023 14:15:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qb3Fr-0001Up-Cy for guix-patches@gnu.org; Tue, 29 Aug 2023 14:15:55 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qb3Fr-00035S-4x for guix-patches@gnu.org; Tue, 29 Aug 2023 14:15:55 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qb3Fx-000176-SV for guix-patches@gnu.org; Tue, 29 Aug 2023 14:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64748] [PATCH v7 2/2] gnu: webrtc-for-telegram-desktop: Update to 0-389.0532942. Resent-From: Distopico Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Aug 2023 18:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64748 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Hilton Chain Cc: 64748@debbugs.gnu.org Received: via spool by 64748-submit@debbugs.gnu.org id=B64748.16933329234233 (code B ref 64748); Tue, 29 Aug 2023 18:16:01 +0000 Received: (at 64748) by debbugs.gnu.org; 29 Aug 2023 18:15:23 +0000 Received: from localhost ([127.0.0.1]:51521 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb3FK-00016D-EM for submit@debbugs.gnu.org; Tue, 29 Aug 2023 14:15:23 -0400 Received: from mx1.riseup.net ([198.252.153.129]:59176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qb3FG-00015v-KT for 64748@debbugs.gnu.org; Tue, 29 Aug 2023 14:15:21 -0400 Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4RZwZ61yVwzDqPg; Tue, 29 Aug 2023 18:14:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1693332905; bh=3m1eaZ9srbmyVvasd430T/6NxDCPge6Gbf/Nez9tCq0=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=E5XeoH+h3YVTd1eZm+akWdYbS40CfFGCa5CM/0y8E6UjAqKZi7k4CVUgVVqx9wsJs 5GmeA82bfMdwXXebDjYc6lTgjZiiduI3ZYNl1yZvqkLOIeHPQ1dkvorvmBm37PKDeB tT/HAfHCiKYU31uVIRZpFgiuQ5lbc8cCEVJOI+eI= X-Riseup-User-ID: 329583D67383A666DED733C04BA642F692A013E8677B72D7D0588EAB5C222239 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4RZwYh3ngCzFqjF; Tue, 29 Aug 2023 18:14:32 +0000 (UTC) References: <243d068053e6678cd4c89f2b2d9314b28473dbea.1693234399.git.hako@ultrarare.space> From: Distopico Date: Tue, 29 Aug 2023 13:13:52 -0500 In-reply-to: <243d068053e6678cd4c89f2b2d9314b28473dbea.1693234399.git.hako@ultrarare.space> Message-ID: <87msy990my.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 3.58 X-Spam-Score: 3.58 X-Migadu-Queue-Id: 6CCB35EAD3 X-Migadu-Scanner: mx2.migadu.com X-TUID: MbLq5mAEOAb0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Build and the call works fine from my side On 2023-08-28, Hilton Chain wrote: > From: Distopico > > * gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patch= : New > file. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/telegram.scm (webrtc-for-telegram-desktop): Update to > 0-389.0532942, which fixes `telegram-desktop` calls that are not working = with > OpenSSL 3. > [source]: Add the patch. > : Unbundle libsrtp. > [inputs]: Add libsrtp. > > Signed-off-by: Hilton Chain > --- > gnu/local.mk | 1 + > ...or-telegram-desktop-unbundle-libsrtp.patch | 137 ++++++++++++++++++ > gnu/packages/telegram.scm | 16 +- > 3 files changed, 149 insertions(+), 5 deletions(-) > create mode 100644 gnu/packages/patches/webrtc-for-telegram-desktop-unbu= ndle-libsrtp.patch > > diff --git a/gnu/local.mk b/gnu/local.mk > index 48187d7e64..5ab021eaed 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -2093,6 +2093,7 @@ dist_patch_DATA =3D \ > %D%/packages/patches/wdl-link-libs-and-fix-jnetlib.patch \ > %D%/packages/patches/webkitgtk-adjust-bubblewrap-paths.patch \ > %D%/packages/patches/webrtc-audio-processing-big-endian.patch \ > + %D%/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.patc= h \ > %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch \ > %D%/packages/patches/wmctrl-64-fix.patch \ > %D%/packages/patches/wmfire-update-for-new-gdk-versions.patch \ > diff --git a/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-li= bsrtp.patch b/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-lib= srtp.patch > new file mode 100644 > index 0000000000..486f0b1aa5 > --- /dev/null > +++ b/gnu/packages/patches/webrtc-for-telegram-desktop-unbundle-libsrtp.p= atch > @@ -0,0 +1,137 @@ > +From 62672f3756ecf218252098211d78c13369ab6d28 Mon Sep 17 00:00:00 2001 > +From: Nicholas Guriev > +Date: Thu, 4 May 2023 16:21:09 +0300 > +Subject: [PATCH] Unbundle libSRTP > + > +Avoid private symbols and link against system-wide libSRTP. The excluded= code > +in SrtpSession looks unreachable from the call integration in Telegram D= esktop. > +--- > + CMakeLists.txt | 3 +++ > + cmake/libsrtp.cmake | 13 +++++++++++++ > + src/pc/external_hmac.cc | 1 - > + src/pc/external_hmac.h | 9 ++++++--- > + src/pc/srtp_session.cc | 16 ++++++++++++++-- > + 5 files changed, 36 insertions(+), 6 deletions(-) > + > +diff --git a/CMakeLists.txt b/CMakeLists.txt > +index af7d24c21..66bec8fdf 100644 > +--- a/CMakeLists.txt > ++++ b/CMakeLists.txt > +@@ -2647,6 +2647,9 @@ if (TG_OWT_USE_PROTOBUF) > + list(APPEND export_targets proto) > + endif() > + > ++if (LIBSRTP_FOUND) > ++ target_compile_definitions(tg_owt PRIVATE HAVE_LIBSRTP) > ++endif() > + if (NOT absl_FOUND) > + list(APPEND export_targets libabsl) > + endif() > +diff --git a/cmake/libsrtp.cmake b/cmake/libsrtp.cmake > +index 5124312d2..01f051606 100644 > +--- a/cmake/libsrtp.cmake > ++++ b/cmake/libsrtp.cmake > +@@ -1,3 +1,16 @@ > ++find_package(PkgConfig REQUIRED) > ++pkg_check_modules(LIBSRTP libsrtp2) > ++ > ++if (LIBSRTP_FOUND) > ++ add_library(libsrtp INTERFACE EXCLUDE_FROM_ALL) > ++ add_library(tg_owt::libsrtp ALIAS libsrtp) > ++ > ++ target_include_directories(libsrtp INTERFACE ${LIBSRTP_INCLUDE_DIRS= } ${LIBSRTP_CFLAGS_OTHER}) > ++ target_link_libraries(libsrtp INTERFACE ${LIBSRTP_LINK_LIBRARIES} $= {LIBSRTP_LDFLAGS_OTHER}) > ++ > ++ return() > ++endif() > ++ > + add_library(libsrtp OBJECT EXCLUDE_FROM_ALL) > + init_target(libsrtp) > + add_library(tg_owt::libsrtp ALIAS libsrtp) > +diff --git a/src/pc/external_hmac.cc b/src/pc/external_hmac.cc > +index 27b5d0e5a..222f5d9ae 100644 > +--- a/src/pc/external_hmac.cc > ++++ b/src/pc/external_hmac.cc > +@@ -15,7 +15,6 @@ > + > + #include "rtc_base/logging.h" > + #include "rtc_base/zero_memory.h" > +-#include "third_party/libsrtp/include/srtp.h" > + > + // Begin test case 0 */ > + static const uint8_t kExternalHmacTestCase0Key[20] =3D { > +diff --git a/src/pc/external_hmac.h b/src/pc/external_hmac.h > +index c5071fc19..8fdc2f1a7 100644 > +--- a/src/pc/external_hmac.h > ++++ b/src/pc/external_hmac.h > +@@ -30,9 +30,12 @@ > + > + #include > + > +-#include "third_party/libsrtp/crypto/include/crypto_types.h" > +-#include "third_party/libsrtp/include/srtp.h" > +-#include "third_party/libsrtp/include/srtp_priv.h" > ++#ifdef HAVE_LIBSRTP > ++# include > ++# include > ++#else > ++# include "srtp_priv.h" > ++#endif > + > + #define EXTERNAL_HMAC_SHA1 SRTP_HMAC_SHA1 + 1 > + #define HMAC_KEY_LENGTH 20 > +diff --git a/src/pc/srtp_session.cc b/src/pc/srtp_session.cc > +index 7d1aaf2d6..7b5a789b0 100644 > +--- a/src/pc/srtp_session.cc > ++++ b/src/pc/srtp_session.cc > +@@ -30,8 +30,12 @@ > + #include "rtc_base/thread_annotations.h" > + #include "rtc_base/time_utils.h" > + #include "system_wrappers/include/metrics.h" > +-#include "third_party/libsrtp/include/srtp.h" > +-#include "third_party/libsrtp/include/srtp_priv.h" > ++ > ++#ifdef HAVE_LIBSRTP > ++# include > ++#else > ++# include "srtp_priv.h" > ++#endif > + > + namespace cricket { > + > +@@ -290,6 +294,9 @@ bool SrtpSession::UnprotectRtcp(void* p, int in_len,= int* out_len) { > + bool SrtpSession::GetRtpAuthParams(uint8_t** key, int* key_len, int* ta= g_len) { > + RTC_DCHECK(thread_checker_.IsCurrent()); > + RTC_DCHECK(IsExternalAuthActive()); > ++#ifdef HAVE_LIBSRTP > ++ return false; > ++#else > + if (!IsExternalAuthActive()) { > + return false; > + } > +@@ -313,6 +320,7 @@ bool SrtpSession::GetRtpAuthParams(uint8_t** key, in= t* key_len, int* tag_len) { > + *key_len =3D external_hmac->key_length; > + *tag_len =3D rtp_auth_tag_len_; > + return true; > ++#endif > + } > + > + int SrtpSession::GetSrtpOverhead() const { > +@@ -336,6 +344,9 @@ bool SrtpSession::GetSendStreamPacketIndex(void* p, > + int in_len, > + int64_t* index) { > + RTC_DCHECK(thread_checker_.IsCurrent()); > ++#ifdef HAVE_LIBSRTP > ++ return false; > ++#else > + srtp_hdr_t* hdr =3D reinterpret_cast(p); > + srtp_stream_ctx_t* stream =3D srtp_get_stream(session_, hdr->ssrc); > + if (!stream) { > +@@ -346,6 +357,7 @@ bool SrtpSession::GetSendStreamPacketIndex(void* p, > + *index =3D static_cast(rtc::NetworkToHost64( > + srtp_rdbx_get_packet_index(&stream->rtp_rdbx) << 16)); > + return true; > ++#endif > + } > + > + bool SrtpSession::DoSetKey(int type, > diff --git a/gnu/packages/telegram.scm b/gnu/packages/telegram.scm > index 88daea7d7d..4814c22b6c 100644 > --- a/gnu/packages/telegram.scm > +++ b/gnu/packages/telegram.scm > @@ -1,8 +1,9 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2021 Raghav Gururajan > -;;; Copyright =C2=A9 2022 Hilton Chain > +;;; Copyright =C2=A9 2022, 2023 Hilton Chain > ;;; Copyright =C2=A9 2023 Saku Laesvuori > ;;; Copyright =C2=A9 2023 Lu Hui > +;;; Copyright =C2=A9 2023 Camilo Q.S. (Distopico) > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -266,8 +267,8 @@ (define tgcalls-for-telegram-desktop > "193m2gkvipijqbfd6a8mhg9nd63wlnshzgspk3pip57vk21l709z")))) > > (define-public webrtc-for-telegram-desktop > - (let ((commit "5098730b9eb6173f0b52068fe2555b7c1015123a") > - (revision "328")) > + (let ((commit "0532942ac6176a66ef184fb728a4cbb02958fc0b") > + (revision "389")) > (hidden-package > (package > (name "webrtc-for-telegram-desktop") > @@ -283,14 +284,18 @@ (define-public webrtc-for-telegram-desktop > (file-name > (git-file-name name version)) > (sha256 > - (base32 "1lk54zlrff59rj5k9dylsgz4sdds4728psrk8m3v9qn5y8d6z8qy= ")) > + (base32 "0fary99yl1ddk5zjpfy0pyb5brd268j41plcnvv9qjyf0wj9hf2k= ")) > + (patches > + (search-patches > + ;; https://github.com/desktop-app/tg_owt/pull/123 > + "webrtc-for-telegram-desktop-unbundle-libsrtp.patch")) > (modules '((guix build utils) > (ice-9 ftw) > (srfi srfi-1))) > (snippet > #~(begin > (let ((keep > - '("libsrtp" "rnnoise" > + '("rnnoise" > ;; Not available in Guix. > "pffft"))) > (with-directory-excursion "src/third_party" > @@ -325,6 +330,7 @@ (define-public webrtc-for-telegram-desktop > libdrm > libglvnd > libjpeg-turbo > + libsrtp > libvpx > libxcomposite > libxdamage --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFJBAEBCAAzFiEEvYwofabWO6y953lVmAk6gHJUa/MFAmTuNYUVHGRpc3RvcGlj b0ByaXNldXAubmV0AAoJEJgJOoByVGvzwoIIAIIEWB/aAsLK4OylOmgF+kdPWutE dWWaa7OApM/kxUT6EiATpQ1BXWXPn8FWUCHuqJ/R19GXEQhHvBXeOi6PL3xBzCx0 Ehsc/J7xnb10vmUjMe2qDuF2zV142jyajXpylkvij/CE/vRntXqNbohYlQccIk0T CNDoRD44ug3mLzsv3+I7H74/HLR17XxwSPI1zVb42QpRH7c2ydXrDALO512LBCeE OVFp2mAoKdN7MTGZWQa7eMI9ACKMmzgcfTPwt5+qRp5u2sEdMCgbFHiAOpQ+SbfQ awxTrr5lKOYqKZ3jPMrdQAqAdf2AOxKG5o5dFUfjY8BTU8S+wViMS92hG9U= =UQ7p -----END PGP SIGNATURE----- --=-=-=--