-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: use SHA256 in
ci_download_cockroachdb
(#5017)
Depends on #4961. Currently, the `tools/ci_download_cockroachdb` script uses MD5 as the checksum for the Cockroachdb tarball. This is unfortunate for two reasons: 1. Upstream Cockroachdb (and the corresponding Illumos build) publish SHA256 digests for these tarballs, rather than MD5s (see https://www.cockroachlabs.com/docs/releases/ and https://illumos.org/downloads/). Using SHA256 rather than MD5 digests should make updating to a new version easier. 2. Nix requires SHA256 checksums for files downloaded as build inputs. Currently, the Nix flake can use the SHA256 checksums for Maghemite and Dendrite from `tools/maghemite_mgd_checksums` and `tools/dendrite_stub_checksums`, meaning that updating these versions does not require manually changing the Nix flake. However, because we use MD5 rather than SHA256 checksums for Cockroachdb, updating the Cockroachdb version requires manually changing the version in the Nix flake, which is a shame, especially if someone unfamiliar with Nix has to do it... This commit changes `tools/cockroachdb_checksums` and the corresponding `tools/ci_download_cockroachdb` script to use SHA256 rather than MD5. I've changed the Nix flake to read the hash from this file rather than hard-coding it, so now, the cockroachdb version can be updated without touching the flake.
- Loading branch information
Showing
3 changed files
with
29 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
CIDL_MD5_DARWIN="2db972c254b4e3b599e12110520178b5" | ||
CIDL_MD5_LINUX="8c3170883e0a0be1a34b44090c067a8c" | ||
CIDL_MD5_ILLUMOS="d8999aff364e5d70f226e139fda724a3" | ||
CIDL_SHA256_DARWIN="1ca69e0911af11a73305c3c6f4650b912d70754900b5bf7b80a1d361efe36561" | ||
CIDL_SHA256_LINUX="24c321820e7ee45fa07fe91ac138befe13ad860e41c6ed595ce58823205ff4a9" | ||
CIDL_SHA256_ILLUMOS="f151714ba3a6e02caaaa59727482c36085e60d6bd2fa963938e9a3d8c8a77088" |