Skip to content

fix: signing of user-defined binaries - #6660

Merged
mmaietta merged 2 commits into
electron-userland:masterfrom
mifi:patch-1
Feb 22, 2022
Merged

mmaietta merged 2 commits into
electron-userland:masterfrom
mifi:patch-1

Conversation

@mifi

@mifi mifi commented Feb 20, 2022 •

Copy link
Copy Markdown
Contributor

Without this PR, the binaries's absolutely calculated paths will be concatenated with to their non-absolute paths.
This causes an error when building, where it tries to sign both the absolute and relative paths, failing on the relative paths. Example:

package.json:

    "mas": {
      "binaries": [
        "Contents/Resources/ffmpeg",
        "Contents/Resources/ffprobe"
      ]
    }

Build output from electron-builder --mac -m mas-dev:

  • Signing addtional user-defined binaries: [
 "/Users/mifi/lossless-cut/dist/mas-dev/LosslessCut.app/Contents/Resources/ffmpeg",
 "/Users/mifi/lossless-cut/dist/mas-dev/LosslessCut.app/Contents/Resources/ffprobe"
]
  • signing         file=dist/mas-dev/LosslessCut.app identityName=Apple Development: Mikael Finstad (JH4PH8B3C8) identityHash=7BB49C65719719783C5DA0B9A1F667707A0EA8B6 provisioningProfile=LosslessCut_Dev.provisionprofile
  ⨯ Command failed: codesign --sign 7BB49C65719719783C5DA0B9A1F667707A0EA8B6 --force --timestamp --entitlements entitlements.mas.inherit.plist Contents/Resources/ffmpeg
Contents/Resources/ffmpeg: No such file or directory

With this fix, it will instead only sign the resolve'd paths and not fail:

  • Signing addtional user-defined binaries: [
 "/Users/mifi/lossless-cut/dist/mas-dev/LosslessCut.app/Contents/Resources/ffmpeg",
 "/Users/mifi/lossless-cut/dist/mas-dev/LosslessCut.app/Contents/Resources/ffprobe"
]
  • signing         file=dist/mas-dev/LosslessCut.app identityName=Apple Development: Mikael Finstad (JH4PH8B3C8) identityHash=7BB49C65719719783C5DA0B9A1F667707A0EA8B6 provisioningProfile=LosslessCut_Dev.provisionprofile
# No error

@changeset-bot

changeset-bot Bot commented Feb 20, 2022 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3e5a7de

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify

netlify Bot commented Feb 20, 2022 •

Copy link
Copy Markdown

✔️ Deploy Preview for car-park-attendant-cleat-11576 ready!

🔨 Explore the source changes: 3e5a7de

🔍 Inspect the deploy log: https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/6213cf3ba8b3af000749f243

😎 Browse the preview: https://deploy-preview-6660--car-park-attendant-cleat-11576.netlify.app

@mifi mifi changed the title Fix signing of user-defined binaries fix: signing of user-defined binaries Feb 20, 2022
mifi added a commit to mifi/lossless-cut that referenced this pull request Feb 20, 2022
@mmaietta
mmaietta merged commit 4c6d154 into electron-userland:master Feb 22, 2022
@mmaietta

Copy link
Copy Markdown
Collaborator

Nice find! Thanks for the contribution

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants