Bug 435761

Summary: No gpg support for kmymoney available from CI builds
Product: [Applications] kmymoney Reporter: Ralf Habacker <ralf.habacker>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: REPORTED ---    
Severity: wishlist CC: kde-windows, kloecker
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
See Also: https://bugs.kde.org/show_bug.cgi?id=396016
Latest Commit: Version Fixed In:
Bug Depends on: 439883    
Bug Blocks: 426400    
Attachments: Screenshots showing GPG configuration dialog

Description Ralf Habacker 2021-04-15 09:42:21 UTC
SUMMARY
The preview builds for Windows listed at https://kmymoney.org/download.html does not provide gpg2 support.

STEPS TO REPRODUCE
1. download and unpack a portable package from the listed web page 
2. start kmymoney
3. open settings menu
4. enter page "modules" and open setting for xml plugin

OBSERVED RESULT
gpg2 support is disabled


EXPECTED RESULT
gpg2 support should be available

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Ralf Habacker 2024-03-28 10:17:00 UTC
Created attachment 167886 [details]
Screenshots showing GPG configuration dialog

I have checked this with an actual build of kmymoney from https://cdn.kde.org/ci-builds/office/kmymoney/master/windows/kmymoney-master-3157-windows-cl-msvc2019-x86_64.7z. GGP seems to be compiled in, but the executable file gpg2.exe is missing, which is needed to generate a private/public key pair. The other option of importing keys cannot be used either, as this also requires the gpg2 command line program.
Comment 2 Ralf Habacker 2024-03-28 11:02:42 UTC
After starting kmymoney from the command line by opening the gpg configuration dialog (Settings->Modules->xml...->Settings), the following appears on the console

GpgME::checkEngine returns 150 Invalid crypto engine
GPG search "/secring.gpg"
GPG no secure keyring found.
Failure while setting GPG home directory to ""
 "Invalid crypto engine"
GPG Home directory located in
GPG binary located in
Failure while setting GPG home directory to ""
 "Invalid crypto engine"
Comment 3 Ingo Klöcker 2024-03-28 12:14:38 UTC
It's not suprising that gpg2.exe is missing if you have the following in kmymoney's exclude list:
> # strip most executables
> bin/(?!(kmymoney|sqlcipher|kbuildsycoca5|update-mime-database|kioslave|ofxdump|kconf_update|QtWebEngineProcess)).*\.exe
Comment 4 Ralf Habacker 2024-04-17 09:17:23 UTC
(In reply to Ingo Klöcker from comment #3)
> It's not suprising that gpg2.exe is missing if you have the following in
> kmymoney's exclude list:
> > # strip most executables
> > bin/(?!(kmymoney|sqlcipher|kbuildsycoca5|update-mime-database|kioslave|ofxdump|kconf_update|QtWebEngineProcess)).*\.exe

The added files have been corrected with https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/766ecafaee502ad9fc9417402e176bb41d392111, but are not included in the current snapshot (kmymoney-master-3196-windows-cl-msvc2019-x86_64.7z) at https://cdn.kde.org/ci-builds/office/kmymoney/master/windows/.
Comment 5 Ralf Habacker 2024-04-24 05:56:15 UTC
(In reply to Ralf Habacker from comment #4)
> The added files have been corrected with
> https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/
> 766ecafaee502ad9fc9417402e176bb41d392111, but are not included in the
> current snapshot (kmymoney-master-3196-windows-cl-msvc2019-x86_64.7z) at
> https://cdn.kde.org/ci-builds/office/kmymoney/master/windows/.

gpg2 is still not included in the portable package.
Comment 6 Ingo Klöcker 2024-04-24 11:44:17 UTC
(In reply to Ralf Habacker from comment #5)
> gpg2 is still not included in the portable package.

Try depending on libs/gpgme/gpgme and libs/gpgme/gpgmepp instead of on libs/gpgme in the blueprint.
Comment 7 Thomas Baumgart 2024-04-28 07:18:48 UTC
Git commit a8488c6711148f6efeea006f426da2bcd74f9cf4 by Thomas Baumgart.
Committed on 28/04/2024 at 07:18.
Pushed by tbaumgart into branch 'master'.

[kmymoney] Try to fix gpg support

Add proposed fix

M  +2    -1    extragear/kmymoney/kmymoney.py

https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/a8488c6711148f6efeea006f426da2bcd74f9cf4
Comment 8 Ralf Habacker 2024-04-30 13:13:23 UTC
(In reply to Thomas Baumgart from comment #7)
> Git commit a8488c6711148f6efeea006f426da2bcd74f9cf4 by Thomas Baumgart.
> Committed on 28/04/2024 at 07:18.
> Add proposed fix

I have heard that every time the blueprint file is changed, self.patchLevel must also be updated.
Comment 9 Thomas Baumgart 2024-05-01 08:31:08 UTC
Not sure if that applies here. Some gpgme*.exe files are now in ./bin without changing the patchlevel. Not sure if that is enough or not, though. No sign of gpg2.exe and honestly, I have no idea where it should come from.
Comment 10 Ingo Klöcker 2024-05-01 09:54:17 UTC
Bumping the patchLevel is only needed for packages that are cached. libalkimia may be cached, but applications are never cached. Hence, bumping the patchLevel of an application isn't necessary.

Regarding the missing gnupg, try if adding libs/gnupg as direct dependency of kmymoney helps.
Comment 11 Bug Janitor Service 2024-05-01 10:17:58 UTC
A possibly relevant merge request was started @ https://invent.kde.org/packaging/craft-blueprints-kde/-/merge_requests/857
Comment 12 Ingo Klöcker 2024-05-01 10:18:34 UTC
Git commit 203ad70e20af968d6ee76b67a87ad34a6ce93eee by Ingo Klöcker, on behalf of Thomas Baumgart.
Committed on 01/05/2024 at 10:17.
Pushed by kloecker into branch 'qt5-lts'.

[kmymoney] Try to fix gpg support

Add proposed fix


(cherry picked from commit a8488c6711148f6efeea006f426da2bcd74f9cf4)

M  +2    -1    extragear/kmymoney/kmymoney.py

https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/203ad70e20af968d6ee76b67a87ad34a6ce93eee