Page MenuHomePhabricator

Add a script to generate sha256sums from Gitian output
ClosedPublic

Authored by jasonbcox on Sat, Jan 11, 01:07.

Details

Summary

Currently, the sha256sums files are assembled by hand (copy-pasting the hash results from the Gitian build).
This patch introduces make-sha256sums.sh to do this automatically.

Test Plan
make-sha256sums.sh -h
make-sha256sums.sh    # errors as expected
make-sha256sums.sh [path to some gitian output]
make-sha256sums.sh path/to/0.20.9 > jasonbcox-sha256sums.0.20.9

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jasonbcox created this revision.Sat, Jan 11, 01:07
Herald added a reviewer: Restricted Project. · View Herald TranscriptSat, Jan 11, 01:07
Fabien requested changes to this revision.Sat, Jan 11, 06:18
Fabien added a subscriber: Fabien.
Fabien added inline comments.
contrib/release/make-sha256sums.sh
33 ↗(On Diff #15324)

Since there is no version number in the res.yml anymore the wildcard is not required.
On the grep side I would rather use a non greedy approach:
bitcoin-abc-.*-linux.([0-9]+\.){3}.tar.gz (not sure the syntax is grep compliant).

This revision now requires changes to proceed.Sat, Jan 11, 06:18
jasonbcox added inline comments.Sat, Jan 11, 16:39
contrib/release/make-sha256sums.sh
33 ↗(On Diff #15324)

On the contrary, I wanted this script to work for old releases until we get one or two new ones out. It allows me to easily test the script, etc.

I can make it less greedy though.

jasonbcox added inline comments.Sat, Jan 11, 16:43
contrib/release/make-sha256sums.sh
33 ↗(On Diff #15324)

Also note that the pattern you gave will greedily match, so not really working as intended:
"0.20.10" will match as (0.20.)(1)(0) or something similar. I think I'll just use what I did above [0-9.]*

While I don't have anything against that patch per se, it seems somewhat questionable that the signing process that core used was ditched in favor of something that clearly requires work.

jasonbcox updated this revision to Diff 15341.Sat, Jan 11, 16:49

Make the patterns less greedy by including a weak requirement for version number

Fabien accepted this revision.Tue, Jan 14, 11:22
This revision is now accepted and ready to land.Tue, Jan 14, 11:22

While I don't have anything against that patch per se, it seems somewhat questionable that the signing process that core used was ditched in favor of something that clearly requires work.

Core's process makes many assumptions that do not patch over to ours well. It will take some time to reconcile these before our process closely matches theirs. In the mean time, this saves us time on every release.

This revision was automatically updated to reflect the committed changes.