Bug 417721 - akonadi-backend-postgresql: Initialisation of database fail if locale en_US.UTF8 is not avalaible systemwide
Summary: akonadi-backend-postgresql: Initialisation of database fail if locale en_US.U...
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (show other bugs)
Version: GIT (master)
Platform: Debian testing Linux
: NOR major (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL: https://bugs.debian.org/cgi-bin/bugre...
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-15 20:33 UTC by roucaries
Modified: 2020-10-19 21:40 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.15.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roucaries 2020-02-15 20:33:54 UTC
The creation of database fail if locale en_US.UTF8 is not installed systemwise (by pulling
locale-all package for instance).

Indeed akonadi create database by using --locale en_US.UTF8
(see https://github.com/KDE/akonadi/blob/8aca730125ad247014868ba6e4cc530f4209619a/src/server/storage/dbconfigpostgresql.cpp#L297)

correct flags will be: -E UTF8 --no-locale   
that does not need to install a locale systemwise and is safe

Thanks

Bastien
Comment 1 roucaries 2020-02-15 20:36:35 UTC
NB: they are two place where you pass the flags also here:
https://github.com/KDE/akonadi/blob/8aca730125ad247014868ba6e4cc530f4209619a/src/server/storage/dbconfigpostgresql.cpp#L484

May be refactor ?
Comment 2 roucaries 2020-02-15 20:44:54 UTC
Debian bug here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951389
Comment 3 Sandro Knauß 2020-09-07 17:36:27 UTC
Git commit 268bfc0830bee2012ab05f3a6055fff27a8c9010 by Sandro Knauß.
Committed on 07/09/2020 at 17:29.
Pushed by knauss into branch 'hefee/bugfix_417721'.

Fix(postgresql): Initialise database without locale en_US.UTF8 avalaible systemwide

Currently postgres rely on en_US.UTF8 locale to be available for the
current machine. But it is possible to to initialise the database
without this locale to be available.

M  +5    -2    src/server/storage/dbconfigpostgresql.cpp

https://invent.kde.org/pim/akonadi/commit/268bfc0830bee2012ab05f3a6055fff27a8c9010
Comment 4 Sandro Knauß 2020-09-07 17:39:22 UTC
Well currently there is only a MR open:
https://invent.kde.org/pim/akonadi/-/merge_requests/30

(not merged)
Comment 5 Sandro Knauß 2020-10-19 21:40:58 UTC
Now the MR is accepted and merged.