treewide: replace datafile pkg with rules_go/runfiles pkg

rules_go/runfiles provides the same functionality as our datafile
package. This change also contains some specifics for the now active
bzlmod, which replaces all WORKSPACE related behaviour. As example the
WORKSPACE name is now always set to _main.


Change-Id: I1a69c72b479330a627b402135670f218c297906f
Reviewed-on: https://review.monogon.dev/c/monogon/+/2745
Tested-by: Jenkins CI
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
diff --git a/metropolis/test/launch/cluster/cluster.go b/metropolis/test/launch/cluster/cluster.go
index 06b928b..fd69b77 100644
--- a/metropolis/test/launch/cluster/cluster.go
+++ b/metropolis/test/launch/cluster/cluster.go
@@ -25,6 +25,7 @@
 	"syscall"
 	"time"
 
+	"github.com/bazelbuild/rules_go/go/runfiles"
 	"github.com/cenkalti/backoff/v4"
 	"go.uber.org/multierr"
 	"golang.org/x/net/proxy"
@@ -39,7 +40,6 @@
 	cpb "source.monogon.dev/metropolis/proto/common"
 
 	metroctl "source.monogon.dev/metropolis/cli/metroctl/core"
-	"source.monogon.dev/metropolis/cli/pkg/datafile"
 	"source.monogon.dev/metropolis/node"
 	"source.monogon.dev/metropolis/node/core/identity"
 	"source.monogon.dev/metropolis/node/core/rpc"
@@ -130,7 +130,7 @@
 	}
 
 	// Initialize the node's storage with a prebuilt image.
-	si, err := datafile.ResolveRunfile("metropolis/node/image.img")
+	si, err := runfiles.Rlocation("_main/metropolis/node/image.img")
 	if err != nil {
 		return nil, fmt.Errorf("while resolving a path: %w", err)
 	}
@@ -141,7 +141,7 @@
 	}
 
 	// Initialize the OVMF firmware variables file.
-	sv, err := datafile.ResolveRunfile("external/edk2/OVMF_VARS.fd")
+	sv, err := runfiles.Rlocation("edk2/OVMF_VARS.fd")
 	if err != nil {
 		return nil, fmt.Errorf("while resolving a path: %w", err)
 	}
@@ -155,7 +155,7 @@
 	if err := os.Mkdir(tpmt, 0o755); err != nil {
 		return nil, fmt.Errorf("while creating the TPM directory: %w", err)
 	}
-	tpms, err := datafile.ResolveRunfile("metropolis/node/tpm")
+	tpms, err := runfiles.Rlocation("_main/metropolis/node/tpm")
 	if err != nil {
 		return nil, fmt.Errorf("while resolving a path: %w", err)
 	}
@@ -165,7 +165,7 @@
 	}
 	for _, file := range tpmf {
 		name := file.Name()
-		src, err := datafile.ResolveRunfile(filepath.Join(tpms, name))
+		src, err := runfiles.Rlocation(filepath.Join(tpms, name))
 		if err != nil {
 			return nil, fmt.Errorf("while resolving a path: %w", err)
 		}