HomePhabricator

depends: Improve id string robustness

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D13940

Details

Provenance
Carl Dong <contact@carldong.me>Authored on Dec 11 2020, 15:20
PiRKCommitted on May 26 2023, 14:30
PiRKPushed on May 26 2023, 14:30
Reviewer
Restricted Project
Differential Revision
D13940: depends: Improve id string robustness
Parents
rABCfcdb2bdcf1fa: refuse to overwrite an existing file with extract_xcode.py
Branches
Unknown
Tags
Unknown