Skip to content

Commit 9270a56

Browse files
committed
Merge bitcoin/bitcoin#27440: contrib: followups to #27358 (verify-binaries)
ad84160 contrib: minor doc improvements in verify-binaries (fanquake) e2e5683 contrib: fixup verifybinaries example docs (fanquake) 663a89c contrib: move verify scripts to verify-binaries (fanquake) Pull request description: Followup to #27358, fixing up the example command docs and other requests. See bitcoin/bitcoin#27358 (comment). ACKs for top commit: josibake: ACK bitcoin/bitcoin@ad84160 achow101: ACK ad84160 theuni: ACK ad84160. Thanks for doing these. Tree-SHA512: 14c47b5a1b231d5116a1e5ddc78cb3a32ca1d4e86f7e18a0c63d5caac95a5272b3eddcc531052e130970a694dd1bc721bfcb29092755e306c37abc0b9f6c9dfd
2 parents d544d03 + ad84160 commit 9270a56

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

contrib/verifybinaries/README.md renamed to contrib/verify-binaries/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,47 +42,47 @@ See the `Config` object for various options.
4242

4343
Validate releases with default settings:
4444
```sh
45-
./contrib/verifybinaries/verify.py pub 22.0
46-
./contrib/verifybinaries/verify.py pub 22.0-rc2
45+
./contrib/verify-binaries/verify.py pub 22.0
46+
./contrib/verify-binaries/verify.py pub 22.0-rc3
4747
```
4848

4949
Get JSON output and don't prompt for user input (no auto key import):
5050

5151
```sh
52-
./contrib/verifybinaries/verify.py --json pub 22.0-x86
52+
./contrib/verify-binaries/verify.py --json pub 22.0-x86
5353
```
5454

5555
Rely only on local GPG state and manually specified keys, while requiring a
5656
threshold of at least 10 trusted signatures:
5757
```sh
58-
./contrib/verifybinaries/verify.py \
58+
./contrib/verify-binaries/verify.py \
5959
--trusted-keys 74E2DEF5D77260B98BC19438099BAD163C70FBFA,9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \
6060
--min-good-sigs 10 pub 22.0-x86
6161
```
6262

63-
If you only want to download the binaries of certain platform, add the corresponding suffix, e.g.:
63+
If you only want to download the binaries for a certain platform, add the corresponding suffix, e.g.:
6464

6565
```sh
66-
./contrib/verifybinaries/verify.py pub 22.0-osx
67-
./contrib/verifybinaries/verify.py pub 22.0-rc2-win64
66+
./contrib/verify-binaries/verify.py pub 24.0.1-darwin
67+
./contrib/verify-binaries/verify.py pub 23.1-rc1-win64
6868
```
6969

7070
If you do not want to keep the downloaded binaries, specify the cleanup option.
7171

7272
```sh
73-
./contrib/verifybinaries/verify.py pub --cleanup 22.0
73+
./contrib/verify-binaries/verify.py pub --cleanup 22.0
7474
```
7575

7676
Use the bin subcommand to verify all files listed in a local checksum file
7777

7878
```sh
79-
./contrib/verifybinaries/verify.py bin SHA256SUMS
79+
./contrib/verify-binaries/verify.py bin SHA256SUMS
8080
```
8181

8282
Verify only a subset of the files listed in a local checksum file
8383

8484
```sh
85-
./contrib/verifybinaries/verify.py bin ~/Downloads/SHA256SUMS \
85+
./contrib/verify-binaries/verify.py bin ~/Downloads/SHA256SUMS \
8686
~/Downloads/bitcoin-24.0.1-x86_64-linux-gnu.tar.gz \
8787
~/Downloads/bitcoin-24.0.1-arm-linux-gnueabihf.tar.gz
8888
```

contrib/verifybinaries/test.py renamed to contrib/verify-binaries/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def main():
1212
expect_code(run_verify("", "pub", '0.32.awefa.12f9h'), 11, "Malformed version should fail")
1313
expect_code(run_verify('--min-good-sigs 20', "pub", "22.0"), 9, "--min-good-sigs 20 should fail")
1414

15-
print("- testing multisig verification (22.0)", flush=True)
15+
print("- testing verification (22.0)", flush=True)
1616
_220 = run_verify("--json", "pub", "22.0")
1717
try:
1818
result = json.loads(_220.stdout.decode())
@@ -31,7 +31,7 @@ def main():
3131

3232
def run_verify(global_args: str, command: str, command_args: str) -> subprocess.CompletedProcess:
3333
maybe_here = Path.cwd() / 'verify.py'
34-
path = maybe_here if maybe_here.exists() else Path.cwd() / 'contrib' / 'verifybinaries' / 'verify.py'
34+
path = maybe_here if maybe_here.exists() else Path.cwd() / 'contrib' / 'verify-binaries' / 'verify.py'
3535

3636
if command == "pub":
3737
command += " --cleanup"

contrib/verifybinaries/verify.py renamed to contrib/verify-binaries/verify.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def bool_from_env(key, default=False) -> bool:
9797

9898

9999
VERSION_FORMAT = "<major>.<minor>[.<patch>][-rc[0-9]][-platform]"
100-
VERSION_EXAMPLE = "22.0-x86_64 or 0.21.0-rc2-osx"
100+
VERSION_EXAMPLE = "22.0-x86_64 or 23.1-rc1-darwin"
101101

102102
def parse_version_string(version_str):
103103
parts = version_str.split('-')
@@ -530,7 +530,7 @@ def cleanup():
530530

531531
# download binaries
532532
for _, binary_filename in hashes_to_verify:
533-
log.info(f"downloading {binary_filename}")
533+
log.info(f"downloading {binary_filename} to {WORKINGDIR}")
534534
success, output = download_with_wget(
535535
HOST1 + remote_dir + binary_filename, binary_filename)
536536

0 commit comments

Comments
 (0)