Re: Shouldn't go app-defaults in /etc/X11?

1996-09-21 Thread Christian Schwarz

Lars Wirzenius <[EMAIL PROTECTED]> wrote:
> Third scenario:
[snip]
> This time the differences between the currently installed and
> the new app-defaults file are huge. The output of `diff' is not
> easy to understand, and the admin makes a mistake and assumes
> that nothing important has changed, just the arrangement of the
> file. She does not add the new resource. Application crashes.
> Not so good.
Well, a smart admin (that's infact what I would do then ;-) would make a
diff between his changed version and the config file of the old package.
He would then discover that you changed the color (or whatever it was),
remove his config file, install the new version of the package and have a 
look at it, how he could change the color in the changed environment.

So I think (as stated in another mail here) we have to choose if
a) app-defaults is part of the _code_ or
b) app-defaults is a configuration file of the program
Debian has chosen a) and there are goods arguments for a) since one
actually can *change* the code via action lists, for example (the
reaction on an event). I didn't know that first and therefore I
suggested (see another mail in this thread) that we add a comment to 
the (very small) paragraph in /usr/doc/readme.debian.

I was used to change the app-defaults file but I think I will live as
good as before if I make my changes in /etc/X11/Xresources since I
know there are good reasons for it.


Cheers,

Chris
--  _,, Christian Schwarz
   / o \__   [EMAIL PROTECTED], [EMAIL PROTECTED],
   !   ___;   [EMAIL PROTECTED], [EMAIL PROTECTED]
   \  /
  \\\__/  !PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
   \  / http://www.informatik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,.-.-
  "DIE ENTE BLEIBT DRAUSSEN!"



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-20 Thread Christian Schwarz

Hi!

Ok, you (Michael) made me change my standpoint. It's propably better to
consider app-defaults as part of the code and then it's ok if it stays
under /usr.

BTW, I just did a `grep app-defaults *.conffiles' in /var/lib/dpkg/info
and discovered, that there are a few packages specifying the app-defaults
file as conffiles (also in my xblast package--I will fix it). I'm not sure
if we should report this as bug.

You mentioned the file debian.readme and it was pointed out, that the
passage about app-defaults is too short. How about an improvement (too
avoid threads like this ;-) :

Please note that this distribution expects you to leave app-defaults
files unchanged. The app-defaults files are considered as part of the
code. That's why the directory is located in /usr/X11R6/lib/X11 instead
of /etc/X11. If you want to customise your X applications globally, put
your customisations in /etc/X11/Xresources.


Cheers,

Chris

--  _,, Christian Schwarz
   / o \__   [EMAIL PROTECTED], [EMAIL PROTECTED],
   !   ___;   [EMAIL PROTECTED], [EMAIL PROTECTED]
   \  /
  \\\__/  !PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
   \  / http://www.informatik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,.-.-
  "DIE ENTE BLEIBT DRAUSSEN!"



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-20 Thread Michael Alan Dorman
Christian Schwarz <[EMAIL PROTECTED]> writes:
> My suggestion of tagging the files as conffiles was thought as a solution
> to your problem, if the files change.

That's the problem, though---it's not a solution at all.  Consider if
the application introduces a new resource, without which the
application will fail?

Isn't it less work for the sysadmin if he/she can know that the
app-defaults file is _guaranteed_ correct (and managed in the postinst
to be customized for given obvious system defaults (like the nntp host
for knews)), and that if the app's not working he or she may need to
expiriment with the _few_ customised options in /etc/X11/Xresources?

What if someone maintains a package they don't use (I do for several
these days), and thus they are never aware that the program won't work
correctly (or lose data, or whatever), if you don't have a certain app
default?  I can't mention it in the postinst if I don't know about it.

> So I think the point is the following: Do we consider the
> app-defaults files as part of the program (code), or as
> configuration files. In the former case, they should stay in /usr,
> in the latter they should be moved to /etc/X11 and be tagged as
> conffiles.

They're part of the code.  They're _defaults_.  Anything else is
customization, and should go on elsewhere.

Mike.



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-20 Thread Lars Wirzenius
Christian Schwarz:
> My suggestion of tagging the files as conffiles was thought as a solution
> to your problem, if the files change.

The problem scenario:

Version 1.0 installs an app-defaults file. It defines
resource ``*Background: black''.

Admin installs version 1.0. She changes the app-defaults
file to ``*Background: white''.

Version 1.1 is released. The app-defaults file is the
same as in 1.0. Admin installs 1.1. What should be done
with the app-defaults file?

If the app-defaults file is marked as a config file, then dpkg
asks whether to keep the current file, or to replace it with the
one from 1.1. Admin keeps current file, because it does what she
wants. So far, so good.

Second scenario:

Version 1.2 is released. The app-defaults file adds a
new resource, ``*enableDWIM: true''. Application will
work if this resource is missing (and defaults to false),
but not nearly as well.

System still has the admin-modified file. Admin installs
1.2. What should be done with the app-defaults file?

Again, dpkg will allow the same choice as before. Admin chooses
to keep the current file. To make the application work well, she
has to compare the current file and the one in 1.2 (dpkg saves
it in the same directory, so this is easy), and make some more
edits. It's a small problem, but not too bad, since the changes
between 1.1 and 1.2 were small. It'd be nicer if the admin wouldn't
have to do any manual edits, but we can live with this.

Third scenario:

Version 1.3 is released. It adds a new resource,
``*importantThing: foo''. If this resource is not set,
the application will crash. This is documented only
in the middle of a five thousand line manual page. The
package maintainer did not know this, because everything
happened to work for him. The app-defaults file has
been rearranged to make it easier to understand.

Admin installs 2.0. What should be done with the
app-defaults file?

This time the differences between the currently installed and
the new app-defaults file are huge. The output of `diff' is not
easy to understand, and the admin makes a mistake and assumes
that nothing important has changed, just the arrangement of the
file. She does not add the new resource. Application crashes.
Not so good.

The Debian solution is to add a new file, /etc/X11/Xresources,
which is used in addition to the app-defaults files and each
user's own ~/.Xresources file. This way, the app-defaults file
does not have to be a config file. The package maintainer can
make any changes as is necessary. The admin makes any local
configuration in /etc/X11/Xresources. Everyone is happy.

Now that I've been made aware of this, I think it's a good
solution.

-- 
Please read  before mailing me.
Please don't Cc: me when replying to my message on a mailing list.




pgpDDlJBVttb3.pgp
Description: PGP signature


Re: Shouldn't go app-defaults in /etc/X11?

1996-09-19 Thread Christian Schwarz

Michael Alan Dorman <[EMAIL PROTECTED]> writes:
> I feel like a broken record, here, but would people involved in this
> discussion please look at /usr/doc/X11/debian.README?  Otherwise
> you're wasting both your own and others' time.
>
> For instance, it mentions the solution to the above mentioned issue:
>
>  Please note that this distribution expects you to leave app-defaults
>  files unchanged. If you want to customise X applications globally, put
>  your customisations in /etc/X11/Xresources.
Well I had a look at the file (and surely Lars too) but the point is that
I'm not satisfied with the argument, that the readme says that's the way
to do it.

My suggestion of tagging the files as conffiles was thought as a solution
to your problem, if the files change. Of course, this will need the
app-defaults directory be moved over to /etc/X11, but that's what we
were talking about.

So I think the point is the following: Do we consider the app-defaults
files as part of the program (code), or as configuration files. In the
former case, they should stay in /usr, in the latter they should be moved
to /etc/X11 and be tagged as conffiles.

Sorry, if I didn't express my standpoint clearly.


Cheers,

Chris

--  _,, Christian Schwarz
   / o \__   [EMAIL PROTECTED], [EMAIL PROTECTED],
   !   ___;   [EMAIL PROTECTED], [EMAIL PROTECTED]
   \  /
  \\\__/  !PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
   \  / http://www.informatik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,.-.-
  "DIE ENTE BLEIBT DRAUSSEN!"



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-18 Thread Lars Wirzenius
Michael Alan Dorman:
> I feel like a broken record, here, but would people involved in this
> discussion please look at /usr/doc/X11/debian.README?

I did that. I didn't notice that paragraph, probably because it
comes under the heading of ``xdm-start-server''. The visual clues
given by the formatting of the file (one extra empty line) were
not enough to make me read that part thoroughly.

I really need to get searching to work in my WWW documentation
front-end...

-- 
Please read  before mailing me.
Please don't Cc: me when replying to my message on a mailing list.




pgp1ujWGMjJUQ.pgp
Description: PGP signature


Re: Shouldn't go app-defaults in /etc/X11?

1996-09-18 Thread Carlos Carvalho
Yves Arrouye ([EMAIL PROTECTED]) wrote on 17 September 1996 00:10:
 >That wouldn't resolve Michael's problem: assume I change my
 >app-defaults file for SomeApp, just to adjust colors to my tastes.
 >Then comes a new release of SomeApp, with new features controlled by X
 >resources that are in the app-defaults file. What will dpkg do, then?
 >Propose me to keep my modified file (1), or replace it (2).
 >
 >If (1) changes are that I loose the ability to use the new feature
 >because the app-defaults file lacks some defaults (in most cases the
 >app will even not run).
 >
 >If (2) I get the new feature but lose my colors changes.
 >
 >It is extremely hard to update a changed file automatically (don't
 >talk about patch, please, this works only if the organization of the
 >file didn't change), so the best way is effectively to make resources
 >mofifications *outside* of the app-defaults file to keep them local
 >and still be able to upgrade nicely.

Exactly. That's why Jamie Zawinsky (or however it's spelled...)
strongly recommends against such files. Have a look at netscape
readmes'.

Carlos



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-17 Thread Lukas Nellen
[EMAIL PROTECTED] said:
> Please peruse /usr/doc/X11/debian.README, to understand why I say 
> that, on Debian, app-defaults files are not considered configurable.

For those who would like to specify their own application resource files, 
you can set the environment variables 
XFILESEARCHPATH (system wide defaults) and 
XUSERFILESEARCHPATH (per user defaults)
in the startup scripts. For more info, look at X(1). To me, this looks like the
`politically correct' way to provide per site X default files.

BTW, I got this and other useful X tricks from the book
`X user tools' by L. Mui and V. Quercia, pub. by O'Reilly

Cheers,
Lukas

---
   Dr. Lukas Nellen | Email: [EMAIL PROTECTED]
   Depto. de Fisica Teorica, IFUNAM |
   Apdo. Postal 20-364  | Tel.:  +52 5 622 5014 ext. 218
   01000 Mexico D.F., MEXICO| Fax:   +52 5 622 5015




Re: Shouldn't go app-defaults in /etc/X11?

1996-09-17 Thread Michael Alan Dorman
Lars Wirzenius <[EMAIL PROTECTED]> writes:
> However, a sysadmin might want to have a way to make a global override.
> For example, to configure Mosaic to use a proxy. Wouldn't it be nice
> if the relevant scripts allowed this? All that is needed is that they
> use /etc/X11/app-defaults/Foo, if it exists, after they have used
> /usr/X11R6/lib/X11/app-defaults, and before they use ~/.Xresources.

I feel like a broken record, here, but would people involved in this
discussion please look at /usr/doc/X11/debian.README?  Otherwise
you're wasting both your own and others' time.

For instance, it mentions the solution to the above mentioned issue:

  Please note that this distribution expects you to leave app-defaults
  files unchanged. If you want to customise X applications globally, put
  your customisations in /etc/X11/Xresources.

Mike.



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-17 Thread Lars Wirzenius
"Brian C. White":
> Personally, since these are _defaults_ that are intended to be overridden
> by user configuration, I think they are fine where they are.  These
> programs are not system utilities that need to be configured.  These
> are just defaults and there are documented ways for a user to change
> them as to their individual preferences.

However, a sysadmin might want to have a way to make a global override.
For example, to configure Mosaic to use a proxy. Wouldn't it be nice
if the relevant scripts allowed this? All that is needed is that they
use /etc/X11/app-defaults/Foo, if it exists, after they have used
/usr/X11R6/lib/X11/app-defaults, and before they use ~/.Xresources.

I'm afraid I don't have time to do this, but it should be simple.

-- 
Please read  before mailing me.
Please don't Cc: me when replying to my message on a mailing list.




pgpnigbZBV4eF.pgp
Description: PGP signature


Re: Shouldn't go app-defaults in /etc/X11?

1996-09-17 Thread Yves Arrouye
On Sep 16,  8:48pm, Christian Schwarz wrote:
} Subject: Re: Shouldn't go app-defaults in /etc/X11?
} 
} Michael Alan Dorman <[EMAIL PROTECTED]> writes:
} > If you disagree with this, as many seem to, please propose a solution
} > whereby package maintainers can easily make sure that app-defaults
} > files are updated to reflect any changes introduced in the upstream
} > app-defaults file.
} 
} Well, couldn't the files in app-defaults be marked as config files
} ("DEBIAN/conffiles") in the packages?
} 
} I think all this is done automatically by dpkg now (at least in the
} newest revision of dpkg). I've seen this working with a few other
} packages, since I upgraded to "unstable" a few days ago.

That wouldn't resolve Michael's problem: assume I change my
app-defaults file for SomeApp, just to adjust colors to my tastes.
Then comes a new release of SomeApp, with new features controlled by X
resources that are in the app-defaults file. What will dpkg do, then?
Propose me to keep my modified file (1), or replace it (2).

If (1) changes are that I loose the ability to use the new feature
because the app-defaults file lacks some defaults (in most cases the
app will even not run).

If (2) I get the new feature but lose my colors changes.

It is extremely hard to update a changed file automatically (don't
talk about patch, please, this works only if the organization of the
file didn't change), so the best way is effectively to make resources
mofifications *outside* of the app-defaults file to keep them local
and still be able to upgrade nicely.

Yves.


-- 
Yves Arrouye  Email: [EMAIL PROTECTED]
7, avenue Leon BolleeWeb: http://www.fdn.fr/~yarrouye/
75013 Paris  Work: +33 45 95 64 59
France   Home: +33 53 61 09 55



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-17 Thread Brian C. White
> > If you disagree with this, as many seem to, please propose a solution
> > whereby package maintainers can easily make sure that app-defaults
> > files are updated to reflect any changes introduced in the upstream
> > app-defaults file.
> 
> Well, couldn't the files in app-defaults be marked as config files
> ("DEBIAN/conffiles") in the packages? Then dpkg creates checksums of these
> files and when a package is updated, it can be replaced (if there were no
> changes) or it can ask the user what he wants to do with it (replace,
> leave under different name, i.e. add .dpkg-dist extension).

The original point was that if these are editable at all, they shouldn't
be on a read-only filesystem (as /usr is allowed to be).

Personally, since these are _defaults_ that are intended to be overridden
by user configuration, I think they are fine where they are.  These
programs are not system utilities that need to be configured.  These
are just defaults and there are documented ways for a user to change
them as to their individual preferences.
 
  Brian
 ( [EMAIL PROTECTED] )
 
---
 measure with micrometer, mark with chalk, cut with axe, hope like hell



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-17 Thread Michael Alan Dorman
Christian Schwarz <[EMAIL PROTECTED]> writes:
> Well, couldn't the files in app-defaults be marked as config files
> ("DEBIAN/conffiles") in the packages?

Only if you want Ian Jackson to post a bug report against your
package---conffiles do not belong in /usr.

Please look at /usr/doc/X11/debian.README for the proper procedure for
making system-wide changes to application default values.

Mike.



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-16 Thread Michael Alan Dorman
Christian Schwarz <[EMAIL PROTECTED]> writes:
> Backups would be much easier if _all_ the configurable files are in /etc
> and /usr can't be mounted readonly if one has to change the app-defaults
> file. (Shouldn't, as a simple rule, all files that are referred by the
> debpkg-conffiles be placed in /etc ?)

Please peruse /usr/doc/X11/debian.README, to understand why I say
that, on Debian, app-defaults files are not considered configurable.

If you disagree with this, as many seem to, please propose a solution
whereby package maintainers can easily make sure that app-defaults
files are updated to reflect any changes introduced in the upstream
app-defaults file.

Mike.



Shouldn't go app-defaults in /etc/X11?

1996-09-16 Thread Christian Schwarz

Hi!

I just browsed the Linux FSSTND (v1.2) but haven't found a comment about
the app-defaults directory.

Backups would be much easier if _all_ the configurable files are in /etc
and /usr can't be mounted readonly if one has to change the app-defaults
file. (Shouldn't, as a simple rule, all files that are referred by the
debpkg-conffiles be placed in /etc ?)


Cheers,

Chris

--  _,, Christian Schwarz
   / o \__   [EMAIL PROTECTED], [EMAIL PROTECTED],
   !   ___;   [EMAIL PROTECTED], [EMAIL PROTECTED]
   \  /
  \\\__/  !PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
   \  / http://www.informatik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,.-.-
  "DIE ENTE BLEIBT DRAUSSEN!"



Re: Shouldn't go app-defaults in /etc/X11?

1996-09-16 Thread Christian Schwarz

Michael Alan Dorman <[EMAIL PROTECTED]> writes:
> If you disagree with this, as many seem to, please propose a solution
> whereby package maintainers can easily make sure that app-defaults
> files are updated to reflect any changes introduced in the upstream
> app-defaults file.

Well, couldn't the files in app-defaults be marked as config files
("DEBIAN/conffiles") in the packages? Then dpkg creates checksums of these
files and when a package is updated, it can be replaced (if there were no
changes) or it can ask the user what he wants to do with it (replace,
leave under different name, i.e. add .dpkg-dist extension). 

I think all this is done automatically by dpkg now (at least in the
newest revision of dpkg). I've seen this working with a few other
packages, since I upgraded to "unstable" a few days ago.


Cheers,

Chris

--  _,, Christian Schwarz
   / o \__   [EMAIL PROTECTED], [EMAIL PROTECTED],
   !   ___;   [EMAIL PROTECTED], [EMAIL PROTECTED]
   \  /
  \\\__/  !PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
   \  / http://www.informatik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,.-.-
  "DIE ENTE BLEIBT DRAUSSEN!"