[Dnsmasq-discuss] Announce: dnsmasq-2.51rc1

Simon Kelley simon at thekelleys.org.uk
Fri Oct 2 13:50:30 BST 2009


Matthias Andree wrote:
> Dear Simon, list subscribers,
> 
> Am 02.10.2009, 14:19 Uhr, schrieb Simon Kelley <simon at thekelleys.org.uk>:
> 
>> I had assumed that the system locale would be set by and inherited 
>> from init, but looking more closely, that's not true. On Debian (and 
>> Ubuntu) the system default locale is stored in /etc/default/locale, 
>> and the startup scripts for daemons which care about this have to 
>> source that file and export LANG. I've fixed dnsmasq's Debian init 
>> script to do this, and that will feed through to Ubuntu too. Other 
>> packagers need to take this into account. I'll add to the documentation.
> 
> Thank you.
> 
> I wonder - also from experiences drawn from my own projects such as 
> fetchmail - how much of documentation, and for which target group in 
> respect, is required.
> It appears to me that decent projects will benefit from a documentation 
> that addresses end users as well as packagers.

There can never be too much documentation, and for dnsmasq most of the 
required documentation is needed by both packagers and users. The things 
that you identified as missing to be with build targets and variables, 
are probably things that users don't need, if they are using packaged 
software.
> 
> One more train of thought (a bit dialectic), if you read a system-wide 
> locale configuration, that may still not match a user-specific locale 
> setting; however this would likely be a less common configuration for 
> dnsmasq. Also, given that many distributions are converging on UTF-8 
> encodings, at least the character representation will be the same, so 
> that documentation would likely suffice for dnsmasq.
> 

One of the files in question is /etc/hosts. The format of that is well 
defined, so there's no way to add a charset tag to it. Since it's a 
system-wide configuration file, then the only valid assumption is that 
it uses the system-default locale, I think. When I was doing this work, 
I experimented with non-ascii characters in /etc/hosts. At least with 
gnu libc, the resolver library works fine, but I suspect it may not if 
the locale associated with a process has a different character encoding 
to that used in /etc/hosts.


Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list