From 8d0d7106c54e9773cf0db7b8701fa6c8165d2cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Mon, 7 Jul 2025 10:35:58 +0200 Subject: [PATCH] Always set rhsm.Facts when generating manifests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make sure that images built by ibcli have correct rhsm.Facts set for distributions that set it (this is handled by the distro definition, not by the caller of the manifest generator). Signed-off-by: Tomáš Hozza --- cmd/image-builder/manifest.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/image-builder/manifest.go b/cmd/image-builder/manifest.go index 5e14637..0681aab 100644 --- a/cmd/image-builder/manifest.go +++ b/cmd/image-builder/manifest.go @@ -13,6 +13,7 @@ import ( "github.com/osbuild/images/pkg/manifestgen" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/ostree" + "github.com/osbuild/images/pkg/rhsm/facts" "github.com/osbuild/images/pkg/sbom" "github.com/osbuild/image-builder-cli/internal/blueprintload" @@ -91,12 +92,11 @@ func generateManifest(dataDir string, extraRepos []string, img *imagefilter.Resu if err != nil { return err } - var imgOpts *distro.ImageOptions - if opts.Ostree != nil || opts.Subscription != nil { - imgOpts = &distro.ImageOptions{ - OSTree: opts.Ostree, - Subscription: opts.Subscription, - } + + imgOpts := &distro.ImageOptions{ + Facts: &facts.ImageOptions{APIType: facts.IBCLI_APITYPE}, + OSTree: opts.Ostree, + Subscription: opts.Subscription, } return mg.Generate(bp, img.Distro, img.ImgType, img.Arch, imgOpts)