trezor / trezord-go

:smiling_imp: Trezor Communication Daemon (written in Go)
GNU Lesser General Public License v3.0
241 stars 146 forks source link

Simplify signing, enable notarization #259

Closed igor-hnizdo closed 1 year ago

igor-hnizdo commented 1 year ago

I have simplified signing and enabled notarization in docker with rcodesign (a Rust-based tool, fully open-source; but it does connect to Apple servers for notarization).

This tool enables notarization and signing fully in Docker on any OS, so it should work in CLI too.

There is some prep-work that needs to be done on Mac OS side and on Apple website; but after that, the signing and notarization works automatically.

It's not directly relevant to this commit, but I think you can also use it on Trezor Suite; a cursory glance there tells me that Trezor Suit is using electron-notarize, which needs to be run on Mac OS; rcodesign does not need that.

Note that we need to use ldflags -s because of this issue of rcodesign - https://github.com/indygreg/apple-platform-rs/issues/17

tsusanka commented 1 year ago

Moving the following work into https://github.com/trezor/trezord-go/issues/260. Thanks!

tsusanka commented 1 year ago

cc @matejkriz, @mroz22 and @vdovhanych for this part:

I have simplified signing and enabled notarization in docker with rcodesign (a Rust-based tool, fully open-source; but it does connect to Apple servers for notarization).

It's not directly relevant to this commit, but I think you can also use it on Trezor Suite; a cursory glance there tells me that Trezor Suit is using electron-notarize, which needs to be run on Mac OS; rcodesign does not need that.

We probably do not need to change that in Suite as it works fine but it is good to know, in case we would have some problems with the current solution.