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/fat32/BUILD.bazel b/osbase/fat32/BUILD.bazel
new file mode 100644
index 0000000..d9aec3d
--- /dev/null
+++ b/osbase/fat32/BUILD.bazel
@@ -0,0 +1,37 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+load("//osbase/test/ktest:ktest.bzl", "ktest")
+
+go_library(
+    name = "fat32",
+    srcs = [
+        "dos83.go",
+        "fat32.go",
+        "structs.go",
+        "utils.go",
+    ],
+    importpath = "source.monogon.dev/osbase/fat32",
+    visibility = ["//visibility:public"],
+)
+
+go_test(
+    name = "fat32_test",
+    srcs = [
+        "fsck_test.go",
+        "linux_test.go",
+        "structs_test.go",
+    ],
+    data = ["@com_github_dosfstools_dosfstools//:fsck"],
+    embed = [":fat32"],
+    deps = [
+        "@com_github_stretchr_testify//assert",
+        "@com_github_stretchr_testify//require",
+        "@io_bazel_rules_go//go/runfiles:go_default_library",
+        "@org_golang_x_mod//semver",
+        "@org_golang_x_sys//unix",
+    ],
+)
+
+ktest(
+    cmdline = "ramdisk_size=266240",
+    tester = ":fat32_test",
+)