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

2013-04-11 Thread Vincent Cheng
On Wed, Apr 10, 2013 at 9:22 AM, Martin Quinson  wrote:
> On Wed, Apr 10, 2013 at 05:44:56PM +0200, Ansgar Burchardt wrote:
>> On 04/10/2013 08:45, Martin Quinson wrote:
>> > On Tue, Apr 09, 2013 at 10:32:01PM -0700, Vincent Cheng wrote:
>> > 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.
>
> I meant "template" as in "example of file that you could copy and
> adapt", explaining that I argumented that they are no templates since
> the program use them.

Err, I was mistaken when I said "templates". AFAIU, 0ad does read
settings from /usr/share/games/0ad/config/default.cfg (if present; if
it's not there, 0ad will just ignore it), but users can specifically
choose to override some (or all) of the settings listed in that file
with a similar config file in $XDG_CONFIG_HOME.

>> > 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.
>
> What bother me is that it is impossible to provide system-wide
> configuration in /etc. I have to use /usr for that.
>
> Or maybe I misunderstood the thing, and these file can be placed and
> edited in /etc also, restoring the good old hierarchy of overrides
>  [/usr]  ->  /etc  ->  ~

It's not that desktop applications ignore the FHS entirely, it's just
that it isn't very practical for (what are intended to be)
user-specific profiles and/or configuration for desktop applications
to be placed in what is intended to be a system-wide directory for
config files (/etc). That works well for your typical daemon running
in the background, but not so much for games. Hence the existence of
the Freedesktop.org's XDG spec [1] and associated standards like
$XDG_{CONFIG,DATA,CACHE}_HOME, which more and more desktop
applications now follow.

0ad's configuration/settings aren't actually intended to be modified
by changing /usr/share/games/0ad/config/default.cfg anyways; the
intent is for users to modify them in-game via a friendly GUI, which
saves these settings into some subdir in $XDG_CONFIG_HOME (which is
pretty standard for games, anyways). That's not to say that there
aren't any other ways to change 0ad's settings (e.g. modifying
/usr/share/games/0ad/config/default.cfg and treating it as a conffile
even when the header of said file says not to do so, or via
command-line arguments passed to pyrogenesis), but these are not
supposed to be treated as the canonical way of modifying and saving
settings that you've tweaked.

> I have the feeling that there is no system wide *conffile* in which I
> could specify that I want a windowed mode so that my edit don't get
> erased when the package is reinstalled. This seems to be a violation
> of the whole 10.7 section of the policy, particularly 10.7.2:
>
> | Any configuration files created or used by your package must reside
> | in /etc. If there are several, consider creating a subdirectory of
> | /etc named after your package.
> |
> | If your package creates or uses configuration files outside of /etc,
> | and it is not feasible to modify the package to use /etc directly,
> | put the files in /etc and create symbolic links to those files from
> | the location that the package requires.

So basically, all games (and other desktop applications) need to make
their config settings accessible as conffiles in /etc, and if they
don't it's an RC bug? All right, sounds like it's time for a mass RC
bug filing against the majority of the Debian Games team's packages,
as well as hundreds of other GNOME/KDE/other desktop applications. :/

Maybe we should try to get Freedesktop.org standards enshrined in
Policy (as a formality, since they're generally considered to be
standards already), but that's an awful lot of work too...

Regards,
Vincent

[1] http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2013-04-10 Thread Martin Quinson
On Wed, Apr 10, 2013 at 05:44:56PM +0200, Ansgar Burchardt wrote:
> On 04/10/2013 08:45, Martin Quinson wrote:
> > On Tue, Apr 09, 2013 at 10:32:01PM -0700, Vincent Cheng wrote:
> > 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.

I meant "template" as in "example of file that you could copy and
adapt", explaining that I argumented that they are no templates since
the program use them.

> > 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.

What bother me is that it is impossible to provide system-wide
configuration in /etc. I have to use /usr for that.

Or maybe I misunderstood the thing, and these file can be placed and
edited in /etc also, restoring the good old hierarchy of overrides
 [/usr]  ->  /etc  ->  ~

I have the feeling that there is no system wide *conffile* in which I
could specify that I want a windowed mode so that my edit don't get
erased when the package is reinstalled. This seems to be a violation
of the whole 10.7 section of the policy, particularly 10.7.2:

| Any configuration files created or used by your package must reside
| in /etc. If there are several, consider creating a subdirectory of
| /etc named after your package.
|
| If your package creates or uses configuration files outside of /etc,
| and it is not feasible to modify the package to use /etc directly,
| put the files in /etc and create symbolic links to those files from
| the location that the package requires. 

Bye, Mt.

-- 
My name only appears in the Acknowledgments section where I could have
signed this paper.  -- Bastard Reviewer From Hell


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2013-04-10 Thread Ansgar Burchardt
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  
>> 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]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2013-04-10 Thread Martin Quinson
On Tue, Apr 09, 2013 at 10:32:01PM -0700, Vincent Cheng wrote:
> Hi Martin,
> 
> On Tue, Apr 9, 2013 at 3:16 PM, Martin Quinson  
> wrote:
> > Package: 0ad
> > Version: 0.0.13-1
> > Severity: normal
> >
> > Dear Vincent,
> >
> > 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:

--- /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.

I don't think that desktop application norms should override the FHS
in Debian. Our distribution is exactly about unifying very
heterogeneous communities into a consistant set.

> > Thanks for your work anyway, you are on each game in Debian, that's
> > incredible!
> 
> Thanks! It looks like we share a pretty similar taste when it comes to
> FOSS games. :)

Should we start doing our own game? ;)

Thanks, Mt.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2013-04-09 Thread Vincent Cheng
Hi Martin,

On Tue, Apr 9, 2013 at 3:16 PM, Martin Quinson  wrote:
> Package: 0ad
> Version: 0.0.13-1
> Severity: normal
>
> Dear Vincent,
>
> 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).

> Thanks for your work anyway, you are on each game in Debian, that's
> incredible!

Thanks! It looks like we share a pretty similar taste when it comes to
FOSS games. :)

Regards,
Vincent


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



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

2013-04-09 Thread Martin Quinson
Package: 0ad
Version: 0.0.13-1
Severity: normal

Dear Vincent,

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 :)


Thanks for your work anyway, you are on each game in Debian, that's
incredible!

Bye, Mt


-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages 0ad depends on:
ii  0ad-data   0.0.13-1
ii  0ad-data-common0.0.13-1
ii  dpkg   1.16.10
ii  libboost-filesystem1.49.0  1.49.0-3.2
ii  libboost-signals1.49.0 1.49.0-3.2
ii  libc6  2.13-38
ii  libcurl3-gnutls7.26.0-1+wheezy1
ii  libenet1a  1.3.3-2
ii  libgcc11:4.7.2-5
ii  libgl1-mesa-glx [libgl1]   8.0.5-4
ii  libjpeg8   8d-1
ii  libmozjs185-1.01.8.5-1.0.0+dfsg-4
ii  libnvtt2   2.0.8-1+dfsg-2
ii  libopenal1 1:1.14-4
ii  libpng12-0 1.2.49-1
ii  libsdl1.2debian1.2.15-5
ii  libstdc++6 4.7.2-5
ii  libvorbisfile3 1.3.2-1.3
ii  libwxbase2.8-0 2.8.12.1-12
ii  libwxgtk2.8-0  2.8.12.1-12
ii  libx11-6   2:1.5.0-1
ii  libxcursor11:1.1.13-1
ii  libxml22.8.0+dfsg1-7+nmu1
ii  zlib1g 1:1.2.7.dfsg-13

0ad recommends no packages.

0ad suggests no packages.

-- no debconf information

-- 
"i don't think so," said Rene Descartes. Just then, he vanished.
"je pense pas, non." furent les derniers mots de Descartes avant de disparaƮtre.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org