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
Contributor

@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 Oct 1, 2020
@0x4A6F 0x4A6F force-pushed the 0x4A6F:master-networking-hostname branch from 834f62c to 5e9589d Oct 1, 2020
@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
@primeos
primeos approved these changes Oct 2, 2020
Copy link
Member

@primeos primeos left a comment

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.

@flokli
flokli approved these changes Oct 2, 2020
Copy link
Contributor

@flokli flokli left a comment

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
17 checks passed
17 checks passed
tests tests
Details
action
Details
Evaluation Performance Report Evaluator Performance Report
Details
Wait for ofborg
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="c232d4b"; rev="c232d4b587b2b9521c549c06ba93fdb45630106a"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@flokli
Copy link
Contributor

@flokli 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.