Go run build.go package fails on MacOS -- "Process failed: tar failed (exit code 1)"

I get the following after trying to do a go run build.go package on MacOS:

Creating package:  deb
fpm -t deb -s dir --description Grafana -C /var/folders/5t/97slp_x90875t9l3mj945zyrq94z6f/T/grafana-linux-pack819857009 --vendor Grafana --url https://grafana.com --license "Apache 2.0" --maintainer contact@grafana.com --config-files /etc/init.d/grafana-server --config-files /etc/default/grafana-server --config-files /usr/lib/systemd/system/grafana-server.service --after-install packaging/deb/control/postinst --name grafana --version 5.1.0 -p ./dist --deb-no-default-config-files --iteration 1523388235pre1 --depends adduser --depends libfontconfig .
Process failed: tar failed (exit code 1). Full command was:["tar", "-C", "/var/folders/5t/97slp_x90875t9l3mj945zyrq94z6f/T/package-deb-build-817a6e1a85b685f653272bb77950b7054c8268a56a641dd32476b3850d19/control", "-zcf", "/var/folders/5t/97slp_x90875t9l3mj945zyrq94z6f/T/package-deb-build-817a6e1a85b685f653272bb77950b7054c8268a56a641dd32476b3850d19/control.tar.gz", "--owner=0", "--group=0", "--numeric-owner", "."] {:level=>:error}

Sounds like a permissions error. I have no idea if packaging works on MacOS - it is usually run on our CI servers, one for the linux packages and a different CI server for the windows package.

If you are trying to build just for MacOS then you do not need to run the package build task: