Fix go 1.17 build on macOS

This MR fixes the binary of the project on macOS with go 1.17. It works with 1.16, but fails with 1.17:

$ go version
go version go1.17.4 darwin/amd64
$ make
$ ./bin/gitlab-elasticsearch-indexer
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x7fff20456c9e]

runtime stack:
runtime: unexpected return pc for runtime.sigpanic called from 0x7fff20456c9e
stack: frame={sp:0x7ffeefbff178, fp:0x7ffeefbff1c8} stack=[0x7ffeefb80218,0x7ffeefbff280)
0x00007ffeefbff078:  0x01007ffeefbff098  0x0000000000000004
0x00007ffeefbff088:  0x000000000000001f  0x00007fff20456c9e
0x00007ffeefbff098:  0x0b01dfacedebac1e  0x0000000000000001
0x00007ffeefbff0a8:  0x0000000004035d31 <runtime.throw+0x0000000000000071>  0x00007ffeefbff148
0x00007ffeefbff0b8:  0x0000000004ae9108  0x00007ffeefbff100
0x00007ffeefbff0c8:  0x0000000004035fe8 <runtime.fatalthrow.func1+0x0000000000000048>  0x00000000058918a0
0x00007ffeefbff0d8:  0x0000000000000001  0x0000000000000001
...

I believe it's related to https://github.com/golang/go/issues/45702 and updating golang.org/x/sys fixes the problem, which is done in this MR.

After applying the fix:

$ go version
go version go1.17.4 darwin/amd64
$ make
$ ./bin/gitlab-elasticsearch-indexer
FATA[0000] Usage: ./bin/gitlab-elasticsearch-indexer [ --version | [--blob-type=(blob|wiki_blob)] [--skip-commits] [--project-path=<project-path>] [--timeout=<timeout>] <project-id> <repo-path> ]
Edited by Dmitry Gruzd

Merge request reports

Loading