Commit Graph

459 Commits

Author SHA1 Message Date
Technetium 5bb5f1da4d add missing aarch64 build deps 2021-09-05 11:17:02 +12:00
Daira Hopwood 49d4bccf51 Update URL for Boost source download (from dl.bintray.com to boostorg.jfrog.io).
Co-authored-by: Taylor Hornby <taylor@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-08-16 21:10:54 +01:00
str4d bdaf3e1ab2 depends: Greatly simplify the Clang 12 patch
We can avoid the "%s" optimization with "%s%s" :D

Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-07-30 19:53:18 +01:00
Jack Grigg 18e39ff9f0 depends: Fix issue cross-compiling BDB to Windows with Clang 12 2021-07-30 18:22:05 +01:00
Jack Grigg d9bcc2d303 depends: Update utfcpp to 3.2.1 2021-07-30 18:22:05 +01:00
Jack Grigg 374f60b326 depends: Update Clang / libcxx to LLVM 12
This is the second release in a row where LLVM has cut a X.0.1 for
everything except Darwin, so I've adjusted its URLs and paths on the
assumption this will continue.
2021-07-30 18:22:05 +01:00
Jack Grigg 0a5e69ab67 depends: Update Rust to 1.54.0 2021-07-30 18:22:05 +01:00
fanquake 182a9af25e build: pass _WIN32_WINNT=0x0601 when building libevent for Windows
This enables of the use of AI_* definitions in the Windows headers,
specifically AI_ADDRCONFIG, which fixes an issue with libevent and
ipv6 on Windows.

It also aligns with what we define in configure when building Core.

(cherry picked from commit eb6b73540d1ee7ff5a6874dd0e35f9b30b68e3b8)
2021-06-05 15:20:22 +01:00
Luke Dashjr dc0d4bcb53 depends: Patch libevent build to fix IPv6 -rpcbind on Windows
libevent uses getaddrinfo when available, and falls back to gethostbyname
Windows has both, but gethostbyname only supports IPv4
libevent fails to detect Windows's getaddrinfo due to not including the right headers
This patches libevent's configure script to check it correctly

(cherry picked from commit 03e056edcd1a7f7197a29068c52fa33fce12f7d7)
2021-06-05 15:20:22 +01:00
Daira Hopwood c80ddb36f1 native_rust: don't install Rust docs. This speeds up builds, especially native builds on macOS.
fixes #5042

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-03-31 19:26:45 +01:00
Jack Grigg 2e12078cfc depends: Update Rust to 1.51.0 2021-03-27 11:47:34 +13:00
Homu 7580890dc1 Auto merge of #4959 - str4d:dependency-updates, r=str4d
Dependency updates

Boost is reverted to 1.74 to mitigate #4945 until a fix is found.
2021-01-25 19:20:45 +00:00
Daira Hopwood bd61fbf056 Ensure that `CONFIGURE_FLAGS=--enable-debug` correctly uses -O0 for dependencies and main build.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-01-25 14:32:18 +00:00
Jack Grigg 4c7d17328a depends: ZeroMQ 4.3.4 2021-01-25 12:04:47 +00:00
Jack Grigg c996fc1ca4 Revert "Update boost to 1.75, postpone other updates."
This reverts commit 8f4dd4460b.
2021-01-25 11:35:18 +00:00
Jack Grigg d0902ab767 depends: Ensure the native_clang download path is for the builder 2021-01-21 22:55:03 +00:00
Jack Grigg c7df8445d0 depends: Allow per-host package download paths
Clang's download path includes its version, but LLVM doesn't always
publish every package for every version, so we need to support multiple
versions.

Fixes zcash/zcash#4954.
2021-01-21 15:19:02 +00:00
Jack Grigg fa41e9adca depends: Fix Boost warnings under Clang 11
C++17 deprecated the two-argument version of std::allocator::allocate.
Starting with 11.0, libc++ enforces these deprecations, which causes
warnings from the Boost headers, and since we require native Linux
builds to be warning-free, this breaks CI.

Boost addressed this issue for MSVC in 1.75; the patch in this commit
forces Clang to be handled in the same way.
2021-01-18 21:55:22 +00:00
Jack Grigg a58d74c6be depends: Move to Clang 11
Most platforms are on 11.0.1; Darwin and Windows are both on 11.0.0
because that is the latest that binaries are provided for.
2021-01-16 00:45:33 +00:00
Carl Dong 98ce8f838d depends: boost: Specify cflags+compileflags 2021-01-15 17:31:29 +00:00
Carl Dong cf70d2eb5c depends: boost: Remove unnecessary _archiver_
We already have $(package)_ar, so just use that instead
2021-01-15 17:31:10 +00:00
Carl Dong 80205dcad5 depends: boost: Cleanup toolset selection 2021-01-15 17:30:32 +00:00
Carl Dong 7f1598ad11 depends: boost: Cleanup architecture/address-model 2021-01-15 17:30:32 +00:00
Carl Dong 44f95d4043 depends: boost: Disable all compression 2021-01-15 17:30:30 +00:00
Carl Dong d5dfbe016d depends: boost: Split into non-/native packages 2021-01-15 17:29:37 +00:00
Carl Dong 63390e503c depends: boost: Refer to version in URL 2021-01-15 17:08:56 +00:00
Carl Dong 5c03db0983 depends: Propagate only specific CLI variables to sub-makes
We want to supply well-known vars to ./configure scripts to do with as
they please. However, we do _not_ want to override these well-known vars
at make-time as certain build systems expect a self-mangled version of
these well-known vars.

For example, freetype and bdb will prepend `libtool --mode=compile' to
CC and CXX, which, if we override CC on the command line at make-time,
will break the build.
2021-01-15 17:08:56 +00:00
Carl Dong 9e997afd84 depends: boost: Use clang toolset if clang in CXX 2021-01-15 17:08:56 +00:00
Carl Dong 96cf6da5b6 depends: boost: Split target-os from toolset
Previously, we specified the target-os in the toolset (and sometimes
used the wrong command line flags), now we have a clear separation,
which is favored by ./bootstrap.sh and ./b2.

This means that all supported OSes will specify the correct target-os=
and toolset= on the command line.
2021-01-15 17:08:56 +00:00
Carl Dong b3fe7d336e depends: boost: Specify toolset to bootstrap.sh
b2 will pickup our user-config.jam just fine, however, bootstrap.sh has
its own toolset autodetect mechanism, which doesn't GAF about our
user-config.jam

Zcash: This also reverts b6d0996cec which
fixes a PIE linking error, but likely breaks FreeBSD build support.
2021-01-15 17:07:01 +00:00
Carl Dong 2c1c82f59a depends: Propagate well-known vars into depends
For example, doing:

  make CC=clang CXX=clang++

Should now propagate these settings down to depends packages
2021-01-15 05:24:25 +00:00
Peter Bushnell 0226ea4647 depends: Consistent use of package variable
All other mk files use the package variable consistently except for the two instances here, which have always been here, since depends was introduced in 0.10.
2021-01-15 05:24:25 +00:00
Cory Fields d64205350d depends: fix boost mac cross build with clang 9+
The ancient "darwin-4.9.1" profile has long been used to match against
clang, which prior to version 9, reported 4.9.1 as its version when
invoking "clang++ -dumpversion". Presumably this was a historical
compatibility quirk related to Apple's switch from gcc to clang.

This was "fixed" in clang 9.0, so that -dumpversion reports the real
version. Unfortunately that had the side-effect of breaking the
(brittle) boost compiler detection.

Move to the seemingly more-correct "clang-darwin" profile, which passes
the checks and builds correctly.

Also switch to using ar rather than libtool for archiving, as it's what
the clang-darwin profile expects to be using.

Note that because this is using a different profile, some of the final
command-line arguments end up changing. The changes look sane at a
glance.
2021-01-15 05:24:25 +00:00
Carl Dong ee10eb77db build: Add variable printing target to Makefiles
I kept finding myself needing these to debug our build system, since
they are innocuous and are very helpful they probably belong in the
codebase.

Source: John Graham-Cumming
https://www.cmcrossroads.com/article/printing-value-makefile-variable
2021-01-15 05:24:25 +00:00
Homu e528caf7fb Auto merge of #4937 - centromere:freebsd, r=daira
Add support for FreeBSD 12

The pre-built binaries for clang 8 on FreeBSD do not ship with `libc++api`, so `libcxxrt` from the base system is used instead.

Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
2021-01-09 16:24:10 +00:00
Alex Wied 2e36d4208c
Use parentheses for defined in windows-unused-variables.diff
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-01-05 22:16:20 -05:00
Alex Wied a0c1ba16db Set rust_target for all FreeBSD versions 2021-01-05 17:28:24 -05:00
Jack Grigg 070d4720eb depends: Update Rust to 1.49.0 2021-01-04 16:31:11 +00:00
Alex Wied eadc3d48f2 Add support for FreeBSD 12 2020-12-30 19:50:25 -05:00
Kris Nuttycombe 8f4dd4460b Update boost to 1.75, postpone other updates.
This removes the paches iostreams-106.patch and signals2-noise.patch
which have been incorporated into boost 1.75. Also, this further
postpones updates to native_clank, libcxx and native_ccache.
2020-12-18 14:13:42 -07:00
Homu dea50714f9 Auto merge of #4892 - str4d:boosted, r=str4d
Replace boost::variant and boost::optional with standard library

Includes a commit cherry-picked from https://github.com/bitcoin/bitcoin/pull/20419.

Closes #4821. Closes #4822.
2020-12-17 02:42:55 +00:00
Kris Nuttycombe bce1da684b Remove vestigial OSX_SDK_VERSION from darwin build.
Upstream still uses this variable for qt builds, but as we no longer
have the GUI wallet it's unnecessary for Zcash.
2020-12-16 22:59:35 +00:00
fanquake f201e1e02d build: set minimum supported macOS to 10.14 2020-12-16 22:59:35 +00:00
Dimitris Apostolou f459e43dc9
Update links 2020-12-13 11:24:44 +02:00
Daira Hopwood a0a87ab413 Set release CFLAGS/CXXFLAGS to use -O3.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-11-13 22:39:17 +00:00
Daira Hopwood e86f83c627 Fix an error reporting bug in "Checksum missing or mismatched ..."
The sense of the test was accidentally inverted in my change to #4733.
The message should be shown if any of the files exist but have an incorrect checksum.
We also now correctly handle the case where there are no package source files.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-26 07:44:21 +00:00
Nate Wilcox 94fa873853 depends: fix a logging bug for multi-archive packages.
While initially fetching packages, I saw `sh: test:` error messages in the make output for only two packages.
However, it appears all packages are correctly fetched.

I tested this patch manually by running these three tests against the `v4.0.0` tag and then with this patch.
In all 6 cases I visually inspected the output.

1. Starting with a pre-downloaded source cash, run the `download` target.
2. Remove an archive from a multi-archive package, then rerun `download`.
3. Alter a hash to cause a hash mismatch condition, then rerun `download`.

I believe after each step both with and without this patch the resulting source cache should be identical
(except for filesystem timestamps).

Co-authored-by: Nathan Wilcox <nathan@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-22 14:43:22 +01:00
Jack Grigg 9052751c21 depends: Build C++ dependencies with C++ 17 2020-10-20 13:55:14 +01:00
str4d eaed8d5797
depends: Add untested note to FreeBSD host
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 20:19:00 +01:00
Jack Grigg ab4033c49c depends: Fix boost::iostreams usage on Windows with libc++
Fixed upstream (but not yet in a Boost release):
    https://github.com/boostorg/iostreams/pull/106
2020-10-13 16:33:25 +01:00
Jack Grigg c691a8413f depends: Rename Boost libraries to follow MinGW/GCC convention
Boost uses the MSVC naming convention when building Windows libraries,
which causes issues with lld.
2020-10-13 15:29:01 +01:00
Jack Grigg 3973a16358 depends: Fix "unused variables" warning when compiling zeromq for Windows
Clang triggers that warning, which becomes an error due to -Werror.
2020-10-13 14:12:41 +01:00
Jack Grigg 5ca4fbf8f6 build: Statically link libc++ 2020-10-13 14:12:41 +01:00
Jack Grigg fa54a1661a depends: Add multilib paths for Linux cross-compile 2020-10-13 14:12:41 +01:00
Jack Grigg 0887f64c90 depends: Don't replace default CXXFLAGS in C++ dependencies 2020-10-13 14:12:41 +01:00
Jack Grigg 1b96347867 depends: Add libc++ as a dependency
For mingw32:

- We use the binaries provided by MSYS2, which do not go back as far as
  libc++ 8. We use libc++ 9 here, matching the LLVM version we will be
  switching to in a subsequent commit (to match the LLVM version used by
  Rust 1.44). We manually specify the path to the libc++ headers,
  because they don't match the headers used by Clang itself.

- We now require at least mingw-w64 6.0.0, which fixes two Clang
  compilation bugs:
  - 1bd66b53be
  - 82b169c573

Darwin is ignored, as the Xcode SDK includes libc++.

For all other targets, we use the static libraries included in Clang
releases. We reuse the files we downloaded in native_clang for native
compilation, instead of fetching the archive twice.
2020-10-13 14:12:41 +01:00
Jack Grigg ff4cb00cb2 depends: Vendor LLD and use it for linking
We don't specify it for macOS, as we already pin a specific SDK there.
2020-10-12 18:10:16 +01:00
Jack Grigg 4abd76f70e depends: Use vendored Clang for macOS cross-compilation 2020-10-12 17:55:12 +01:00
Jack Grigg d306b72be4 depends: Use vendored Clang for native compilation
Clang is used for compiling C/C++ dependencies, as well as the Zcash
binaries themselves. GCC is still required for compiling native
toolchain dependencies (such as ccache).
2020-10-12 17:55:12 +01:00
Jack Grigg d071e316e5 depends: Add Clang 8.0.0
We vendor only the subset of the Clang tarball that we require.
2020-10-12 17:55:12 +01:00
Nate Wilcox 5a47aa5350 Convert a sed command to a static patch file. 2020-10-12 11:58:28 +09:00
str4d a5c2daf618
depends: Update packages documentation for Zcash
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-10-08 14:15:03 +01:00
Jack Grigg 7c9fa28274 depends: ZeroMQ 4.3.3 2020-10-06 00:03:21 +01:00
fanquake 3c4f9d383f build: pass --enable-option-checking to applicable packages 2020-10-05 23:48:58 +01:00
fanquake 3420f0171e build: only pass --disable-dependency-tracking to packages that understand it
By blanket passing --disable-dependency-tracking to all depends packages
we end up with some warnings like:

configure: WARNING: unrecognized options: --disable-dependency-tracking

So instead, only pass it to packages that understand it.

Related to https://github.com/bitcoin/bitcoin/issues/16354.
2020-10-05 23:46:38 +01:00
fanquake 13f0e7874a depends: zeromq: disable draft classes and methods 2020-10-05 23:42:15 +01:00
Carl Dong 84dfe68465 depends: Purge libtool archives
We use pkg-config where we can, which generally replaces libtool at a
higher level and does not have the same downsides as libtool. These
archives sit in our depends tree with no purpose and pollute the final
bitcoin build with massive overlinking.
2020-10-05 23:37:09 +01:00
Carl Dong df60fd966b depends: Build secondary deps statically.
Secondary dependencies don't need to be shared.
2020-10-05 23:36:26 +01:00
fanquake 92aa4d6178 depends: Disable unused ZeroMQ features
Zcash: From upstream commit 387879dd4cbecd4d39bcf691bfe910047e5ed85c
2020-10-05 22:46:58 +01:00
Jack Grigg be700a89cc depends: ccache 3.7.12 2020-10-05 19:58:39 +01:00
Jack Grigg a9f62bdda0 depends: Boost 1.74.0
- The old patch is no longer necessary because of this upstream fix:
    https://github.com/boostorg/build/pull/560

- Boost 1.72 removed a <deque> from an include, which exposed a missing
  include in src/httpserver.cpp.

- Boost 1.73 moved function placeholders into the boost::placeholders
  namespace.

- The new patch is a fix from just after Boost 1.74 was released, fixing
  a warning that was missed.
2020-10-05 19:48:46 +01:00
Dimitris Apostolou 95a5c30339
Fix zeromq warning 2020-10-03 09:13:35 +03:00
Jack Grigg 0d4a7b032f depends: Use correct HOST for download-linux target
By using the old HOST with -unknown, `make -C depends download` was
interpreting the download-linux step as a cross-compile, and attempting
to download a Rust stdlib for Linux that we weren't pinning (because we
don't support cross-compiling to x86_64 Linux - just build it native).

Follow-up to https://github.com/zcash/zcash/pull/4749.
2020-10-01 11:22:27 +01:00
Jack Grigg 076c1af55c depends: utfcpp 3.1.2 2020-10-01 11:10:33 +01:00
Jack Grigg 78a7230f50 depends: googletest 1.8.1 2020-10-01 10:57:57 +01:00
Jack Grigg 7725f66051 depends: ccache 3.7.11 2020-10-01 10:57:26 +01:00
Jack Grigg 96da9c2c00 depends: libevent 2.1.12
This includes https://github.com/libevent/libevent/pull/637 which fixes
a problem we encounter during cross-compilation with clang.
2020-10-01 10:56:42 +01:00
fanquake f477932d38 depends: remove OpenSSL package 2020-09-30 00:40:12 +01:00
Jack Grigg 9384b78c0f depends: Update map of GCC canonical hosts to Rust targets
The updated files now output x86_64-pc-linux-gnu on some platforms where
they previously output x86_64-unknown-linux-gnu.
2020-09-28 18:20:47 +01:00
Jack Grigg 8e55824119 depends: Update to latest config.guess & config.sub 2020-09-25 14:11:58 +01:00
Dimitris Apostolou 4e1d3856ee
Remove reference to cargo-checksum.sh 2020-09-25 07:15:04 +03:00
Jack Grigg a554f7ccc6 depends: Remove cargo-checksum.sh
Now that we are using `cargo vendor`, the checksum files are computed
automatically.
2020-09-23 11:30:35 +01:00
Sean Bowe 03ce24013a
Update Rust to 1.44.1. 2020-09-22 15:06:01 -06:00
Jack Grigg 2449349882 depends: Ensure that SOURCES_PATH exists before vendoring crates
During Gitian builds, SOURCES_PATH is set to a path within the Gitian
cache. Normally this path is created as part of creating a particular
dependency's source directory, but in some situations we may vendor Rust
crates before this folder exists.
2020-09-19 13:35:36 +01:00
Jack Grigg 549bf2dfa8 depends: Switch to `cargo vendor` for Rust dependencies
When we first integrated Rust into our build system, we had two
limitations:

- We were building the `librustzcash` FFI library as a dependency, and
  therefore needed access to its crate dependencies in the depends
  system.
- Gitian builds happen offline, so we needed to fetch any crate
  dependencies ahead of time, and then configure cargo to use these in
  an offline environment.

At the time, `cargo` already had support for "Source Replacement", but
there was no easy way to package the dependencies in the necessary way.
What we implemented was effectively the `cargo-vendor` tool, built using
Makefiles. A noticeable downside was that we were pinning dependencies
twice: once in the `Cargo.lock` for the FFI library, and again in our
depends system.

Since then, `cargo-vendor` has been upstreamed into `cargo` itself, and
we have moved `librustzcash` into this repository. We can therefore use
`cargo vendor` directly from our pinned Rust compiler to fetch the
dependencies, and rely on our local `Cargo.lock` to pin the specific
crates we are relying on.
2020-09-18 22:55:57 +01:00
Jack Grigg f0babb8356 depends: cargo update 2020-08-25 13:07:22 +01:00
Jack Grigg c10ba7da41 depends: Migrate to zcash_* 0.3.0 Rust crates 2020-08-25 13:07:22 +01:00
Homu 2502ebb183 Auto merge of #4656 - str4d:depends-fixes, r=str4d
depends: Fixes to build system
2020-08-10 23:58:27 +00:00
Jack Grigg 682bc15757 depends: Split check-packages and check-sources across categories
All the text from a make action is passed as arguments to a single
execve call, and it can't be longer than the maximum size allowed by the
operating system. We now have enough Rust crates vendored by the depends
system that we are hitting this limit here.
2020-08-10 22:52:23 +01:00
Jack Grigg ddc517b2c8 depends: Add platform-specific overrides for download files 2020-08-10 22:52:23 +01:00
Jack Grigg 2a3770cfbf depends: Rework Rust integration
The Rust toolchain is now a native dependency, and the vendored crates
no longer depend on the native toolchain.
2020-08-10 22:52:23 +01:00
Homu 9487115cbb Auto merge of #3952 - LongShao007:master, r=daira
Remove unnecessary patch in bdb.mk

there is no "__atomic_compare_exchange" function in "src/dbinc/atomic.h".
2020-08-10 13:31:55 +00:00
Jack Grigg 927a03465f Merge branch 'master' into modernise-macos-toolchain 2020-08-08 00:07:31 +01:00
Homu d36718542c Auto merge of #4597 - str4d:rust-tracing, r=str4d
Use the Rust tracing crate for C++ logging

This PR swaps in the `tracing` crate (via FFI) for logging to either standard
output or `debug.log`. It transparently maps all existing `LogPrintf` and
`LogPrint` invocations to info-level `tracing` events, and passes through
correct file and line information. `error` invocations are mapped to error-level
`tracing` events, currently without line information (due to the way that
`error` is used in the codebase; swapping individual callsites to the new
`LogError` macro will provide that information).

The end-goal for this change is that we don't need to make any disruptive
changes to the codebase, but we can start to leverage `tracing`-specific
functionality where we want to, such as providing extra fields on certain log
lines (that can be filtered for), adding spans to record the flow of execution
through `zcashd`, and logging within C++ and Rust simultaneously. Support
for extra fields on spans and events will be added in a subsequent PR.

The `-debug` config options are converted at launch into their corresponding
directives for tracing's `EnvFilter`. The new `setlogfilter` RPC method allows
this filter to be reloaded dynamically. The syntax is documented in the
`setlogfilter` help text, as well as here:

https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/filter/struct.EnvFilter.html#directives

When `-printtoconsole` is specified, the output now includes timestamps and
ANSI encoding :)
2020-08-07 21:54:46 +00:00
Homu 205c7b5844 Auto merge of #4653 - str4d:reliable-dependency-fetching, r=str4d
depends: Revert to using upstreams as primary download paths

We use the depends system for vendoring `zcashd` dependencies, pinning them
with SHA-256 hashes. It supports fetching dependencies from both their
upstream archive source, and a mirror operated by ECC.

In #816, we switched to the ECC mirror as the primary source, due to an
unreliable upstream (SourceForge). However, this only addressed the symptom
(that dependency builds would reliably fail with an unreliable upstream that
was serving incorrect files). In particular, if the ECC mirror were to become
similarly unreliable, the issue would return.

This PR fixes the core problem, by downloading dependencies and checking
their hashes as an atomic operation. This gives us greater resiliency, as
both the primary and fallback would need to fail in order to halt the build.
Having addressed this problem, we also switch back to using upstreams as
primary download paths.
2020-08-07 18:14:56 +00:00
Jack Grigg 70c518bb84 depends: tracing-core 0.1.13 2020-08-07 15:26:28 +01:00
Jack Grigg 2b7d824714 Use a tracing EnvFilter directive for -debug flags 2020-08-07 15:08:10 +01:00
Jack Grigg e6a52fa9c8 Add tracing to librustzcash dependencies 2020-08-07 15:07:44 +01:00
Homu 022c3a4c6d Auto merge of #4567 - oxarbitrage:issue4537, r=daira
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
2020-08-07 11:11:47 +00:00
Jack Grigg 9cdc6f2a85 depends: Use FALLBACK_DOWNLOAD_PATH if the primary's hash doesn't match
The previous behaviour was to use FALLBACK_DOWNLOAD_PATH to download
dependencies if the primary did not resolve. This was not resilient
against primaries that either mis-report HTTP status codes (e.g.
SourceForge returning 200 OK alongside a 404 webpage), or did not
guarantee artifacts to be bit-stable (e.g. GitHub regenerating commit
archive caches in a non-reproducible manner); in either case, the
incorrect file would be fetched and then the build would fail due to
hash mismatch.

The new behaviour is to download dependencies and check their hashes as
an atomic operation, and use FALLBACK_DOWNLOAD_PATH if any part of the
operation fails.
2020-08-07 10:07:07 +01:00