Skip to content

Commit

Permalink
ostree: Fix target imgref
Browse files Browse the repository at this point in the history
If we haven't been passed an ostree remote, don't use it for
verification; just use `ostree-unverified-image` which matches
containers/bootc@20d2d6c
  • Loading branch information
cgwalters committed Jan 16, 2024
1 parent 75781e2 commit c8bb519
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pkg/manifest/ostree_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,19 @@ func (p *OSTreeDeployment) doOSTreeContainerSpec(pipeline *osbuild.Pipeline, rep
cont := *p.containerSpec
ref := p.ref

var targetImgref string
// The ostree-remote case is unusual; it may be used by FCOS/Silverblue for example to handle
// embedded GPG signatures
if p.Remote.Name != "" {
targetImgref = fmt.Sprintf("ostree-remote-registry:%s:%s", p.Remote.Name, p.containerSpec.Source)
} else {
targetImgref = fmt.Sprintf("ostree-unverified-registry:%s", p.containerSpec.Source)
}

options := &osbuild.OSTreeDeployContainerStageOptions{
OsName: p.osName,
KernelOpts: p.KernelOptionsAppend,
// NOTE: setting the target imgref to be the container source but
// we should make this configurable
TargetImgref: fmt.Sprintf("ostree-remote-registry:%s:%s", p.Remote.Name, p.containerSpec.Source),
OsName: p.osName,
KernelOpts: p.KernelOptionsAppend,
TargetImgref: targetImgref,
Mounts: []string{"/boot", "/boot/efi"},
Rootfs: &osbuild.Rootfs{
Label: "root",
Expand Down

0 comments on commit c8bb519

Please sign in to comment.