Re: Please review netcfg templates for debian-installer

Justin B Rye <[email protected]> Fri, 2 Jan 2026 19:48:31 +0000
Newsgroups gmane.linux.debian.internationalization.english
Message-ID <[email protected]>
Holger Wansing wrote:
> I would like to ask for a review of some template changings regarding the
> network config in debian-installer.
> 
> netcfg allows (for a long time already) to give an fully qualified domain
> name (FQDN), when the installer asks for the hostname.
> The wording in the templates however does not tell about this possibilty.
[...]

> +++ b/debian/netcfg-common.templates
> @@ -149,14 +149,18 @@ Default: debian
>  _Description: Hostname:
>   Please enter the hostname for this system.
>   .
>   The hostname is a single word that identifies your system to the network.
>   If you don't know what your hostname should be, consult your network
>   administrator. If you are setting up your own home network, you can make
>   something up here.

If we're going to add the FQDN option, we should probably be clearer
about the fact that we're starting with the bare-hostname version.

> + .
> + Optionally it is possible to give a fully qualified domain name (FQDN) here,
> + which combines hostname and domain name in one string, with the labels
> + separated by periods.

Pedantically, it's possible as an option rather than optionally
possible.  And if we're going to use words like "string" and "label"
then maybe we ought to use them from the start - something like

    Please enter the hostname for this system.
    .
    The hostname is a label that identifies your system. It may be either a
    single word giving it a unique name within the local network, or a fully
    qualified domain name (FQDN) which combines the hostname and domain name
    in one string, separated by periods.
    .
    If you don't know what your hostname should be, consult your network
    administrator. If you are setting up your own home network, you can make
    up the hostname yourself.
  
[...]
>   .
>   A valid hostname may contain only the numbers 0-9, upper and lowercase

Nitpick (here and below): we mean the digits 0-9 (which may legally be
combined to produce numbers outside the range 0-9!), and there ought
to be a dangling hyphen in "upper- and lowercase".

I might also raise the issue of [A-Za-z] including odd characters in
some locales, but that's *too* pedantic.  Then again, I notice that
hostname(7) implies a trailing hyphen *is* legal, and uppercase
letters *aren't*!

>   letters (A-Z and a-z), and the minus sign. It must be at most
>   ${maxhostnamelen} characters long, and may not begin or end with a minus
>   sign.
> + .
> + If you chose to give a fully qualified domain name (FQDN) as hostname,
> + all contained labels may only contain characters as stated in the rule quoted
> + above, and the whole string must be at most ${maxhostnamelen} characters
> + long.

    If you chose to give a fully qualified domain name (FQDN) as hostname, each
    part must follow the above rules on permitted characters, and the whole
    string must be no more than ${maxhostnamelen} characters long.

>  Template: netcfg/invalid_domain
>  Type: error
>  # :sl2:
>  _Description: Invalid domain name
>   The domain name "${domain}" is invalid.
>   .
> - A valid domain name may contain labels separated with periods.
> + A valid domain name may contain labels separated by periods.
>   Each label may contain only the numbers 0-9, upper and lowercase
> - letters (A-Z and a-z), and the minus sign. It must be at most
> - ${maxhostnamelen} characters long, and may not begin or end with a minus
> - sign.
> + letters (A-Z and a-z), and the minus sign, but it may not begin or end
> + with a minus sign. The domain name must be at most ${maxhostnamelen}
> + characters long.

Since "may contain only..." is a restriction, adding a further
restriction isn't really a job for "but".  Then again, repeating "and"
feels awkward too.  Try a semicolon?

    A valid domain name may contain labels separated by periods. Each label
    may contain only the digits 0-9, upper- and lowercase letters (A-Z and
    a-z), and the minus sign; it may not begin or end with a minus sign.
    The domain name must be at most ${maxhostnamelen} characters long.