From patchwork Wed Dec 8 09:27:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Tropin X-Patchwork-Id: 35015 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B03CC27BBE9; Wed, 8 Dec 2021 09:29:17 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5F89E27BBEA for ; Wed, 8 Dec 2021 09:29:16 +0000 (GMT) Received: from localhost ([::1]:56100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mutGF-0004tC-EM for patchwork@mira.cbaines.net; Wed, 08 Dec 2021 04:29:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mutG2-0004qg-QC for guix-patches@gnu.org; Wed, 08 Dec 2021 04:29:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:56248) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mutG2-0007Zh-IQ for guix-patches@gnu.org; Wed, 08 Dec 2021 04:29:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mutG2-0003Lp-GB for guix-patches@gnu.org; Wed, 08 Dec 2021 04:29:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52371] [PATCH 0/2] Update tdlib and emacs-telega. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Dec 2021 09:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52371 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52371@debbugs.gnu.org Cc: zevlg@yandex.ru X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163895569512818 (code B ref -1); Wed, 08 Dec 2021 09:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Dec 2021 09:28:15 +0000 Received: from localhost ([127.0.0.1]:39559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mutFD-0003Kd-VH for submit@debbugs.gnu.org; Wed, 08 Dec 2021 04:28:15 -0500 Received: from lists.gnu.org ([209.51.188.17]:56636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mutFC-0003KV-0r for submit@debbugs.gnu.org; Wed, 08 Dec 2021 04:28:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47232) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mutFA-00045d-00 for guix-patches@gnu.org; Wed, 08 Dec 2021 04:28:08 -0500 Received: from [2a00:1450:4864:20::232] (port=41812 helo=mail-lj1-x232.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mutF6-0007RW-SO for guix-patches@gnu.org; Wed, 08 Dec 2021 04:28:07 -0500 Received: by mail-lj1-x232.google.com with SMTP id bn20so2859419ljb.8 for ; Wed, 08 Dec 2021 01:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version; bh=f81FdLcyBsrNk0NRpYhWld3xCv9XUdw4ZoRSKkFW0KI=; b=39+N0MPW+Voy2AtcDEM1ilcw83zMxk5qMW4D4kBqlVV44p1oOCZp3cg+n0RbRqd0+N +Tqorp6bjajlkW8551arUdStaRdXFdzfkhpIBNs8/2JQWK7TOUflBcHF6tIQrddDAqoN GU6dTm0zqSPxISpIHS8CfVHEVrUCfTLr71IOdG/VYPKOgCNEccgYwgY3vAyVcTb46KCs PrNwRlV3eH+uWLjcnAwybzVlZ+hLlq+3DBIthuGsnCYObtray5V0isgezCv9nLTk6M5Y NdshKHKZEnCUhrRqMNVHmDsQNyustVIIbzAWPoctrHFuHvP4KlCu2e66InG9OjqhG93t Tfwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version; bh=f81FdLcyBsrNk0NRpYhWld3xCv9XUdw4ZoRSKkFW0KI=; b=IAAW0oDSQuF2Eq6QGjNKz8+ESG2a/CgK6X75zUbiqfySAINyX2mrD7r6FD3ZaDYxSU W68WaXPpU66HiO/ojIu8XySUBbOdHD2g2nPJL3ywkL4HRoRm3KgPW08CzPUBhyFvanAq O6xHWEoJj2v3Lj+4MmOUUOTj/msCxhunQkkNn9AAJFzZyvq1guUZ+I9oAcusw3S0Yjak vHiwCSU6OZC08nGhbswFRyjDCHalcCJrPe5mL8s8EHCU/My06viznB396wlMjfkRugNs uglq+mc/zEfxUo6ar0l9VMAlm8iA/nP8MxsJyS35UJoy9k7UFXUSEwKUz8uceDauAHpA tdFQ== X-Gm-Message-State: AOAM533ay8GE2Pk9abIfOKasXPF8ZUArJynUt5rGLWMfy7WryBYG6or3 bEdo518dF1iOZBXVcRX4DWbKGxqKMEpEcw== X-Google-Smtp-Source: ABdhPJz+wzbYLyNB1beWYZW/SyWyjaT6PLh4fQaOQNPYsyi4DDzi/l1J1GLVugr7BLlnSGPVlotpag== X-Received: by 2002:a2e:95d6:: with SMTP id y22mr48104404ljh.5.1638955678472; Wed, 08 Dec 2021 01:27:58 -0800 (PST) Received: from localhost (109-252-187-66.dynamic.spd-mgts.ru. [109.252.187.66]) by smtp.gmail.com with ESMTPSA id bp36sm229309lfb.0.2021.12.08.01.27.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Dec 2021 01:27:57 -0800 (PST) From: Andrew Tropin Date: Wed, 08 Dec 2021 12:27:53 +0300 Message-ID: <875yrzh2ee.fsf@trop.in> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::232 (failed) Received-SPF: none client-ip=2a00:1450:4864:20::232; envelope-from=andrew@trop.in; helo=mail-lj1-x232.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches tdlib version 1.7.0 is deprecated and doesn't work anymore, there is no 1.7.9 tag in upstream repo, but the version is present in source code. https://github.com/tdlib/td/blob/858078d89fcd2ad1d9860547e3f87c49d0f9abe9/CMakeLists.txt#L9 emacs-telega 0.7.031 is inteded for tdlib 1.7.0, but because this tdlib version doesn't work anymore, Evgeny (author of telega.el) suggest to use telega version from master branch. I used 0.7.15 tag (closest tag to the version in master branch I found) + revision + commit hash. Without those updates tdlib and all clients based on it doesn't work, it's quite unfortunate behavior from Telegram developers, IMHO of course, but it's necessary to update to non-tagged versions to get it work again. Andrew Tropin (2): gnu: tdlib: Update to 1.7.9-1.858078d. gnu: emacs-telega: Update to 0.7.15-1.acf2d99. gnu/packages/emacs-xyz.scm | 100 +++++++++--------- gnu/packages/messaging.scm | 80 +++++++------- .../emacs-telega-path-placeholder.patch | 49 ++++----- .../patches/emacs-telega-test-env.patch | 30 ++++-- 4 files changed, 134 insertions(+), 125 deletions(-) From 1e9d59573f7c6c76fb4f2e524d70a043b185a682 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 7 Dec 2021 16:05:22 +0300 Subject: [PATCH 2/2] gnu: emacs-telega: Update to 0.7.15-1.acf2d99. * gnu/packages/emacs-xyz.scm (emacs-telega-server): Update to 0.7.15-1.acf2d99. * gnu/packages/patches/emacs-telega-path-placeholder.patch: Match patch with newer source code. * gnu/packages/patches/emacs-telega-test-env.patch: Match patch with newer source code. --- gnu/packages/emacs-xyz.scm | 100 +++++++++--------- .../emacs-telega-path-placeholder.patch | 49 ++++----- .../patches/emacs-telega-test-env.patch | 30 ++++-- 3 files changed, 93 insertions(+), 86 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index e542da0c26..599790bc6e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -27144,55 +27144,57 @@ (define-public emacs-helm-switch-to-repl (license license:gpl3+))) (define-public emacs-telega-server - (package - (name "emacs-telega-server") - (version "0.7.031") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/zevlg/telega.el") - (commit (string-append "v" version)))) - (sha256 - (base32 "05j82796s4k3yr0igl6hir3p8qj0cw66vvhbpbcy28d6q9v9vjjz")) - (file-name (git-file-name "emacs-telega" version)) - (patches - (search-patches "emacs-telega-path-placeholder.patch" - "emacs-telega-test-env.patch")))) - (build-system gnu-build-system) - (arguments - `(#:make-flags - (list (string-append "CC=" ,(cc-for-target)) - (string-append "INSTALL_PREFIX=" - (assoc-ref %outputs "out") "/bin")) - #:phases - (modify-phases %standard-phases - (add-before 'configure 'enter-subdirectory - (lambda _ (chdir "server") #t)) - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (substitute* "run_tests.py" - (("^(TELEGA_SERVER = ).*$" _all prefix) - (string-append prefix - "\"" out "/bin/telega-server\"\n")))))) - (delete 'check) - (add-after 'install 'check - (assoc-ref %standard-phases 'check)) - (add-before 'install-license-files 'leave-subdirectory - (lambda _ (chdir "..") #t))) - #:test-target "test")) - (inputs - `(("tdlib" ,tdlib) - ("libappindicator" ,libappindicator))) - (native-inputs - `(("python" ,python) - ("pkg-config" ,pkg-config))) - (home-page "https://zevlg.github.io/telega.el/") - (synopsis "Server process of Telega") - (description "Telega-server is helper program to interact with Telegram + (let ((commit "acf2d99df25f15c104cd13d5bbdcb17078a353f9") + (revision "1")) + (package + (name "emacs-telega-server") + (version (git-version "0.7.15" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/zevlg/telega.el") + (commit commit))) + (sha256 + (base32 "1wxx77whwl5fw2fbq6k7082gqn6srvy8vckhdn0qd75xqm4axf93")) + (file-name (git-file-name "emacs-telega" version)) + (patches + (search-patches "emacs-telega-path-placeholder.patch" + "emacs-telega-test-env.patch")))) + (build-system gnu-build-system) + (arguments + `(#:make-flags + (list (string-append "CC=" ,(cc-for-target)) + (string-append "INSTALL_PREFIX=" + (assoc-ref %outputs "out") "/bin")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'enter-subdirectory + (lambda _ (chdir "server") #t)) + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (substitute* "run_tests.py" + (("^(TELEGA_SERVER = ).*$" _all prefix) + (string-append prefix + "\"" out "/bin/telega-server\"\n")))))) + (delete 'check) + (add-after 'install 'check + (assoc-ref %standard-phases 'check)) + (add-before 'install-license-files 'leave-subdirectory + (lambda _ (chdir "..") #t))) + #:test-target "test")) + (inputs + `(("tdlib" ,tdlib) + ("libappindicator" ,libappindicator))) + (native-inputs + `(("python" ,python) + ("pkg-config" ,pkg-config))) + (home-page "https://zevlg.github.io/telega.el/") + (synopsis "Server process of Telega") + (description "Telega-server is helper program to interact with Telegram service, and connect it with Emacs via inter-process communication.") - (license license:gpl3+))) + (license license:gpl3+)))) (define-public emacs-telega (package @@ -27226,7 +27228,7 @@ (define-public emacs-telega "\"" ffmpeg-bin "\")")))))) (add-after 'unpack 'configure (lambda* (#:key inputs outputs #:allow-other-keys) - (substitute* "telega-server.el" + (substitute* "telega-customize.el" (("@TELEGA_SERVER_BIN@") (string-append (assoc-ref inputs "emacs-telega-server") "/bin/telega-server"))) diff --git a/gnu/packages/patches/emacs-telega-path-placeholder.patch b/gnu/packages/patches/emacs-telega-path-placeholder.patch index c20be36712..5829edd22a 100644 --- a/gnu/packages/patches/emacs-telega-path-placeholder.patch +++ b/gnu/packages/patches/emacs-telega-path-placeholder.patch @@ -1,36 +1,31 @@ -From 865b8c553722a971c68742c2e849e41eb0e2360c Mon Sep 17 00:00:00 2001 -From: Zhu Zihao -Date: Thu, 24 Jun 2021 23:43:50 +0800 -Subject: [PATCH] Replace code that search path with placeholder for - configuration. +From bf95de21faa623e48bca00d6a2c9b33ab2c5d812 Mon Sep 17 00:00:00 2001 +From: Andrew Tropin +Date: Wed, 8 Dec 2021 11:01:31 +0300 +Subject: [PATCH] Use absolute path for telega-server-command. --- - telega-server.el | 6 +----- - telega-util.el | 2 +- - 2 files changed, 2 insertions(+), 6 deletions(-) + telega-customize.el | 2 +- + telega-util.el | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/telega-server.el b/telega-server.el -index 999125d..0fa0817 100644 ---- a/telega-server.el -+++ b/telega-server.el -@@ -142,11 +142,7 @@ Otherwise query user about building flags." - (defun telega-server--find-bin () - "Find telega-server executable. - Raise error if not found." -- (let ((exec-path (cons telega-directory exec-path))) -- (or (executable-find "telega-server") -- (progn (telega-server-build) -- (executable-find "telega-server")) -- (error "`telega-server' not found in exec-path")))) -+ "@TELEGA_SERVER_BIN@") +diff --git a/telega-customize.el b/telega-customize.el +index 0af343f..cc2938c 100644 +--- a/telega-customize.el ++++ b/telega-customize.el +@@ -591,7 +591,7 @@ In range [1..3]. Use 1." + :prefix "telega-server-" + :group 'telega) - (defun telega-server-version () - "Return telega-server version." +-(defcustom telega-server-command "telega-server" ++(defcustom telega-server-command "@TELEGA_SERVER_BIN@" + "Command to run as telega server. + It should be absolute path or binary file searchable in `exec-path'." + :type 'string diff --git a/telega-util.el b/telega-util.el -index 73a46b1..f53e20a 100644 +index 6340c27..01e3cb7 100644 --- a/telega-util.el +++ b/telega-util.el -@@ -464,7 +464,7 @@ N can't be 0." +@@ -587,7 +587,7 @@ N can't be 0." (defun telega-etc-file (filename) "Return absolute path to FILENAME from etc/ directory in telega." @@ -40,5 +35,5 @@ index 73a46b1..f53e20a 100644 (defun telega-link-props (link-type link-to &optional face) "Generate props for link button openable with `telega-link--button-action'." -- -2.32.0 +2.34.0 diff --git a/gnu/packages/patches/emacs-telega-test-env.patch b/gnu/packages/patches/emacs-telega-test-env.patch index 75fe2e12fc..c6b02be6ff 100644 --- a/gnu/packages/patches/emacs-telega-test-env.patch +++ b/gnu/packages/patches/emacs-telega-test-env.patch @@ -1,14 +1,24 @@ -Test Emacs environment on startup. +From 237ea2471bb6521390bbac174ac2a8a5e9683e4d Mon Sep 17 00:00:00 2001 +From: Andrew Tropin +Date: Tue, 7 Dec 2021 16:20:38 +0300 +Subject: [PATCH] Test Emacs environment on startup. -Patch by Diego N. Barbato +--- + telega.el | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/telega.el 2020-02-07 17:07:18.549970090 +0100 -+++ b/telega.el 2020-02-07 17:10:08.383499765 +0100 -@@ -82,6 +82,7 @@ - "Start telegramming. - If prefix ARG is given, then will not pop to telega root buffer." +diff --git a/telega.el b/telega.el +index d6b28b5..40854ec 100644 +--- a/telega.el ++++ b/telega.el +@@ -181,7 +181,7 @@ can't write to `telega-server-logfile'" logfile-dir))) + Pop to root buffer. + If `\\[universal-argument]' is specified, then do not pop to root buffer." (interactive "P") +- + (telega-test-env t) - (telega--create-hier) - - (unless (telega-server-live-p) + ;; For multiple accounts setup possibly select (if there is no + ;; default account declared) an account to use + (if (and telega-accounts (not (telega-account-current))) +-- +2.34.0 -- 2.34.0