lxdui icon indicating copy to clipboard operation
lxdui copied to clipboard

LXDUI config gets blown away on upgrade due to being persisted next to the source code

Open strugee opened this issue 5 years ago • 2 comments

If you opt to install LXDUI globally (i.e. python3 setup.py install without activating a virtualenv first), configuration files such as auth.conf will be stored in and read from /usr/local/lib/python3.7/dist-packages/LXDUI-<version>-py3.7.egg/conf. This location is not the correct place to store configuration, but even worse, if the administrator runs python3 setup.py install again (e.g. to upgrade LXDUI to a new release), this configuration directory will be silently overwritten with the defaults from upstream.

LXDUI should instead read configuration from /etc - e.g. /etc/lxdui or something like that. auth.conf arguably is state instead of configuration, so maybe it should go in /var/lib (or someplace defined in lxdui.conf) but really almost anywhere is better than where it is now in /usr.

See also the hier(7) and file-hierarchy(7) manpages.

strugee avatar Feb 05 '21 05:02 strugee

@jetroni closed by accident?

strugee avatar Feb 14 '22 15:02 strugee

My bad, this issue was referenced to a PR that was merged and I thought that it was already introduced.

jetroni avatar Feb 14 '22 17:02 jetroni