Skip to content

Impedance mismatch between packager and osx-sign w.r.t. entitlements #1854

@mhjacobson

Description

@mhjacobson

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

$ npx electron-packager --version
Electron Packager 19.0.1
Node v22.19.0
Host Operating system: darwin 21.6.0 (x64)

To Reproduce

$ npx @electron/packager ... \
  --osx-sign.identity "whatever" \
  --osx-sign.entitlements "entitlements.plist" \
  ...

Expected Behavior

As per usage.txt:

osx-sign           (macOS host platform only) Whether to sign the macOS app packages. You can either
                   pass --osx-sign by itself to use the default configuration, or use dot notation
                   to configure a list of sub-properties, e.g. --osx-sign.identity="My Name"
                   For info on supported values see https://npm.im/@electron/osx-sign#opts---options
                   Properties supported include:
                   - identity: should contain the identity to be used when running `codesign`
                   - entitlements: the path to entitlements used in signing
                   - entitlements-inherit: the path to the 'child' entitlements

Actual Behavior

The --osx-sign.entitlements argument is effectively ignored; osx-sign uses its own default entitlements file. See below for why.

Additional Information

This happens because osx-sign (in sign.ts in signApplication()) looks for an opts.optionsForFile function, but packager does not pass one.

The requirement for an optionsForFile function was added in electron/osx-sign@af53ad0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions