Hi Edward,

On 7/18/22 12:25, Edward Welbourne wrote:
Hi Alejandro,

I think the source of the confusion is that "Should normally be" and how
you should write a default value don't match up because it is normal to
use non-default values.

So systems are commonly set up with localstatedir=/usr/var and
runstatedir=/var/run, despite the fact that their defaults are
$prefix/var and the result of appending /run to it.  The reason to give
the defaults in this form is so that, when someone sets prefix to
/usr/local, they (by default) get /usr/local/var and /usr/local/var/run
and thus conform to "how your non-system GNU install should work" rather
than stomping on where things would have been if you'd hard-coded what
many folk do in fact set up.  This way, if someone sets things up
differently, you play nicely with their choices, rather than hard-coding
what "everyone" else does.

It's about whoever administers a particular box being at liberty to do
what they want, so if you're writing software to offer to others to
install on their systems, your defaults should be "polite" and not
impose on them any particular set-up.

Does that make it clearer ?

I think so.

So you're saying that "should normally be" doesn't mean the "the default value should normally be", but rather that "commonly, people use".

That is not obvious at all from reading the file, since that entry is the only one in which "should normally be" is different than the default value (AFAIR). Also, the wording is not helping:

"This [$runstatedir] should normally be /var/run, but write it as $(localstatedir)/run"

"write it as" to me means that the "written" version has the same meaning as the former (and happens to be in all other entries).

So maybe you would like to change it to something like:

This should normally be /var/run, but the default value should be /usr/local/var/run, but write it as $(localstatedir)/run

Or even omit any reference to /var/run, which is just misleading, and say:

This should normally be /usr/local/var/run, but write it as $(localstatedir)/run

Makes sense?

I don't see why we would like to mention /var/run here if we don't mention for example /etc (we mention /usr/local/etc).



Alejandro Colomar

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to