Bug 418265 - Akonadi misbehaves if installed with -DCONFIG_INSTALL_DIR=/somewhere
Summary: Akonadi misbehaves if installed with -DCONFIG_INSTALL_DIR=/somewhere
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: unspecified
Platform: OpenMandriva Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-27 19:50 UTC by Bernhard Rosenkränzer
Modified: 2023-05-06 07:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkränzer 2020-02-27 19:50:38 UTC
SUMMARY
If akonadi is configured with -DCONFIG_INSTALL_DIR=/somewhere, all of its config files (including mysql-global.conf) get installed to /somewhere -- but akonadiserver tries to load some of the files (including mysql-global.conf) with StandardDirs::locateResourceFile -- which isn't aware of -DCONFIG_INSTALL_DIR and looks in the default places.

STEPS TO REPRODUCE
1. On a box without previous akonadi configs, build and install akonadi with e.g. -DCONFIG_INSTALL_DIR=/etc
2. Try to start akonadiserver

OBSERVED RESULT
akonadiserver crashes on startup saying it can't find mysql-global.conf

EXPECTED RESULT
akonadiserver finds mysql-global.conf where it was installed (or alternatively, make install ignores CONFIG_INSTALL_DIR and installs mysql-global.conf where it can be found).

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

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2023-04-25 17:52:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/akonadi/-/merge_requests/135
Comment 2 Carl Schwan 2023-05-06 07:36:58 UTC
Git commit 0763800aed1b09259d8e42621482ed3b66a34f2d by Carl Schwan.
Committed on 06/05/2023 at 07:33.
Pushed by carlschwan into branch 'master'.

Check for config file in the location of CONFIG_INSTALL_DIR

Since we install the files in CONFIG_INSTALL_DIR

M  +2    -0    src/private/CMakeLists.txt
M  +8    -0    src/private/standarddirs.cpp

https://invent.kde.org/pim/akonadi/commit/0763800aed1b09259d8e42621482ed3b66a34f2d