HomePhabricator

build: improve sed robustness by not using sed

Description

build: improve sed robustness by not using sed

Summary:

While using sed can be handy to use for a quick-fix, these instances
accumulate, and can become unmaintainable. Not only that, but using sed
isn't necessarily robust and it can fail silently. Most of our usage is
also missing any documentation explaining why something is being done,
when it should be updated/removed etc.

Rather than relying on sed going forward, where possible, I've converted
our sed usage into patches. These are easier to maintain, contain
documentation, and should fail loudly when they don't apply.

The remaining sed usage, (1 in miniupnpc, the rest in qt), are
non-trivial to remove, as they are using build-time variables, or some
input from the environment.

Backport of core PR19761, slightly updated to match our depends.

Depends on D7760.

Test Plan:

make build-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Aug 17 2020, 12:08
FabienCommitted on Oct 5 2020, 16:58
FabienPushed on Oct 5 2020, 16:58
Reviewer
Restricted Project
Differential Revision
D7763: build: improve sed robustness by not using sed
Parents
rABCafeb98be24a3: [CI] Factorize the Apple SDK download
Branches
Unknown
Tags
Unknown