treewide: remove qemu build
We aren't bundling it right now and it is fairly out of date. Let's kick
it out until we need it, then reengineer the build.
Change-Id: I5362616922d4b9d3e971868636f3792e33880f7a
Reviewed-on: https://review.monogon.dev/c/monogon/+/3568
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/go/qcow2/BUILD.bazel b/go/qcow2/BUILD.bazel
index c4806eb..88f257e 100644
--- a/go/qcow2/BUILD.bazel
+++ b/go/qcow2/BUILD.bazel
@@ -3,19 +3,12 @@
go_library(
name = "qcow2",
srcs = ["qcow2.go"],
- data = [
- "@qemu//:qemu-img",
- ],
importpath = "source.monogon.dev/go/qcow2",
visibility = ["//visibility:public"],
- x_defs = {
- "xQemuImgPath": "$(rlocationpath @qemu//:qemu-img )",
- },
)
go_test(
name = "qcow2_test",
srcs = ["qcow2_test.go"],
embed = [":qcow2"],
- deps = ["@io_bazel_rules_go//go/runfiles:go_default_library"],
)
diff --git a/go/qcow2/qcow2_test.go b/go/qcow2/qcow2_test.go
index 9dc230a..cff77ac 100644
--- a/go/qcow2/qcow2_test.go
+++ b/go/qcow2/qcow2_test.go
@@ -6,29 +6,8 @@
"os/exec"
"path/filepath"
"testing"
-
- "github.com/bazelbuild/rules_go/go/runfiles"
)
-var (
- // These are filled by bazel at linking time with the canonical path of
- // their corresponding file. Inside the init function we resolve it
- // with the rules_go runfiles package to the real path.
- xQemuImgPath string
-)
-
-func init() {
- var err error
- for _, path := range []*string{
- &xQemuImgPath,
- } {
- *path, err = runfiles.Rlocation(*path)
- if err != nil {
- panic(err)
- }
- }
-}
-
// TestGenerate exercises the Generate function for a variety of image sizes.
func TestGenerate(t *testing.T) {
// Test all orders of magnitude from 1KiB to 1PiB.
@@ -47,7 +26,7 @@
t.Fatalf("Close: %v", err)
}
- cmd := exec.Command(xQemuImgPath, "check", path)
+ cmd := exec.Command("qemu-img", "check", path)
if err := cmd.Run(); err != nil {
t.Fatalf("qemu-img check failed: %v", err)
}