Build mkfs.xfs using rules_cc
This drops the old big genrule for mkfs.xfs and replaces it with a nice rules_cc build system
with the help of bazel_cc_fix generated patches and our musl-based toolchain.
While we're at it I bumped the versions of all related dependencies to their latest stable release.
This also means pulling in ini.h which is a dependency of the new xfstools version.
Instructions to regenerate the patches are included in the spec files.
Toolchain selection is done by the existing transition in our rootfs rule so we automatically get a musl-built
static binary when building for the rootfs.
Test Plan: Tested with E2E tests, should fail fairly catastrophically if something were wrong.
X-Origin-Diff: phab/D708
GitOrigin-RevId: 648a05cdd08cfa84a8a9f4c057c52446e7005631
diff --git a/metropolis/pkg/fsquota/BUILD.bazel b/metropolis/pkg/fsquota/BUILD.bazel
index f4e11d3..dbeb19b 100644
--- a/metropolis/pkg/fsquota/BUILD.bazel
+++ b/metropolis/pkg/fsquota/BUILD.bazel
@@ -29,11 +29,8 @@
ktest(
cmdline = "ramdisk_size=51200",
- initramfs_extra = """
-file /mkfs.xfs $(location //third_party/xfsprogs:mkfs.xfs) 0755 0 0
- """,
+ files_cc = {
+ "@xfsprogs//:mkfs": "/mkfs.xfs",
+ },
tester = ":go_default_test",
- deps = [
- "//third_party/xfsprogs:mkfs.xfs",
- ],
)