[Bug 261082] branch 2022Q1 , net-mgmt/prometheus2 checksum error

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 10 Jan 2022 11:13:16 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261082

--- Comment #1 from David O'Rourke <dor.bsd@xm0.uk> ---
Hi,

Unfortunately this is because GitHub archives are not fit for purpose.

Specifically, the issue here is that GitHub archives are generated on the fly
by `git archive` and then cached for some period of time. `git archive` does a
number of things outside of just generating the archives (tar.gz), such as
search and replace in files for specific format strings.

In this case, the string causing the problem is at
https://github.com/containerd/containerd/blob/v1.5.4/vendor/k8s.io/client-go/pkg/version/base.go#L58.

It feels like there are GitHub backends running different versions of Git, so
each of them is generating slightly different strings for that file (some
generate a hash with N characters, others a hash with N-1 characters), which
obviously means we get conflicting checksums on the final generated archive
sometimes. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258724#c2 for
an example of what's being generated.

Future versions of containerd (1.6.0+) fix this by using a newer version of the
client-go dependency which uses the full version of the commit hash (%H)
instead of an abbreviated version (%h).

For now, it's probably best to just fix the checksum locally for your build as
I'm not sure what my options for fixing this in a more permanent way are, and
if I "fix" the port now, I'll just have "fix" it again when GitHub decides its
time to break things once again.

-David

-- 
You are receiving this mail because:
You are the assignee for the bug.