treewide: add product info to OCI OS images

Add the product info to the OCI OS image config.

Change-Id: I70c572f2698c8d8bb0edc0ba969d8c6b37ae4c00
Reviewed-on: https://review.monogon.dev/c/monogon/+/4193
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/osbase/build/mkoci/def.bzl b/osbase/build/mkoci/def.bzl
index f7f491d..8b688a7 100644
--- a/osbase/build/mkoci/def.bzl
+++ b/osbase/build/mkoci/def.bzl
@@ -1,6 +1,10 @@
 def _oci_os_image_impl(ctx):
     inputs = []
     arguments = []
+
+    inputs.append(ctx.file.product_info)
+    arguments += ["-product_info", ctx.file.product_info.path]
+
     for name, label in ctx.attr.srcs.items():
         files = label[DefaultInfo].files.to_list()
         if len(files) != 1:
@@ -42,6 +46,13 @@
         Build an OS image OCI artifact.
     """,
     attrs = {
+        "product_info": attr.label(
+            doc = """
+                Product info of the OS in JSON format.
+            """,
+            mandatory = True,
+            allow_single_file = True,
+        ),
         "srcs": attr.string_keyed_label_dict(
             doc = """
                 Payloads to include in the OCI artifact.