From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Lepiller Subject: bug#30123: claws-mail plugins not updated Date: Fri, 19 Jan 2018 17:55:54 +0100 Message-ID: <20180119175554.1252b190@lepiller.eu> References: <34ab5e819160ccb1afaa37d8dfa1612f@lepiller.eu> <20180115171838.1440a62d@scratchpost.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecZyT-0000WZ-Jw for bug-guix@gnu.org; Fri, 19 Jan 2018 11:57:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecZyQ-0003XD-8T for bug-guix@gnu.org; Fri, 19 Jan 2018 11:57:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55512) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ecZyQ-0003Wv-2e for bug-guix@gnu.org; Fri, 19 Jan 2018 11:57:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ecZyP-0006vY-Rh for bug-guix@gnu.org; Fri, 19 Jan 2018 11:57:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20180115171838.1440a62d@scratchpost.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 30123@debbugs.gnu.org Le Mon, 15 Jan 2018 17:18:38 +0100, Danny Milosavljevic a =C3=A9crit : > Hi Julien, >=20 > On Mon, 15 Jan 2018 14:52:30 +0100 > julien lepiller wrote: >=20 > > claws-mail has a plugin system to add functionnality. For instance, > > to add PGP support, one has to load 3 plugins from the claws-mail > > package. By default, claws-mail looks in its store directory to > > propose available plugins. > >=20 > > When upgrading claws-mail, the configuration doesn't change. > > Plugins are still looked for in the old store location, so old > > plugins are still used. This is bad for security and compatibility. > > Another issue is when running guix gc afterwards: the old plugins > > are deleted and claws-mail issues an error message on startup > > because it cannot find them anymore. =20 >=20 > I wonder how that happened. >=20 > claws-mail already makes sure not to include the name of the plugin > directory in entries in clawsrc: >=20 > static gchar * plugin_canonical_name(const Plugin *plugin) > { > if (plugin->in_prefix_dir =3D=3D TRUE) { > if (plugin_filename_is_standard_dir(plugin->filename) > =3D=3D TRUE) { gchar *plugin_name =3D g_path_get_basename(plugin->filenam= e); > return plugin_name; > } > } > return g_strdup(plugin->filename); > } >=20 > And after the update it SHOULD take the plugins from the new > installation directory. >=20 > There's a Makefile variable PLUGINDIR which we could set, but as far > as I can see it should already work fine (in claws-mail 3.16.0). >=20 > Do your ~/.claws-mail/clawsrc entries include the directory name? This is the end of my claswrc: [Plugins_GTK2] /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mai= l/plugins/pgpcore.so /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mai= l/plugins/pgpinline.so /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mai= l/plugins/pgpmime.so >=20 > If it's actually broken, the easiest fix would be to make > get_plugin_dir() return the plugin directory in the profile instead. > If the user then configures the plugins, he'll (hopefully) take the > ones from the profile directory (instead of the ones directly in the > store). The function above then stores only the basenames - and on a > later update of claws-mail files with these basenames should be > looked up in the new installation directory. And even if the > function should not work, claws-mail would take the plugins from the > profile directory - which would be the new ones in the case of an > update. >=20 > But I'd rather get to the bottom of this problem before making the > claws-mail package so defensive.