metropolis: replace version stamp with product info

This removes the stamped metropolis version library and the associated
stampgo infrastructure, and replaces it with the product info file.

The info is now stored in a separate file in the rootfs, instead of
embedded in the core binary. This has the benefit that the core binary
no longer needs to be relinked when stamping info changes.

The version logging in core/main, and the tconsole are updated to show
some of the additional info from the product info.

Change-Id: Ic5ed0e3598e8da71b96748e8d7abfedff41acd3f
Reviewed-on: https://review.monogon.dev/c/monogon/+/4207
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/metropolis/node/kubernetes/reconciler/reconciler_status_test.go b/metropolis/node/kubernetes/reconciler/reconciler_status_test.go
index f9d839f..1f17e69 100644
--- a/metropolis/node/kubernetes/reconciler/reconciler_status_test.go
+++ b/metropolis/node/kubernetes/reconciler/reconciler_status_test.go
@@ -15,26 +15,28 @@
 	"source.monogon.dev/metropolis/node/core/consensus/client"
 	"source.monogon.dev/metropolis/node/core/curator"
 	ppb "source.monogon.dev/metropolis/node/core/curator/proto/private"
+	"source.monogon.dev/metropolis/node/core/productinfo"
 	cpb "source.monogon.dev/metropolis/proto/common"
-	mversion "source.monogon.dev/metropolis/version"
 	"source.monogon.dev/osbase/supervisor"
 	"source.monogon.dev/version"
 	vpb "source.monogon.dev/version/spec"
 )
 
+var productInfo = productinfo.Get()
+
 // TestMinimumReleasesNotAboveMetropolisRelease tests that minimum releases
 // are not above the metropolis release itself, because that would cause
 // things to get stuck.
 func TestMinimumReleasesNotAboveMetropolisRelease(t *testing.T) {
-	if version.ReleaseLessThan(mversion.Version.Release, minReconcilerRelease) {
+	if version.ReleaseLessThan(productInfo.Version.Release, minReconcilerRelease) {
 		t.Errorf("Metropolis release %s is below the minimum reconciler release %s",
-			version.Semver(mversion.Version),
+			version.Semver(productInfo.Version),
 			version.Release(minReconcilerRelease),
 		)
 	}
-	if version.ReleaseLessThan(mversion.Version.Release, minApiserverRelease) {
+	if version.ReleaseLessThan(productInfo.Version.Release, minApiserverRelease) {
 		t.Errorf("Metropolis release %s is below the minimum apiserver release %s",
-			version.Semver(mversion.Version),
+			version.Semver(productInfo.Version),
 			version.Release(minApiserverRelease),
 		)
 	}
@@ -115,10 +117,13 @@
 // will time out if WaitReady fails to return when it is supposed to.
 func TestWaitReady(t *testing.T) {
 	cl := startEtcd(t)
+	s := Service{
+		Etcd: cl,
+	}
 
 	isReady := make(chan struct{})
 	supervisor.TestHarness(t, func(ctx context.Context) error {
-		err := WaitReady(ctx, cl)
+		err := s.WaitReady(ctx)
 		if err != nil {
 			t.Error(err)
 		}
@@ -163,7 +168,7 @@
 		Version: &vpb.Version{
 			Release: &vpb.Version_Release{Major: 10000, Minor: 0, Patch: 0},
 		},
-		MinimumCompatibleRelease: mversion.Version.Release,
+		MinimumCompatibleRelease: productInfo.Version.Release,
 	})
 
 	<-isReady
@@ -263,7 +268,7 @@
 	waitForActions := func() {
 		isReady := make(chan struct{})
 		supervisor.TestHarness(t, func(ctx context.Context) error {
-			err := WaitReady(ctx, cl)
+			err := s.WaitReady(ctx)
 			if err != nil {
 				t.Error(err)
 			}