Commit graph

425 commits

Author SHA1 Message Date
James Dorfman
32d7ad00b2 Merge c9b63ab61e into merged_master (Bitcoin PR bitcoin/bitcoin#23489) 2023-06-02 05:07:21 +00:00
James Dorfman
d94c120f97 Merge 19815b096c into merged_master (Bitcoin PR bitcoin/bitcoin#23535) 2023-05-26 16:09:27 +00:00
Byron Hambly
74f2207551 Merge 6bde42e29e into merged_master (Bitcoin PR bitcoin/bitcoin#23511) 2023-05-26 12:16:49 +00:00
James Dorfman
4a713e72bb Merge aec631bccc into merged_master (Bitcoin PR bitcoin/bitcoin#23462) 2023-05-24 20:35:27 +00:00
Byron Hambly
81d5607ec8 Merge c1fb30633b into merged_master (Bitcoin PR bitcoin/bitcoin#23114) 2023-05-24 12:58:57 +00:00
Byron Hambly
31bb8332bc Merge 3bf40d06a2 into merged_master (Bitcoin PR bitcoin/bitcoin#23212) 2023-05-11 13:15:28 +00:00
Byron Hambly
59e5eb0433 Merge 71a85fbd09 into merged_master (Bitcoin PR bitcoin/bitcoin#23148) 2023-05-11 10:36:49 +00:00
Byron Hambly
4024f43c52 Merge da13c7b18a into merged_master (Bitcoin PR bitcoin/bitcoin#22392) 2023-05-11 10:29:04 +00:00
Byron Hambly
4756e1f59a Merge 8f022a59b8 into merged_master (Bitcoin PR bitcoin/bitcoin#22993) 2023-04-22 07:54:57 +00:00
Byron Hambly
2334307d42 Merge 245462b66c into merged_master (Bitcoin PR bitcoin/bitcoin#22418) 2023-04-13 12:10:09 +00:00
James Dorfman
c29fb7f58a Merge 90499358e9 into merged_master (Bitcoin PR bitcoin/bitcoin#22645) 2023-04-10 06:54:44 +00:00
fanquake
c870027cc2
build: qt 5.15.2 2021-12-03 14:07:12 +08:00
fanquake
f31d4bd214
scripts: test for PE control flow instrumentation 2021-11-17 16:12:47 +08:00
fanquake
dbfca4a815
build: require glibc 2.18+ for release builds
From what I can see the only platform this drops support for is CentOS
7. CentOS 7 reached the end of it's "full update" support at the end of
2020. It does receive maintenance updates until 2024, however I don't
think supporting glibc 2.17 until 2024 is realistic. Note that anyone
wanting to self-compile and target a glibc 2.17 runtime could build with
--disable-threadlocal.

glibc 2.18 was released in August 2013.
https://sourceware.org/legacy-ml/libc-alpha/2013-08/msg00160.html
2021-11-16 07:51:24 +08:00
Hennadii Stepanov
9a1ad7bc0d
test: Enable SC2086 shellcheck rule 2021-11-13 16:54:56 +02:00
Gleb Naumenko
0659f12b13
Add minisketch dependency 2021-10-21 09:38:55 +08:00
josibake
a46f71bb70
lint: enable mypy checking for missing imports
Achieve this by adding some ignore, and making data/ importable.

Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
2021-10-16 09:14:37 +08:00
Carl Dong
1527b7e8a1 symbol-check: Check requested ELF interpreter
It is important that binaries request a standard interpreter location
where most distros would place the linker-loader. Otherwise, the user
would be met with a very confusing message:

    bash: <path>/<to>/bitcoind: No such file or directory

When really it's the interpreter that's not found.
2021-10-13 08:39:48 -04:00
fanquake
ce69e18947
scripts: remove pixie.py 2021-10-12 08:36:21 +08:00
fanquake
00b85d0b13
scripts: only parse the binary once in security-check.py 2021-10-12 08:36:21 +08:00
fanquake
cad40a5b16
scripts: use LIEF for ELF checks in security-check.py 2021-10-12 08:36:21 +08:00
fanquake
8242ae230e
scripts: only parse the binary once in symbol-check.py 2021-10-12 08:36:21 +08:00
fanquake
309eac9019
scripts: use LIEF for ELF checks in symbol-check.py
Co-authored-by: Carl Dong <contact@carldong.me>
2021-10-12 08:36:15 +08:00
Carl Dong
610a8a8e39
test-*-check: Pass in *FLAGS and compile with them
These test-*-check scripts should compile "test" binaries in a way that
is as close to what autotools would do, since the goal is to make sure
that if we run the *-check script, they can correctly detect flaws in
binaries which are compiled by our autotools-based system.

Therefore, we should emulate what happens when the binary is linked in
autotools, meaning that for C binaries, we need to supply the CFLAGS,
CPPFLAGS, and LDFLAGS flags in that order.

Note to future developers: perhaps it'd be nice to have these
test-*-check scripts be part of configure.ac to avoid having to manually
replicate autoconf-like behaviour every time we find a discrepancy. Of
course, that would also mean you'd have to write more m4...
2021-10-12 08:28:25 +08:00
fanquake
a43b8e9555
build: set OSX_MIN_VERSION to 10.15
This is required to use std::filesystem on macOS as support for it only
landed in the libc++ dylib shipped with 10.15.

See also: https://developer.apple.com/documentation/xcode-release-notes/xcode-11-release-notes

Clang now supports the C++17 <filesystem> library for iOS 13, macOS 10.15, watchOS 6, and tvOS 13.
2021-09-16 17:50:19 +08:00
fanquake
ab9c34237a
release: remove gitian 2021-08-31 09:37:23 +08:00
fanquake
5449d44e37
scripts: prevent GCC optimising test symbols in test-symbol-check 2021-08-09 13:59:48 +08:00
Andrew Poelstra
915d06019a Merge 34d1d6a112 into merged_master (Bitcoin PR bitcoin/bitcoin#22381) 2021-07-31 13:46:26 +00:00
Andrew Poelstra
ae15e5dc5d Merge 137f3b9ba3 into merged_master (Bitcoin PR bitcoin/bitcoin#22405) 2021-07-31 01:42:33 +00:00
Andrew Poelstra
95858637f6 Merge a305a687e7 into merged_master (Bitcoin PR bitcoin/bitcoin#22244) 2021-07-27 23:51:48 +00:00
Andrew Poelstra
dcb699cad8 Merge da69d9965a into merged_master (Bitcoin PR bitcoin/bitcoin#21871) 2021-07-27 19:03:16 +00:00
Andrew Poelstra
713dc12fcd Merge ecf5f2c1a0 into merged_master (Bitcoin PR bitcoin/bitcoin#21889) 2021-07-10 15:51:14 +00:00
fanquake
6cf3345297
scripts: adjust test-symbol-check for guix release environment
Now that our release binaries are build in a glibc 2.24 and 2.27
environment, we can't use a symbol from glibc 2.28 to test our checks.
Replace renameat2() with nextup(), which was introduced in 2.24.

Note that this also means re-disabling the test for RISC-V, however
RISC-V is built in a glibc 2.27 environment, and our minimum required
glibc for that binary is 2.27.
2021-07-07 20:29:01 +08:00
fanquake
1946b5f77c
scripts: more robustly test macOS symbol checks 2021-07-07 19:31:37 +08:00
Carl Dong
a8127b34bc
build: Use and test PE binutils with --reloc-section
Also fix test-security-check.py to account for new PE PIE failure
indication.
2021-07-07 19:31:37 +08:00
Carl Dong
9fdc8afe11
devtools: Improve *-check.py tool detection
This is important to make sure that we're not testing tools different
from the one we're building with.

Introduce determine_wellknown_cmd, which encapsulates how we
should handle well-known tools specification (IFS splitting, env
override, etc.).
2021-07-07 19:31:37 +08:00
Andrew Poelstra
cc047c66f0 Merge b7c2625703 into merged_master (Bitcoin PR bitcoin/bitcoin#21664) 2021-07-06 15:36:05 +00:00
fanquake
797b3ed909
script: remove gitian reference from symbol-check.py 2021-07-06 20:50:47 +08:00
Andrew Poelstra
13db444272 Merge 7f3fd34117 into merged_master (Bitcoin PR #21481) 2021-06-27 20:15:08 +00:00
Andrew Poelstra
63f16fe799 Merge a65e772fec into merged_master (Bitcoin PR #21428) 2021-06-27 16:07:40 +00:00
Andrew Poelstra
9e0c92057c Merge e828fc8f52 into merged_master (Bitcoin PR #21376) 2021-06-26 19:33:37 +00:00
Andrew Poelstra
2f9409db22 Merge 84af29337c into merged_master (Bitcoin PR #21255) 2021-06-24 20:03:43 +00:00
W. J. van der Laan
a305a687e7
Merge bitcoin/bitcoin#22244: devtools: Correctly extract symbol versions in symbol-check
e8cd3700ee devtools: Integrate ARCH_MIN_GLIBC_VER table into MAX_VERSIONS in symbol-check.py (W. J. van der Laan)
a33381acf5 devtools: Add xkb version to symbol-check (W. J. van der Laan)
19e598bab0 devtools: Fix verneed section parsing in pixie (W. J. van der Laan)

Pull request description:

  I misunderstood the ELF specification for version symbols (verneed): The `vn_aux` pointer is relative to the main verneed record, not the start of the section.

  This caused many symbols to not be versioned properly in the return value of `elf.dyn_symbols`. This was discovered in #21454.

  Fix it by correcting the offset computation.

  - xkb versions symbols (using the prefix `V`), as this library is used by bitcoin-qt, add it to the valid versions in `symbol-check.py`

  This unfortunately brings to light some symbols that have been introduced since and weren't caught (from a gitian compile of master):

  ```
  bitcoin-cli: symbol getrandom from unsupported version GLIBC_2.25
  bitcoin-cli: failed IMPORTED_SYMBOLS
  bitcoind: symbol getrandom from unsupported version GLIBC_2.25
  bitcoind: symbol log from unsupported version GLIBC_2.29
  bitcoind: symbol fcntl64 from unsupported version GLIBC_2.28
  bitcoind: symbol pow from unsupported version GLIBC_2.29
  bitcoind: symbol exp from unsupported version GLIBC_2.29
  bitcoind: failed IMPORTED_SYMBOLS
  bitcoin-qt: symbol exp from unsupported version GLIBC_2.29
  bitcoin-qt: symbol fcntl64 from unsupported version GLIBC_2.28
  bitcoin-qt: symbol log from unsupported version GLIBC_2.29
  bitcoin-qt: symbol pow from unsupported version GLIBC_2.29
  bitcoin-qt: symbol statx from unsupported version GLIBC_2.28
  bitcoin-qt: symbol getrandom from unsupported version GLIBC_2.25
  bitcoin-qt: symbol renameat2 from unsupported version GLIBC_2.28
  bitcoin-qt: symbol getentropy from unsupported version GLIBC_2.25
  bitcoin-qt: failed IMPORTED_SYMBOLS
  bitcoin-wallet: symbol exp from unsupported version GLIBC_2.29
  bitcoin-wallet: symbol log from unsupported version GLIBC_2.29
  bitcoin-wallet: symbol fcntl64 from unsupported version GLIBC_2.28
  bitcoin-wallet: failed IMPORTED_SYMBOLS
  test_bitcoin: symbol getrandom from unsupported version GLIBC_2.25
  test_bitcoin: symbol log from unsupported version GLIBC_2.29
  test_bitcoin: symbol fcntl64 from unsupported version GLIBC_2.28
  test_bitcoin: symbol pow from unsupported version GLIBC_2.29
  test_bitcoin: symbol exp from unsupported version GLIBC_2.29
  test_bitcoin: failed IMPORTED_SYMBOLS
  ```

ACKs for top commit:
  hebasto:
    ACK e8cd3700ee

Tree-SHA512: 8c15e3478eb642f01a1ddaadef03f80583f088f9fa8e3bf171ce16b0ec05ffb4675ec147d7ffc6a4360637ed47fca517c6ca2bac7bb30d794c03783cfb964b79
2021-06-21 07:58:12 +02:00
W. J. van der Laan
e8cd3700ee devtools: Integrate ARCH_MIN_GLIBC_VER table into MAX_VERSIONS in symbol-check.py
The (ancient) versions specified here were deceptive. Entries older than
MAX_VERSIONS['GLIBC'], which is 2.17, are ignored here. So reorganize
the code to avoid confusion for other people reading this code.
2021-06-18 13:25:57 +02:00
Andrew Poelstra
50f29236f8 Merge e7eb37128c into merged_master (Bitcoin PR #20913) 2021-06-17 20:51:51 +00:00
Andrew Poelstra
27930edc9c Merge 4a540683ec into merged_master (Bitcoin PR #20813) 2021-06-16 14:11:07 +00:00
Andrew Poelstra
00801e5a4b Merge 7f9ae87011 into merged_master (Bitcoin PR #20451) 2021-06-16 04:29:56 +00:00
Andrew Poelstra
b9a8def365 Merge f1dbf92ff0 into merged_master (Bitcoin PR #20434) 2021-06-15 14:46:56 +00:00
W. J. van der Laan
a33381acf5 devtools: Add xkb version to symbol-check
xkb versions symbols (using the prefix `V`), as this library is used by
bitcoin-qt, add it to the valid versions in `symbol-check.py`.
2021-06-14 20:32:09 +02:00
W. J. van der Laan
19e598bab0 devtools: Fix verneed section parsing in pixie
I misunderstood the ELF specification for version symbols (verneed):
The `vn_aux` pointer is relative to the main verneed record, not the
start of the section.

This caused many symbols to not be versioned properly in the return
value of `elf.dyn_symbols`. This was discovered in #21454.

Fix it by correcting the offset computation.
2021-06-14 20:31:58 +02:00