Skip to content

No signed binaries for Mac #128

@ikripaka

Description

@ikripaka

Execution of tests uses at least electrsd binary from repo1, and elementsd from repo2.
Env variables have to be set as in this env.sh file.

The issue lies in binaries execution as they are not signed, link.
Apple requires binaries to be signed, otherwise it will throw them into quarantine and you're unable to run them.
Furthermore, after removing it from quarantine Apple requires binaries to be signed anyway, in other way it would just kill them in terminal forcefully.

For signing and for forced execution of binaries on Mac you have to do the following:

  1. https://apple.stackexchange.com/questions/436674/how-to-unblock-binary-from-use-because-mac-says-it-is-not-from-identified-develo#436677
    Move from quarantine : sudo xattr -dr com.apple.quarantine path/to/file
  2. Sign binary: codesign -s - --force path/to/file

Proposed changes that has to be made:

  • add signing of binaries for build pipeline. (Yep, there are already done for the blockstream app, but has to be done for daemons also)

Additional changes that can be done:

  • add dotenvy dependency and use it.
    For launching locally tests you have to manually set env variables. What about using .env for that? I understand that in the environment it is more convenient to just introduce variables inline, but locally it's more convenient to use a .env file.
    dotenvy::dotenv() can be used here or right before test execution like here.
    It won't harm project if you're using inline initialization but introduce convenience for executing tests locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions