We’re mirroring the hashicorp debian repository for bionic and focal with aptly. aptly complains
Downloading https://apt.releases.hashicorp.com/pool/amd64/main/terraform_0.13.4-2_amd64.deb…
ERROR: unable to update: download errors:
https://apt.releases.hashicorp.com/pool/amd64/main/terraform_0.13.4-2_amd64.deb: size check mismatch 34880812 != 34880754
also the checksum as stated in Packages.bz2 does not match the checksum of the terraform executable
Can this be repaired in the repo
the executable doesn’t seem to work either
gm-rc3-jumphost01@marcel.kuiper/tmp$ file tf
tf: Debian binary package (format 2.0)
gm-rc3-jumphost01@marcel.kuiper/tmp$ ./tf version
./tf: line 1: syntax error near unexpected token newline' ./tf: line 1:
!’
Hi @puikerduiker,
I focused on your second post here first, because I’m not familiar with aptly and so I’m not sure how to understand the error messages you shared from it, but I was at least able to try to reproduce what you saw while working with the .deb
file.
I downloaded the .deb
file and extracted its contents using the following, just so I’d be able to inspect what was inside without actually installing it:
dpkg-deb -x ~/Downloads/terraform_0.13.4-2_amd64.deb terraform_0.14.4-2_deb
That left me with the Terraform executable at terraform_0.14.4-2_deb/usr/bin/terraform
:
$ file terraform_0.14.4-2_deb/usr/bin/terraform
terraform_0.14.4-2_deb/usr/bin/terraform: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=vwo6OWtPk0mcdQEXzQft/7lomANprcxmzPvXaMvnt/TYzlc6iA7L1AvLyTYsY3/yyE0aPAO60bfoKoUakJi, not stripped
In my case then, the executable inside the package does seem to be a valid executable.
The result you saw where file
said that it was a Debian binary package seems confusing. I do get a similar result (as expected) if I ask file
to identify the .deb
file I downloaded:
terraform_0.13.4-2_amd64.deb: Debian binary package (format 2.0), with control.tar.gz, data compression gz/
…although mine gave a little more information and I’m not sure if that’s just because I might be using a different distribution version which therefore has a different magic
database for file
to refer to.
Can you share the steps you followed to get that tf
file you were trying to execute? I’d like to try again to reproduce what you saw.
You are absolutely right. My bad.
ANyway the point in my first post was valid. When i downloaded curl https://apt.releases.hashicorp.com/dists/bionic/main/binary-amd64/Packages and looked up the size and checksum of terradorm-0.13.4-2.deb it differed from the actual size and checksum of the .deb file
However today these match again. The .deb file has changed as well since yesterday as its size changed from 34880812 to 34880798 in the repo. So someone or some proces did some repairing.
Thanks