{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15282","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15282/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15282/comments","events_url":"https://api.github.com/repos/golang/go/issues/15282/events","html_url":"https://github.com/golang/go/issues/15282","id":148138176,"number":15282,"title":"syscall: use Docker container for making auto-generated files","user":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1323,"closed_issues":349,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2016-04-14T19:38:02Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":1,"created_at":"2016-04-13T18:06:31Z","updated_at":"2016-04-14T20:16:04Z","closed_at":null,"body":"The auto-generation of the `syscall/z*.go` files is a mess.\r\n\r\nTheir generation depends on the headers installed on the host system, so nobody can reliably generate them without making a bunch of accidental unrelated changes.\r\n\r\nThis applies equally to pkg `syscall` and to `golang.org/x/sys/unix`.\r\n\r\nLet's use a Dockerfile in there and then run mkwhatever.{sh,pl,go} file in Docker, and then `docker cp` the auto-generated files out of the container back to the host.\r\n\r\nRecent chaos:\r\n- https://go-review.googlesource.com/#/c/21971/\r\n- https://go-review.googlesource.com/#/c/21582/\r\n- etc (basically any change)\r\n\r\nIt's less clear what to do about other Unix, like OpenBSD (https://go-review.googlesource.com/#/c/21797/, etc). @mdempsky? Jails? But openbsd is tricky for other reasons: #15227\r\n\r\nWindows seems to be fine.\r\n\r\n/cc @ianlancetaylor "},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/210130867","html_url":"https://github.com/golang/go/issues/15282#issuecomment-210130867","issue_url":"https://api.github.com/repos/golang/go/issues/15282","id":210130867,"user":{"login":"mdempsky","id":38349,"avatar_url":"https://avatars.githubusercontent.com/u/38349?v=3","gravatar_id":"","url":"https://api.github.com/users/mdempsky","html_url":"https://github.com/mdempsky","followers_url":"https://api.github.com/users/mdempsky/followers","following_url":"https://api.github.com/users/mdempsky/following{/other_user}","gists_url":"https://api.github.com/users/mdempsky/gists{/gist_id}","starred_url":"https://api.github.com/users/mdempsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdempsky/subscriptions","organizations_url":"https://api.github.com/users/mdempsky/orgs","repos_url":"https://api.github.com/users/mdempsky/repos","events_url":"https://api.github.com/users/mdempsky/events{/privacy}","received_events_url":"https://api.github.com/users/mdempsky/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T20:16:04Z","updated_at":"2016-04-14T20:16:04Z","body":"I don't think there's anything fundamental to generating OpenBSD's `z*.go` files that requires running on an OpenBSD host.  It looks like we just need access to the kernel headers, which we could get by either downloading from OpenBSD's cvsweb server or grabbing an appropriate install or source tarball.\r\n\r\nThe same looks to be true of the other `mksysnum_*.go` scripts."}}