treewide: introduce osbase package and move things around
All except localregistry moved from metropolis/pkg to osbase,
localregistry moved to metropolis/test as its only used there anyway.
Change-Id: If1a4bf377364bef0ac23169e1b90379c71b06d72
Reviewed-on: https://review.monogon.dev/c/monogon/+/3079
Tested-by: Jenkins CI
Reviewed-by: Serge Bazanski <serge@monogon.tech>
diff --git a/osbase/efivarfs/BUILD.bazel b/osbase/efivarfs/BUILD.bazel
new file mode 100644
index 0000000..7f7539f
--- /dev/null
+++ b/osbase/efivarfs/BUILD.bazel
@@ -0,0 +1,32 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+ name = "efivarfs",
+ srcs = [
+ "boot.go",
+ "devicepath.go",
+ "efivarfs.go",
+ "variables.go",
+ ],
+ importpath = "source.monogon.dev/osbase/efivarfs",
+ visibility = ["//visibility:public"],
+ deps = [
+ "//osbase/msguid",
+ "@com_github_google_uuid//:uuid",
+ "@org_golang_x_text//encoding/unicode",
+ ],
+)
+
+go_test(
+ name = "efivarfs_test",
+ srcs = [
+ "boot_test.go",
+ "devicepath_test.go",
+ ],
+ embed = [":efivarfs"],
+ gc_goopts = ["-d=libfuzzer"],
+ deps = [
+ "@com_github_google_go_cmp//cmp",
+ "@com_github_google_uuid//:uuid",
+ ],
+)