From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#30123: claws-mail plugins not updated Date: Mon, 15 Jan 2018 17:18:38 +0100 Message-ID: <20180115171838.1440a62d@scratchpost.org> References: <34ab5e819160ccb1afaa37d8dfa1612f@lepiller.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eb7TV-0002OJ-Vj for bug-guix@gnu.org; Mon, 15 Jan 2018 11:19:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eb7TS-0002iv-Nw for bug-guix@gnu.org; Mon, 15 Jan 2018 11:19:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:49793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eb7TS-0002in-Jb for bug-guix@gnu.org; Mon, 15 Jan 2018 11:19:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eb7TS-0006GT-Dl for bug-guix@gnu.org; Mon, 15 Jan 2018 11:19:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <34ab5e819160ccb1afaa37d8dfa1612f@lepiller.eu> 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: julien lepiller Cc: 30123@debbugs.gnu.org Hi Julien, On Mon, 15 Jan 2018 14:52:30 +0100 julien lepiller wrote: > 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. > > 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. I wonder how that happened. claws-mail already makes sure not to include the name of the plugin directory in entries in clawsrc: static gchar * plugin_canonical_name(const Plugin *plugin) { if (plugin->in_prefix_dir == TRUE) { if (plugin_filename_is_standard_dir(plugin->filename) == TRUE) { gchar *plugin_name = g_path_get_basename(plugin->filename); return plugin_name; } } return g_strdup(plugin->filename); } And after the update it SHOULD take the plugins from the new installation directory. 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). Do your ~/.claws-mail/clawsrc entries include the directory name? 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. But I'd rather get to the bottom of this problem before making the claws-mail package so defensive.