New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export function DownloadFileHash #5370

Merged
merged 2 commits into from Dec 19, 2018

Conversation

2 participants
@monstermunchkin
Copy link
Member

monstermunchkin commented Dec 19, 2018

Remove DownloadFileSha{256,512}, and export DownloadFileHash. This
removes the restriction of only using sha256 and sha512.

Signed-off-by: Thomas Hipp thomas.hipp@canonical.com

@stgraber

This comment has been minimized.

Copy link
Member

stgraber commented Dec 19, 2018

I think we should rename downloadFileSha to DownloadFileHash and remove the hash specific functions from shared, porting all our code to just calling DownloadFileHash with the expected hash as argument.

@monstermunchkin what do you think?

@monstermunchkin monstermunchkin force-pushed the monstermunchkin:features/md5-checksum branch from b663361 to 7966cca Dec 19, 2018

@monstermunchkin

This comment has been minimized.

Copy link
Member

monstermunchkin commented Dec 19, 2018

That makes sense. I updated the code.

@monstermunchkin monstermunchkin changed the title shared/util: Add DownloadFileMd5 Export function DownloadFileHash Dec 19, 2018

monstermunchkin added some commits Dec 19, 2018

shared/util: Export DownloadFileHash
Remove DownloadFileSha{256,512}, and export DownloadFileHash. This
removes the restriction of only using sha256 and sha512.
If no hash function is provided, the checksum is ignored.

Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>
client: Use exported DownloadFileHash
Signed-off-by: Thomas Hipp <thomas.hipp@canonical.com>

@monstermunchkin monstermunchkin force-pushed the monstermunchkin:features/md5-checksum branch from 7966cca to 352fd8b Dec 19, 2018

@monstermunchkin

This comment has been minimized.

Copy link
Member

monstermunchkin commented Dec 19, 2018

I also added the option to omit a hash function in which case the checksum is ignored. This is useful for distrobuilder.

@stgraber

This comment has been minimized.

Copy link
Member

stgraber commented Dec 19, 2018

Failures are unrelated, I sent a branch to fix that, once confirmed we can retry and land this one.

@stgraber

This comment has been minimized.

Copy link
Member

stgraber commented Dec 19, 2018

jenkins: test this please

@stgraber stgraber merged commit da77c8a into lxc:master Dec 19, 2018

4 of 5 checks passed

Testsuite Testsuite failed
Details
Branch target Branch target is correct
Details
DCO All commits signed-off
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment