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

backport: bitcoin#24603, #26694, #24669, #22546, #22199, #25817 (mac build) #5718

Merged
merged 8 commits into from
Nov 24, 2023

Conversation

knst
Copy link
Collaborator

@knst knst commented Nov 20, 2023

Issue being fixed or feature implemented

pasta@pastas-MacBook-Pro /tmp/2/distsrc-20.0.0-arm64-apple-darwin                                                                     [11:17:11]
> $ lldb "./Dash-Qt.app/Contents/MacOS/Dash-Qt"                                                                                                 
(lldb) target create "./Dash-Qt.app/Contents/MacOS/Dash-Qt"
Current executable set to '/tmp/2/distsrc-20.0.0-arm64-apple-darwin/Dash-Qt.app/Contents/MacOS/Dash-Qt' (arm64).
(lldb) run
error: process exited with status -1 (no such process.)

Os X doesn't let to run guix's binaries on arm64 because these binaries are not signed.

What was done?

Backported bitcoin#22546 and couple extra relevant backports or backports just better to be here to avoid conflicts now and in future

How Has This Been Tested?

Run unit/functional tests.

@PastaPastaPasta , please, confirm that you can run guix's binaries with these changes on Mac.

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst added this to the 20.1 milestone Nov 20, 2023
@knst knst marked this pull request as draft November 20, 2023 13:17
@knst knst force-pushed the mac-improvements branch 2 times, most recently from e1754af to 828f32e Compare November 20, 2023 13:51
@knst knst marked this pull request as ready for review November 20, 2023 14:51
@PastaPastaPasta
Copy link
Member

LGTM; running Guix-build now

@PastaPastaPasta
Copy link
Member

pasta@pasta1:/mnt/volume_tor1_01/guix/dash$ sha256sum guix-build-44e9cc9162b8/output/*/*
35360c9c0cfb6af055b1ecf6ec8904642c306545ffd977cd1bef3376e4b06783  guix-build-44e9cc9162b8/output/aarch64-linux-gnu/SHA256SUMS.part
81b5eecf03017e0fb3c03486aab76d12bcfd04075536ae209f9a35ee99b487b0  guix-build-44e9cc9162b8/output/aarch64-linux-gnu/dashcore-44e9cc9162b8-aarch64-linux-gnu-debug.tar.gz
56eeeb92f21d72c757fa51268e909f33086cacede9578c935c11bde398ad5f75  guix-build-44e9cc9162b8/output/aarch64-linux-gnu/dashcore-44e9cc9162b8-aarch64-linux-gnu.tar.gz
966457461faedf740ab38b7cf671486ac19b9745ee708c70807a899a47ee3738  guix-build-44e9cc9162b8/output/arm-linux-gnueabihf/SHA256SUMS.part
92c078a818e190fde5186d3d62ced5b2940fe56c5e2e86d10f7eccd829b45093  guix-build-44e9cc9162b8/output/arm-linux-gnueabihf/dashcore-44e9cc9162b8-arm-linux-gnueabihf-debug.tar.gz
0f20374fe92902440a8521d172795ffa89121c3760f8fa9342c7266f842f9f29  guix-build-44e9cc9162b8/output/arm-linux-gnueabihf/dashcore-44e9cc9162b8-arm-linux-gnueabihf.tar.gz
5fdfe04a2e2ba3689506beebf0e83d6370ebcde6313319b6992b9ade9562c0c8  guix-build-44e9cc9162b8/output/arm64-apple-darwin/SHA256SUMS.part
1eaa98146188c947c60bf80460ece73508a30811a3222619ca4261f872502780  guix-build-44e9cc9162b8/output/arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin-debug.tar.gz
52aa281f6bc1f0c034cc8a987fa448990732b79d6fe97f7f3c5e84494cb418c9  guix-build-44e9cc9162b8/output/arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin-unsigned.dmg
36ef1c692cd756f6540b51e5e8027a6c174c3dac1839b84d0516cfff209ac1c5  guix-build-44e9cc9162b8/output/arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin-unsigned.tar.gz
356a4eb9b3efe2b8ca38127dc17e90a3c5eef7d7c5d817eaa700665171c188c1  guix-build-44e9cc9162b8/output/arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin.tar.gz
792ef785bed18aa4011e368f3157fc6f3fd782a0a0f4fd9cdb0fe2317fe3dd37  guix-build-44e9cc9162b8/output/dist-archive/dashcore-44e9cc9162b8.tar.gz
4c0a44d8f1ceebd1bdd60e251075bb9bab7679e1b086a6b22c906fe4d20eebe3  guix-build-44e9cc9162b8/output/riscv64-linux-gnu/SHA256SUMS.part
da2605634a2956e75383b45e641f4c6586b40e463af8ecfb47afaf338fec0fa2  guix-build-44e9cc9162b8/output/riscv64-linux-gnu/dashcore-44e9cc9162b8-riscv64-linux-gnu-debug.tar.gz
3751e2fdc1657f8ef3e682655e53e2a623a52009a6a47188e9be5cf300aaf0b7  guix-build-44e9cc9162b8/output/riscv64-linux-gnu/dashcore-44e9cc9162b8-riscv64-linux-gnu.tar.gz
7f4859976cb6cd6e0e6002d41ff5c4181379a9bca5424feaac1ee1190e600c91  guix-build-44e9cc9162b8/output/x86_64-apple-darwin/SHA256SUMS.part
9f69c4302942470d93ec1a9f6070f25eca7b229065a399aef96549e08333e775  guix-build-44e9cc9162b8/output/x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin-debug.tar.gz
a5b9119efebc7334c121cbda53d0fbdd3b943322ff81d90f3584375b82aa9ef9  guix-build-44e9cc9162b8/output/x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin-unsigned.dmg
da51d6c3b27289a9c22118ecdd71f4204b2ed9cd19eada7d39cff9c39f800117  guix-build-44e9cc9162b8/output/x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin-unsigned.tar.gz
889cb5e721354c488b037daf4c008ebf906f86c33a8044dced19faa77f3cf059  guix-build-44e9cc9162b8/output/x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin.tar.gz
4ef4ec4b88c0859782a0dab2ed8f19fa22703723e94dbeb1164ab587acff1cef  guix-build-44e9cc9162b8/output/x86_64-linux-gnu/SHA256SUMS.part
e46c1be4c01d5befba543f3b3157e82b9e8878606ece080d2457cc14bd75954c  guix-build-44e9cc9162b8/output/x86_64-linux-gnu/dashcore-44e9cc9162b8-x86_64-linux-gnu-debug.tar.gz
8fba2bd2a6f4e260d1b513986e1bffd82b1fde5e9445006f7e683097bada81d1  guix-build-44e9cc9162b8/output/x86_64-linux-gnu/dashcore-44e9cc9162b8-x86_64-linux-gnu.tar.gz
6a2018866d89b6484de42f6eb5d65971faa376090f2da67e8a9e8c8f288bc875  guix-build-44e9cc9162b8/output/x86_64-w64-mingw32/SHA256SUMS.part
3f3b168cbd9d101279c76de273073ff104c505d32291833a1c0b840ba126592d  guix-build-44e9cc9162b8/output/x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64-debug.zip
2055716e3cf34bdab979cd9de346506503b4bb56db65ed84624ce21b38a36483  guix-build-44e9cc9162b8/output/x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64-setup-unsigned.exe
291daae578bed7045a5045e467989cd82d0fa3afbb5b6f425f6960d5780ca613  guix-build-44e9cc9162b8/output/x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64-unsigned.tar.gz
bb9318f7cb4757d9c63df881f3bcac99cb61c2696013d1b7a6d5e696e42e0b84  guix-build-44e9cc9162b8/output/x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64.zip

@UdjinM6
Copy link

UdjinM6 commented Nov 21, 2023

Canceled "Guix Build" action, waiting for infra team to figure out what's wrong with runners.

@UdjinM6
Copy link

UdjinM6 commented Nov 21, 2023

same hashes (except for *-apple-darwin-debug.tar.gz, as expected)

@UdjinM6
Copy link

UdjinM6 commented Nov 22, 2023

Guix CI failure is unrelated, should be fixed by #5727

@knst
Copy link
Collaborator Author

knst commented Nov 24, 2023

pasta@pasta1:/mnt/volume_tor1_01/guix/dash$ sha256sum guix-build-44e9cc9162b8/output//

hashes matched with mine (except debug for mac):

81b5eecf03017e0fb3c03486aab76d12bcfd04075536ae209f9a35ee99b487b0  aarch64-linux-gnu/dashcore-44e9cc9162b8-aarch64-linux-gnu-debug.tar.gz
56eeeb92f21d72c757fa51268e909f33086cacede9578c935c11bde398ad5f75  aarch64-linux-gnu/dashcore-44e9cc9162b8-aarch64-linux-gnu.tar.gz
a67ee5ff35c7e47a1cef1fba84180d17161bff0959a9c58a130acb9a830dbafd  arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin-debug.tar.gz
356a4eb9b3efe2b8ca38127dc17e90a3c5eef7d7c5d817eaa700665171c188c1  arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin.tar.gz
52aa281f6bc1f0c034cc8a987fa448990732b79d6fe97f7f3c5e84494cb418c9  arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin-unsigned.dmg 
36ef1c692cd756f6540b51e5e8027a6c174c3dac1839b84d0516cfff209ac1c5  arm64-apple-darwin/dashcore-44e9cc9162b8-arm64-apple-darwin-unsigned.tar.gz
92c078a818e190fde5186d3d62ced5b2940fe56c5e2e86d10f7eccd829b45093  arm-linux-gnueabihf/dashcore-44e9cc9162b8-arm-linux-gnueabihf-debug.tar.gz
0f20374fe92902440a8521d172795ffa89121c3760f8fa9342c7266f842f9f29  arm-linux-gnueabihf/dashcore-44e9cc9162b8-arm-linux-gnueabihf.tar.gz
792ef785bed18aa4011e368f3157fc6f3fd782a0a0f4fd9cdb0fe2317fe3dd37  dist-archive/dashcore-44e9cc9162b8.tar.gz
da2605634a2956e75383b45e641f4c6586b40e463af8ecfb47afaf338fec0fa2  riscv64-linux-gnu/dashcore-44e9cc9162b8-riscv64-linux-gnu-debug.tar.gz
3751e2fdc1657f8ef3e682655e53e2a623a52009a6a47188e9be5cf300aaf0b7  riscv64-linux-gnu/dashcore-44e9cc9162b8-riscv64-linux-gnu.tar.gz
a3ce72e5767290a1c9180b49721b8a3cf16dc515c17263085853dd8baecba33e  x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin-debug.tar.gz
889cb5e721354c488b037daf4c008ebf906f86c33a8044dced19faa77f3cf059  x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin.tar.gz
a5b9119efebc7334c121cbda53d0fbdd3b943322ff81d90f3584375b82aa9ef9  x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin-unsigned.dmg
da51d6c3b27289a9c22118ecdd71f4204b2ed9cd19eada7d39cff9c39f800117  x86_64-apple-darwin/dashcore-44e9cc9162b8-x86_64-apple-darwin-unsigned.tar.gz
e46c1be4c01d5befba543f3b3157e82b9e8878606ece080d2457cc14bd75954c  x86_64-linux-gnu/dashcore-44e9cc9162b8-x86_64-linux-gnu-debug.tar.gz
8fba2bd2a6f4e260d1b513986e1bffd82b1fde5e9445006f7e683097bada81d1  x86_64-linux-gnu/dashcore-44e9cc9162b8-x86_64-linux-gnu.tar.gz
3f3b168cbd9d101279c76de273073ff104c505d32291833a1c0b840ba126592d  x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64-debug.zip
2055716e3cf34bdab979cd9de346506503b4bb56db65ed84624ce21b38a36483  x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64-setup-unsigned.exe
291daae578bed7045a5045e467989cd82d0fa3afbb5b6f425f6960d5780ca613  x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64-unsigned.tar.gz
bb9318f7cb4757d9c63df881f3bcac99cb61c2696013d1b7a6d5e696e42e0b84  x86_64-w64-mingw32/dashcore-44e9cc9162b8-win64.zip

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, guix ci failure is unrelated

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK for merging via merge commit

fanquake and others added 8 commits November 24, 2023 11:23
…lity

08bd338 build: optimise arm64 darwin qt build using -O1 (fanquake)

Pull request description:

  Building the macOS M1 bitcoin-qt binary at a optimisation level higher than `-O1` causes reproducibility issues when building on different architectures.

  Proposing somewhat of a hammer.

  This would fix 1 of the 2 remaining HOSTS in bitcoin#21194.

  Guix Build (x86_64):
  ```bash
  1b58b5109b32dca2509499c93347148e6bab5dca835081f8cbd3123bed72cce1  guix-build-08bd3382777b/output/arm64-apple-darwin/SHA256SUMS.part
  0e0d063d3832fad7c5116dabb2ac33c919f40bda04759aad4523c6247295bc9e  guix-build-08bd3382777b/output/arm64-apple-darwin/bitcoin-08bd3382777b-arm64-apple-darwin-unsigned.dmg
  1feb301245f2c664edcfd9ac528fe1543fc7b183b3b42637db77d57658bc2b5e  guix-build-08bd3382777b/output/arm64-apple-darwin/bitcoin-08bd3382777b-arm64-apple-darwin-unsigned.tar.gz
  641eb100d0a281203f9d6e36e45dc0ffc772c680d6aec462434f106b4c44e295  guix-build-08bd3382777b/output/arm64-apple-darwin/bitcoin-08bd3382777b-arm64-apple-darwin.tar.gz
  9d89920626e35939aa6cf506fc85861179f3c0e18d4ef1954750cf81336a851a  guix-build-08bd3382777b/output/dist-archive/bitcoin-08bd3382777b.tar.gz
  e7697d30084270d0b5843b3baf0d752e240c2f708f728bc2f6896f153276ca6b  guix-build-08bd3382777b/output/x86_64-apple-darwin/SHA256SUMS.part
  dd77acee082dbfd3cdad2c564bbd3bdace8df9bf32f92cf4a2debd5a996ace49  guix-build-08bd3382777b/output/x86_64-apple-darwin/bitcoin-08bd3382777b-x86_64-apple-darwin-unsigned.dmg
  85e63fccb7af12468a04a678034c42dcd775d243b2d194a52e1086a6ffbdbe84  guix-build-08bd3382777b/output/x86_64-apple-darwin/bitcoin-08bd3382777b-x86_64-apple-darwin-unsigned.tar.gz
  ff2629957608898d76a42025985e3ec4bf5dc8572794e32b4182ba6f8babb828  guix-build-08bd3382777b/output/x86_64-apple-darwin/bitcoin-08bd3382777b-x86_64-apple-darwin.tar.gz
  ```

  Guix Build (arm64):
  ```bash
  1b58b5109b32dca2509499c93347148e6bab5dca835081f8cbd3123bed72cce1  guix-build-08bd3382777b/output/arm64-apple-darwin/SHA256SUMS.part
  0e0d063d3832fad7c5116dabb2ac33c919f40bda04759aad4523c6247295bc9e  guix-build-08bd3382777b/output/arm64-apple-darwin/bitcoin-08bd3382777b-arm64-apple-darwin-unsigned.dmg
  1feb301245f2c664edcfd9ac528fe1543fc7b183b3b42637db77d57658bc2b5e  guix-build-08bd3382777b/output/arm64-apple-darwin/bitcoin-08bd3382777b-arm64-apple-darwin-unsigned.tar.gz
  641eb100d0a281203f9d6e36e45dc0ffc772c680d6aec462434f106b4c44e295  guix-build-08bd3382777b/output/arm64-apple-darwin/bitcoin-08bd3382777b-arm64-apple-darwin.tar.gz
  9d89920626e35939aa6cf506fc85861179f3c0e18d4ef1954750cf81336a851a  guix-build-08bd3382777b/output/dist-archive/bitcoin-08bd3382777b.tar.gz
  e7697d30084270d0b5843b3baf0d752e240c2f708f728bc2f6896f153276ca6b  guix-build-08bd3382777b/output/x86_64-apple-darwin/SHA256SUMS.part
  dd77acee082dbfd3cdad2c564bbd3bdace8df9bf32f92cf4a2debd5a996ace49  guix-build-08bd3382777b/output/x86_64-apple-darwin/bitcoin-08bd3382777b-x86_64-apple-darwin-unsigned.dmg
  85e63fccb7af12468a04a678034c42dcd775d243b2d194a52e1086a6ffbdbe84  guix-build-08bd3382777b/output/x86_64-apple-darwin/bitcoin-08bd3382777b-x86_64-apple-darwin-unsigned.tar.gz
  ff2629957608898d76a42025985e3ec4bf5dc8572794e32b4182ba6f8babb828  guix-build-08bd3382777b/output/x86_64-apple-darwin/bitcoin-08bd3382777b-x86_64-apple-darwin.tar.gz
  ```

ACKs for top commit:
  hebasto:
    ACK 08bd338
  jarolrod:
    ACK 08bd338

Tree-SHA512: 48da4acb1799c3153cdaf674f287c81c3da230a3476183616b74f318baa595af45b313136eb228ba13c63e0b8206a78064734f9fd0488e1e839c9e4e1d92ba25
0a5723b macdeploy: cleanup .temp.dmg if present (fanquake)
ecffe86 macdeploy: remove qt4 related code (fanquake)
639f064 macdeploy: select the plugins we need, rather than excluding those we don't (fanquake)
3d26b6b macdeploy: fix framework printing when passing -verbose (fanquake)
dca6c90 macdeploy: remove unused plistlib import (fanquake)

Pull request description:

  This includes [one followup](bitcoin#20422 (comment)) and [one bug fix](bitcoin@3d26b6b) from bitcoin#20422, as well as some simplifications to the `macdeployqtplus` code.

ACKs for top commit:
  hebasto:
    ACK 0a5723b, tested on macOS Big Sur 11.4 (20F71, x86_64) + Homebrew's Qt 5.15.2.

Tree-SHA512: cfad9505eacd32fe3a9d06eb13b2de0b6d2cad7b17778e90b503501cbf922e53d4e7f7f74952d1aed58410bdae9b0bb3248098583ef5b85689cb27d4dc06c029
…ith system frameworks

1513727 build, qt: (Re-)sign package (Hennadii Stepanov)
c26a0a5 build, qt: Align frameworks with macOS codesign tool requirements (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin#22403

  This PR follows Apple [docs](https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-universal-apps-release-notes):
  >  - New in macOS 11 on Macs with Apple silicon, and starting in macOS Big Sur 11 beta 6, the operating system enforces that any executable must be signed before it’s allowed to run. There isn’t a specific identity requirement for this signature: a simple ad-hoc signature is sufficient...
  >  - ... If you use a custom workflow involving tools that modify a binary after linking (e.g. `strip` or `install_name_tool`) you might need to manually call `codesign` as an additional build phase to properly ad-hoc sign your binary. These new signatures are not bound to the specific machine that was used to build the executable, they can be verified on any other system and will be sufficient to comply with the new default code signing requirement on Macs with Apple silicon...

  When building with system Qt frameworks (i.e., without depends), a new string has been added to the `make deploy` log on M1-based macOS:
  ```
  % make deploy
  ...
  + Generating .DS_Store +
  dist/Bitcoin-Qt.app: replacing existing signature
  + Preparing .dmg disk image +
  ...
  ```

  This PR does not change build system behavior:
  - when building with depends
  - on Intel-based macOS

ACKs for top commit:
  jarolrod:
    ACK 1513727
  fanquake:
    ACK 1513727 - although didn't test on M1 hardware. Given the forced signing is scoped to only occur when running the deploy script on macOS, this doesn't interfere with our release signing.

Tree-SHA512: 3aa778fdd6ddb54f029f632f2fe52c2ae3bb197ba564cb776493aa5c3a655bd51d10ccbe6c007372d717e9b01fc4193dd5c29ea0bc7e069dcae7e991ae259f0c
3d41521 build: perform /Applications symlink generation in macdeployqtplus (fanquake)
dac6936 build: perform all .tiff copying in macdeployqtplus (fanquake)

Pull request description:

  Rather than maintaining 2 different versions of the same code (`.tiff` copying and symlink generation), consolidate to just the Python code, and use it on macOS and Linux. Previously Linux would  perform the 2 actions in the makefile, and then would still be running the `macdeployqtplus` script, so it makes sense to further consolidate deployment operations into the script.

  Guix Build (on x86_64):
  ```bash
  23343f04c426c7ff078afae4e600a7028970d4d86eed8b7834696d9e4d684151  guix-build-3d415215699e/output/arm64-apple-darwin/SHA256SUMS.part
  c28b2a2e4888bf84369aa25804e2576347d5ab09416354ec8b95c76a9d38ff96  guix-build-3d415215699e/output/arm64-apple-darwin/bitcoin-3d415215699e-arm64-apple-darwin-unsigned.dmg
  9a57077b2bd722a7d85d26b66cbce5abdb791985fe9d9d37e884c79ba8751e24  guix-build-3d415215699e/output/arm64-apple-darwin/bitcoin-3d415215699e-arm64-apple-darwin-unsigned.tar.gz
  d2b06dc5b86541798ace41dab569849f7403e7ff9ec329bda671ec84e6fad549  guix-build-3d415215699e/output/arm64-apple-darwin/bitcoin-3d415215699e-arm64-apple-darwin.tar.gz
  608e7d51a44ab9c5b28eb3703a0f4fe98b4adff22c77a5502786b84bd96cc188  guix-build-3d415215699e/output/dist-archive/bitcoin-3d415215699e.tar.gz
  3e483705b1f9f1fb8f6afedc8ad0214a6cb00e77f766c0b03c42d56f410d4362  guix-build-3d415215699e/output/x86_64-apple-darwin/SHA256SUMS.part
  9370e3e3b7d47b5a44e64554cf3b6d7e0671b072c08cd251eacc7ec72ce2b53f  guix-build-3d415215699e/output/x86_64-apple-darwin/bitcoin-3d415215699e-x86_64-apple-darwin-unsigned.dmg
  ad0f68682d78c311497669fc3d627138be37510215d259b5f0b686d93e7d83b7  guix-build-3d415215699e/output/x86_64-apple-darwin/bitcoin-3d415215699e-x86_64-apple-darwin-unsigned.tar.gz
  e09dce4ff692ef66d1f4818083c1880bcf3a79c53112561d9e929bb6e5ffc011  guix-build-3d415215699e/output/x86_64-apple-darwin/bitcoin-3d415215699e-x86_64-apple-darwin.tar.gz
  ```

ACKs for top commit:
  laanwj:
    Re-ACK 3d41521

Tree-SHA512: 80dd66a6e94c5b3e8823ccb57dcb08a8851a1e70a154b62385443f8d2d5ed5af900a0ac5003143959863586f1c7b90002fe6bff3ca5e37697253e051f69d7629
dba1231 test: previous releases: add v23.0 (Sjors Provoost)

Pull request description:

  Follows the same pattern as d8b705f (v22.0) and 8a57a06 (v0.21.0).

  Starting from v23.0 there is a separate macOS release for x86_64 and aarch64.

ACKs for top commit:
  prusnak:
    Approach ACK dba1231

Tree-SHA512: 249aeddd5e80e163578581e5c8e9b6579f3694abc3d1fb68dddb7b42d75021ad85266688ec4a365a6631d82a65a19873aff7ba61c0ea59d21f8adbe4b772dc16
…'t run unsigned arm64 binaries; self-sign when needed

dc12f2e test: improve error msg on previous release tarball extraction failure (kdmukai)
7121fd8 test: self-sign previous release binaries for arm64 macOS (kdmukai)

Pull request description:

  ## The Problem
  If you run `test/get_previous_releases.py -b` on an M1 or M2 mac, you'll get an unsigned v23.0 binary in the arm64 tarball. macOS [sets stricter requirements on ARM binaries](https://news.ycombinator.com/item?id=26996578) so the unsigned arm64 binary is apparently completely unusable without being signed/notarized(?).

  This means that any test that depends on a previous release (e.g. `wallet_backwards_compatibility.py`) will fail because the v23.0 node cannot launch:

  ```
  TestFramework (ERROR): Assertion failed
  Traceback (most recent call last):
    File "/Users/kdmukai/dev/bitcoin-core/test/functional/test_framework/test_framework.py", line 563, in start_nodes
      node.wait_for_rpc_connection()
    File "/Users/kdmukai/dev/bitcoin-core/test/functional/test_framework/test_node.py", line 231, in wait_for_rpc_connection
      raise FailedToStartError(self._node_msg(
  test_framework.test_node.FailedToStartError: [node 2] bitcoind exited with status -9 during initialization
  ```

  This can also be confirmed by downloading bitcoin-23.0-arm64-apple-darwin.tar.gz (https://bitcoincore.org/bin/bitcoin-core-23.0/) and trying to run any of the binaries manually on an M1 or M2 mac.

  ## Solution in this PR
  (UPDATED) Per @ hebasto, we can self-sign the arm64 binaries. This PR checks each binary in the previous release's "bin/" and verifies if the arm64 binary is signed. If not, attempt to self-sign and confirm success.

  (note: an earlier version of this PR downloaded the x86_64 binary as a workaround but this approach has been discarded)

  ## Longer term solution
  If possible, produce signed arm64 binaries in a future v23.x tarball?

  Note that this same problem affects the new v24.0.1 arm64 tarball so perhaps a signed v24.x.x tarball would also be ideal?

  That being said, this PR will check all current and future arm64 binaries and self-sign as needed, so perhaps we need not worry about pre-signing the tarball binaries. And I did test a version of `get_previous_releases.py` that includes the new v24.0.1 binaries and it successfully self-signed both v23.0 and v24.0.1, as expected.

  ## Further info:
  Somewhat related to: bitcoin#15774 (comment)

  And @ fanquake noted on IRC that you can confirm which binaries are or are not signed via:
  ```
  $ codesign -v -d bitcoin-qt
  bitcoin-qt: code object is not signed at all
  ```

ACKs for top commit:
  hebasto:
    ACK dc12f2e

Tree-SHA512: 644895f8e97f5ffb3c4754c1db2c48abd77fa100c2058e3c896af04806596fc2b9c807a3f3a2add5be53301ad40ca2b8171585bd254e691f6eb38714d938396b
979271a macdeploy: remove unused detached-sig-apply (fanquake)

Pull request description:

  Signature application is now done with signapple.

  https://github.com/bitcoin/bitcoin/blob/8435d7f11a89bb3f93306646f62cc2179693e072/contrib/guix/libexec/codesign.sh#L84-L85

ACKs for top commit:
  laanwj:
    ACK 979271a
  gruve-p:
    ACK bitcoin@979271a
  achow101:
    ACK 979271a
  hebasto:
    ACK 979271a, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: ab51a609d00cead4f33bcfc5b5ff1008ee02363ab1f4c4bf9544631069c237bfa92eac4dfa231bff8a1d702bda6cc92b4151361f74f58e77b595e0cb82a8391a
@PastaPastaPasta PastaPastaPasta merged commit 23eb7a7 into dashpay:develop Nov 24, 2023
4 of 5 checks passed
@UdjinM6 UdjinM6 modified the milestones: 20.1, 20.0.2 Dec 4, 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.

5 participants