Re: Please review netcfg templates for debian-installer

Justin B Rye <[email protected]> Sat, 3 Jan 2026 17:30:04 +0000
Newsgroups gmane.linux.debian.internationalization.english
Message-ID <[email protected]>
Richard Lewis wrote:
>  _Description: Hostname:
>   Please enter the hostname for this system.
>   .
>   The hostname is a single word that identifies your system to the network.
> 
> Isnt "to the network" wrong these days? a hostname identifies the system
> full stop, and most systems are not reachable "from the network" in any
> meaningful sense.

My version took this out for the sake of generality, but really we
don't need to explain what names are for.  Mind you, I've always
wondered what it is I'm naming exactly - do people normally give
multi-booting machines one name per OS or one name per base unit?

>   If you don't know what your hostname should be, consult your network
>   administrator.
> 
> Should this sentence still be here -- most users have no "network
> administrator", and those that do dont need to be told to consult them
> 
>   If you are setting up your own home network, you can make
>   something up here.
> 
> I suggest the template should assume this is what is happening, as that
> is what most people will be doing -- and people doing something else
> will need less help

Don't forget the installer gives this question a default answer of
"debian" anyway, so people who don't care will just hit "okay".
 
> + .
> + 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.
> 
> 
> it's understandable english (although "optionally it is possible" could
> be just "optionally", and "period" is a bit unusual for non-american
> readers), but i dont think this is easy to understand -- and hardly
> anything has a FQDN for some years -- there was a discussion about
> fqdn's meaning recently and someone wrote a wiki page
> https://wiki.debian.org/Hostname which would be a better starting point
> for all of this

We don't want to get sidetracked; this dialogue only really exists to
say "if you want to give your system a name, here are the rules".
Though it turns out the rules aren't as clear-cut as they might be.
 
> Basically i tihnk this whole question should be modernised -- isnt it something like:
> 
> - give the system a meaningful name that identifies it - you can use any name you like
> - but it has to be a single word with A-Z, a-z, 0-9, ., - (or whatever)
> - if the system has an internet domain name you can use the bit before the first dot
> - if the system has a FQDN you can use it

I'm not sure I follow your distinction between "internet domain name"
and "FQDN" here; I'd have expected it to be a matter of "local name,
possibly in /etc/hosts files on my LAN" versus "routeable DNS FQDN"...
 
>  Template: netcfg/hostname
>  Type: string
>  Description: for internal use; can be preseeded
>   Hostname to set for the system; ignores names provided by DHCP or DNS.
>  
>  Template: netcfg/invalid_hostname
> @@ -165,26 +169,31 @@ Type: error
>  _Description: Invalid hostname
>   The name "${hostname}" is invalid.
>   .
>   A valid hostname 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.
> + .
> + 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.
> 
> i dont think this new bit before the comma is at all understandable, the
> rule above applies to the whole string so isnt it obvious that "all
> contained labels" have to also follow it? the term "label" should be
> defined (you explain it in one of the other templates, but not here)

The rule for short hostnames didn't explain that the rules are
per-segment and segments are separated by dots, so this version needs
to make that more explicit.
 
>  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.
> 
> (I think this is probably OK, but it feels a bit over-complicated)

It is in fact possible that we could leave out the bit about upper-
and lowercase and the bit about trailing dashes.
  
>  Template: netcfg/error
>  Type: error
>  # :sl2:
>  _Description: Error
>   An error occurred and the network configuration process has been aborted.
> 
> is the word "process" really needed here?

We could get away with abbreviating it down to "and network
configuration has been aborted", but I didn't bother.

> 
>   You may retry it from the installation main menu.

(One other thing I considered trying to fix but didn't bother with is
that there's an oversupply of "may"s...)