Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos: Conform with RFC 1123 in networking.hostName #99329

Merged
merged 1 commit into from Oct 2, 2020

Conversation

0x4A6F
Copy link
Member

@0x4A6F 0x4A6F commented Oct 1, 2020

Motivation for this change
Conform to RFC 1123 [0], specifically to "2.1 Host Names and Numbers",
which allow starting host name with alphanumerical instead of alphabetical characters.
RFC 1123 updates RFC 952 [1], which is referenced in "man 5 hosts".

[0]: https://tools.ietf.org/html/rfc1123
[1]: https://tools.ietf.org/html/rfc952

also see #94011.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc: @zimbatm @primeos

@0x4A6F 0x4A6F requested a review from primeos October 1, 2020 21:46
@0x4A6F 0x4A6F changed the title nixos/task/networking: conform to RFCs nixos: Conform with RFC 1123 in networking.hostName Oct 1, 2020
Conform to RFC 1123 [0], specifically to "2.1 Host Names and Numbers",
which allow starting host name with alphanumerical instead of alphabetical characters.
RFC 1123 updates RFC 952 [1], which is referenced in "man 5 hosts".

[0]: https://tools.ietf.org/html/rfc1123
[1]: https://tools.ietf.org/html/rfc952
Copy link
Member

@primeos primeos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RFC 1123 updates RFC 952

The way I see it is that they're different "standards" (domain names vs. requirements for Internet hosts) and RFC 1123 isn't listed as an update of RFC 1035 (but I didn't read them so I might be missing something). However, it still seems to be considered an amendment or even update depending on the source.

But in any case I'm fine with this change (RFC 1123 seems more appropriate) though I'm not sure if we really need it and if e.g. some (old) software might misbehave if the hostname starts with a digit.

I'll give this a slight approval but I don't want to make the final decision here.

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allowing a digit as a first character shouldn't be a problem, especially if there's an RFC listing this.

@flokli flokli merged commit 93178d4 into NixOS:master Oct 2, 2020
@flokli
Copy link
Contributor

flokli commented Oct 2, 2020

Backported to 20.09 in c232d4b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants