From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 9H8gHxWFtl9/cAAA0tVLHw (envelope-from ) for ; Thu, 19 Nov 2020 14:45:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id iIeeGhWFtl/4EQAAbx9fmQ (envelope-from ) for ; Thu, 19 Nov 2020 14:45:41 +0000 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 86C7E9404E7 for ; Thu, 19 Nov 2020 14:45:40 +0000 (UTC) Received: from localhost ([::1]:58024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kflBr-00067F-2Z for larch@yhetil.org; Thu, 19 Nov 2020 09:45:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51886) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kflBF-00064b-VE for guix-patches@gnu.org; Thu, 19 Nov 2020 09:45:01 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kflBF-0004oJ-KB for guix-patches@gnu.org; Thu, 19 Nov 2020 09:45:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kflBF-0002rY-IZ for guix-patches@gnu.org; Thu, 19 Nov 2020 09:45:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44730] [GAJIM]: Fix loading of installed plugins Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 Nov 2020 14:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44730 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Raghav Gururajan Cc: julien@lepiller.eu, 44730@debbugs.gnu.org X-Debbugs-Original-Cc: Julien Lepiller , 44730@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 44730-submit@debbugs.gnu.org id=B44730.160579708810964 (code B ref 44730); Thu, 19 Nov 2020 14:45:01 +0000 Received: (at 44730) by debbugs.gnu.org; 19 Nov 2020 14:44:48 +0000 Received: from localhost ([127.0.0.1]:38673 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kflAu-0002qe-Sz for submit@debbugs.gnu.org; Thu, 19 Nov 2020 09:44:48 -0500 Received: from tobias.gr ([80.241.217.52]:50162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kflAp-0002qR-Op for 44730@debbugs.gnu.org; Thu, 19 Nov 2020 09:44:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tobias.gr; s=2018; bh=moZqXfUBq05YeVJJh7T7IsLQcwJJOI1YpJq4emhAJ7o=; h=date:in-reply-to: references:subject:cc:to:from; b=UTK6Pgx68xhxF9JjVZotIBZV22q08uiWrlVne 9fq74AtXpWKTDUp+2b5IJSaHheywioRIMBTohUWMM8Yqyu3w3v1DAscX18jVmSue1hDqNO sVQCWqumQLvBzBQK8gPB+X1Jmdio+LPfuyEOl54YLJCRhKZI9brjz1jiL+LgAeNMP49whs sFY3FW6FHecht2pE+GSTnrRn9a1r+0mthWG4blXmn/oOBwgygzjaHZlajT6HB2OEypZgO2 K3JqGk2a5exrJmE6bI5Vf3HFEhvSJlKH+zoPmqMEV7LtUMmii7E6ZmNNmnDpPE0oM+CLFu 0GtEWY6+3TVhIodWACWLlm1ZQ== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 445e6beb (TLSv1.2:ECDHE-ECDSA-AES256-GCM-SHA384:256:NO); Thu, 19 Nov 2020 14:44:40 +0000 (UTC) BIMI-Selector: v=BIMI1; s=default; References: <101c1bb4-2513-b1de-2962-436b4431f836@raghavgururajan.name> In-reply-to: <101c1bb4-2513-b1de-2962-436b4431f836@raghavgururajan.name> Date: Thu, 19 Nov 2020 15:44:31 +0100 Message-ID: <87eekp76eo.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) 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" Reply-to: Tobias Geerinckx-Rice , Tobias Geerinckx-Rice via Guix-patches From: Tobias Geerinckx-Rice via Guix-patches via X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tobias.gr header.s=2018 header.b=UTK6Pgx6; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -3.11 X-TUID: e6L6VD9og2NN --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Hullo Raghav! Thanks for taking care of Gajim. Raghav Gururajan =E5=86=99=E9=81=93=EF=BC=9A > fix plugins issue in Gajim. Please provide more information: what was wrong with the original=20 code, and why and how will your patch fix it? It's better to put=20 this in the commit message itself (above the change log), not just=20 the cover letter (your mail). No more than a few lines. The more clear your explanation, the faster the fix can be=20 reviewed and merged. I assume that the problem is the empty =E2=80=98Plugins=E2=80=99 list when = I run: $ guix environment guix \ -- ./pre-inst-env guix environment \ --pure --ad-hoc gajim{,-openpgp,-omemo} \ -- gajim However, the fix doesn't look right to me. After applying your patch, Gajim is broken. Menus don't work. =2D-8<---------------cut here---------------start------------->8--- Traceback (most recent call last): File=20 "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/si= te-packages/gajim/application.py",=20 line 222, in _activate self.interface.run(self) File=20 "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/si= te-packages/gajim/gui_interface.py",=20 line 1965, in run app.plugin_manager =3D plugins.PluginManager() File=20 "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/si= te-packages/gajim/common/helpers.py",=20 line 1002, in __call__ cls._instances[cls] =3D super(Singleton, cls).__call__( File=20 "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/si= te-packages/gajim/plugins/pluginmanager.py",=20 line 224, in __init__ self._load_plugins() File=20 "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/si= te-packages/gajim/plugins/pluginmanager.py",=20 line 668, in _load_plugins for plugin_dir in configpaths.get_plugin_dirs(): File=20 "/gnu/store/zd02xplbafrmzs2swrj3r3zx1hrsvg4y-gajim-1.2.2/lib/python3.8/si= te-packages/gajim/common/configpaths.py",=20 line 50, in get_plugin_dirs Path(os.getenv['PLUGINS_OS']), =2D-8<---------------cut here---------------end--------------->8--- I wrote my own patch (attached; no, I don't speak much Python). I=20 think it fixes the problem but I can't test it. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-gajim-Honour-GAJIM_PLUGIN_PATH.patch Content-Transfer-Encoding: quoted-printable From=20866593af88993ab5068f165b1284b8b4cb32e04e Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 19 Nov 2020 15:20:14 +0100 Subject: [PATCH] gnu: gajim: Honour $GAJIM_PLUGIN_PATH. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit This perhaps fixes maybe. * gnu/packages/messaging.scm (gajim)[arguments]: Replace the =E2=80=98add-plugin-dirs=E2=80=99 substitution phase with a... [source]: ...patch that won't silently break in the future. * gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. =2D-- gnu/local.mk | 1 + gnu/packages/messaging.scm | 13 ++----------- .../patches/gajim-honour-GAJIM_PLUGIN_PATH.patch | 11 +++++++++++ 3 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.pat= ch diff --git a/gnu/local.mk b/gnu/local.mk index a1da838aee..e728ed28d1 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -990,6 +990,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/freedink-engine-fix-sdl-hints.patch \ %D%/packages/patches/freeimage-unbundle.patch \ %D%/packages/patches/fuse-overlapping-headers.patch \ + %D%/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch \ %D%/packages/patches/ganeti-deterministic-manual.patch \ %D%/packages/patches/ganeti-disable-version-symlinks.patch \ %D%/packages/patches/ganeti-drbd-compat.patch \ diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm index 624ad72c23..99131dcf05 100644 =2D-- a/gnu/packages/messaging.scm +++ b/gnu/packages/messaging.scm @@ -743,7 +743,8 @@ of xmpppy.") (version-major+minor version) "/gajim-" version ".tar.gz")) (sha256 =2D (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx"))= )) + (base32 "1gfcp3b5nq43xxz5my8vfhfxnnli726j3hzcgwh9fzrzzd9ic3gx")) + (patches (search-patches "gajim-honour-GAJIM_PLUGIN_PATH.patch")))) (build-system python-build-system) (arguments `(#:imported-modules @@ -756,16 +757,6 @@ of xmpppy.") (guix build utils)) #:phases (modify-phases %standard-phases =2D (add-after 'unpack 'add-plugin-dirs =2D (lambda _ =2D (substitute* "gajim/common/configpaths.py" =2D (("_paths\\['PLUGINS_USER'\\]\\]") =2D "_paths['PLUGINS_USER']] + \ =2D([os.getenv('GAJIM_PLUGIN_PATH')] \ =2Dif os.getenv('GAJIM_PLUGIN_PATH') \ =2Dand Path(os.getenv('GAJIM_PLUGIN_PATH')).is_dir() \ =2Delse [])")) =2D #t)) (replace 'check (lambda _ ;; Tests require a running X server. diff --git a/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch b/gn= u/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch new file mode 100644 index 0000000000..cb3313197c =2D-- /dev/null +++ b/gnu/packages/patches/gajim-honour-GAJIM_PLUGIN_PATH.patch @@ -0,0 +1,11 @@ +--- a/gajim/common/configpaths.py 2020-11-19 12:12:02.004414323 +0100 ++++ a/gajim/common/configpaths.py 2020-11-19 15:34:52.211476895 +0100 +@@ -47,7 +47,7 @@ + return [Path(_paths['PLUGINS_BASE']), + Path('/app/plugins')] + return [Path(_paths['PLUGINS_BASE']), +- Path(_paths['PLUGINS_USER'])] ++ Path(_paths['PLUGINS_USER'])] + ([Path(os.getenv('GAJIM_PLUGI= N_PATH'))] if os.getenv('GAJIM_PLUGIN_PATH') and Path(os.getenv('GAJIM_PLUG= IN_PATH')).is_dir() else []) +=20 +=20 + def get_paths(type_: PathType) -> Generator[str, None, None]: =2D-=20 2.29.2 --=-=-= Content-Type: text/plain; format=flowed The plug-ins are found, but won't load with my version of Gajim. --8<---------------cut here---------------start------------->8--- 11/19/20 15:10:01 (W) gajim.plugin_system Plugin omemo not loaded, newer version of gajim required: 1.2.91 <= 1.2.2 <= 1.3.90 11/19/20 15:10:01 (W) gajim.plugin_system Plugin openpgp not loaded, newer version of gajim required: 1.2.91 <= 1.2.2 <= 1.3.90 --8<---------------cut here---------------end--------------->8--- This is on current master. How are these plug-ins expected to be used? > - (variable "GAJIM_PLUGIN_PATH") > + (variable "PLUGINS_OS") This doesn't look related to the fix at hand. Why remove GAJIM_? Why rename _PATH? TBH, both strike me as unnecessary regressions. Kind regards, T G-R --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCX7aEzw0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15hB8BAM726V8hc632zdEaX4KZWUya5B+VL0JK/oL9Kr42 9n83AQCLu7+Ezt4wozc7oJqgieulQtXufpeSj/Cwf2IC6Yx8BA== =q9bR -----END PGP SIGNATURE----- --==-=-=--