Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please update to Go 1.16 and also release for macOS ARM64 #4403

Closed
dbast opened this issue Feb 18, 2021 · 6 comments
Closed

Please update to Go 1.16 and also release for macOS ARM64 #4403

dbast opened this issue Feb 18, 2021 · 6 comments
Milestone

Comments

@dbast
Copy link

dbast commented Feb 18, 2021

Go 1.16 was just released with macOS ARM64 support, see https://blog.golang.org/go1.16

@bk2204
Copy link
Member

bk2204 commented Feb 19, 2021

Hey,

Thanks for writing in. We can certainly do this for the next major release. However, it will require some manual work because we have to make sure binaries are signed in order to distribute them, and that means we need to run multiple steps during our build. So while this certainly isn't impossible, it isn't immediately trivial, either.

Note that if Homebrew provides suitable binaries, you may want to use theirs in the mean time.

@bk2204 bk2204 added this to the v3.0.0 milestone Feb 19, 2021
@dbast
Copy link
Author

dbast commented Feb 20, 2021

Hey @bk2204,

thanks for looking into the topic.

The code signing stuff actually got much simpler as go 1.16 is adding an adhoc signature to the darwin_arm64 binary without any extra effort, which is good enough, see the long discussion inside golang/go#42684

That is the reason why e.g. for gocloc building+releasing for darwin_arm64 was an one-liner hhatto/gocloc#43 (they use also the GitHub action goreleaser/goreleaser-action@v1 which automatically also released the binary for that new arch... there are no extra signing calls there)

Downloading the darwin_arm64 binary and checking the signature shows:

  • wget https://github.com/hhatto/gocloc/releases/download/v0.4.1/gocloc_darwin_arm64.tar.gz
  • tar -xf gocloc_darwin_arm64.tar.gz
  • codesign -d -v gocloc:
Executable=/Users/.../gocloc
Identifier=a.out
Format=Mach-O thin (arm64)
CodeDirectory v=20400 size=90110 flags=0x20002(adhoc,linker-signed) hashes=2813+0 location=embedded
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements=none

Thanks

@bk2204
Copy link
Member

bk2204 commented Feb 22, 2021

Unfortunately, unless macOS has stopped suggesting that binaries downloaded from the Internet that aren't signed by an Apple Developer account and notarized be moved to the trash, we actually need to get real signing set up. So this isn't as easy as it seems. I'm also not very excited about doing one thing for amd64 and another for arm64.

@bk2204
Copy link
Member

bk2204 commented Feb 24, 2021

I'm looking into this and it doesn't seem too difficult. I have a test branch at https://github.com/bk2204/git-lfs/tree/darwin-arm64 which is reliant on GitHub Actions natively supporting Go 1.16 on all platforms. Unfortunately, at least in our CI test environment, using actions/setup-go doesn't seem to work when building our releases, so I'll need to wait for the main Actions images to be updated, which should happen next week.

@bk2204
Copy link
Member

bk2204 commented Mar 17, 2021

Okay, the PR implementing this has been merged, so I'm going to close this. I'll backport the requisite pieces when we do a 2.13.3 so we can include this in the next release.

@bk2204 bk2204 closed this as completed Mar 17, 2021
@dbast
Copy link
Author

dbast commented Mar 25, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants