Page MenuHome GnuPG

Migration of group config from old location to new location is broken
Testing, NormalPublic

Description

The changes made for T6799: Kleopatra configuration files in wrong places have broken the migration of the group config because Kleopatra now looks in the wrong place for the old group config. Instead of looking in %LOCALAPPDATA% %APPDATA%/kleopatra Kleopatra now looks in %GNUPGHOME%/kleopatra for the old group config (which is also the new location).

This happens only on Windows (because we use %GNUPGHOME%/kleopatra only on Windows).

To test this move kleopatragroupsrc from %GNUPGHOME%/kleopatra to %LOCALAPPDATA% %APPDATA%/kleopatra. If migration works then Kleopatra will copy the group config file from %LOCALAPPDATA% %APPDATA%/kleopatra to %GNUPGHOME%/kleopatra.

Update (2025-07-15): When I created the ticket I erroneously assumed that older versions of Gpg4win had used %LOCALAPPDATA% for config files (including the group config file). That's not the case. Gpg4win 4.3 has used %APPDATA%/kleopatra for its config files (including the group config file). Note that migration of the group config files by VSD/GPD is covered by T7700: Kleopatra: Move kleopatrarc away from %LOCALAPPDATA%.

Details

Version
gpg4win-5.0.0-beta160 (local build)

Event Timeline

ikloecker created this task.
ikloecker moved this task from Backlog to WIP on the gpd5x board.
ikloecker changed the task status from Open to Testing.Mar 18 2025, 2:39 PM

The migration of the group config file works again.

timegrid added a subscriber: timegrid.

looks good to me on gpg4win-5.0.0-beta167@win10

Note: The right old path is %APPDATA%/kleopatra, not %LOCALAPPDATA% as stated in the description.

ebo changed the task status from Testing to Open.Tue, Jul 15, 4:50 PM
ebo moved this task from Done to Backlog on the gpd5x board.
ebo added a subscriber: ebo.

As timegrid has not experienced the older versions himself, he misunderstood this. Ingo's description is correct.
(%LOCALAPPDATA% was the location of kleopatragroupsrc before VSD 3.3.0.)

I retested this with Gpg4win-5.0.0-beta345 and while migration works from %APPDATA%\kleopatra to %APPDATA%\gnupg\kleopatra,
Migration from %LOCALAPPDATA% does not work.

ikloecker changed the task status from Open to Testing.Tue, Jul 15, 5:50 PM
ikloecker moved this task from Backlog to QA on the gpd5x board.

It's intentional that with Gpg4win migration from %LOCALAPPDATA% does not work because %LOCALAPPDATA% is used by VSD (and GPD) but not by any old Gpg4win.

I don't think that it would be a good idea to migrate old VSD config files to Gpg4win (or vice versa).

Migration of config files of current VSD/GPD to upcoming VSD/GPD is covered by T7700: Kleopatra: Move kleopatrarc away from %LOCALAPPDATA% (work-in-progress) which has a large table of intended migrations. In short:

  • Gpg4win migrates config files from the locations used by old versions of Gpg4win (typically %APPDATA%/kleopatra) to %GNUPGHOME%/kleopatra (typically %APPDATA%/gnupg/kleopatra).
  • VSD 3.4+ (and GPD) migrates config files from the locations used by old versions of VSD (and GPD) (%LOCALAPPDATA% and %APPDATA%/kleopatra/kleopatrastaterc) to %GNUPGHOME%/kleopatra (typically %APPDATA%/gnupg-vsd/kleopatra).