Skip to content

Conversation

@theStack
Copy link
Contributor

This is a small follow-up to #25650 (commit 614d468) with three fixes/improvements:

  • fix "Checksum did not match" detection, which was not adapted to the new SHA256_SUMS structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the 'tarball' field of each value)
  • make both help text and default tag download order deterministic by sorting default tags
  • --tags argument help text: add missing space between "for" and "backwards"

This is a small follow-up to bitcoin#25650 (commit
614d468) with three fixes/improvements:

- fix "Checksum did not match" detection, which was not adapted to the new
  SHA256_SUMS structure and hence never executed (the list of tarball
  names isn't directly in the dictionary's values anymore, but has to be
  extracted from the 'tarball' field of each value)
- make both help text and default tag download order deterministic by
  sorting default tags
- "--tags" argument help text: add missing space between "for" and
  "backwards"
@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 28, 2022

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK Sjors, josibake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

@fanquake fanquake added Tests and removed Consensus labels Nov 28, 2022
@fanquake fanquake requested review from Sjors and josibake November 28, 2022 12:16
@maflcko maflcko changed the title script: small fixups/improvements for get_previous_releases.py test: small fixups/improvements for get_previous_releases.py Nov 28, 2022
@maflcko maflcko removed the Tests label Nov 28, 2022
@DrahtBot DrahtBot added the Tests label Nov 28, 2022
Copy link
Member

@Sjors Sjors left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK 9b5feb7. Tested that if I change a checksum, or remove a release, it catches that.

Copy link
Member

@josibake josibake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested ACK 9b5feb7

I modified the sha256 sum for v23 and then ran ./test/get_previous_releseases.py -b v23.0 to verify I got the expected error of "Checksum did not match."

This could be addressed in a follow-up, but I did notice while testing that if the binaries have been previously downloaded the script will use the cached version and skip checking the sha256sum. Seems like it would be better to still check the sha256sum even if using the cached binary as the binary could have been corrupted/modified since it was previously downloaded.

EDIT: regarding cached binaries, we delete the tarball after we check it and it doesn't seem worth it to keep the tarball around just so that we can re-verify the checksum and unzip it every time we want to use it, so nvm

@maflcko maflcko merged commit 5939794 into bitcoin:master Nov 28, 2022
@theStack theStack deleted the getprevreleases_improvements branch November 28, 2022 13:03
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Dec 1, 2022
…_releases.py

9b5feb7 script: small fixups/improvements for get_previous_releases.py (Sebastian Falbesoner)

Pull request description:

  This is a small follow-up to bitcoin#25650 (commit 614d468) with three fixes/improvements:

  - fix "Checksum did not match" detection, which was not adapted to the new `SHA256_SUMS` structure and hence never executed (the list of tarball names isn't directly in the dictionary's values anymore, but has to be extracted from the `'tarball'` field of each value)
  - make both help text and default tag download order deterministic by sorting default tags
  - `--tags` argument help text: add missing space between "for" and "backwards"

ACKs for top commit:
  Sjors:
    tACK 9b5feb7. Tested that if I change a checksum, or remove a release, it catches that.
  josibake:
    tested ACK bitcoin@9b5feb7

Tree-SHA512: 791fa693477eebbda7fd41f3f5ec78fe7eab57df06979aa907ab258a6945534bdc3b931ddfce0fb440c9666b98c88ce5e1b6dc353ed39e129e87d3634855165c
@bitcoin bitcoin locked and limited conversation to collaborators Nov 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants