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

revert: fix(mac): should normalize unicode strings from file system before used in string compare #7905

Merged
merged 1 commit into from Nov 29, 2023

Conversation

jebibot
Copy link
Contributor

@jebibot jebibot commented Nov 29, 2023

This reverts commit 37a17f2 (#4841).

Since names are normalized to NFD as of #7901, normalizing them back to NFC leads to a similar error:

File "node_modules/dmg-builder/vendor/dmgbuild/core.py", line 290, in <module>
    build_dmg()
  File "node_modules/dmg-builder/vendor/dmgbuild/core.py", line 261, in build_dmg
    icvp['backgroundImageAlias'] = biplist.Data(alias.to_bytes())
                                                ^^^^^^^^^^^^^^^^
  File "node_modules/dmg-builder/vendor/mac_alias/alias.py", line 649, in to_bytes
    self._to_fd(b)
  File "node_modules/dmg-builder/vendor/mac_alias/alias.py", line 535, in _to_fd
    cnid_path = struct.pack('>%uI' % len(self.target.cnid_path),
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: 'I' format requires 0 <= number <= 4294967295

The error ony occurs in:

but not in:

  • Darwin MacBookPro.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64

It seems like a macOS < 14 issue or an x64 vs. arm64 issue so I couldn't catch it earlier. Sorry, I should've tested more.

This fix was also mentioned in #5977:

If I try the same exact string in NFD notation, the codesign works but later the dmg build process breaks. I am able to fix this by applying a patch-package modification basically reverting #4841.

Tested on: https://github.com/jebibot/electron-test/actions/runs/7028981048.

Copy link

changeset-bot bot commented Nov 29, 2023

🦋 Changeset detected

Latest commit: 1e71eb1

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

This PR includes changesets to release 2 packages
Name Type
dmg-builder Patch
electron-builder 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

Copy link

netlify bot commented Nov 29, 2023

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

Name Link
🔨 Latest commit 1e71eb1
🔍 Latest deploy log https://app.netlify.com/sites/car-park-attendant-cleat-11576/deploys/6566cd4e916b5200086606c5
😎 Deploy Preview https://deploy-preview-7905--car-park-attendant-cleat-11576.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mmaietta mmaietta merged commit d1347a0 into electron-userland:master Nov 29, 2023
18 checks passed
@github-actions github-actions bot mentioned this pull request Nov 29, 2023
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.

None yet

2 participants