Skip to content
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

Can Please confirm if md5 checksum is validated properly? #141

Open
mikzuit opened this issue May 14, 2022 · 5 comments
Open

Can Please confirm if md5 checksum is validated properly? #141

mikzuit opened this issue May 14, 2022 · 5 comments
Labels

Comments

@mikzuit
Copy link

mikzuit commented May 14, 2022

I been trying to build from https://osmc.tv/download/ images but constantly give me the output bellow. Even though I checked with wget after donwloaded the img.gz and check the md5 they matched successfully , so is not the website md5.

command used:

docker run \
  --rm \
  --privileged \
  -v /dev:/dev \
  -v ${PWD}:/build:ro \
  -v ${PWD}/packer_cache:/build/packer_cache \
  -v ${PWD}/output-arm-image:/build/output-arm-image \
  ghcr.io/solo-io/packer-plugin-arm-image build samples/raspbian_golang.json

snippet of my builder:

"builders": [{
    "type": "arm-image",
    "image_type":"raspberrypi",
    "iso_url": "https://ftp.fau.de/osmc/osmc/download/installers/diskimages/OSMC_TGT_rbp2_20220314.img.gz",
    "iso_checksum": "md5:175b87851dbf1143df351cfb4134dbdd",
    "target_image_size": 4294967296
  }],  

output recceived:

==> arm-image: error downloading Image: [Checksums did not match for /build/packer_cache/1a719beb123cb2282c07f70f69d7bfe8b39c9487.iso.
==> arm-image: Expected: 28a8495c4da0ece10c8b12f0be6eb5f0
==> arm-image: Got: 175b87851dbf1143df351cfb4134dbdd
==> arm-image: *md5.digest]
Build 'arm-image' errored after 1 minute 43 seconds: error downloading Image: [Checksums did not match for /build/packer_cache/1a719beb123cb2282c07f70f69d7bfe8b39c9487.iso.
Expected: 28a8495c4da0ece10c8b12f0be6eb5f0
Got: 175b87851dbf1143df351cfb4134dbdd
*md5.digest]

expected output:

successfuly build

thanks

@yuval-k
Copy link
Member

yuval-k commented May 21, 2022

the message says expected 28a8495c4da0ece10c8b12f0be6eb5f0... where is that coming from?

@mikzuit
Copy link
Author

mikzuit commented May 22, 2022

I can only asume:

  1. From OSMC's website , returned a bad checksum , but i try with wget and it return the proper hash.
  2. From the plugin, (packer-plugin-arm) . I have only seen examples with the builder and checksum sha256 , will check tomorrow another img using a md5.
  3. Is docker in any way corrupting the md5 ?

@yuval-k
Copy link
Member

yuval-k commented May 22, 2022

the checksum 175b87851dbf1143df351cfb4134dbdd looks correct in the OSMC website.
The message says expected 28a8495c4da0ece10c8b12f0be6eb5f0 this usually means someone told packer to expect this hash... maybe it is in one of the config files?

@mikzuit
Copy link
Author

mikzuit commented May 22, 2022

the checksum 175b87851dbf1143df351cfb4134dbdd looks correct in the OSMC website. The message says expected 28a8495c4da0ece10c8b12f0be6eb5f0 this usually means someone told packer to expect this hash... maybe it is in one of the config files?

If I run a search for that hash (28a8495c4da0ece10c8b12f0be6eb5f0) nothing found on the project codebase.

what is this line telling?
==> arm-image: error downloading Image: [Checksums did not match for /tmp/getter2272480967/temp.

After searching inside a container with set overriding --entrypoint "bin/bash" I cannot either find anything related to "28a8495c4da0ece10c8b12f0be6eb5f0"

@yuval-k
Copy link
Member

yuval-k commented Jul 10, 2022

i'm not 100% sure, the part the downloads the images is re-used from upstream packet...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants