unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#30123: claws-mail plugins not updated
@ 2018-01-15 13:52 julien lepiller
  2018-01-15 16:18 ` Danny Milosavljevic
  2021-11-24 23:32 ` zimoun
  0 siblings, 2 replies; 9+ messages in thread
From: julien lepiller @ 2018-01-15 13:52 UTC (permalink / raw)
  To: 30123

Hi,

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-15 13:52 bug#30123: claws-mail plugins not updated julien lepiller
@ 2018-01-15 16:18 ` Danny Milosavljevic
  2018-01-19 16:55   ` Julien Lepiller
  2021-11-24 23:32 ` zimoun
  1 sibling, 1 reply; 9+ messages in thread
From: Danny Milosavljevic @ 2018-01-15 16:18 UTC (permalink / raw)
  To: julien lepiller; +Cc: 30123

Hi Julien,

On Mon, 15 Jan 2018 14:52:30 +0100
julien lepiller <julien@lepiller.eu> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-15 16:18 ` Danny Milosavljevic
@ 2018-01-19 16:55   ` Julien Lepiller
  2018-01-21 11:59     ` Danny Milosavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Lepiller @ 2018-01-19 16:55 UTC (permalink / raw)
  To: 30123

Le Mon, 15 Jan 2018 17:18:38 +0100,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :

> Hi Julien,
> 
> On Mon, 15 Jan 2018 14:52:30 +0100
> julien lepiller <julien@lepiller.eu> 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?

This is the end of my claswrc:

[Plugins_GTK2]
/gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpcore.so
/gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpinline.so
/gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpmime.so

> 
> 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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-19 16:55   ` Julien Lepiller
@ 2018-01-21 11:59     ` Danny Milosavljevic
  2018-01-21 13:34       ` Julien Lepiller
  0 siblings, 1 reply; 9+ messages in thread
From: Danny Milosavljevic @ 2018-01-21 11:59 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30123

> This is the end of my claswrc:
> 
> [Plugins_GTK2]
> /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpcore.so
> /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpinline.so
> /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpmime.so

Please close claws-mail, make a backup of clawsrc and then remove the directory parts of these entries in clawsrc.

Then start claws-mail again and close it again.  Then check clawsrc.  The directory part should stay off.

Also, please open claws-mail, enter the menu Configuration -> Plugins and remove and add some plugin there.  Then close claws-mail.  Does it have a directory part in clawsrc now?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-21 11:59     ` Danny Milosavljevic
@ 2018-01-21 13:34       ` Julien Lepiller
  2018-01-21 14:44         ` Danny Milosavljevic
  0 siblings, 1 reply; 9+ messages in thread
From: Julien Lepiller @ 2018-01-21 13:34 UTC (permalink / raw)
  To: 30123

Le Sun, 21 Jan 2018 12:59:37 +0100,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :

> > This is the end of my claswrc:
> > 
> > [Plugins_GTK2]
> > /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpcore.so
> > /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpinline.so
> > /gnu/store/5p5bs3na24af02hqpm9nmg817k9h97iz-claws-mail-3.16.0/lib/claws-mail/plugins/pgpmime.so  
> 
> Please close claws-mail, make a backup of clawsrc and then remove the
> directory parts of these entries in clawsrc.
> 
> Then start claws-mail again and close it again.  Then check clawsrc.
> The directory part should stay off.

Indeed, this seems to work.

> 
> Also, please open claws-mail, enter the menu Configuration -> Plugins
> and remove and add some plugin there.  Then close claws-mail.  Does
> it have a directory part in clawsrc now?

Loading a module adds the directory part in clawsrc.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-21 13:34       ` Julien Lepiller
@ 2018-01-21 14:44         ` Danny Milosavljevic
  2018-01-21 18:25           ` Julien Lepiller
  0 siblings, 1 reply; 9+ messages in thread
From: Danny Milosavljevic @ 2018-01-21 14:44 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 30123

> Loading a module adds the directory part in clawsrc.

Is it a /gnu/store directory or a user profile directory?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-21 14:44         ` Danny Milosavljevic
@ 2018-01-21 18:25           ` Julien Lepiller
  0 siblings, 0 replies; 9+ messages in thread
From: Julien Lepiller @ 2018-01-21 18:25 UTC (permalink / raw)
  To: 30123

Le Sun, 21 Jan 2018 15:44:40 +0100,
Danny Milosavljevic <dannym@scratchpost.org> a écrit :

> > Loading a module adds the directory part in clawsrc.  
> 
> Is it a /gnu/store directory or a user profile directory?

still the same /gnu/store directory.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2018-01-15 13:52 bug#30123: claws-mail plugins not updated julien lepiller
  2018-01-15 16:18 ` Danny Milosavljevic
@ 2021-11-24 23:32 ` zimoun
  2021-11-25  1:28   ` Julien Lepiller
  1 sibling, 1 reply; 9+ messages in thread
From: zimoun @ 2021-11-24 23:32 UTC (permalink / raw)
  To: julien lepiller; +Cc: 30123

Hi Julien,

On Mon, 15 Jan 2018 at 14:52, julien lepiller <julien@lepiller.eu> 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.

Reading the recent activity about claws-mail, is it still an issue?

Cheers,
simon




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#30123: claws-mail plugins not updated
  2021-11-24 23:32 ` zimoun
@ 2021-11-25  1:28   ` Julien Lepiller
  0 siblings, 0 replies; 9+ messages in thread
From: Julien Lepiller @ 2021-11-25  1:28 UTC (permalink / raw)
  To: zimoun; +Cc: 30123-close

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

The problem seems to be solved now. Thanks for reminding me of my old bugs :). Closing.

Le 24 novembre 2021 18:32:20 GMT-05:00, zimoun <zimon.toutoune@gmail.com> a écrit :
>Hi Julien,
>
>On Mon, 15 Jan 2018 at 14:52, julien lepiller <julien@lepiller.eu> 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.
>
>Reading the recent activity about claws-mail, is it still an issue?
>
>Cheers,
>simon

[-- Attachment #2: Type: text/html, Size: 1390 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-25  1:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 13:52 bug#30123: claws-mail plugins not updated julien lepiller
2018-01-15 16:18 ` Danny Milosavljevic
2018-01-19 16:55   ` Julien Lepiller
2018-01-21 11:59     ` Danny Milosavljevic
2018-01-21 13:34       ` Julien Lepiller
2018-01-21 14:44         ` Danny Milosavljevic
2018-01-21 18:25           ` Julien Lepiller
2021-11-24 23:32 ` zimoun
2021-11-25  1:28   ` Julien Lepiller

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).