Bug#877533: biboumi needs /var/lib/biboumi directory to work properly.

Florent Le Coz louiz at louiz.org
Mon Oct 2 16:50:14 UTC 2017


On 10/02/2017 06:32 PM, Vasudev Kamath wrote:
>> However, by default (if the option db_name is not set in the biboumi.cfg
>> file), biboumi will try to open (or create) the database file
>> $XDR_DATA_HOME/biboumi.sqlite or $HOME/.config/biboumi/biboumi.sqlite if
>> XDR_DATA_HOME is not defined.
> Umm.. Slightly confused, if it is to use those environment variable the
> unit should be installed with --user?. Also in the error file I noticed
> biboumi complaining about non existent /var/lib/biboumi/biboumi.sqlite.
>
> So am I understanding something wrong?.
I’m not exactly sure how this happened. Maybe the XDG_DATA_PATH or HOME 
for the user “nobody” is /var/lib?
I just checked, and /var/lib is hardcoded nowhere in biboumi’s sources 
(except in the Dockerfile, which is not used at all here, of course).

Note that these env variables are standard ones. I used this 
specification to write the code:
https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

>> You also have to make sure the path is correct, somehow.
> I would appreciate some more input as I was planning to add postinst
> file which adds /var/lib/biboumi folder and also create user and group
> biboumi biboumi.
>
> Cheers,

(Disclaimer: I’m not very familiar with debian’s packaging policy 
regarding users creation, or configuration files)

I don’t know exactly how (and if) debian defines these variables by 
default. But if this is not the case, then we have a few solutions:

- Install the /etc/biboumi/biboumi.cfg file with the package, using the 
example config, with the addition of db_name=/var/lib/biboumi/biboumi.sqlite

- Make sure the environment variable XDG_DATA_HOME is set to /var/lib 
when biboumi is started (in the unit file, or something else?)


And in any case, yes the package should probably create a “biboumi” 
account, and /var/lib/biboumi should be owned by it.


-- 

louiz’



More information about the Pkg-voip-maintainers mailing list