Re: Please review netcfg templates for debian-installer
Holger Wansing <[email protected]> Sat, 03 Jan 2026 10:41:44 +0100
| Newsgroups | gmane.linux.debian.internationalization.english |
|---|---|
| Message-ID | <[email protected]> |
Hi Justin, Pascal,
thanks for your review, much welcomed=2E
I have pushed the changings to my branch=2E
<https://salsa=2Edebian=2Eorg/holgerw/netcfg/-/commit/650079223c539787ec9c=
54e67b762427dfff5cf1>
Remark inline=2E
Am 2=2E Januar 2026 20:48:31 MEZ schrieb Justin B Rye <justin=2Ebyam=2Erye=
@gmail=2Ecom>:
>Holger Wansing wrote:
>> I would like to ask for a review of some template changings regarding t=
he
>> network config in debian-installer=2E
>>=20
>> netcfg allows (for a long time already) to give an fully qualified doma=
in
>> name (FQDN), when the installer asks for the hostname=2E
>> The wording in the templates however does not tell about this possibilt=
y=2E
>[=2E=2E=2E]
>
>> +++ b/debian/netcfg-common=2Etemplates
>> @@ -149,14 +149,18 @@ Default: debian
>> _Description: Hostname:
>> Please enter the hostname for this system=2E
>> =2E
>> The hostname is a single word that identifies your system to the netw=
ork=2E
>> If you don't know what your hostname should be, consult your network
>> administrator=2E If you are setting up your own home network, you can=
make
>> something up here=2E
>
>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=2E
>
>> + =2E
>> + Optionally it is possible to give a fully qualified domain name (FQDN=
) here,
>> + which combines hostname and domain name in one string, with the label=
s
>> + separated by periods=2E
>
>Pedantically, it's possible as an option rather than optionally
>possible=2E 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=2E
> =2E
> The hostname is a label that identifies your system=2E It may be eith=
er a
> single word giving it a unique name within the local network, or a fu=
lly
> qualified domain name (FQDN) which combines the hostname and domain n=
ame
> in one string, separated by periods=2E
> =2E
> If you don't know what your hostname should be, consult your network
> administrator=2E If you are setting up your own home network, you can=
make
> up the hostname yourself=2E
> =20
>[=2E=2E=2E]
>> =2E
>> A valid hostname may contain only the numbers 0-9, upper and lowercas=
e
>
>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"=2E
>
>I might also raise the issue of [A-Za-z] including odd characters in
>some locales, but that's *too* pedantic=2E Then again, I notice that
>hostname(7) implies a trailing hyphen *is* legal, and uppercase
>letters *aren't*!
@Pascal:=20
Seems there are different rules, when it comes to allowed characters and l=
ength of FQDN (63 vs=2E 253)=2E
Any idea how to deal with that?
Holger
>> letters (A-Z and a-z), and the minus sign=2E It must be at most
>> ${maxhostnamelen} characters long, and may not begin or end with a mi=
nus
>> sign=2E
>> + =2E
>> + If you chose to give a fully qualified domain name (FQDN) as hostname=
,
>> + all contained labels may only contain characters as stated in the rul=
e quoted
>> + above, and the whole string must be at most ${maxhostnamelen} charact=
ers
>> + long=2E
>
> 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 who=
le
> string must be no more than ${maxhostnamelen} characters long=2E
>
>> Template: netcfg/invalid_domain
>> Type: error
>> # :sl2:
>> _Description: Invalid domain name
>> The domain name "${domain}" is invalid=2E
>> =2E
>> - A valid domain name may contain labels separated with periods=2E
>> + A valid domain name may contain labels separated by periods=2E
>> Each label may contain only the numbers 0-9, upper and lowercase
>> - letters (A-Z and a-z), and the minus sign=2E It must be at most
>> - ${maxhostnamelen} characters long, and may not begin or end with a mi=
nus
>> - sign=2E
>> + letters (A-Z and a-z), and the minus sign, but it may not begin or en=
d
>> + with a minus sign=2E The domain name must be at most ${maxhostnamelen=
}
>> + characters long=2E
>
>Since "may contain only=2E=2E=2E" is a restriction, adding a further
>restriction isn't really a job for "but"=2E Then again, repeating "and"
>feels awkward too=2E Try a semicolon?
>
> A valid domain name may contain labels separated by periods=2E Each l=
abel
> may contain only the digits 0-9, upper- and lowercase letters (A-Z an=
d
> a-z), and the minus sign; it may not begin or end with a minus sign=
=2E
> The domain name must be at most ${maxhostnamelen} characters long=2E
>
--=20
Sent from /e/ OS on Fairphone3