depends: Make tarball creation from local directory reproducible #35618

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:260629-depends-sort changing 1 files +5 −1
  1. hebasto commented at 1:56 PM on June 29, 2026: member

    This guarantees $(package)_sha256_hash reproducibility regardless of the default behavior of $(build_TAR).

    Fixes caching on some systems, for example, on FreeBSD, on OpenBSD or on macOS.

    Steps to reproduce the issue on FreeBSD using the master branch @ 2a9e35d293b308e81811fa93ad2e5e8ed20e66e0:

    $ pkg update
    $ pkg install -y bash git gmake
    $ mkdir a && cd a && git init
    $ git remote add origin https://github.com/bitcoin/bitcoin.git
    $ git fetch --depth 1 origin 2a9e35d293b308e81811fa93ad2e5e8ed20e66e0
    $ git checkout FETCH_HEAD
    $ cd depends
    $ gmake print-native_libmultiprocess_sha256_hash
    native_libmultiprocess_sha256_hash=7dd817bfc0ee23c408299907aff13fefb0bd3a54ec66dc14ea15b0cc38c3d9ce
    $ cd ../../ && sleep 2
    $ mkdir b && cd b && git init
    $ git remote add origin https://github.com/bitcoin/bitcoin.git
    $ git fetch --depth 1 origin 2a9e35d293b308e81811fa93ad2e5e8ed20e66e0
    $ git checkout FETCH_HEAD
    $ cd depends
    $ gmake print-native_libmultiprocess_sha256_hash
    native_libmultiprocess_sha256_hash=34d6f79560c0ff7a4f46bd6bfb4693076546b41f071b6dbf879da45ac8384688
    

    The CI run for this branch: https://github.com/hebasto/github-actions/actions/runs/28376051724/job/84065853378.

  2. depends: Make tarball creation from local directory reproducible
    This guarantees `$(package)_sha256_hash` reproducibility regardless of
    the default behavior of `$(build_TAR)`. Fixes caching on some systems,
    for example, on FreeBSD.
    7e973cce52
  3. hebasto added the label Build system on Jun 29, 2026
  4. DrahtBot commented at 1:56 PM on June 29, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. fanquake commented at 1:58 PM on June 29, 2026: member

    Fixes caching on some systems, for example, on FreeBSD.

    What is the underlying issue? Why does this only effect FreeBSD?

  6. hebasto commented at 2:32 PM on June 29, 2026: member

    Fixes caching on some systems, for example, on FreeBSD.

    What is the underlying issue?

    It likely depends on how tar interacts with the underlying filesystem. While I can't point to the specific code in the related system utilities, we have this code for the exact same reason::https://github.com/bitcoin/bitcoin/blob/57b3bf8496032cb7a87eafe94ce840387ece2408/depends/funcs.mk#L284-L288


    Why does this only effect FreeBSD?

    It's not FreeBSD-specific. I've just tested on macOS Tahoe, and the same issue occurred. It was simply noticed on FreeBSD first in https://github.com/hebasto/bitcoin-core-nightly.

  7. hebasto commented at 5:09 PM on June 29, 2026: member

    My Guix build:

    aarch64
    014feb68bb9779bb1e5c5e6de28cf90a4d4327a4e45703825a4e67b3e9ced3fc  guix-build-7e973cce52ca/output/aarch64-linux-gnu/SHA256SUMS.part
    2fed3f1d4f1c9db637ba43077ced808f8ca83c87a51ac3833cc41de7866cbb48  guix-build-7e973cce52ca/output/aarch64-linux-gnu/bitcoin-7e973cce52ca-aarch64-linux-gnu-debug.tar.gz
    22b485e1b175536b093c82061019cfafc845e725f8790a13deebd3fd7a254cef  guix-build-7e973cce52ca/output/aarch64-linux-gnu/bitcoin-7e973cce52ca-aarch64-linux-gnu.tar.gz
    0fa4c6e76d806526d7c3c1f15b064067111eb6f43d34f9437c5fcc84e437d8fa  guix-build-7e973cce52ca/output/arm-linux-gnueabihf/SHA256SUMS.part
    51d7ad7634dda8758f36d1ff8bb52dea25fd8116f9d3a65ce92150dbea018fa6  guix-build-7e973cce52ca/output/arm-linux-gnueabihf/bitcoin-7e973cce52ca-arm-linux-gnueabihf-debug.tar.gz
    ff728785c3ee3fb456918388029d98bb8978edf145bff3e1067ea78f09c05cb5  guix-build-7e973cce52ca/output/arm-linux-gnueabihf/bitcoin-7e973cce52ca-arm-linux-gnueabihf.tar.gz
    7b4af6358c33f4ced24fd58efb115a8fffd3ca8d657d0a01438aa8c19915bdc7  guix-build-7e973cce52ca/output/arm64-apple-darwin/SHA256SUMS.part
    223256c467f76238b784cada28901258326efe974cbc90a25c18d6153afbcef2  guix-build-7e973cce52ca/output/arm64-apple-darwin/bitcoin-7e973cce52ca-arm64-apple-darwin-codesigning.tar.gz
    227b13a7706de3b9e614b9936c707db55406906b8417c16e4e5fdde3fb9dc12b  guix-build-7e973cce52ca/output/arm64-apple-darwin/bitcoin-7e973cce52ca-arm64-apple-darwin-unsigned.tar.gz
    8d683d84513b96b8fa38a6330ea4dc3eedf5c4902984172704613b8e5be50ea2  guix-build-7e973cce52ca/output/arm64-apple-darwin/bitcoin-7e973cce52ca-arm64-apple-darwin-unsigned.zip
    e311d6fa8938ad9932d3c1e3d54742a811a30f68c243996b99d75ebc8064ade9  guix-build-7e973cce52ca/output/dist-archive/bitcoin-7e973cce52ca.tar.gz
    876d44709819c76cd222b87e5add833b711db553445367b70d5d7de11d81b97b  guix-build-7e973cce52ca/output/powerpc64-linux-gnu/SHA256SUMS.part
    2d9d08f4233f0398a76b9f6566e555d78c9703bcb8529309e5840e68e3d586c4  guix-build-7e973cce52ca/output/powerpc64-linux-gnu/bitcoin-7e973cce52ca-powerpc64-linux-gnu-debug.tar.gz
    3751f45b851d6bc1214b0e258dc42f4f7ebf9e88250611c5f8eb2d9aaf0bfb12  guix-build-7e973cce52ca/output/powerpc64-linux-gnu/bitcoin-7e973cce52ca-powerpc64-linux-gnu.tar.gz
    021f6a27ab5c2becc3e43f8bad31a5dffbf7ee7949f56d47b3fe3a1c2d3e50ac  guix-build-7e973cce52ca/output/riscv64-linux-gnu/SHA256SUMS.part
    d8e8d18a1a99c8d8fb880911ece46d5bbbbea12e080e3c61d8e1f28a226e0add  guix-build-7e973cce52ca/output/riscv64-linux-gnu/bitcoin-7e973cce52ca-riscv64-linux-gnu-debug.tar.gz
    eaffdf953f1c8ec7dbf23ac48c7f39fd7576efa605d2b0f72681afc620921597  guix-build-7e973cce52ca/output/riscv64-linux-gnu/bitcoin-7e973cce52ca-riscv64-linux-gnu.tar.gz
    58d5cfcdb5ee926c0f8435414ca16871f0c1dc5f4cd402c72b463f3cee009c26  guix-build-7e973cce52ca/output/x86_64-apple-darwin/SHA256SUMS.part
    1653d0299d9e34cc3e99c67362c0d1c1636b9dd7dd267476d4855100c8bdc549  guix-build-7e973cce52ca/output/x86_64-apple-darwin/bitcoin-7e973cce52ca-x86_64-apple-darwin-codesigning.tar.gz
    26de287dc0526ce50d6c09bf00d1250620d4f57e17a42924524dcb749835412a  guix-build-7e973cce52ca/output/x86_64-apple-darwin/bitcoin-7e973cce52ca-x86_64-apple-darwin-unsigned.tar.gz
    43eeb1017537ceca727a34404eb79f283a000d71b578789eec5169b37d468373  guix-build-7e973cce52ca/output/x86_64-apple-darwin/bitcoin-7e973cce52ca-x86_64-apple-darwin-unsigned.zip
    c56db31ca4da6fe9c4c9e334bc501b23c57ee9ff7127a23dc42f71c049ddfda3  guix-build-7e973cce52ca/output/x86_64-linux-gnu/SHA256SUMS.part
    5c3cb69cb5b7559ec453dfa6e4b7fd753ab7550cf36f37cd70e9066aa0ebbc1e  guix-build-7e973cce52ca/output/x86_64-linux-gnu/bitcoin-7e973cce52ca-x86_64-linux-gnu-debug.tar.gz
    9a97c81e4487fb96a9bf7196e0dca6781698d431aecaf4d93bf9617e113d05dd  guix-build-7e973cce52ca/output/x86_64-linux-gnu/bitcoin-7e973cce52ca-x86_64-linux-gnu.tar.gz
    a764f714e90bbba6deeea5876151d0567f08f20db65afcea17dd9e01835f0639  guix-build-7e973cce52ca/output/x86_64-w64-mingw32/SHA256SUMS.part
    e574bfd982913b333e6b950e9b95bb42828d6f12276f92c72933e9d1c87bddc4  guix-build-7e973cce52ca/output/x86_64-w64-mingw32/bitcoin-7e973cce52ca-win64-codesigning.tar.gz
    1c0cd61e445831af7c399045ada19123fd20bdb8ecd66dd626514fd4141ddb72  guix-build-7e973cce52ca/output/x86_64-w64-mingw32/bitcoin-7e973cce52ca-win64-debug.zip
    57a605e1759aea234f7de930e3ccc590b8dcdda136d2d0e198fdcbe1037d2ce3  guix-build-7e973cce52ca/output/x86_64-w64-mingw32/bitcoin-7e973cce52ca-win64-setup-unsigned.exe
    5240a286dfe91e2dc9d04b4b253b7cf62e14edc585a0d57d4e9588968ab10475  guix-build-7e973cce52ca/output/x86_64-w64-mingw32/bitcoin-7e973cce52ca-win64-unsigned.zip
    
  8. hebasto commented at 5:12 PM on June 29, 2026: member

    Friendly ping @ryanofsky as the original code author :)


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-07-01 05:51 UTC

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