Page MenuHomePhabricator

deps: bump lief to 0.16.6
ClosedPublic

Authored by PiRK on Fri, Nov 7, 09:43.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCc217063d84f1: deps: bump lief to 0.16.6
Summary

Some of the primary changes are:

This commit includes a workaround for the bug fixed in
https://github.com/lief-project/LIEF/pull/1218, but the workaround can
be kept, since it makes has_nx checks stricter by enforcing both heap
and stack are non-executable.

This change also requires a patch to partially revert a commit to LIEF
(https://github.com/lief-project/LIEF/commit/f23ced2f4ffc170d0a6f40ff4a1bee575e3447cf)
which broke compatibility with versions of scikit-build-core <= 0.10.x.

This patch can be dropped once the guix time machine advances to or
beyond https://codeberg.org/guix/guix/commit/35c5f07e967155d2276c7ec58e5108e4da02c974,
which bumps the scikit-build-core version in guix from 0.9.3 to 0.10.7.

Co-authored-by: willcl-ark <will8clark@gmail.com>
Co-authored-by: fanquake <fanquake@gmail.com>
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

This is a partial backport of core#32431
https://github.com/bitcoin/bitcoin/pull/32431/commits/765922d8022d3addeb80b5f3f6e041f7fd2ad3ed
Depends on D18899

Test Plan

guix builds

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

contrib/guix/manifest.scm
28 ↗(On Diff #56506)

python-altgraph would be removed in core#28859
We don't run signapple, so I'm assuming we can remove it as well

@bot guix-linux guix-win guix-osx

Tail of the build log:

Fetching 07004b97cf691774efebe70404cf22201e4d330d.tar.gz from https://github.com/miniupnp/libnatpmp/archive
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 27663    0 27663    0     0  72573      0 --:--:-- --:--:-- --:--:-- 72573
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/libnatpmp-07004b97cf691774efebe70404cf22201e4d330d/07004b97cf691774efebe70404cf22201e4d330d.tar.gz.temp: OK
Fetching protobuf-all-21.12.tar.gz from https://github.com/protocolbuffers/protobuf/releases/download/v21.12
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 7469k  100 7469k    0     0  21.6M      0 --:--:-- --:--:-- --:--:-- 21.6M
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/protobuf-21.12/protobuf-all-21.12.tar.gz.temp: OK
Fetching openssl-1.1.1t.tar.gz from https://www.openssl.org/source
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   169  100   169    0     0   4463      0 --:--:-- --:--:-- --:--:--  4567

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 9650k  100 9650k    0     0  20.2M      0 --:--:-- --:--:-- --:--:-- 20.2M
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/openssl-1.1.1t/openssl-1.1.1t.tar.gz.temp: OK
Fetching zeromq-4.3.1.tar.gz from https://github.com/zeromq/libzmq/releases/download/v4.3.1/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1455k  100 1455k    0     0  5394k      0 --:--:-- --:--:-- --:--:-- 5394k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/zeromq-4.3.1/zeromq-4.3.1.tar.gz.temp: OK
Fetching jemalloc-5.3.0.tar.bz2 from https://github.com/jemalloc/jemalloc/releases/download/5.3.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  718k  100  718k    0     0  2849k      0 --:--:-- --:--:-- --:--:-- 2849k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/jemalloc-5.3.0/jemalloc-5.3.0.tar.bz2.temp: OK
make: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
INFO: Building f7678a4656b5 for platform triple x86_64-apple-darwin:
      ...using reference timestamp: 1746592491
      ...running at most 12 jobs
      ...from worktree directory: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc'
          ...bind-mounted in container to: '/bitcoin'
      ...in build directory: 'distsrc-f7678a4656b5-x86_64-apple-darwin'
          ...bind-mounted in container to: /bitcoin/distsrc-f7678a4656b5-x86_64-apple-darwin
      ...outputting in: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/guix-osx/guix-results/x86_64-apple-darwin'
          ...bind-mounted in container to: '/outdir-base/x86_64-apple-darwin'
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/contrib/guix/manifest.scm:614:1: missing closing parenthesis
Build guix-osx failed with exit code 1

Tail of the build log:

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 27663    0 27663    0     0  59235      0 --:--:-- --:--:-- --:--:-- 59235
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/libnatpmp-07004b97cf691774efebe70404cf22201e4d330d/07004b97cf691774efebe70404cf22201e4d330d.tar.gz.temp: OK
Fetching protobuf-all-21.12.tar.gz from https://github.com/protocolbuffers/protobuf/releases/download/v21.12
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 7469k  100 7469k    0     0  16.6M      0 --:--:-- --:--:-- --:--:-- 16.6M
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/protobuf-21.12/protobuf-all-21.12.tar.gz.temp: OK
Fetching openssl-1.1.1t.tar.gz from https://www.openssl.org/source
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   169  100   169    0     0   1396      0 --:--:-- --:--:-- --:--:--  1396

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 9650k  100 9650k    0     0  9535k      0  0:00:01  0:00:01 --:--:-- 9535k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/openssl-1.1.1t/openssl-1.1.1t.tar.gz.temp: OK
Fetching zeromq-4.3.1.tar.gz from https://github.com/zeromq/libzmq/releases/download/v4.3.1/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1455k  100 1455k    0     0  4450k      0 --:--:-- --:--:-- --:--:-- 4450k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/zeromq-4.3.1/zeromq-4.3.1.tar.gz.temp: OK
Fetching jemalloc-5.3.0.tar.bz2 from https://github.com/jemalloc/jemalloc/releases/download/5.3.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  718k  100  718k    0     0  2652k      0 --:--:-- --:--:-- --:--:-- 2652k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/jemalloc-5.3.0/jemalloc-5.3.0.tar.bz2.temp: OK
make[1]: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
INFO: Building f7678a4656b5 for platform triple x86_64-w64-mingw32:
      ...using reference timestamp: 1746592491
      ...running at most 12 jobs
      ...from worktree directory: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc'
          ...bind-mounted in container to: '/bitcoin'
      ...in build directory: 'distsrc-f7678a4656b5-x86_64-w64-mingw32'
          ...bind-mounted in container to: /bitcoin/distsrc-f7678a4656b5-x86_64-w64-mingw32
      ...outputting in: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/guix-win/guix-results/x86_64-w64-mingw32'
          ...bind-mounted in container to: '/outdir-base/x86_64-w64-mingw32'
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/contrib/guix/manifest.scm:614:1: missing closing parenthesis
Build guix-win failed with exit code 1

Tail of the build log:

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   169  100   169    0     0   1396      0 --:--:-- --:--:-- --:--:--  1396

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

  0 9650k    0 34423    0     0  71864      0  0:02:17 --:--:--  0:02:17 71864
100 9650k  100 9650k    0     0  14.0M      0 --:--:-- --:--:-- --:--:-- 48.4M
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/openssl-1.1.1t/openssl-1.1.1t.tar.gz.temp: OK
Fetching zeromq-4.3.1.tar.gz from https://github.com/zeromq/libzmq/releases/download/v4.3.1/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1455k  100 1455k    0     0  2814k      0 --:--:-- --:--:-- --:--:-- 2814k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/zeromq-4.3.1/zeromq-4.3.1.tar.gz.temp: OK
Fetching jemalloc-5.3.0.tar.bz2 from https://github.com/jemalloc/jemalloc/releases/download/5.3.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  718k  100  718k    0     0  1774k      0 --:--:-- --:--:-- --:--:-- 1774k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/jemalloc-5.3.0/jemalloc-5.3.0.tar.bz2.temp: OK
Fetching v3.12.7.tar.gz from https://github.com/python/cpython/archive/refs/tags/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  707k    0  707k    0     0   980k      0 --:--:-- --:--:-- --:--:--  980k
100 9089k    0 9089k    0     0  5190k      0 --:--:--  0:00:01 --:--:-- 8145k
100 16.6M    0 16.6M    0     0  6231k      0 --:--:--  0:00:02 --:--:-- 8112k
100 23.7M    0 23.7M    0     0  6546k      0 --:--:--  0:00:03 --:--:-- 7886k
100 26.2M    0 26.2M    0     0  6587k      0 --:--:--  0:00:04 --:--:-- 7794k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/cpython-3.12.7/v3.12.7.tar.gz.temp: OK
make[1]: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make: Entering directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make[1]: Entering directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make[1]: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
INFO: Building f7678a4656b5 for platform triple x86_64-linux-gnu:
      ...using reference timestamp: 1746592491
      ...running at most 12 jobs
      ...from worktree directory: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc'
          ...bind-mounted in container to: '/bitcoin'
      ...in build directory: 'distsrc-f7678a4656b5-x86_64-linux-gnu'
          ...bind-mounted in container to: /bitcoin/distsrc-f7678a4656b5-x86_64-linux-gnu
      ...outputting in: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/guix-linux/guix-results/x86_64-linux-gnu'
          ...bind-mounted in container to: '/outdir-base/x86_64-linux-gnu'
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/contrib/guix/manifest.scm:614:1: missing closing parenthesis
Build guix-linux failed with exit code 1
contrib/guix/security-check.py
269 ↗(On Diff #56506)

This assertion avoids mypy errors in the following lines:

error: Item "None" of "Binary | None" has no attribute "format" [union-attr]
error: Item "None" of "Binary | None" has no attribute "abstract" [union-attr]

fix 2 errors in manifest.scm:

@bot guix-win guix-linux guix-osx

Tail of the build log:

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 27663    0 27663    0     0  58115      0 --:--:-- --:--:-- --:--:-- 58115
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/libnatpmp-07004b97cf691774efebe70404cf22201e4d330d/07004b97cf691774efebe70404cf22201e4d330d.tar.gz.temp: OK
Fetching protobuf-all-21.12.tar.gz from https://github.com/protocolbuffers/protobuf/releases/download/v21.12
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 7469k  100 7469k    0     0  27.3M      0 --:--:-- --:--:-- --:--:-- 27.3M
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/protobuf-21.12/protobuf-all-21.12.tar.gz.temp: OK
Fetching openssl-1.1.1t.tar.gz from https://www.openssl.org/source
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   169  100   169    0     0   4567      0 --:--:-- --:--:-- --:--:--  4567

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 9650k  100 9650k    0     0  20.8M      0 --:--:-- --:--:-- --:--:-- 20.8M
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/openssl-1.1.1t/openssl-1.1.1t.tar.gz.temp: OK
Fetching zeromq-4.3.1.tar.gz from https://github.com/zeromq/libzmq/releases/download/v4.3.1/
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100 1455k  100 1455k    0     0  5272k      0 --:--:-- --:--:-- --:--:-- 5272k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/zeromq-4.3.1/zeromq-4.3.1.tar.gz.temp: OK
Fetching jemalloc-5.3.0.tar.bz2 from https://github.com/jemalloc/jemalloc/releases/download/5.3.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100  718k  100  718k    0     0  2356k      0 --:--:-- --:--:-- --:--:-- 2356k
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends/work/download/jemalloc-5.3.0/jemalloc-5.3.0.tar.bz2.temp: OK
make[1]: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
make: Leaving directory '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/depends'
INFO: Building 8fe25966281d for platform triple x86_64-apple-darwin:
      ...using reference timestamp: 1746592491
      ...running at most 12 jobs
      ...from worktree directory: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc'
          ...bind-mounted in container to: '/bitcoin'
      ...in build directory: 'distsrc-8fe25966281d-x86_64-apple-darwin'
          ...bind-mounted in container to: /bitcoin/distsrc-8fe25966281d-x86_64-apple-darwin
      ...outputting in: '/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/abc-ci-builds/guix-osx/guix-results/x86_64-apple-darwin'
          ...bind-mounted in container to: '/outdir-base/x86_64-apple-darwin'
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
/home/teamcity/buildAgent/work/jailed-build/bitcoin-abc/contrib/guix/manifest.scm:408:27: In procedure propagated-inputs:
error: python-altgraph: unbound variable
hint: Did you forget `(use-modules (gnu packages python-xyz))'?

Build guix-osx failed with exit code 1

looks like we still need python-altgraph for the MacOS build, until we properly backport core#28859, even if we don't use signapple
Update version of lief in dependency build script.

@bot guix-osx guix-win guix-linux

PiRK published this revision for review.Fri, Nov 7, 12:58
This revision is now accepted and ready to land.Fri, Nov 7, 13:36
This revision was automatically updated to reflect the committed changes.