Bug 416827 - libofx dtd files are not found in AppImage
Summary: libofx dtd files are not found in AppImage
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: git (master)
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-27 17:16 UTC by Thomas Baumgart
Modified: 2020-06-05 04:08 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Baumgart 2020-01-27 17:16:27 UTC
SUMMARY
The appimage is reporting missing DTD files. I performed a manual check and found them in /usr/share/libofx7/libofx. After some research it seems that the appimage needs these files to be located one directory up as follows: /usr/share/libofx

STEPS TO REPRODUCE
1. Start the AppImage and import an OFX file

OBSERVED RESULT
File not imported

EXPECTED RESULT
File is imported without problems

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Messages printed to the console:

OfxImporterPlugin::slotImportFile
setup callback routines
process data
LibOFX INFO: libofx_proc_file(): File format not specified, autodetecting...
LibOFX INFO: libofx_proc_file(): Detected file format: OFX (Open Financial eXchange (OFX or QFX))
LibOFX INFO: sanitize_proprietary_tags() removed: <INTU.BID>00508</INTU.BID>
LibOFX ERROR: find_dtd():Unable to find the DTD named opensp.dcl
LibOFX ERROR: find_dtd():Unable to find the DTD named ofx160.dtd
LibOFX ERROR: ofx_proc_file(): FATAL: Missing DTD, aborting

Moving the DTD files to /usr/share/libofx solves the problem.

Originally reported on https://forum.kde.org/viewtopic.php?f=69&t=164354
Comment 1 Thomas Baumgart 2020-01-27 18:52:18 UTC
Git commit 07131912856d7b8f04d374ad8e79cfe505563f5f by Thomas Baumgart.
Committed on 27/01/2020 at 18:51.
Pushed by tbaumgart into branch '5.0'.

Include libofx DTD files in AppImage
FIXED-IN: 5.0.9

M  +1    -0    packaging/linux/appimage/build-image.sh

https://commits.kde.org/kmymoney/07131912856d7b8f04d374ad8e79cfe505563f5f
Comment 2 Thomas Baumgart 2020-01-29 15:51:18 UTC
Adding the files is only half of the solution: seems that we need to tweak the path were libofx should look for them also. They are not searched for in the appimage but things work fine when they are installed on the hosts /usr/share/libofx directory.
Comment 3 Thomas Baumgart 2020-01-29 19:26:33 UTC
Git commit 7ea9a9d7d2822e7fdd7c1de5245e275bbc5246b9 by Thomas Baumgart.
Committed on 29/01/2020 at 19:25.
Pushed by tbaumgart into branch '5.0'.

Load OFX DTDs from AppImage filesystem

In AppImage mode LibOFX needs to be instructed to search the DTD files
inside the AppImage file instead of the root filesystem.
FIXED-IN: 5.0.9

M  +11   -0    kmymoney/plugins/ofx/import/ofximporter.cpp

https://commits.kde.org/kmymoney/7ea9a9d7d2822e7fdd7c1de5245e275bbc5246b9