From patchwork Wed Jan 5 19:20:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Kehayias X-Patchwork-Id: 35993 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 0AD8A27BBEA; Wed, 5 Jan 2022 19:26:51 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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 8825A27BBE9 for ; Wed, 5 Jan 2022 19:26:50 +0000 (GMT) Received: from localhost ([::1]:35906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5Bvt-0003BR-MI for patchwork@mira.cbaines.net; Wed, 05 Jan 2022 14:26:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5Bqm-0006yy-4O for guix-patches@gnu.org; Wed, 05 Jan 2022 14:21:38 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5BqI-0000Qc-Jj for guix-patches@gnu.org; Wed, 05 Jan 2022 14:21:17 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5BqI-0000Ee-F5 for guix-patches@gnu.org; Wed, 05 Jan 2022 14:21:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53036] [PATCH] gnu: syncthing-gtk: Fix autostart. Resent-From: John Kehayias Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Jan 2022 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 53036 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53036@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.1641410442844 (code B ref -1); Wed, 05 Jan 2022 19:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 5 Jan 2022 19:20:42 +0000 Received: from localhost ([127.0.0.1]:38798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Bpr-0000DQ-E9 for submit@debbugs.gnu.org; Wed, 05 Jan 2022 14:20:42 -0500 Received: from lists.gnu.org ([209.51.188.17]:60026) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5Bpo-0000DI-TA for submit@debbugs.gnu.org; Wed, 05 Jan 2022 14:20:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:55932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5Bpo-0006pN-JS for guix-patches@gnu.org; Wed, 05 Jan 2022 14:20:32 -0500 Received: from mail-40134.protonmail.ch ([185.70.40.134]:30101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5Bpj-0000H6-3B for guix-patches@gnu.org; Wed, 05 Jan 2022 14:20:30 -0500 Date: Wed, 05 Jan 2022 19:20:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail2; t=1641410418; bh=y31iydwpYWXlAsnEUcGnmvVrZaHv6i2xUF3wuUoIpOY=; h=Date:To:From:Reply-To:Subject:Message-ID:From:To:Cc; b=hGjGTTRi+f93hgU6QO4YjIZwDhjWltP+03CDwvQhDk8fao+IGbbel7VND4R04HqNb lTw887udSEORxJU96+IqYLNSrlGWdyR3x9jjMhLVOXodA3wILyy3GlcGR44Q3FcBam HowQc57YvSIHtYLwxdHgGtWUbN6+N02ODMvCtwPVgBNQqbB+SxbsuSuRiNCEJv6GXm d1O8IGEE3NmmODMaJyFrPwn9+126Lq4p1XajxBgYhKSHsXM9nj78GIKYA7WqrcDO/o kXt6TGRsokfY8uYoX6toHeXkrgSME9gitQG4QTupPcLjvBCCiiqKMJH07xPLisVRur Vyp9zxCp581nA== Message-ID: <10YAD-y_pZJkNBM4uVrklp03YiJtBVRcxPqDLGaJJ8R5PSHg6p21iH8A6NjoKR7uxnPCRUA9ELWS1MPYRoOo3v1nylz0VJfG6J3mF6AwZE8=@protonmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.134; envelope-from=john.kehayias@protonmail.com; helo=mail-40134.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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" Reply-to: John Kehayias X-ACL-Warn: , John Kehayias via Guix-patches X-Patchwork-Original-From: John Kehayias via Guix-patches via From: John Kehayias X-getmail-retrieved-from-mailbox: Patches Hello, This is a simple fix/workaround for https://issues.guix.gnu.org/50789 As discussed there, there is not a perfect solution for syncthing-gtk writing ~/.config/autostart/Syncthing-GTK.desktop with the Exec line pointing to the store path of ".syncthing-gtk-real". I've opted for a simple fix that won't break upon changes to the syncthing-gtk store path that was done similarly to e.g. the desktop files Flatpak writes in 9c4244cc73db4d5c3adf6f8342f6b08b39dd3628: just use plain "syncthing-gtk". While this means different syncthing-gtk could conflict (whatever is first in PATH wins), that seems unlikely given this package is just a frontend to syncthing. Anyway, seems like the best option right now so that the autostart file is usable and won't break. Thanks, John From 1d62676b2b507f67103110c3fce5d8c6dc483f8b Mon Sep 17 00:00:00 2001 From: John Kehayias Date: Wed, 5 Jan 2022 14:09:42 -0500 Subject: [PATCH] gnu: syncthing-gtk: Fix autostart. * gnu/packages/syncthing.scm (syncthing-gtk)[#:phases]: Add autostart-path phase to use "syncthing-gtk" (rather than a store path to ".syncthing-gtk-real") as the exec command for the autostart desktop file written by syncthing-gtk. --- gnu/packages/syncthing.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm index 7125e70117..f356b24844 100644 --- a/gnu/packages/syncthing.scm +++ b/gnu/packages/syncthing.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020 Giacomo Leidi ;;; Copyright © 2021 Maxim Cournoyer ;;; Copyright © 2021 Arun Isaac +;;; Copyright © 2022 John Kehayias ;;; ;;; This file is part of GNU Guix. ;;; @@ -171,6 +172,13 @@ (define-public syncthing-gtk (substitute* "syncthing_gtk/configuration.py" (("/usr/bin/syncthing") (string-append syncthing "/bin/syncthing")))))) + (add-after 'unpack 'autostart-path + ;; Change the autostart desktop file Exec command to just be + ;; syncthing-gtk, rather than the store path to + ;; .syncthing-gtk-real + (lambda _ + (substitute* "syncthing_gtk/tools.py" + (("return executable") "return \"syncthing-gtk\"")))) (add-after 'unpack 'remove-windows.py (lambda _ ;; A Windows-specific module that fails to load with -- 2.34.1