[Dnsmasq-discuss] Announce: dnsmasq-2.51rc1

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

Matthias Andree wrote:

> [IDN]
>>> - I wonder how dnsmasq will figure out the proper character set for 
>>> these files -- or will it just assume UTF-8? Older systems might use 
>>> some ISO-8859-* variant. (Sorry, no time to read source now.)
>> It calls idna_to_ascii_lz() which uses the current locale.
> ...which derives from implicit assumptions that the user starting 
> dnsmasq uses the proper locale for the /etc/ files subjected to 
> IDN/Punycode handling, particularly on systems where root users don't 
> usually log in, but use sudo (Ubuntu Linux) - the console locale used to 
> edit files may differ from the locale in effect when /etc/init.d/dnsmasq 
> or init or Upstart or whichever launches the daemon.
> This should be documented very clearly in the manpage and the relevant 
> .html file to avoid surprises - the locale used to edit these /etc/ 
> files must get set in the environment where dnsmasq is launched.

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.

>>>  - The "all-i18n" target creates the .mo files under /src which I 
>>> find counterintuitive.
>> I can't remember why it's done like that. It must have made sense at 
>> the time!
> Well at least they are side to side with the .o files which also end up 
> in src/, and then I wonder what the bld/ directory is for if it's 
> static. I would've guessed from the name that bld/ is build/ and hence 
> where the outputs are supposed to end up, but apparently not so. :)

/bld is a place to keep build infrastructure, rather than cluttering up 
the root directory.



More information about the Dnsmasq-discuss mailing list