HomePhabricator

Merge #12305: [docs] [refactor] Add help messages for datadir path mangling

Description

Merge #12305: [docs] [refactor] Add help messages for datadir path mangling

Summary:
5460460 Add AbsPathForConfigVal to consolidate datadir prefixing for path args (James O'Beirne)
a1e1305 Clarify help messages for path args to mention datadir prefix (James O'Beirne)

Pull request description:

Change `-conf`'s help message to indicate that relative path values will be prefixed by the datadir path. This behavior probably merits clarification; it's kind of confusing when attempting to specify a configuration file in the current directory with `-conf=bitcoin.conf`, but instead loading the `bitcoin.conf` file in ~/.bitcoin datadir.

### Edit

This PR has been modified to document all cases where relative path configurations are modified to be under datadir. A small refactoring has also been added which consolidates this normalization.

Tree-SHA512: be4fc0595fbeba33d17af08f59898af45e76a44f00719ea0282403b155ac6755584604fab765250a3aa14ed6991882c4d1ccbe601184362c5ba97c886bdda344

Backport of Core PR12305
https://github.com/bitcoin/bitcoin/pull/12305/

Depends on D3940

Test Plan:

make check
./bitcoind -h

Verify help messages have been changed.

./bitcoind

Verify debug.log, bitcoin.conf, bitcoind.pid, and cookie files exist in their default directories (Likely somewhere in .bitcoin).

./bitcoind -debuglogfile=<absolute path>/debug.log

Verify the same debug.log was touched by this instance of ./bitcoind.

./bitcoind -debuglogfile=<relative path>/debug.log

Verify the same debug.log was touched by this instance of ./bitcoind.

Repeat for other files.

Reviewers: deadalnix, Fabien, jasonbcox, O1 Bitcoin ABC, #bitcoin_abc

Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc

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

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Feb 6 2018, 15:00
nakihitoCommitted on Aug 23 2019, 20:18
nakihitoPushed on Aug 23 2019, 20:18
Reviewer
Restricted Owners Package
Differential Revision
D3939: Merge #12305: [docs] [refactor] Add help messages for datadir path mangling
Parents
rABC3311745cc973: Merge #12770: Use explicit casting in cuckoocache's compute_hashes(...) to…
Branches
Unknown
Tags
Unknown