metropolis/node: generate OCI index

This adds a multi-architecture OCI index target for metropolis. mkoci is
extended to add the platform to the index.json. Product info is extended
to add the PlatformOS field, which mkoci puts into the platform.

The OCI spec requires the os field of the platform to be set. We don't
need this field so we could simply put "unknown" there, but I think
"uefi" is nicer. Registry UIs display the os and architecture fields.

Change-Id: I24acf3c01201b50238abd30cfd86da2eda43c1d9
Reviewed-on: https://review.monogon.dev/c/monogon/+/4477
Tested-by: Jenkins CI
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
diff --git a/osbase/build/genproductinfo/defs.bzl b/osbase/build/genproductinfo/defs.bzl
index c484bbb..f2dde7c 100644
--- a/osbase/build/genproductinfo/defs.bzl
+++ b/osbase/build/genproductinfo/defs.bzl
@@ -12,6 +12,7 @@
     args.add("-id", ctx.attr.os_id)
     args.add("-architecture", ctx.attr.architecture)
     args.add("-build_flags", "-".join(ctx.attr.build_flags))
+    args.add("-platform_os", ctx.attr.platform_os)
     args.add_all(ctx.attr.components, before_each = "-component")
     ctx.actions.run(
         mnemonic = "GenProductInfo",
@@ -29,6 +30,7 @@
         "os_name": attr.string(mandatory = True),
         "os_id": attr.string(mandatory = True),
         "stamp_var": attr.string(mandatory = True),
+        "platform_os": attr.string(default = "unknown"),
         "components": attr.string_list(),
         "out_os_release": attr.output(
             mandatory = True,