{"action":"created","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/751","labels_url":"https://api.github.com/repos/systemd/systemd/issues/751/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/751/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/751/events","html_url":"https://github.com/systemd/systemd/pull/751","id":97602307,"number":751,"title":"hostnamectl, firstboot, networkd: ignore dot at end of fqdn, be case-insensitive, case preserving","user":{"login":"keszybz","id":349618,"avatar_url":"https://avatars.githubusercontent.com/u/349618?v=3","gravatar_id":"","url":"https://api.github.com/users/keszybz","html_url":"https://github.com/keszybz","followers_url":"https://api.github.com/users/keszybz/followers","following_url":"https://api.github.com/users/keszybz/following{/other_user}","gists_url":"https://api.github.com/users/keszybz/gists{/gist_id}","starred_url":"https://api.github.com/users/keszybz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keszybz/subscriptions","organizations_url":"https://api.github.com/users/keszybz/orgs","repos_url":"https://api.github.com/users/keszybz/repos","events_url":"https://api.github.com/users/keszybz/events{/privacy}","received_events_url":"https://api.github.com/users/keszybz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-28T02:55:21Z","updated_at":"2015-08-05T14:57:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/systemd/systemd/pulls/751","html_url":"https://github.com/systemd/systemd/pull/751","diff_url":"https://github.com/systemd/systemd/pull/751.diff","patch_url":"https://github.com/systemd/systemd/pull/751.patch"},"body":"This is v2 of #730.\r\n\r\nImplementation changed a bit following @poettering's suggestion to add relax parameter to hostname_is_valid. This is done patch one as preparation, and tests are augmented.\r\n\r\nIn various places where we accept hostnames from the user, preserve case, and ignore a trailing dot if the name is a fqdn. This makes the behaviour for \"foobar.org.\" and \"foobar.org\" the same. This is done firstboot, networkd config file parsing, and hostnamectl, since those are places where we get the hostname straight from the user.\r\n\r\nAlso, do not lowercase the hostname in hostnamectl, and ignore case when checking if name is localhost.\r\n```\r\n$ ./hostnamectl set-hostname Foobar.\r\n$ ./hostnamectl\r\n   Static hostname: Foobar\r\n   Pretty hostname: Foobar.\r\n$ ./hostnamectl set-hostname Foobar.org.\r\n$ ./hostnamectl\r\n   Static hostname: Foobar.org\r\n$ ./hostnamectl set-hostname Foobar.org..\r\n$ ./hostnamectl\r\n   Static hostname: Foobar.org\r\n   Pretty hostname: Foobar.org..\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/systemd/systemd/issues/comments/128025853","html_url":"https://github.com/systemd/systemd/pull/751#issuecomment-128025853","issue_url":"https://api.github.com/repos/systemd/systemd/issues/751","id":128025853,"user":{"login":"poettering","id":2130732,"avatar_url":"https://avatars.githubusercontent.com/u/2130732?v=3","gravatar_id":"","url":"https://api.github.com/users/poettering","html_url":"https://github.com/poettering","followers_url":"https://api.github.com/users/poettering/followers","following_url":"https://api.github.com/users/poettering/following{/other_user}","gists_url":"https://api.github.com/users/poettering/gists{/gist_id}","starred_url":"https://api.github.com/users/poettering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poettering/subscriptions","organizations_url":"https://api.github.com/users/poettering/orgs","repos_url":"https://api.github.com/users/poettering/repos","events_url":"https://api.github.com/users/poettering/events{/privacy}","received_events_url":"https://api.github.com/users/poettering/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T14:57:36Z","updated_at":"2015-08-05T14:57:36Z","body":"Looks pretty OK otherwise."}}