dash/contrib
Andrew Chow 3e693ddfb5
Merge bitcoin/bitcoin#25788: guix: patch NSIS to remove .reloc sections from installer stubs
7a0b129c41d9fefdbc20d6d04983dd87bb8379e7 guix: patch NSIS to remove .reloc sections from install stubs (fanquake)

Pull request description:

  With the release of binutils/ld 2.36, ld swapped to much improved
  default settings when producing windows binaries with mingw-w64. One of
  these changes was to stop stripping the .reloc section from binaries,
  which is required for working ASLR.

  When we switched to using a newer Guix time-machine in #23778, we begun
  using binutils 2.37 to produce releases. Since then, our windows
  installer (produced with makensis) has not functioned correctly when run on
  a Windows system with the "Force randomization for images (Mandatory ASLR)"
  option enabled. Note that all of our other release binaries, which all
  contain .reloc sections, function fine under the same option, so it
  cannot be just the presence of a .reloc section that is the issue.

  The root cause of the problem is that when we compile NSIS (makensis), a number
  of exe installer stubs are produced at the same time, for use later when makensis
  is actually run. Given the new linker defaults, the stubs will contain .reloc sections,
  when previously they would not. It seems that, in combination with how makensis
  mutates the stub when it actually builds the installer, causes the problem.

  According to upstream, https://sourceforge.net/p/nsis/bugs/1131/#abb6:
  > Looks like the problem is the very existance of the .reloc section.
  > It's not supposed to be there, and makensis doesn't handle it.

  The most recent .reloc related upstream activity is in
  https://sourceforge.net/p/nsis/bugs/1283/, where the conclusion again seemed to
  be that .relo sections are not wanted, but there hasn't been any further follow up.

  For now, restore pre-binutils-2.36 behaviour, by passing `-Wl,--disable-reloc-section`
  to the linker when building the installer stubs, which fixes the produced installer.
  The underlying issue can be further investigated in future.

  .reloc section stripping is something we've accounted for previously,
  see #18702, and related upstream discussion is in this thread:
  https://sourceware.org/bugzilla/show_bug.cgi?id=19011.

  Fixes #25726.

  Guix Build (x86_64):
  ```bash
  7e0723388913ac1ec9f650b943c6b23351ba0cd921c0ec830abf16b16724d503  guix-build-7a0b129c41d9/output/dist-archive/bitcoin-7a0b129c41d9.tar.gz
  c3bb9c68895ffafa2900b0d18c1268e299d012a7dc70593f20f9900cf116eb05  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/SHA256SUMS.part
  b57aa99c242b0aae64653c64ada38f6d3f0cbd902bbc096d3dc529fdcf87d681  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-debug.zip
  341d99afc9961299883be6cd9666e8bc0f3f6296cff758719a32d27419acad36  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-setup-unsigned.exe
  1d9ef48d3c9ed93a925962356b41cdaeb9d09fd758de193cd4d5f4d1ec6791eb  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-unsigned.tar.gz
  28c81d99a9a4bd6648449393f91db213369e958add579ba9e9a1721540d2c4f7  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  7e0723388913ac1ec9f650b943c6b23351ba0cd921c0ec830abf16b16724d503  guix-build-7a0b129c41d9/output/dist-archive/bitcoin-7a0b129c41d9.tar.gz
  c3bb9c68895ffafa2900b0d18c1268e299d012a7dc70593f20f9900cf116eb05  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/SHA256SUMS.part
  b57aa99c242b0aae64653c64ada38f6d3f0cbd902bbc096d3dc529fdcf87d681  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-debug.zip
  341d99afc9961299883be6cd9666e8bc0f3f6296cff758719a32d27419acad36  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-setup-unsigned.exe
  1d9ef48d3c9ed93a925962356b41cdaeb9d09fd758de193cd4d5f4d1ec6791eb  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-unsigned.tar.gz
  28c81d99a9a4bd6648449393f91db213369e958add579ba9e9a1721540d2c4f7  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64.zip
  ```

ACKs for top commit:
  achow101:
    ACK 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7
  hebasto:
    ACK 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7
  jarolrod:
    ACK 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7

Tree-SHA512: 9e14e98207d20236b833603319fc4bb335c878a7c179ab495b33d143e2a900c6926125536bbb7499ee4f0f676cd5ea45c8c86cd7e544ed9a76bb298f98db6197
2024-02-29 09:34:59 -06:00
..
auto_gdb non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
builder-keys chore: update udjin's expired builder's key 2024-01-06 19:25:49 -06:00
containers non-scripted-diff: bump copyright year to 2023 2024-02-24 11:05:37 -06:00
debian Merge bitcoin/bitcoin#21818: doc: fixup -coinstatsindex help, update bitcoin.conf and files.md 2024-02-27 12:01:02 -06:00
devtools feat: enable optional rebasing as part of github-merge.py script 2024-02-28 17:27:21 -06:00
guix Merge bitcoin/bitcoin#25788: guix: patch NSIS to remove .reloc sections from installer stubs 2024-02-29 09:34:59 -06:00
init Merge #20884: script: Improve robustness of bitcoind.service on startup 2024-01-16 09:29:46 -06:00
linearize Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
macdeploy Merge bitcoin/bitcoin#22418: release: Remove gitian 2023-12-06 12:40:58 -06:00
message-capture Merge bitcoin/bitcoin#25367: [contrib] message-capture-parser: fix out of bounds error for empty vectors 2024-02-27 10:02:42 -06:00
qos Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
seeds feat: add onion_seeds to seed creation; do seed creation (#5866) 2024-02-14 22:31:24 -06:00
shell feat: Set client version for non-release binaries and version in guix based on git tags (#5653) 2024-01-11 21:43:42 -06:00
testgen Merge #20168: contrib: Fix gen_key_io_test_vectors.py imports 2024-01-26 12:50:30 -06:00
verify-commits Merge bitcoin/bitcoin#25568: Remove my key from trusted-keys 2024-02-27 10:02:44 -06:00
verifybinaries fix: adjust verify-binaries script to properly handle RCs 2024-02-24 11:07:44 -06:00
windeploy feat: migrate to a CA issued certificate 2024-02-24 10:44:55 -06:00
zmq
dash-cli.bash-completion Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
dash-qt.pro
dash-tx.bash-completion
dashd.bash-completion Merge #17829: scripted-diff: Bump copyright of files changed in 2019 2023-12-06 11:40:14 -06:00
filter-lcov.py Merge #18673: scripted-diff: Sort test includes 2023-08-29 22:00:59 -05:00
install_db4.sh Merge bitcoin/bitcoin#23658: contrib: add check for wget command in install_db4.sh 2023-12-26 22:26:20 -06:00
README.md Merge bitcoin/bitcoin#22418: release: Remove gitian 2023-12-06 12:40:58 -06:00
valgrind.supp Merge #19669: contrib: Fixup valgrind suppressions file 2023-06-07 01:50:18 -05:00

Repository Tools

Developer tools

Specific tools for developers working on this repository. Contains the script github-merge.py for merging GitHub pull requests securely and signing them using GPG.

Verify-Commits

Tool to verify that every merge commit was signed by a developer using the above github-merge.py script.

Linearize

Construct a linear, no-fork, best version of the blockchain.

Qos

A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Dash network. This means one can have an always-on dashd instance running, and another local dashd/dash-qt instance which connects to this node and receives blocks from it.

Seeds

Utility to generate the pnSeed[] array that is compiled into the client.

Build Tools and Keys

Debian

Contains files used to package dashd/dash-qt for Debian-based Linux systems. If you compile dashd/dash-qt yourself, there are some useful files here.

Builder keys

PGP keys used for signing Dash Core release results.

MacDeploy

Scripts and notes for Mac builds.

Test and Verify Tools

TestGen

Utilities to generate test vectors for the data-driven Dash tests.

Verify Binaries

This script attempts to download and verify the signature file SHA256SUMS.asc from bitcoin.org.