Commit Graph

251 Commits

Author SHA1 Message Date
Daira Hopwood 63bfdad106 Fix a return status issue.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-29 14:28:54 +01:00
Daira Hopwood 499d9c222c zcutil/distclean.sh: remove BDB utility programs.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-29 13:31:19 +01:00
Taylor Hornby 8f5dbd3293 Enforce pre-release dependency update check in make-release.py 2020-06-24 18:14:47 -06:00
Homu 1d7574eb7b Auto merge of #4488 - oxarbitrage:issue4315, r=str4d
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

$
```
2020-05-28 04:01:05 +00:00
Alfredo Garcia e7edfefce7 change name of harden option 2020-05-20 09:32:41 -03:00
Alfredo Garcia a17951bfa8 get fuzzing options from directory 2020-05-13 17:07:26 -03:00
Alfredo Garcia f505d64c50 add documentation and command line parsing to afl scripts 2020-04-30 21:49:52 -03:00
Dimitris Apostolou 8403e04db9
Fix typos 2020-04-17 17:46:15 +03:00
Homu 8a2ab9fbda Auto merge of #4450 - str4d:make-release-py3, r=daira
Updates to zcutil/make-release.py

Finishes its migration to Python 3, and adds release process dependency checks.
2020-04-15 15:36:42 +00:00
Daira Hopwood 47b05ab801 Address review comments: `target` and `depends/work` should be cleaned by clean.sh.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-04-15 12:09:27 +01:00
Jack Grigg 86f8bcfa17 zcutil/release-notes.py: Add Python 3 execution header 2020-04-15 22:57:05 +12:00
Jack Grigg 8b9e4eec0f zcutil/make-release.py: Check for release dependencies 2020-04-15 17:56:38 +12:00
Jack Grigg 147526b0a8 zcutil/make-release.py: Fix to run with Python 3 2020-04-15 17:56:38 +12:00
Daira Hopwood 62142660b0 Remove a redundant `rm -f` command.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-30 15:06:14 +01:00
Daira Hopwood 6b8c0bc928 Address review comments.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-26 13:44:50 +00:00
Daira Hopwood 457437ef05 Avoid spurious error messages when cleaning up directories.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-26 13:44:06 +00:00
Daira Hopwood 9f6278e305 Executables end with .exe on Windows.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-26 13:41:48 +00:00
Daira Hopwood 531e2b290f Minor refactoring.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-26 13:39:22 +00:00
Daira Hopwood 4718c1e306 Split into clean.sh and distclean.sh.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-21 19:34:34 +00:00
Daira Hopwood 6174ba2d5c Add a `zcutil/clean.sh` script that works (unlike `make clean`).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-21 16:38:30 +00:00
Homu 77c2e1c251 Auto merge of #3481 - LarryRuane:fetch-params-testnet-arg, r=mdr0id
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.
2020-02-25 20:40:49 +00:00
mdr0id 7300db81ed Updating remaining python3 conventions 2020-02-10 13:15:26 -08:00
mdr0id 4cb368a8d9 Update remaining Python3 conventions 2020-02-10 12:46:41 -08:00
mdr0id 826135d5ed Fix remaining python3 conventions 2020-02-10 12:38:46 -08:00
Jack Grigg 2e9028f1f1 Move default -g flag into configure.ac behind --enable-debug=no
This ensures that if --enable-debug is set, we correctly use -g3 if it
is available, instead of overriding it.

Part of #4317.
2020-01-31 13:39:38 +00:00
Jack Grigg d458cf627a zcutil/build.sh: Turn off verbosity by default
Users who want verbose output (like CI) can call ./zcutil/build.sh V=1
2020-01-31 12:12:07 +00:00
Jack Grigg 42a58f1e23 configure: Change default Proton to match build.sh 2020-01-31 12:12:07 +00:00
Jack Grigg 2ed62edfd6 zcutil/build.sh: Remove lcov and mining flags
These flags can be directly moved into CONFIGURE_FLAGS.
2020-01-31 12:12:07 +00:00
Homu 5ec69e8c2c Auto merge of #4171 - defuse:fuzzer-packaging, r=str4d
Add AFL in zcutil (with all-in-one script)

Supersedes #4156 and #4167.

Fuzzing targets and input sets are defined by the contents of directories in `./src/fuzzing/`. Inside the directory, there's a `fuzz.cpp` and `fuzz.h` with a `main()` function that will replace `zcashd`'s actual `main()` as well as an `input` subdirectory containing the inputs, one per file. To just run a fuzzer, you can, for example...

```
make clean # if you've previously build zcashd without AFL instrumentation
./zcutil/afl/afl-getbuildrun.sh DecodeHexTx
```

Alternatively you can...

```
./zcutil/afl/afl-get.sh /tmp/afl   # (or wherever you want to build AFL)
./zcutil/afl/afl-build.sh /tmp/afl DecodeHexTx -j$(nproc)
./zcutil/afl/afl-run.sh /tmp/afl DecodeHexTx
```

Run `make clean` whenever you switch between a normal build and an AFL-instrumented build.
2019-11-06 03:33:05 -08:00
Eirik Ogilvie-Wigley a68024158f Update team email 2019-11-05 17:08:37 -07:00
Taylor Hornby f189a5f09d Pass AFL input file path to zcashd 2019-10-28 18:30:20 -06:00
Taylor Hornby b25a14f433 Separate AFL build, run fuzz stages, and add afl argument pass-through 2019-10-28 11:54:13 -06:00
Taylor Hornby f968506039 Add all-in-one script for starting AFL fuzzing 2019-10-23 11:15:09 -06:00
Taylor Hornby 8a0fb36b21 Add configure option to replace main with a stub for fuzzing 2019-10-22 13:52:32 -06:00
Taylor Hornby 586f54fc39 Add AFL instrumentation scripts to zcutil.
Co-Authored-By: zebambam <bambam@electriccoin.co>
2019-10-22 13:52:28 -06:00
Homu 961c0d58ec Auto merge of #4060 - str4d:remove-libsnark, r=daira
Remove libsnark

Closes #167. Closes #416. Closes #418. Closes #437.
Closes #521. Closes #743. Closes #750. Closes #894.
Closes #903. Closes #1125. Closes #1136. Closes #1240.
Closes #1264. Closes #1516. Closes #1517. Closes #1651.
Closes #2064. Closes #2158. Closes #3478. Closes #3652.
Closes #3744.
2019-09-26 11:21:40 -07:00
Jack Grigg 2efcb9e592
Stop fetching old Sprout parameters
We aren't automatically deleting them yet.
2019-09-17 12:00:03 +01:00
Gareth Davies cecccce6fa
Updating IPFS link for chunking 2019-09-12 21:14:23 -07:00
Homu 65b44ab59c Auto merge of #4098 - zebambam:optimize_parameter_downloads, r=str4d
Improve caching on parameter downloads

Yay, fun week!

Closes #4097.
2019-08-14 16:34:02 -07:00
zebambam c4bfc3a257 Fixes 4097, improves caching on parameter downloads 2019-08-14 16:25:16 -07:00
Daira Hopwood f6e1e15773 Add coding declaration to zcutil/release-notes.py
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-06-19 00:26:45 +01:00
Daira Hopwood dbe49614c1 Tweak author aliases.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-06-18 14:00:56 +01:00
Eirik0 be04f76034 Update author aliases 2019-05-22 15:47:05 -06:00
Dimitris Apostolou 7420711d9e
Electric Coin Company 2019-03-20 09:04:32 +02:00
Eirik Ogilvie-Wigley 3620d5709d Add missing author aliases 2019-02-20 12:52:41 -07:00
Homu 93dd24cc2d Auto merge of #3707 - Eirik0:3698-fix-help-output, r=daira
Remove --disable-libs flag from help output

The --disable-libs option was removed. This PR removes it from the output of `./zcutil/build.sh --help`.
2018-11-30 13:04:20 -08:00
mdr0id 6f8d182f50 Add Charlie and Ariel alias to author_aliases
Update approx_release_height to allow pre-rel to get into master prior

Bump APPROX_RELEASE_HEIGHT due to transient failures in pre-release 2.0.2 PR
2018-11-30 10:04:49 -08:00
Eirik Ogilvie-Wigley e7860a2843 Remove --disable-libs flag from help output 2018-11-26 12:45:17 -07:00
Gareth Davies fb6cd66660 Add clarifying text for parameter size 2018-10-30 21:10:31 -07:00
Larry Ruane 2bedcd3ecf zcutil/fetch-params.sh unneeded --testnet arg should warn user 2018-10-22 09:40:04 -06:00
Jack Grigg f2d3715727
zcutil/build.sh: Remove --enable-werror from default configuration
Windows cross-compile has currently-unavoidable warnings. Upstream Bitcoin Core
has them as well. For now, let's remove this from the default configuration, and
add it to the Linux and OSX CI builders (so we effectively still enforce it for
merged PRs).
2018-08-17 16:45:32 +01:00
Jack Grigg 03ea5a8122
zcutil/build.sh: Use config.site to set default ./configure settings
This is a more reliable way to configure the depends path (matching what is done
upstream), and frees up --prefix for user configuration.
2018-08-17 16:45:28 +01:00
Jack Grigg b057754005
zcutil/build.sh: Use $HOST to specify the depends prefix 2018-08-17 16:43:06 +01:00
Sean Bowe 198dfd3c36 Switch to use the official Sapling parameters. 2018-08-04 16:28:39 -06:00
Homu bb9658c88c Auto merge of #3402 - mdr0id:3401_fix_auto_senescence, r=bitcartel
Fix minor references to auto-senescence in code

Fix references
2018-07-30 01:36:32 -07:00
mdr0id e18f25e352 Fix minor references to auto-senescence in code
Update typo in rc-notes-1.0.13

Fix typo in rc-notes-1.0.13

Fix typo in rc-notes-1.0.13

Fix typo in rc-notes-1.1.0

Fix typo in rc-notes-1.1.0

Fix typo in make-release

Revert prior release note term to original auto-senescence
2018-07-29 06:32:08 -07:00
Charlie OKeefe eb20680502 Remove extra slash from lockfile path 2018-07-24 16:18:30 -06:00
Dimitris Apostolou ccf9106501
Fix typos 2018-07-06 14:33:24 +03:00
Sean Bowe 45f1cb440e Update Sapling testnet parameters 2018-05-18 13:26:39 -06:00
Sean Bowe acfcdb94b9 Load Sapling testnet parameters into memory. 2018-04-17 15:04:46 -06:00
Homu ceb4559eac Auto merge of #2784 - kozyilmaz:fetch, r=str4d
[macOS] added curl download method to fetch-params.sh

added curl download method and flock workaround for macOS

Part of #2246.
2018-04-14 14:38:07 -07:00
Jack Grigg 47fe5f72f4
Disable building libzcashconsensus by default
The library is not currently a supported build artifact; it needs work in
order to build on certain platforms (e.g. MacOS), and its dependencies need to
be narrowed down (Equihash is not a requirement for validating scripts).
2018-04-06 15:09:50 +01:00
Jack Grigg d9cd254e5e
Make Rust compilation mandatory
The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
2018-03-28 17:55:45 +02:00
Jack Grigg b466c1c90c
cleanup: Ensure code is pyflakes-clean for CI 2018-03-27 02:47:57 +02:00
Jack Grigg 326fc65e66
Add environment variable for setting ./configure flags in zcutil/build.sh
Closes #2066.
2018-03-01 16:04:12 +00:00
Jack Grigg 5d8ab776f0
Exclude beta and RC release notes from author tallies
(except for pre-1.0.0, per previous commit)
2017-12-21 00:29:41 +00:00
Jack Grigg d436db662c
release-notes.py: Remove unnecessary parameter 2017-12-21 00:29:41 +00:00
Jack Grigg 2b38d11eda
Create release notes starting from the previous non-beta non-RC release 2017-12-21 00:29:33 +00:00
kozyilmaz 4c2120c736 [macOS] use shlock instead of flock in fetch-params 2017-12-17 20:18:03 +03:00
kozyilmaz 3c3623ef23 [macOS] added curl method for param download 2017-12-17 19:30:19 +03:00
Homu 83af270002 Auto merge of #2786 - str4d:2074-build, r=str4d
Build system improvements

Includes commits cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6978
  - Only the first commit (second is for QT)
- bitcoin/bitcoin#7059
- bitcoin/bitcoin#7603
  - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT)
- bitcoin/bitcoin#7954
- bitcoin/bitcoin#8314
  - Only the second commit (first is for QT)
- bitcoin/bitcoin#8504
  - Only the first commit (second was undoing something we didn't have)
- bitcoin/bitcoin#8520
- bitcoin/bitcoin#8563
- bitcoin/bitcoin#8249
- bitcoin/bitcoin#9156
- bitcoin/bitcoin#9831
- bitcoin/bitcoin#9789
- bitcoin/bitcoin#10766

Part of #2074.
2017-12-15 05:04:44 -08:00
Homu 89aaa67e9e Auto merge of #2769 - syd0:rename-bitcoin-bash-completion, r=str4d
Rename bitcoin bash completion files so that they refer to zcash and not bitcoin.

This closes #2167
2017-12-04 04:58:19 -08:00
Jack Grigg 704337b2b8
Move Zcash flags into configure.ac 2017-12-01 14:10:18 +00:00
Jack Grigg c1fcdd01dd
Change --enable-werror to apply to all warnings, use it in build.sh 2017-12-01 14:10:18 +00:00
Jack Grigg e4cd341260
Replace hard-coded defaults for HOST and BUILD with config.guess 2017-11-29 15:25:14 +00:00
Jack Grigg 7fa05b29b6
Use g-prefixed coreutils commands if they are available
If they are present on the system, it means that the non-prefixed ones are not
necessarily the versions we want, while the prefixed ones are highly likely to
be the ones from GNU Coreutils.
2017-11-29 15:24:21 +00:00
syd e619c21944 Rename bash completion files so that they refer to zcash and not bitcoin.
This closes #2167
2017-11-28 15:24:15 -05:00
Homu 0eebdefb8a Auto merge of #2597 - kpcyrd:fetch-ipfs, r=str4d
Fetch params from ipfs if possible

This patch allows fetch-params to download the params from [ipfs], if it's installed. This reduces the need for a central server and ensures the params are available if the official server ceases to exist.

For now, the default is still wget. If wget exits with an error, the script automatically tries ipfs. To use ipfs instead of wget:

    ZC_DISABLE_WGET=1 ./zcutil/fetch-params.sh

[ipfs]: https://github.com/ipfs/go-ipfs
2017-09-21 09:26:29 -07:00
kpcyrd 076e177dd9 Prefer wget over ipfs 2017-09-21 03:28:14 +02:00
kpcyrd 3ccbbe31a4 Fetch params from ipfs if possible
Disable ipfs with ZC_DISABLE_IPFS=
2017-09-21 03:28:04 +02:00
Homu e797c7bdb1 Auto merge of #2586 - str4d:release-script-build-progress, r=str4d
Add build progress to the release script if progressbar module is available

Install progressbar2 in your Python path to see the build progress.
2017-09-19 14:43:11 -07:00
Homu 151932d478 Auto merge of #2600 - str4d:2497-hotfix-release, r=str4d
Implement process for hotfix releases

Closes #2497.
2017-09-18 16:02:26 -07:00
Jack Grigg fd5724eca7
make-release.py: Send stderr to stdout 2017-09-18 10:45:03 +01:00
Jack Grigg 24bfc7c6c6
Enforce sequential hotfix versioning 2017-08-31 02:05:07 +01:00
Jack Grigg 869c9f91c4
Add hotfix support to release script 2017-08-30 13:02:50 +01:00
Jack Grigg d9d33a4b78
Add build progress to the release script if progressbar module is available
Install progressbar2 in your Python path to see the build progress.
2017-08-15 13:45:06 +01:00
Bjorn Hjortsberg 4272a1e2b1 Do not warn on built in declaration mismatch 2017-07-20 13:27:37 +02:00
Jack Grigg caafbbb483
Pull in temporary release notes during the release process 2017-06-29 15:42:40 -07:00
Homu 35bf9e73ff Auto merge of #2420 - kozyilmaz:disable-libs, r=str4d
option to disable building libraries (zcutil/build.sh)

option to disable building libraries (zcutil/build.sh)
2017-06-15 07:31:46 -07:00
kozyilmaz c63417bbe7 option to disable building libraries (zcutil/build.sh) 2017-06-04 19:46:35 +03:00
kozyilmaz cf4f400ca8 [macOS] system linker does not support “--version” option but only “-v” 2017-05-31 10:38:02 +03:00
Nathan Wilcox 88bf7eb050 Add a few more version strings to positive parser test. 2017-05-22 21:23:11 -07:00
Nathan Wilcox 187e64c7ab Consider both beta and rc versions to be `IS_RELEASE == false`. 2017-05-22 20:42:00 -07:00
Nathan Wilcox 92333721e5 Examine all future versions which are assumed to follow the same Version parser schema. 2017-05-22 20:38:22 -07:00
Nathan Wilcox 73a3f7dc02 Include release version in commit comments. 2017-05-22 20:38:06 -07:00
Nathan Wilcox 0df82709b4 First full-release-branch version of script; rewrite large swatch of release-process.md. [Manually tested.] 2017-05-22 12:34:00 -07:00
Nathan Wilcox c66c5ab21f Tidy up / systematize logging output a bit more. 2017-05-19 18:20:00 -07:00
Nathan Wilcox 08d66a9c01 Polish logging a bit more. 2017-05-19 18:09:35 -07:00
Nathan Wilcox c62edf9471 Generate manpages; commit that; improve error output in sh_log. 2017-05-19 18:05:02 -07:00
Nathan Wilcox 785244020a Commit the version changes and build. 2017-05-19 18:05:02 -07:00