This corrects an error in Version construction for hotfix releases,
and makes parsing of tags more robust to error by ignoring tags that
do not conform to the standard Zcash patterns such as `v4.7.0-gitian`
and some of the tags from the upstream `bitcoin/bitcoin` repository.
fixes#3625
We use clean.sh rather than distclean.sh because the checksumming
and redownloading of C++ dependencies is pretty robust.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This reverts commit fb38cf0d90.
The lint fix caused a problem on macOS, where the escaped double quote
was interpreted as part of an argument, and not as defining an argument.
We will need to find another way to address the lint.
Closeszcash/zcash#5379.
Build BDB utilities
To install the binaries we need to build with just `install` instead of `install_lib` and `install_include`, this will install everything.
Then the binaries will be moved to a folder in `zcutil` directory. We can just leave them in staging however the user might have a hard time to find them there.
Closes https://github.com/zcash/zcash/issues/4537
Add options and help to AFL scripts
Closes https://github.com/zcash/zcash/issues/4315
For reference here is how the help of each command is script:
**afl-get.sh**:
```
$ ./zcutil/afl/afl-get.sh --help
Obtains and builds a copy of AFL from source.
Usage:
./zcutil/afl/afl-get.sh --afl-install=AFL_INSTALL_DIR
OPTIONS:
-h, --help Print this help message
-i, --afl-install Directory where AFL is going to be installed
EXAMPLE:
./zcutil/afl/afl-get.sh -i /tmp/afl
$
```
**afl-build.sh**:
```
$ ./zcutil/afl/afl-build.sh --help
A wrapper around ./zcutil/build.sh for instrumenting the build with AFL.
You may obtain a copy of AFL using ./zcutil/afl/afl-get.sh.
Additional arguments are passed-through to build.sh.
Usage:
./zcutil/afl/afl-build.sh --afl-install=AFL_INSTALL_DIR --fuzz-case=FUZZ_CASE [ OPTIONS ... ] [ ARGUMENTS ... ]
OPTIONS:
-a, --harden Turn off AFL_HARDEN. Default: 1
-c, --configure-flags Pass this flags to ./configure. Default: --enable-tests=no --enable-fuzz-main
-f, --fuzz-case Options are: CheckBlock, DecodeHexTx, DeserializeAddrMan, DeserializeTx or ReadFeeEstimates
-h, --help Print this help message
-l, --afl-log Directory to save AFL logs. Default: /home/oxarbitrage/zcash/zcash4/zcash
-i, --afl-install Directory where AFL is installed
-z, --zcutil The zcutil directory. Default /home/oxarbitrage/zcash/zcash4/zcash/zcutil
ARGUMENTS:
By default we are passing to build.sh the following flags:
CC=/home/oxarbitrage/zcash/zcash4/zcash/zcutil/afl/zcash-wrapper-gcc
CXX=/home/oxarbitrage/zcash/zcash4/zcash/zcutil/afl/zcash-wrapper-g++
EXAMPLE:
./zcutil/afl/afl-build.sh -i /tmp/afl -f DecodeHexTx
$
```
**afl-run.sh**:
```
$ ./zcutil/afl/afl-run.sh --help
Start fuzzing a case in a previously zcashd built for AFL.
Additional arguments are passed-through to AFL.
Usage:
./zcutil/afl/afl-run.sh --afl-install=AFL_INSTALL_DIR --fuzz-case=FUZZ_CASE [ ARGUMENTS... ]
OPTIONS:
-f, --fuzz-case Options are: CheckBlock, DecodeHexTx, DeserializeAddrMan, DeserializeTx or ReadFeeEstimates
-h, --help Print this help message
-i, --afl-install Directory where AFL is installed
EXAMPLE:
./zcutil/afl/afl-run.sh -i /tmp/afl -f DecodeHexTx
$
```
**afl-getbuildrun.sh**:
```
$ ./zcutil/afl/afl-getbuildrun.sh --help
Builds AFL and an instrumented zcashd, then begins fuzzing.
This script must be run from within the top level directory of a zcash clone.
Additional arguments are passed-through to AFL.
Usage:
./zcutil/afl/afl-getbuildrun.sh --fuzz-case=FUZZ_CASE [ OPTIONS ... ] [ ARGUMENTS... ]
OPTIONS:
-f, --fuzz-case Options are: CheckBlock, DecodeHexTx, DeserializeAddrMan, DeserializeTx or ReadFeeEstimates
-h, --help Print this help message
-i, --afl-install Directory where AFL is installed. Default: /home/oxarbitrage/zcash/zcash4/zcash/afl-temp
EXAMPLE:
./zcutil/afl/afl-getbuildrun.sh -f DecodeHexTx
$
```
zcutil/fetch-params.sh unneeded --testnet arg should warn user
If fetch-params.sh user doesn't know that testnet and mainnet params are the same, and user specifies --testnet, it's confusing that the argument is ignored.