Page MenuHomePhabricator

depends: Improve id string robustness
ClosedPublic

Authored by PiRK on May 26 2023, 09:10.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCfc84e818e517: depends: Improve id string robustness
Summary

core#20629: depends: Improve id string robustness

build: Proper quoting for var printing targets

Previously, if the value contained syntax that was meaningful to make,
the printing would fail. Quoting properly avoids this.

depends: Improve id string robustness

Environment variables and search paths can drastically effect the
operation of build tools.

Include these in our id string to mitigate against false cache hits.

depends: Include GUIX_ENVIRONMENT in id string


https://github.com/bitcoin/bitcoin/pull/21375/commits/39741128d3775d198dbee34dc827353bfd18acd8

guix: Supply --link-profile


core#21427

depends: Fix id_string invocations

We now use a script named gen_id to generate the base build_id/host_id.
This solves 2 problems:

  1. GNU Make special-casing exit code 127 (command not found) meant that warnings about missing tools would propagate to the user's terminal and broke our opportunistic build_id construction.
  2. This change ensures that we don't have arbitrary characters in our make variables that would be misinterpreted by Make.

See comments in depends/Makefile and depends/gen_id for more
information.


This is a backport of core#20629 and core#21427
and one commit from core#21375

Test Plan

guix build

Diff Detail

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