Skip to content

Conversation

@Ataraxia009
Copy link

@Ataraxia009 Ataraxia009 commented Aug 2, 2025

We do not need Bitcoin Core specific text on these guix-build flows. This makes forking the open source project easier.

These make the scripts more reusable.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 2, 2025

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

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/33126.

Reviews

See the guideline for information on the review process.

Type Reviewers
Concept NACK dergoegge, willcl-ark
Concept ACK luke-jr, BitcoinMechanic, bigshiny90, jonatack, l0rinc
User requested bot ignore janb84

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #33158 (macdeploy: avoid use of Bitcoin Core in Linux cross build by fanquake)
  • #33155 (contrib: drop bitcoin-util exception from FORTIFY check by fanquake)

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.

@Sammie05
Copy link

Sammie05 commented Aug 2, 2025

Tested locally. Changes are minimal and improve flexibility for forks. Looks good.

@dergoegge
Copy link
Member

to better support forked clients

Concept NACK

This is not something Bitcoin Core needs to support.

@janb84
Copy link
Contributor

janb84 commented Aug 4, 2025

Concept NACK

What is the usecase for this ? forks would also fork the GUIX build script and if this is intended as multi client build script than move it to an independent repo.

EDIT No longer NACK-ing this PR: see #33126 (comment)

@willcl-ark
Copy link
Member

Concept NACK

Unless this value was picked up from elsewhere, I don't see how this makes it easier to support "multi clients""? A two-line downstream patch... remains a two-line downstream patch. Only the lines being patched have changed?

@luke-jr
Copy link
Member

luke-jr commented Aug 4, 2025

and ftr, Concept ACK. Core has always had a policy of using CLIENT_NAME correctly and not breaking needlessly when it's changed. PR title could be updated to appease naysayers.

@BitcoinMechanic
Copy link

to better support forked clients

Concept N-A-C-K

This is not something Bitcoin Core needs to support.

No I guess it isn't, but hopefully that means the spirit of FOSS that is invoked as an excuse when Bitcoin Core does something a large % of its users dislike is something we can stop pretending applies here.

Making life harder for no good reason for people who fork this repo is lamentable behaviour.

Otherwise, ACK.

@Ataraxia009 Ataraxia009 force-pushed the multi-client-support branch from 85cfa53 to 2c9aa1a Compare August 5, 2025 11:08
@Ataraxia009 Ataraxia009 changed the title Allowing multi client support in guix-build Removing Bitcoin core text where unnecessary Aug 5, 2025
@Ataraxia009
Copy link
Author

Ataraxia009 commented Aug 5, 2025

to better support forked clients

Concept NACK

This is not something Bitcoin Core needs to support.

This objectively makes Core easier to fork and to maintain the fork.

It doesn't need to support it, but it does make it a more accessible open source project.

And its just cleaner.

Copy link
Member

Choose a reason for hiding this comment

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

Potentially moving multiple files to a single file is not a good idea. Using a wildcard here makes this much more fragile and prone to error.

Copy link
Member

Choose a reason for hiding this comment

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

Moving multiple files to a single file is an error, so it should cause the guix build to abort?

Copy link
Author

Choose a reason for hiding this comment

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

I think this is fine here since it is in the deploy output folder. It should really never be giving out more than a single zip. It's safe to assume here that the deploy folder will just have the one

Copy link
Contributor

Choose a reason for hiding this comment

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

Haven't explored this in depth, but my guess is that the zip filename comes from this line in add_macos_deploy_target:
https://github.com/bitcoin/bitcoin/blob/2c9aa1afa8dab8cf2c86b10010f1d3b342d93425/cmake/module/Maintenance.cmake#L87
An alternative approach might be to change that to something generic like CFBundleName = \"BundleName\", or make it have something closer to the final name in the first place.

Copy link
Author

Choose a reason for hiding this comment

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

Changing it to CFBundleName = \"BundleName\" would be confusing or weird for people just running the raw deploy build, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

True, maybe one could make it possible for build.sh to override the bundle name when doing the deploy:

            BUNDLE_NAME="${DISTNAME}-${HOST}-unsigned"
            cmake --build build --target deploy ${V:+--verbose} "-DBUNDLE_NAME=${BUNDLE_NAME}"
            mv "build/dist/${BUNDLE_NAME}.zip" "${OUTDIR}/"

Then have Maintenance.cmake pick that up if set, otherwise fall back to CLIENT_NAME.

Copy link
Member

Choose a reason for hiding this comment

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

Opened an alternative in #33158.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 5, 2025

Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

File commit fd813bf
(master)
commit 9a5e29ab0b33831a011564e0a53e34f72425e9bb
(pull/33126/merge)
*-aarch64-linux-gnu-debug.tar.gz 0fca353c35d56894...
*-aarch64-linux-gnu.tar.gz 68c4fb0e5bb8723f...
*-arm-linux-gnueabihf-debug.tar.gz e585818d2a7111a6...
*-arm-linux-gnueabihf.tar.gz e5f64c657be612bd...
*-arm64-apple-darwin-codesigning.tar.gz af8a0f2e9b51d375...
*-arm64-apple-darwin-unsigned.tar.gz 1c02e8f7e9bd7ace...
*-arm64-apple-darwin-unsigned.zip 8ee2034bc764ada1...
*-powerpc64-linux-gnu-debug.tar.gz 6cdd0c745c461a47...
*-powerpc64-linux-gnu.tar.gz 3439c91e85664d03...
*-riscv64-linux-gnu-debug.tar.gz c94059448029af2e...
*-riscv64-linux-gnu.tar.gz b250a8f24f86e8ae...
*-x86_64-apple-darwin-codesigning.tar.gz 595024244445bc56...
*-x86_64-apple-darwin-unsigned.tar.gz 933354116e065ae7...
*-x86_64-apple-darwin-unsigned.zip 720d862e21bb32d7...
*-x86_64-linux-gnu-debug.tar.gz c9a74d9865916ede...
*-x86_64-linux-gnu.tar.gz 78f28bc55cc42f2a...
*.tar.gz c2dfee232da81a31... 34f75b4280262f3c...
SHA256SUMS.part c01f8a26017bb2c2...
guix_build.log a557e059591acc3e... 3349999b04f4dcaf...
guix_build.log.diff a6070322972484f4...

@Ataraxia009
Copy link
Author

Can we merge this, the builds seem fine

@dergoegge
Copy link
Member

This has 3 nacks with no reasonable rebuttals, ready for close?

@Ataraxia009
Copy link
Author

Concept NACK

What is the usecase for this ? forks would also fork the GUIX build script and if this is intended as multi client build script than move it to an independent repo.

This makes conducting a fork easier, and rebasing the fork/absorbing cores changes if required in a fork easier for a maintainer.

The code is also a lot cleaner, given we check for bitcoin-utils in a better way,

and don't have an unnecessary Bitcoin-Core based text in the build.sh

@Ataraxia009
Copy link
Author

Concept NACK

Unless this value was picked up from elsewhere, I don't see how this makes it easier to support "multi clients""? A two-line downstream patch... remains a two-line downstream patch. Only the lines being patched have changed?

This is addressed, and a fair callout.

Now the downstream patch for a forked client is not a two line downstream patch

@Ataraxia009
Copy link
Author

This has 3 nacks with no reasonable rebuttals, ready for close?

Just addressed them.

Feel like this is objectively more reusable code

@KurtisStirling
Copy link

This has 3 nacks with no reasonable rebuttals, ready for close?

Rebuttal: claiming to be open source, but not acting in the spirit of open source, is bad for Core's already tarnished reputation.

Sure, no one has to do anything, but ngaf about people outside of your immediate circle is no way to win kudos.

@bigshiny90
Copy link

Concept ACK - obviously.

Simple change that simplifies forking. Core may not NEED to do this, but why would Core NOT do this?

@janb84
Copy link
Contributor

janb84 commented Aug 6, 2025

Can we merge this, the builds seem fine

Isn't the missing links to the guix build outcomes not an indication that the build is indeed not fine ? would expect a result more like #32865 (comment)

@dergoegge
Copy link
Member

You are free to fork the code and change whatever you like, but the burden of maintaining your fork falls on you not the contributors of Bitcoin Core.

@achow101
Copy link
Member

achow101 commented Aug 6, 2025

Can we merge this, the builds seem fine

No, there are no ACKs from regular contributors. No PR is merged just because it builds fine.

@janb84
Copy link
Contributor

janb84 commented Aug 6, 2025

Concept NACK
What is the usecase for this ? forks would also fork the GUIX build script and if this is intended as multi client build script than move it to an independent repo.

This makes conducting a fork easier, and rebasing the fork/absorbing cores changes if required in a fork easier for a maintainer.

The code is also a lot cleaner, given we check for bitcoin-utils in a better way,

and don't have an unnecessary Bitcoin-Core based text in the build.sh

Thanks for addressing my question. With a more descriptive PR title your intentions with the code changes (PR) are better understood. Although I'm not agreeing that the current state of the code in the PR is "a lot cleaner" I'm also not going to block the PR any longer. Have removed my NACK.

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

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

Concept ACK, provided this small patch is robust. It's a minor change to be sure. Nevertheless, it seems cleaner not to hardcode it and would convey a magnanimous FOSS spirit that I encourage.

@l0rinc
Copy link
Contributor

l0rinc commented Aug 7, 2025

I'm not sure why it would be our job to make the code more forkable - but we do need to make it maintainable, so concept ACK for less hard-coding - no opinion on the implementation details, will let others review the specifics.

@Ataraxia009 Ataraxia009 force-pushed the multi-client-support branch from 2c9aa1a to 0560c98 Compare August 7, 2025 04:15
@Ataraxia009
Copy link
Author

Ataraxia009 commented Aug 7, 2025

Isn't the missing links to the guix build outcomes not an indication that the build is indeed not fine ? would expect a result more like #32865 (comment)

good call, there was a problem with using binary.name in the new python lief version. We should be fine now, just pushed a fix.

However i cant run the drahbot build, if somebody could add the label for building, would be helpful

@Ataraxia009
Copy link
Author

You are free to fork the code and change whatever you like, but the burden of maintaining your fork falls on you not the contributors of Bitcoin Core.

The contributors and builders of the bitcoin network do have a responsibility towards helping decentralise the network, which leads to overall network health.

In my humble opinion, helping support more diversity in client choice for node runners should be, if not already is, a core principle of the network.

Also this leads to less hardcoding and code cleanliness, as agreed upon by other reviewers.

@maflcko
Copy link
Member

maflcko commented Aug 7, 2025

Can we merge this, the builds seem fine

No, it didn't. The build failed and you haven't tested this yourself at all?

However i cant run the drahbot build, if somebody could add the label for building, would be helpful

A passing CI (or build) is not sufficient for a merge. Especially here, because a full guix build (with signing) isn't run by any CI. The burden to explain the changes (and why they are safe and correct, and how to test them) is on the pull request author. Instead of spamming the thread with comments about rushing a merge here without proper testing and review, it would be better to make testing and review easier.

@Ataraxia009
Copy link
Author

Can we merge this, the builds seem fine

No, it didn't. The build failed and you haven't tested this yourself at all?

However i cant run the drahbot build, if somebody could add the label for building, would be helpful

A passing CI (or build) is not sufficient for a merge. Especially here, because a full guix build (with signing) isn't run by any CI. The burden to explain the changes (and why they are safe and correct, and how to test them) is on the pull request author. Instead of spamming the thread with comments about rushing a merge here without proper testing and review, it would be better to make testing and review easier.

Hey apologies, my intent was not to rush, was just trying to address everyones concerns

Did run tests, but had a bad local environment, unfortunately

Anyways, everything should be fine now, should attach a drahbot guix build request to be sure

@sedited
Copy link
Contributor

sedited commented Aug 7, 2025

Anyways, everything should be fine now, should attach a drahbot guix build request to be sure

Ideally you would do the full guix build yourself and post the build artifact hashes. Your dev environment should have no influence on that. Then reviewers can compare their results to yours.

@Ataraxia009
Copy link
Author

guix build for verification

daa954407e65e2f3baba9ed349d46f321786db7822db988f522577a1eb7647c1  guix-build-0560c98ca110/output/dist-archive/bitcoin-0560c98ca110.tar.gz
f7bcb25a8f555b22b07c713d13823f3e07cfb9f4e2e1da1ac197d019fb89da60  guix-build-0560c98ca110/output/riscv64-linux-gnu/SHA256SUMS.part
3275ce7634c4b93b5733985aa6b761ed2b87d7984e44bb79f375a3e25dbd6511  guix-build-0560c98ca110/output/riscv64-linux-gnu/bitcoin-0560c98ca110-riscv64-linux-gnu.tar.gz
7b5988013467c397fd2f4c23105fc905a190033728c7c8ce9eca6540e3015187  guix-build-0560c98ca110/output/riscv64-linux-gnu/bitcoin-0560c98ca110-riscv64-linux-gnu-debug.tar.gz
79ca6d9b03a850ed6cd4d0f9dc72ca180ee23862e739efdad3e37b5ee1a54e9f  guix-build-0560c98ca110/output/powerpc64-linux-gnu/bitcoin-0560c98ca110-powerpc64-linux-gnu.tar.gz
a04588aba9080007be2dba0fa9ae63d503e3018e680a0f135f30b644d8bb03b6  guix-build-0560c98ca110/output/powerpc64-linux-gnu/SHA256SUMS.part
0a4de5e49c9ce698a1b3b737db9604230676cea16cf4afda0d0b30c539e1527d  guix-build-0560c98ca110/output/powerpc64-linux-gnu/bitcoin-0560c98ca110-powerpc64-linux-gnu-debug.tar.gz
749e9d66a8869e935d8b469e0af080b9be50f21e3cce82c3ac5c55c0c289a270  guix-build-0560c98ca110/output/arm64-apple-darwin/bitcoin-0560c98ca110-arm64-apple-darwin-unsigned.zip
6417faef9652a76824177c91b05caacaaa5755f1b1af206a59891a81fc2aff0b  guix-build-0560c98ca110/output/arm64-apple-darwin/SHA256SUMS.part
67cac3f596f8d7f3623660b0c440de2506444f473891613d9fe30c47f6ed9bba  guix-build-0560c98ca110/output/arm64-apple-darwin/bitcoin-0560c98ca110-arm64-apple-darwin-codesigning.tar.gz
abb16a9182273e2fd80a6197e90c060d3d971d6386dbe401d17efa686328a965  guix-build-0560c98ca110/output/arm64-apple-darwin/bitcoin-0560c98ca110-arm64-apple-darwin-unsigned.tar.gz
1a96eacf57752c4588a4ac7ac8c0cfa950c3d28ca9860c948eb1bf9d586f23ce  guix-build-0560c98ca110/output/arm-linux-gnueabihf/bitcoin-0560c98ca110-arm-linux-gnueabihf.tar.gz
ae460ee8a39778f3cc0167e14a951e4ff3d52815a080941a1fdcea8ce2464805  guix-build-0560c98ca110/output/arm-linux-gnueabihf/SHA256SUMS.part
ad3e50cf615e770e7aa696118497eb4df29d1950fdc07c4b715ea1765922b084  guix-build-0560c98ca110/output/arm-linux-gnueabihf/bitcoin-0560c98ca110-arm-linux-gnueabihf-debug.tar.gz
2f63caa57dc7806f62dbc379c0fa3a7d27e4c4f5967d33b231ab332af062116f  guix-build-0560c98ca110/output/x86_64-linux-gnu/SHA256SUMS.part
bafe716285828988ceccf06facf8dd93f44189a61aad3d307078f16ea4a524f5  guix-build-0560c98ca110/output/x86_64-linux-gnu/bitcoin-0560c98ca110-x86_64-linux-gnu-debug.tar.gz
41a9f679a06da5859f0c9df0fd5065da74c81e209856d77acc28076b891100ad  guix-build-0560c98ca110/output/x86_64-linux-gnu/bitcoin-0560c98ca110-x86_64-linux-gnu.tar.gz
7b530cb932bf0133e5a4ec829ecefa5ffb8219f4cce3c8098b2d02d56e88461a  guix-build-0560c98ca110/output/x86_64-w64-mingw32/SHA256SUMS.part
265c38e8a115e568f60cd347532219ab825ba274dd3099ab3b6ac0ff095da506  guix-build-0560c98ca110/output/x86_64-w64-mingw32/bitcoin-0560c98ca110-win64-unsigned.zip
adbe1db99fbdd861dec43c85fa68838af5d202fa6dd0897b55a68885698b5bb9  guix-build-0560c98ca110/output/x86_64-w64-mingw32/bitcoin-0560c98ca110-win64-codesigning.tar.gz
a1bff07d2cf16013cce8c8281ee59c52be6c82ceeea72cb00c93b77d847be57b  guix-build-0560c98ca110/output/x86_64-w64-mingw32/bitcoin-0560c98ca110-win64-setup-unsigned.exe
e111af7a06809ad48b8ad1edf63d31d9dce657021166c13afe7a53b84dff564f  guix-build-0560c98ca110/output/x86_64-w64-mingw32/bitcoin-0560c98ca110-win64-debug.zip
3a3ee54a1ebb55b59f77d03f61d8be5b2e0d65920fa18c90b7e19964af067498  guix-build-0560c98ca110/output/aarch64-linux-gnu/bitcoin-0560c98ca110-aarch64-linux-gnu-debug.tar.gz
8fec1930c52d8abdd7bbc4a77e0d1b01766e9192873ab9f28bd60ed039fea86a  guix-build-0560c98ca110/output/aarch64-linux-gnu/SHA256SUMS.part
36fef4ab9f8ec8975a826045dfc3df9e5f0470da32cc38216275deea86f63718  guix-build-0560c98ca110/output/aarch64-linux-gnu/bitcoin-0560c98ca110-aarch64-linux-gnu.tar.gz
ecb8e7646231d7f6d2bc091eded179b5d9bf0888dc30014440c74c4c1682c8f0  guix-build-0560c98ca110/output/x86_64-apple-darwin/bitcoin-0560c98ca110-x86_64-apple-darwin-unsigned.zip
aac8c9f4e9b720fd36d015358477c954ac3f3f64e0ba734576183a3fb8cf9b8e  guix-build-0560c98ca110/output/x86_64-apple-darwin/bitcoin-0560c98ca110-x86_64-apple-darwin-unsigned.tar.gz
7743006a89b46e6af88fcc2b85b6da1689f92be8c5441e766e7b8537a8673189  guix-build-0560c98ca110/output/x86_64-apple-darwin/bitcoin-0560c98ca110-x86_64-apple-darwin-codesigning.tar.gz
fd20d767413b012411e8977834d2ee123a265b8b44c72a21d6886274ea030869  guix-build-0560c98ca110/output/x86_64-apple-darwin/SHA256SUMS.part


# bitcoin-util does not currently contain any fortified functions
if 'Bitcoin Core bitcoin-util utility version ' in binary.strings:
if any(' bitcoin-util utility version ' in s for s in binary.strings):
Copy link
Member

Choose a reason for hiding this comment

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

This can just be removed: #33155.

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@Ataraxia009
Copy link
Author

Seems like the above 2 PRs will cover this just fine:

#33155
#33158

No need to merge this then, closing

@fanquake fanquake mentioned this pull request Oct 15, 2025
4 tasks
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.