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

fix: signing of user-defined binaries #6660

Merged
merged 2 commits into from
Feb 22, 2022
Merged

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Feb 20, 2022

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
Copy link

changeset-bot bot commented Feb 20, 2022

🦋 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
Copy link

netlify bot commented Feb 20, 2022

✔️ 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
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