-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build: don't compress macOS DMG #24031
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
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
Concept ACK When I build locally on macOS 12.1 and without using depends, the difference in size between this commit and its parent is negligible. Both are 20 MB. Am I doing it wrong or is there something in the Guix build that lends itself more to compression? Update: oh wait, when building on macOS it uses completely different tools (see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An additional reason for merging this is that is will fix Guix building for arm64 darwin on arm64 darwin (#24211). |
b38ef12
to
abda6d4
Compare
abda6d4
to
da1cc40
Compare
da1cc40
to
36493fc
Compare
36493fc
to
3a0aa73
Compare
Rebased past #23565. |
3a0aa73
to
2fdbafc
Compare
2fdbafc
to
6c73e2a
Compare
The code in 6c73e2a looks reasonable, but what's the process for testing this? I assume we need detached signatures to have guix bake the DMG? If that can be done with something self-signed, what's the incantation? |
Concept ACK Guix hashes on x86
Guix hashes on arm64
|
Build system changes code review ACK 1dd8cbf, I don't know anything about MacOS application formats and their internals so do not have an opinion on the contents of this change. |
Looks like a bug in the
I mean, the change in user's steps to install Bitcoin Core on macOS should be documented somehow. Maybe, in release notes? While touching this code, could the |
Approach ACK. I have reviewed the code and done some testing, but still plan to do more testing before my final ack. Confirming that the quix built dmg does not automatically open in a file window when double clicked, but does mount as expected. The DMG deployed through This behavior change is fine with me, as we are getting rid of things (yay less things) and achieving cross-architecture reproducibility on a platform. If we need documentation on the behavior change, that can be picked up in a follow-up. Additionally, it could be possible to address the behavior change in a follow-up down the road. |
We should explain to the user that they have to do "open Bitcoin-Core.dmg". Could be fixed in a followup; I'd rather not have to run Guix again :-) |
I'm not sure it is a bug. Aside from my not being sure if my assumption is correct, if it was, the same header bit that means something on macOS, probably doesn't mean anything on Linux for hfsplus volumes, which would likely be why the developers of the tool wouldn't have cared about this behaviour. I can look at following up.
Sure, we could add something to the release notes. I don't think it's a big deal either way.
If I touch this branch again I could do.
They don't have to do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 1dd8cbf
I've tested guix builds on x86 and arm64 to ensure that I can build and open the resulting dmg. This change looks good to me, While technically there is a behavior change in that the dmg doesn't automatically open up in the finder, I don't think this will reasonably cause any disturbance; I also don't think there will be any need for any documentation changes. One can reasonably be expected to know how to open up the dmg. The need for documentation can be revisited if there is ever an issue opened up on this topic.
No-longer required after bitcoin#24031.
I'm going to remove "Needs release note" here (this will be in 24.0), as I don't actually think it warrants one. |
In regards to #26176, perhaps a release note is needed. |
1dd8cbf build: don't compress macOS DMG (fanquake) Pull request description: Skip compressing the macOS DMG, and drop related build steps and dependencies. Uncompressed the DMG increases from ~16mb to ~30mb, which compared to other software a user may download, (Firefox 125mb, VLC 52mb, Open Office 176mb), is still relatively small. When contrasted against the 100's of GB of blockchain data a node will download, an additional 15mb to get the release binary, isn't much additional overhead. Note that if / when we build with LTO enabled for releases, this size will shrink back down significantly again. `native_libdmg-hfsplus` is not maintained, and I doubt the DMG creation feature will ever be fixed. If at some point `xorrisofs` supports compressing dmgs, we could enable that. Guix Build on x86_64: ```bash 25b7c8bb7bc8ea014d43cebb844a842d2ac8d5a343039a820d24b649c9e6bc8a guix-build-1dd8cbfbc631/output/arm64-apple-darwin/SHA256SUMS.part 16beb5c52c9bf51b5ce9ef5a0d17c0038238a833383586a1b14acbca78533e4b guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.dmg d8f89a61a7448d6334dbb3639386a7b6340542393933f35421a9e6dfc724e455 guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin-unsigned.tar.gz 11617dc261ef602433f5bb29956a40a9085dbc783f519f75fbe06e80970148d0 guix-build-1dd8cbfbc631/output/arm64-apple-darwin/bitcoin-1dd8cbfbc631-arm64-apple-darwin.tar.gz aa8550d4a394d3161d14ec5e6012ed07354135afb022e905a1946785b4665664 guix-build-1dd8cbfbc631/output/dist-archive/bitcoin-1dd8cbfbc631.tar.gz 2b837f2f971a9738d0b7b8497f7ded740ef5e67c8baa7f30ca33e6b7d826eec8 guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/SHA256SUMS.part db972b2c06dbde5525a3f9e6ceb9c20a8120bc9a6f15e1d852a4bfac09d88569 guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.dmg 50fe990c3f9923ee92195125faf6517396e7c1b017a8f4f7d52e991ebce52f0c guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin-unsigned.tar.gz 1d9022b0ae46ead41046c40f82291ce363760660a3cd6e6ef6a5b1128b90faef guix-build-1dd8cbfbc631/output/x86_64-apple-darwin/bitcoin-1dd8cbfbc631-x86_64-apple-darwin.tar.gz ``` Guix Build on arm64: ```bash ``` ACKs for top commit: Sjors: re-tACK 1dd8cbf on Intel macOS laanwj: Build system changes code review ACK 1dd8cbf, I don't know anything about MacOS application formats and their internals so do not have an opinion on the contents of this change. jarolrod: ACK bitcoin@1dd8cbf Tree-SHA512: 04c5bf78f26a9877777093ec4c50c457107bef59d720839ea5e7d7e4f7961dfee9f86b40cf791524a9e60e9e77403a797e9fcdae3849b60b759f9f66cc31b6ab
Summary: Skip compressing the macOS DMG, and drop related build steps and dependencies. Uncompressed the DMG increases from ~16mb to ~30mb, which compared to other software a user may download, (Firefox 125mb, VLC 52mb, Open Office 176mb), is still relatively small.Note that if / when we build with LTO enabled for releases, this size will shrink back down significantly again. native_libdmg-hfsplus is not maintained, and I doubt the DMG creation feature will ever be fixed. If at some point xorrisofs supports compressing dmgs, we could enable that. This is a backport of [[bitcoin/bitcoin#24031 | core#24031]] This is one step needed to make the MacOS build work with the current guix script. Test Plan: gitian-osx `HOSTS="x86_64-apple-darwin" contrib/guix/guix-build` This still fails with an exotic clang related error `ld: unrecognised emulation mode: acosx_version_min`, but it no longer fails with a `cannot find lz` error. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D13950
Skip compressing the macOS DMG, and drop related build steps and dependencies. Uncompressed the DMG increases from ~16mb to ~30mb, which compared to other software a user may download, (Firefox 125mb, VLC 52mb, Open Office 176mb), is still relatively small. When contrasted against the 100's of GB of blockchain data a node will download, an additional 15mb to get the release binary, isn't much additional overhead. Note that if / when we build with LTO enabled for releases, this size will shrink back down significantly again.
native_libdmg-hfsplus
is not maintained, and I doubt the DMG creation feature will ever be fixed. If at some pointxorrisofs
supports compressing dmgs, we could enable that.Guix Build on x86_64:
Guix Build on arm64: