build: fix native macOS deployment #34787

pull fanquake wants to merge 3 commits into bitcoin:master from fanquake:ci_test_macos_codesigning changing 2 files +10 −2
  1. fanquake commented at 12:09 pm on March 10, 2026: member
    Fix bundle format. Add a CI check that codesigning works. Fixes #34744.
  2. DrahtBot added the label Tests on Mar 10, 2026
  3. DrahtBot commented at 12:10 pm on March 10, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK Sjors, hebasto, sedited

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31349 (ci: detect outbound internet traffic generated while running tests by vasild)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. fanquake force-pushed on Mar 10, 2026
  5. DrahtBot added the label CI failed on Mar 10, 2026
  6. fanquake commented at 1:11 pm on March 10, 2026: member

    This does fail the same as #34744. https://github.com/bitcoin/bitcoin/actions/runs/22903729732/job/66456660437?pr=34787#step:9:2202:

    0/Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch/build-aarch64-apple-darwin24.6.0/deploy/Bitcoin-Qt.app: bundle format unrecognized, invalid, or unsuitable
    1In subcomponent: /Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch/build-aarch64-apple-darwin24.6.0/deploy/Bitcoin-Qt.app/Contents/Frameworks/QtGui.framework
    
  7. fanquake force-pushed on Mar 10, 2026
  8. fanquake commented at 5:32 pm on March 10, 2026: member

    Pushed a commit that should fix #34744, so CI should pass:

    0codesign --verify /Users/runner/work/bitcoin/bitcoin/repo_archive/ci/scratch/build-aarch64-apple-darwin24.6.0/deploy/Bitcoin-Qt.app
    1+ '[' true = true ']'
    
  9. macdeploy: subprocess out to zip rather than shutil.make_archive
    Calling shutil.make_archive(), does not preserve symlinks when using the
    zip format, see https://github.com/python/cpython/issues/139679.
    
    Call `zip` using subprocess instead. This code is only run when using a
    macos machine, and I think it's safe to assume that zip is available, same
    as codesign, and all other tools we call in this script.
    ab137cbfe2
  10. macdeploy: use plugins dir to find plugins
    Rather than looking for /translations, which might not exist (it doesn't
    in a recent brew installed qt on macOS). i.e:
    ```bash
    ls /opt/homebrew/opt/qtbase/share/qt
    doc
    libexec
    metatypes
    mkspecs
    modules
    plugins
    sbom
    ```
    66d80d57b4
  11. ci: check macos bundle structure and codesigning d03e3be246
  12. fanquake force-pushed on Mar 11, 2026
  13. fanquake renamed this:
    ci: check macos bundle structure and codesigning
    build: fix native macOS deployment
    on Mar 11, 2026
  14. fanquake marked this as ready for review on Mar 11, 2026
  15. fanquake commented at 11:00 am on March 11, 2026: member
    Fixed the native fuzz CI.
  16. DrahtBot removed the label CI failed on Mar 11, 2026
  17. Sjors commented at 3:29 pm on March 11, 2026: member

    tACK d03e3be246f64065002268e74ee9a834089de37a

    The generated Bitcoin-Qt.app still works and bitcoin-macos-app.zip now works fork me too, when opened from Finder. codesign --verify is happy too.

    macOS 26.3.1 (M4) qt 6.10.2 via homebrew

    re 66d80d57b48982d8301e21321a9d82780586908d:

    Rather than looking for /translations, which might not exist (it doesn’t in a recent brew installed qt on macOS)

    Indeed it doesn’t for me, whereas plugins does.

  18. fanquake added the label Needs Backport (31.x) on Mar 11, 2026
  19. fanquake requested review from hebasto on Mar 12, 2026
  20. in contrib/macdeploy/macdeployqtplus:502 in d03e3be246
    498@@ -499,7 +499,7 @@ if config.zip is not None:
    499         print("+ Removing existing .zip +")
    500         os.unlink(name + ".zip")
    501 
    502-    shutil.make_archive('{}'.format(name), format='zip', root_dir='dist', base_dir='Bitcoin-Qt.app')
    503+    subprocess.check_call(["zip", "-ry", os.path.abspath(name + ".zip"), 'Bitcoin-Qt.app'], cwd='dist')
    


    hebasto commented at 12:49 pm on March 12, 2026:
    The build system should check the zip binary availability perhaps.

    fanquake commented at 12:53 pm on March 12, 2026:
    Not sure. As I mentioned in ab137cbfe2763f2306e52c7c5f1860d87defc636, we don’t check for any of the other used tools.
  21. hebasto approved
  22. hebasto commented at 12:49 pm on March 12, 2026: member

    ACK d03e3be246f64065002268e74ee9a834089de37a, tested on macOS Tahoe 26.3.1.

    The second commit 66d80d57b48982d8301e21321a9d82780586908d additionally fixes the issue with plugins. However, Qt’s translations remain missed from the bundle (can be amended in a follow-up).

    A bit unrelated to this PR, but we use different approaches when creating a zipped bundle: the contrib/macdeploy/macdeployqtplus Python script when building on macOS, and the cmake/script/macos_zip.sh shell script when cross-compiling on Linux. Could both these approches converge at some point?

  23. fanquake commented at 4:00 pm on March 12, 2026: member

    Guix Build (x86_64):

     0898d9f8b8a62e42115d36b1a9fa031e59f7004d052cf95a5e005d408fdc3c8fa  guix-build-d03e3be246f6/output/aarch64-linux-gnu/SHA256SUMS.part
     1cfe0ca1564750e0d627a2b69e2da28c9d03f2869b2ec1e16aeb966f7fd86fa1c  guix-build-d03e3be246f6/output/aarch64-linux-gnu/bitcoin-d03e3be246f6-aarch64-linux-gnu-debug.tar.gz
     2588a4601631c26c29826c25514797288d41fa53895e43ef487cce9a57b6c300f  guix-build-d03e3be246f6/output/aarch64-linux-gnu/bitcoin-d03e3be246f6-aarch64-linux-gnu.tar.gz
     38128bec5d1403cc567302e6c6193b554a508baf62c93fe34858508a0ff275d08  guix-build-d03e3be246f6/output/arm-linux-gnueabihf/SHA256SUMS.part
     43eba808dc310ce9ed2ce0c0fbdf6ca1f48992071ae465e427b6d88673e8e8088  guix-build-d03e3be246f6/output/arm-linux-gnueabihf/bitcoin-d03e3be246f6-arm-linux-gnueabihf-debug.tar.gz
     5a1321d868e7984fee7ed2d1cff02c8d85045a9eacefc0c8dd93d1a0bc01a4d60  guix-build-d03e3be246f6/output/arm-linux-gnueabihf/bitcoin-d03e3be246f6-arm-linux-gnueabihf.tar.gz
     6481ed2752180c1a1a4d71f83cb9432c23244a394bc9747ed815e0ed0507165a3  guix-build-d03e3be246f6/output/arm64-apple-darwin/SHA256SUMS.part
     76b0a3a1ef41eaa857da8a32d1999cb13c141f738a66dd6b2b12f0a4b4495f94a  guix-build-d03e3be246f6/output/arm64-apple-darwin/bitcoin-d03e3be246f6-arm64-apple-darwin-codesigning.tar.gz
     82771de5094d611dbf8d1202825bfb380df0abbcf48dfb52ff8364ec6a64b2f74  guix-build-d03e3be246f6/output/arm64-apple-darwin/bitcoin-d03e3be246f6-arm64-apple-darwin-unsigned.tar.gz
     9576b43d00f6e4566cc18d6bf6006998849ba0271257ee2d878ba66c945b5684d  guix-build-d03e3be246f6/output/arm64-apple-darwin/bitcoin-d03e3be246f6-arm64-apple-darwin-unsigned.zip
    10f4ba5e1ea20024c1c280577d1749e18a09b3b85752c4ccadfbcd8b054aafd52d  guix-build-d03e3be246f6/output/dist-archive/bitcoin-d03e3be246f6.tar.gz
    11513dbd528d70201c1b1e2549665fca8eb4f94fa2ccc8ec6ec4b15805b0fe98e1  guix-build-d03e3be246f6/output/powerpc64-linux-gnu/SHA256SUMS.part
    1221c03407ffb4e77140875b25b87ff085ad3cc620cc1f8273ff9379c4b0fca522  guix-build-d03e3be246f6/output/powerpc64-linux-gnu/bitcoin-d03e3be246f6-powerpc64-linux-gnu-debug.tar.gz
    130ec82388facd8ab7fd11216fba3c175c13808c1c5307a4fa30f5e015136eb1a0  guix-build-d03e3be246f6/output/powerpc64-linux-gnu/bitcoin-d03e3be246f6-powerpc64-linux-gnu.tar.gz
    146ba8d485a8dba9d3f78715d591e940e45eec3217d4f9260f74ee13c61ae51242  guix-build-d03e3be246f6/output/riscv64-linux-gnu/SHA256SUMS.part
    15574d89854a763ce5d8ba4c6bc1d6746373e4448e9ce2ef4150328c0a5d08549c  guix-build-d03e3be246f6/output/riscv64-linux-gnu/bitcoin-d03e3be246f6-riscv64-linux-gnu-debug.tar.gz
    1670c2d00bd8c10620ab6bac739802827e65c04b9d850f489b3cef36bb07c84db2  guix-build-d03e3be246f6/output/riscv64-linux-gnu/bitcoin-d03e3be246f6-riscv64-linux-gnu.tar.gz
    17b945f4ab116813efc8b1ca0ad67b6d77ae9cbdee4b3782ae2527ab0e61f534db  guix-build-d03e3be246f6/output/x86_64-apple-darwin/SHA256SUMS.part
    1809244c40d849a2aef721f4ab457eafa2f3369915f9c4d100133597331f8f5edd  guix-build-d03e3be246f6/output/x86_64-apple-darwin/bitcoin-d03e3be246f6-x86_64-apple-darwin-codesigning.tar.gz
    19f750a3e8e3e9719963cd7a887218d0d5ada0b40b25eff1c55ec48145e97b380e  guix-build-d03e3be246f6/output/x86_64-apple-darwin/bitcoin-d03e3be246f6-x86_64-apple-darwin-unsigned.tar.gz
    20420feb5b2be2f9899f780e397d6fa548b775a68ffa1048bf823d7259eaf5a637  guix-build-d03e3be246f6/output/x86_64-apple-darwin/bitcoin-d03e3be246f6-x86_64-apple-darwin-unsigned.zip
    2194178ba6391b9774474d1803f2bbc719a9890ab0675761cc8a3843afc3b73002  guix-build-d03e3be246f6/output/x86_64-linux-gnu/SHA256SUMS.part
    228600fc4560905895d37b7f665c9e97ed964a90852748a7b5f7b0a21a13298667  guix-build-d03e3be246f6/output/x86_64-linux-gnu/bitcoin-d03e3be246f6-x86_64-linux-gnu-debug.tar.gz
    23726cdc05bf853b33f1b29ab0ec1a0bde466eaa46ad3f333509354a273f6b6cbb  guix-build-d03e3be246f6/output/x86_64-linux-gnu/bitcoin-d03e3be246f6-x86_64-linux-gnu.tar.gz
    246759ecaa75826d462c683bf2a288483e64f75657968b53bf6a3b1b0d12325a8f  guix-build-d03e3be246f6/output/x86_64-w64-mingw32/SHA256SUMS.part
    2560661ddd120e20cd30eb64e96d6c0559e307ff709bc918a20a9327e782cf2b2f  guix-build-d03e3be246f6/output/x86_64-w64-mingw32/bitcoin-d03e3be246f6-win64-codesigning.tar.gz
    26dabd3b2b6ac6ec0e575cdb31a55cc89922bb7307d0554c20b2f7f6c59e85bcbc  guix-build-d03e3be246f6/output/x86_64-w64-mingw32/bitcoin-d03e3be246f6-win64-debug.zip
    27cedfa06e24965be5b2b68d3b56c69d0ce79cddfb9b0b944450f58bd1e9762bbe  guix-build-d03e3be246f6/output/x86_64-w64-mingw32/bitcoin-d03e3be246f6-win64-setup-unsigned.exe
    2891453118a44f751c676c847c17df9ce1bf2f8ee43911019b80eb18d0951f7f97  guix-build-d03e3be246f6/output/x86_64-w64-mingw32/bitcoin-d03e3be246f6-win64-unsigned.zip
    
  24. fanquake added this to the milestone 31.0 on Mar 12, 2026
  25. sedited approved
  26. sedited commented at 9:50 am on March 13, 2026: contributor
    ACK d03e3be246f64065002268e74ee9a834089de37a
  27. sedited merged this on Mar 13, 2026
  28. sedited closed this on Mar 13, 2026

  29. fanquake deleted the branch on Mar 13, 2026
  30. fanquake referenced this in commit bb9fcffd4c on Mar 13, 2026
  31. fanquake referenced this in commit ab37d3d7cd on Mar 13, 2026
  32. fanquake referenced this in commit e3383ac932 on Mar 13, 2026
  33. fanquake removed the label Needs Backport (31.x) on Mar 13, 2026
  34. fanquake commented at 10:49 am on March 13, 2026: member
    Backported to 31.x in #34800.
  35. fanquake added the label Needs backport (30.x) on Mar 13, 2026
  36. Sjors commented at 11:53 am on March 13, 2026: member
    My x86_64 guix hashes match @fanquake’s.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-03-16 03:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me