guix: Compile GUI separately from other binaries #35098

pull hebasto wants to merge 6 commits into bitcoin:master from hebasto:260417-guix-gui changing 14 files +313 −233
  1. hebasto commented at 10:50 AM on April 17, 2026: member

    This PR isolates the GUI build, including its specific dependencies, into a dedicated container.

    Benefits of this approach:

    1. Improves security: Any unknown backdoors in GUI-specific dependencies will no longer affect bitcoind and other non-GUI binaries.

    2. Enables a safer upgrade path: Allows for the introduction of additional GUI dependencies needed for Wayland support or transitioning to the QML-based GUI.

    3. ~Could be useful for #25573.~

    This implementation is based on an idea proposed here.

    Currently based on #34948 and #35072.

    Closes #29914.

  2. guix: Split manifest into build and codesign manifests 690e587b7b
  3. cmake: Move `USE_DBUS` to `bitcoinqt` target
    This removes the `USE_DBUS` definition from `bitcoin-build-config.h`,
    reducing the dependency of non-GUI code on GUI-specific definitions.
    afcb4be937
  4. cmake: Move `USE_QRCODE` to `bitcoinqt` target
    This removes the `USE_QRCODE` definition from `bitcoin-build-config.h`,
    reducing the dependency of non-GUI code on GUI-specific definitions.
    
    Additionally, `QRencode::QRencode` is now linked only when wallet is
    enabled, because the `qrencode.h` header is used exclusively in
    wallet-specific code.
    29d4d1ff96
  5. guix: Split GUI dependencies into separate manifest 037fce4eee
  6. guix, depends: Omit `GUIX_ENVIRONMENT` from `gen_id` calculations
    When using the Guix build/sign scripts from this repository, the Guix
    environment and the `GUIX_ENVIRONMENT` variable within the container are
    fully defined by the commit hash and the user-provided
    `ADDITIONAL_GUIX_*_FLAGS`.
    
    This change removes `GUIX_ENVIRONMENT` from the package ID calculations.
    Doing so allows us to split manifests and reuse built depends packages
    across containers that utilize these split manifests in subsequent
    commits.
    
    The potential impact of `ADDITIONAL_GUIX_*_FLAGS` is still accounted for
    by passing them to the `gen_id` script via the `{BUILD,HOST}_ID_SALT`
    variables.
    0bb539dec3
  7. hebasto added the label Build system on Apr 17, 2026
  8. DrahtBot commented at 10:51 AM on April 17, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #35131 (guix, refactor: Minor script cleanups and improvements by hebasto)
    • #35072 (cmake: Remove optional definitions from bitcoin-build-config.h by hebasto)
    • #34948 (guix: Split manifest into build and codesign manifests by hebasto)
    • #32764 (guix: Build for macOS using Clang only by hebasto)
    • #32162 (depends: Switch from multilib to platform-specific toolchains by hebasto)
    • #31260 (scripted-diff: Type-safe settings retrieval by ryanofsky)
    • #25573 (guix: produce a -static-pie bitcoind 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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  9. DrahtBot added the label CI failed on Apr 17, 2026
  10. DrahtBot commented at 11:58 AM on April 17, 2026: contributor

    <!--85328a0da195eb286784d51f73fa0af9-->

    🚧 At least one of the CI tasks failed. <sub>Task lint: https://github.com/bitcoin/bitcoin/actions/runs/24561368833/job/71811492362</sub> <sub>LLM reason (✨ experimental): CI failed because the shell lint check (lint-shell.py) reported a ShellCheck SC2206 word-splitting warning in contrib/guix/libexec/build.sh and treated it as an error.</sub>

    <details><summary>Hints</summary>

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

    </details>

  11. guix: Build GUI sequentially c4730955ec
  12. hebasto force-pushed on Apr 24, 2026
  13. DrahtBot removed the label CI failed on Apr 24, 2026
  14. hebasto commented at 10:01 AM on April 27, 2026: member

    My Guix build:

    aarch64
    8d308b60d97239daa22fc9ba920437afbf0664fbdd79cbb980d8c48443eb9f0d  guix-build-c4730955ec14/output/aarch64-linux-gnu/SHA256SUMS.part
    4c47b63c7c1d85318bb69bd86dfde30120f5b564f4234a56b66121caad871e47  guix-build-c4730955ec14/output/aarch64-linux-gnu/bitcoin-c4730955ec14-aarch64-linux-gnu-debug.tar.gz
    48e5a702549ecbadbfaa03a74da8fd57fa3e27dad2974b5809eec951563ce512  guix-build-c4730955ec14/output/aarch64-linux-gnu/bitcoin-c4730955ec14-aarch64-linux-gnu.tar.gz
    809c4ba92375c225343fe72f1301cde792baccb1309ef398a78692569f7f82e2  guix-build-c4730955ec14/output/arm-linux-gnueabihf/SHA256SUMS.part
    0e8c57f500706e35234a1ca65267e46abc69245d2b2614c6b05d5027d7a13a6f  guix-build-c4730955ec14/output/arm-linux-gnueabihf/bitcoin-c4730955ec14-arm-linux-gnueabihf-debug.tar.gz
    d43d739efcc84fd50ae9c8fafc7d2a238ae68494fe013a5cfaefa6f96da6d59e  guix-build-c4730955ec14/output/arm-linux-gnueabihf/bitcoin-c4730955ec14-arm-linux-gnueabihf.tar.gz
    0477d6edfc51e27260ef3ded768bb5dfe0b31151ca784dbbe3d61b019b64c6bc  guix-build-c4730955ec14/output/arm64-apple-darwin/SHA256SUMS.part
    65ee14c6a96b5eff66cb37323e58fda3eb148772b0545037a15b3aa00b9b103c  guix-build-c4730955ec14/output/arm64-apple-darwin/bitcoin-c4730955ec14-arm64-apple-darwin-codesigning.tar.gz
    b45bf246506de6a858dc9b7e5054b2ebf8db0e3f5b1d01f0cb80446da98999b5  guix-build-c4730955ec14/output/arm64-apple-darwin/bitcoin-c4730955ec14-arm64-apple-darwin-unsigned.tar.gz
    ec833b60a512c584bd3bdaa97cfed5edd1a00f15b6f8b6e87c926d4b60c05065  guix-build-c4730955ec14/output/arm64-apple-darwin/bitcoin-c4730955ec14-arm64-apple-darwin-unsigned.zip
    5d06358004486a2f3395b37390684cdf8fc6f6c239a1e3acd6a9bfa4ea459127  guix-build-c4730955ec14/output/dist-archive/bitcoin-c4730955ec14.tar.gz
    e6b56adabeac53ebb7deb9931e1a35f573f15f2c0660614344471094336d4f7b  guix-build-c4730955ec14/output/powerpc64-linux-gnu/SHA256SUMS.part
    23c8f012f09ef3f063d7e9adc2945277d9ccac55a2885b0cce5b0edcadc2d521  guix-build-c4730955ec14/output/powerpc64-linux-gnu/bitcoin-c4730955ec14-powerpc64-linux-gnu-debug.tar.gz
    f26008575cc16ba33a7f8988a638baecd6243d8f9bc769541cadbbc4e93998de  guix-build-c4730955ec14/output/powerpc64-linux-gnu/bitcoin-c4730955ec14-powerpc64-linux-gnu.tar.gz
    b8136a36ca039e4db008a7ba3694be1a3ef5b8497a28ff0430ca4cea16e2fdab  guix-build-c4730955ec14/output/riscv64-linux-gnu/SHA256SUMS.part
    3981d1fe92fbc7683b8b6d0b2f83beab2cd9f4e69ee961b831d82c4771a2e343  guix-build-c4730955ec14/output/riscv64-linux-gnu/bitcoin-c4730955ec14-riscv64-linux-gnu-debug.tar.gz
    aff08b59011bc95f493b3866f00864a1501ac089909cb896e8fa1e85fa15191e  guix-build-c4730955ec14/output/riscv64-linux-gnu/bitcoin-c4730955ec14-riscv64-linux-gnu.tar.gz
    32ba8fbdc3e4e2c47f0980f515821314c588129942479c972de0444d9a7a7709  guix-build-c4730955ec14/output/x86_64-apple-darwin/SHA256SUMS.part
    6cc971e899d7f6472a8a3402b42d5204c0b78ce6c70bf10a23cbc710451f0d12  guix-build-c4730955ec14/output/x86_64-apple-darwin/bitcoin-c4730955ec14-x86_64-apple-darwin-codesigning.tar.gz
    070e7c96aeb5ed0deebb4c0d37055414c2922bf1c8b83a93b2ad36f1d54aa374  guix-build-c4730955ec14/output/x86_64-apple-darwin/bitcoin-c4730955ec14-x86_64-apple-darwin-unsigned.tar.gz
    2bee7e0febb3cabe3be9d6ddb01a151bbc4856d10a00e962dd094f09bfc6303e  guix-build-c4730955ec14/output/x86_64-apple-darwin/bitcoin-c4730955ec14-x86_64-apple-darwin-unsigned.zip
    a82816d07f0b7399b81c6c0be638d42ce958f625ac474bbd241bdc359f93ab44  guix-build-c4730955ec14/output/x86_64-linux-gnu/SHA256SUMS.part
    765fce3f8e1d93d16f5ce4aea85ea5a5df7d93f56ead20820453f2ba11968c8a  guix-build-c4730955ec14/output/x86_64-linux-gnu/bitcoin-c4730955ec14-x86_64-linux-gnu-debug.tar.gz
    e0cfa6f076bdc9924c2601a031fc05f5f3743a8fe62252770068532b966eb195  guix-build-c4730955ec14/output/x86_64-linux-gnu/bitcoin-c4730955ec14-x86_64-linux-gnu.tar.gz
    3fb88c8569f43855f7fb514970e2b9009cea8c6d5f2850c0e751d65a72dcd8d4  guix-build-c4730955ec14/output/x86_64-w64-mingw32/SHA256SUMS.part
    079f4921a2456eb983644754f74f280e07faab8f956f0e45524fbabb439aba2a  guix-build-c4730955ec14/output/x86_64-w64-mingw32/bitcoin-c4730955ec14-win64-codesigning.tar.gz
    a0ded9c2beedb4d2602ade21e232fc9ed7b099cb7dab57644b14f3651080bb47  guix-build-c4730955ec14/output/x86_64-w64-mingw32/bitcoin-c4730955ec14-win64-debug.zip
    c6d59948845b1debdae9d05b17f25496a0700f2fe966c1d2f5919756a2fbf90d  guix-build-c4730955ec14/output/x86_64-w64-mingw32/bitcoin-c4730955ec14-win64-setup-unsigned.exe
    ac0e507ef67dae4595ce40433c6e8f05a077e5f0dd0a7ef3bd23d50395d95523  guix-build-c4730955ec14/output/x86_64-w64-mingw32/bitcoin-c4730955ec14-win64-unsigned.zip
    
  15. fanquake commented at 12:39 PM on April 29, 2026: member

    or transitioning to the QML-based GUI.

    Is that blocked on this change; I thought it just needed to be finished? (looking at https://github.com/bitcoin-core/gui-qml, it just has this repo as a subtree; I also can't see any new dependencies)

    Could be useful for #25573.

    Im not sure yet, given the current approach of re-using the same build dir. We will want to compile / link the static binaries with different compilation / link flags.

  16. hebasto commented at 1:45 PM on April 29, 2026: member

    or transitioning to the QML-based GUI.

    Is that blocked on this change; I thought it just needed to be finished? (looking at https://github.com/bitcoin-core/gui-qml, it just has this repo as a subtree; I also can't see any new dependencies)

    The qt6 branch using this repo as a subtree is a shortcut taken during the migration from Qt 5 to Qt 6.

    The transition to QML-based GUI will use a branch that is cleanly mergeable into the master branch in this repo (rebasing is currently in progress).

    The new dependencies will look like the ones here.

    Could be useful for #25573.

    Im not sure yet, given the current approach of re-using the same build dir. We will want to compile / link the static binaries with different compilation / link flags.

    Dropped this from the PR description. However, it still seems unreasonable to keep GUI-specific stuff in a Guix prefix where static non-GUI binaries are being built.

  17. fanquake commented at 1:53 PM on April 29, 2026: member

    The new dependencies will look like the ones here.

    Ok, so some additional Qt subcomponents? My point is that doing anything QML related in this repo, doesn't seem to be blocked on the changes here. It could be done today, by just enabling a few more components in Qt, without any other, new, non-Qt dependencies?

  18. hebasto commented at 2:08 PM on April 29, 2026: member

    The new dependencies will look like the ones here.

    Ok, so some additional Qt subcomponents? My point is that doing anything QML related in this repo, doesn't seem to be blocked on the changes here. It could be done today, by just enabling a few more components in Qt, without any other, new, non-Qt dependencies?

    I'm a bit confused. Are we making a distinction between additional Qt components and other non-Qt dependencies? If so, what is the difference between them from a security perspective?

    This PR is not proposed solely for the transition to the QML-based GUI. Its primary purpose is to resolve #29914, which doesn't mention QML at all. As a byproduct, it also enables the transition to the QML GUI without having any effect on the security of the non-GUI release binaries.

  19. fanquake commented at 3:30 PM on April 29, 2026: member

    I'm a bit confused. Are we making a distinction between additional Qt components and other non-Qt dependencies? If so, what is the difference between them from a security perspective?

    Yes. I think we could generally add new Qt submodules as-needed, given we are already using Qt. Any other new dependency should be evaluated on a case-by-case basis.

    it also enables the transition to the QML GUI without having any effect on the security of the non-GUI release binaries.

    I think this is my confusion. I don't think there are any security-related issues that would arise from moving to QML, today, if it only requires using a few more Qt modules; so am trying to clarify how this PR provides a "safer upgrade path".


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-05-15 03:12 UTC

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