Bug#705077: 0ad: Configuration file *must* be under /etc

Ansgar Burchardt ansgar at debian.org
Wed Apr 10 15:44:56 UTC 2013


On 04/10/2013 08:45, Martin Quinson wrote:
> On Tue, Apr 09, 2013 at 10:32:01PM -0700, Vincent Cheng wrote:
>> On Tue, Apr 9, 2013 at 3:16 PM, Martin Quinson <martin.quinson at loria.fr> wrote:
>>> I wanted to change the default configuration, and had to dpkg -L the
>>> packages to discover its configuration file.
>>>
>>> /usr/share/games/0ad/config/ is not the right location for
>>> default.cfg, you really want to move it to /etc.
>>>
>>> Usually I would have reported this serious policy violation with a
>>> release critical severity, but I don't want to interfere with the
>>> release process right now.
>>>
>>> Please fix it anyway :)
>>
>> The "config" files in /usr/share/games/0ad are all just templates; the
>> actual config files the game uses are placed in
>> $XDG_CONFIG_HOME/0ad/config/user.cfg (i.e. for mostly everyone it's
>> found in ~/.config/0ad/config/user.cfg), and these config files in
>> $XDG_CONFIG_HOME override those in /usr/share/games/0ad (as is the
>> norm for many desktop applications).
> 
> If they are templates, they must go to /usr/share/doc. But that's not
> true: when I edit this file, and relaunch the game, I see the
> difference applied in the game. I did this:

No, files that are used by the program (for example when it uses them as
a base for a file in ~/.config) must *not* be in /usr/share/doc.

> --- /usr/share/games/0ad/config/default.cfg~
> +++ /usr/share/games/0ad/config/default.cfg
> @@ -18,7 +18,7 @@
>  ; **************************************************************
>   
>  ; Enable/disable windowed mode by default. (Use Alt+Enter to toggle in the game.)
> -windowed = false
> +windowed = true
>  
>  ; Enable/disable the splashscreen
>   splashscreenenable = true
> ---------------------------------------------   
> 
> and then the game starts in windowed mode. The fact that ~/.0ad config
> files override /etc/ files seems quite usual to me, but do not change
> my feeling about config files out of /etc.

As far as I know having default configurations in /usr that are
overriden by files in /etc or $HOME is allowed by the FHS. As long as
users are not supposed to change them at least.

systemd uses this quite a lot, for example [1].

Ansgar

  [1]
<http://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F>



More information about the Pkg-games-devel mailing list