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.
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.
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
Print toolchain versions before making depends, autoconf, or main build.
Closes#2218.
Note: I spent a half hour attempting to have make do this so that people not using `build.sh` would get the same output. There's no easy way I found to ensure that output occurs first and regardless of the result of other build rules.
Fix sha256sum on busybox
Busybox's version of `sha256sum` doesn't support `--check` parameter
```
/usr/bin/sha256sum: unrecognized option: check
BusyBox v1.24.2 (2016-08-12 14:38:34 GMT) multi-call binary.
Usage: sha256sum [-c[sw]] [FILE]...
Print or check SHA256 checksums
-c Check sums against list in FILEs
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines
The command '/bin/sh -c ./zcutil/fetch-params.sh' returned a non-zero code: 1```
Gather release notes from previous release to HEAD
Release-notes.py used to depend on release already being tagged--now gathers release notes from previous tagged release up to current HEAD.
Debian packaging fixes
* Updates maintainer scripts from latest version of `dh_make`
* Includes `rules` file
* Use `fakeroot` to build the package.
We use currently `dpkg-deb --build` instead of `debuild` or `dpkg-buildpackage`, so I don't know if the package is well-formatted for the latter. (one difference, the former works with uppercase `DEBIAN`, the latter lowercase `debian` -- that's why the directory was renamed)
Because of `set -e`, if there are any warnings, then the package won't be
copied back to the source directory. For now, there are definitely going to
remain some Lintian warnings which we'll want to ignore.
Also updates comments to make them more descriptive.
Zcash zk-SNARK public parameters for 1.0 "Sprout".
Created in the ceremony this weekend! 🎉
We're writing a blog post about this, I'm going to publish the code shortly too.
Closes#1553
This adds some source files, a script and skeleton for building
a Debian package that installs the zcash daemon and CLI tool.
Also removes unused Bitcoin files.
This will retry upon refused connections and similar errors, wait 1 second
before the next retry, time out after 10 seconds if no data is received or
the connection times out, plus try an infinite number of times.
Per NCC-2016-017, wget was run with --no-check-certificate,
which means that the connection can be man-in-the-middled,
even if we are verifying the integrity of the params later via hash sums.
The rationale cited in the Bash comments does not stand up to scrutiny.
There's really no persuasive reason not to verify certificates.
Fixes#1346.
Two instances of the fetch-params.sh script running at once will
result in corruption of the proving key and an error when the
hashes are computed. This implements a lock to stop such a
scenario from occurring.
We also terminate and don't create the symlinks if the downloaded
parameters fail the checksum command.
Fix inconsistent -O1/-O2, fix libzcash flags, add -fwrapv -fno-strict-aliasing
Closes#1168. In that ticket I decided the optimization flags for dependencies are out of scope, i.e. we go with whatever the upstream package maintainer chose.