{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36556","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36556/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36556/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36556/events","html_url":"https://github.com/NixOS/nixpkgs/pull/36556","id":303610043,"number":36556,"title":"user/group assertion to not exceed the 32/16 character limit","user":{"login":"qknight","id":137406,"avatar_url":"https://avatars2.githubusercontent.com/u/137406?v=4","gravatar_id":"","url":"https://api.github.com/users/qknight","html_url":"https://github.com/qknight","followers_url":"https://api.github.com/users/qknight/followers","following_url":"https://api.github.com/users/qknight/following{/other_user}","gists_url":"https://api.github.com/users/qknight/gists{/gist_id}","starred_url":"https://api.github.com/users/qknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qknight/subscriptions","organizations_url":"https://api.github.com/users/qknight/orgs","repos_url":"https://api.github.com/users/qknight/repos","events_url":"https://api.github.com/users/qknight/events{/privacy}","received_events_url":"https://api.github.com/users/qknight/received_events","type":"User","site_admin":false},"labels":[{"id":737642262,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-darwin:%200","name":"10.rebuild-darwin: 0","color":"eeffee","default":false},{"id":737642408,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/10.rebuild-linux:%200","name":"10.rebuild-linux: 0","color":"eeffee","default":false},{"id":60265212,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false},{"id":290122884,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20module%20(update)","name":"8.has: module (update)","color":"009800","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/NixOS/nixpkgs/milestones/12","html_url":"https://github.com/NixOS/nixpkgs/milestone/12","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/milestones/12/labels","id":2670947,"number":12,"title":"18.03","description":"Nixpkgs/NixOS 18.03 stable release.\r\n\r\nRelease managers are @fpletz and @vcunat.","creator":{"login":"edolstra","id":1148549,"avatar_url":"https://avatars0.githubusercontent.com/u/1148549?v=4","gravatar_id":"","url":"https://api.github.com/users/edolstra","html_url":"https://github.com/edolstra","followers_url":"https://api.github.com/users/edolstra/followers","following_url":"https://api.github.com/users/edolstra/following{/other_user}","gists_url":"https://api.github.com/users/edolstra/gists{/gist_id}","starred_url":"https://api.github.com/users/edolstra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edolstra/subscriptions","organizations_url":"https://api.github.com/users/edolstra/orgs","repos_url":"https://api.github.com/users/edolstra/repos","events_url":"https://api.github.com/users/edolstra/events{/privacy}","received_events_url":"https://api.github.com/users/edolstra/received_events","type":"User","site_admin":false},"open_issues":63,"closed_issues":113,"state":"open","created_at":"2017-07-31T10:37:50Z","updated_at":"2018-04-03T09:28:37Z","due_on":"2018-03-29T07:00:00Z","closed_at":null},"comments":3,"created_at":"2018-03-08T19:54:33Z","updated_at":"2018-04-05T18:42:43Z","closed_at":"2018-03-30T21:43:24Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/36556","html_url":"https://github.com/NixOS/nixpkgs/pull/36556","diff_url":"https://github.com/NixOS/nixpkgs/pull/36556.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/36556.patch"},"body":"###### Motivation for this change\r\n\r\nWith the previous implementation one can add a `user` or `group` which _is_ created by Nix but then fails to execute programs from `systemd`.\r\n\r\n`man useradd` says: `Usernames may only be up to 32 characters long.`\r\n\r\nThe actual implementation says it is only 31 chars: https://github.com/systemd/systemd/blob/586fb20fd192d9f9cd2a850f50f67ccd797b6931/src/basic/user-util.c#L624\r\n\r\n`man groupadd` says: `Groupnames may only be up to 16 characters long.`\r\n\r\nSo this simple `apply` check makes the user aware of this!\r\n\r\nSee also: https://github.com/nixcloud/nixcloud-webservices/issues/15\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/379037323","html_url":"https://github.com/NixOS/nixpkgs/pull/36556#issuecomment-379037323","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/36556","id":379037323,"user":{"login":"aszlig","id":192147,"avatar_url":"https://avatars1.githubusercontent.com/u/192147?v=4","gravatar_id":"","url":"https://api.github.com/users/aszlig","html_url":"https://github.com/aszlig","followers_url":"https://api.github.com/users/aszlig/followers","following_url":"https://api.github.com/users/aszlig/following{/other_user}","gists_url":"https://api.github.com/users/aszlig/gists{/gist_id}","starred_url":"https://api.github.com/users/aszlig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszlig/subscriptions","organizations_url":"https://api.github.com/users/aszlig/orgs","repos_url":"https://api.github.com/users/aszlig/repos","events_url":"https://api.github.com/users/aszlig/events{/privacy}","received_events_url":"https://api.github.com/users/aszlig/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T18:42:43Z","updated_at":"2018-04-05T18:42:43Z","author_association":"MEMBER","body":"@vcunat, @fpletz, @qknight: IMHO there is no reason to go below the `systemd` limit for group names, as the maximum group length is a `configure` option and available [since 2009](https://github.com/shadow-maint/shadow/blob/164dcfe65b7e81ce908121711754497c6f05a4f3/NEWS#L321-L328).\r\n\r\nBesides, I checked the limit on other distros and they all use a limit of either 31 or 32 characters:\r\n\r\n  * [Arch Linux](https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?id=7c72b3bc3842f570b64ac1212026f718c98072a7) (since 2013)\r\n  * [Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=240456#15) (since 2004)\r\n  * [Fedora](https://src.fedoraproject.org/cgit/rpms/shadow-utils.git/commit/shadow-utils.spec?id=e772ed6ecf59a7e90a3ecf6953676e03e00a7951) (since 2010)\r\n  * [Gentoo even has no limit at all](https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/shadow/shadow-4.5.ebuild?id=c521e61b70e6507354bbf01877197ccac5603e75#n49) (no archives, but probably > 10 years)\r\n  * [RedHat Enterprise Linux](https://access.redhat.com/errata/RHBA-2005:164) (since 2005)\r\n\r\nSo I think we should change this to 31 or even 32 characters to be in par with the maximum user name length."}}
{"actor":{"display_login":"aszlig"}}