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

Add Universal Mac OS build #770

Closed
RangerMauve opened this issue Oct 6, 2022 · 2 comments
Closed

Add Universal Mac OS build #770

RangerMauve opened this issue Oct 6, 2022 · 2 comments
Labels
dif/expert Extensive knowledge (implications, ramifications) required effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature kind/maintenance Work required to avoid breaking changes or harm to project's status quo P2 Medium: Good to have, but can wait until someone steps up

Comments

@RangerMauve
Copy link

Hello, we'd like to bundle Kubo with Electron applications to run on Mac OS with Apple Silicone / x64 macs via the npm-go-ipfs module for the WebRecorder and Agregore Browser projects.

At the moment this is complicated by the fact that while Electron supports generating Universal builds for Mac OS, kubo currently requires choosing one or the other.

Would it be possible to add Universal Mac OS builds to the distribution matrix to enable this use case?

@RangerMauve RangerMauve added the need/triage Needs initial labeling and prioritization label Oct 6, 2022
@ipfs ipfs deleted a comment from welcome bot Nov 28, 2022
@lidel
Copy link
Member

lidel commented Nov 28, 2022

This will unblock Universal DMG with IPFS Desktop too (see ipfs/ipfs-desktop#1856)

Sgtm, but:

Good news is that this is pretty simple to do in userland: universal binary can be created by gluing amd64 and arm64 binaries together.
This can be done either with lipo CLI tool (included with XCode), or with a standalone golang tool like makefat.

I think doing this in this repo makes sense, this way NPM release could default to universal binary + provide a way to override and use platform-specific one, if size is important.

How to add this fake build target?

  • dist.ipfs.tech already has a special sign-macos build stage for MacOS, which takes care of signing, notarization via ./scripts/ci/sign-new-macos-releases.sh.
  • Creating universal artifacts MUST happen before signing and notarization.
  • Add ./scripts/ci/create-universal-macos-binary.sh that takes existing arm64 and amd64 binaries and
    • glues them together
    • create archives is the same shape and filenames so they look like regular build artifacts
  • Update ./scripts/ci/sign-new-macos-releases.sh and append darwin universal on DIST_MAC_ARCHS to ensure universal binaries are signed and notarized.

If someone contributes a PR, I can block some time for reviews.
When this lands here, someone needs to update npm-go-ipfs and finally we could unblock ipfs/ipfs-desktop#1856

@lidel lidel added kind/enhancement A net-new feature or improvement to an existing feature P2 Medium: Good to have, but can wait until someone steps up kind/maintenance Work required to avoid breaking changes or harm to project's status quo dif/expert Extensive knowledge (implications, ramifications) required effort/days Estimated to take multiple days, but less than a week and removed need/triage Needs initial labeling and prioritization labels Nov 28, 2022
@BigLep
Copy link
Contributor

BigLep commented May 18, 2023

2023-05-18 maintainer conversation: Brave went down the path of using separate binaries (since they want to minimize the amount they are bundling/distributing) and we expect IPFS desktop to use separate binaries. We're not seeing the need currently. The "wrapper app" (Brave, desktop, Electron in the original post) can bring in both binaries.

We're not sure if https://github.com/ipfs/npm-go-ipfs/ is smart enough to detect arm, but if that's the case, that should be in an issue in that repo.

The biggest value we could see in completing this is to have a single "download for MacOS" URL at https://dist.ipfs.tech/#kubo. It has so-far worked though for users to select the right platform for themseleves.

As a result, we're not planning to fix this. Please feel free to reopen if there are important usecases we're not accounting for.

@BigLep BigLep closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/expert Extensive knowledge (implications, ramifications) required effort/days Estimated to take multiple days, but less than a week kind/enhancement A net-new feature or improvement to an existing feature kind/maintenance Work required to avoid breaking changes or harm to project's status quo P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Archived in project
Development

No branches or pull requests

3 participants