Skip to content

Commit

Permalink
Ensure FIPS files are added to the build
Browse files Browse the repository at this point in the history
Make sure the FIPS files are always added to the build
when needed.

Fixes: #407

Signed-off-by: Miguel Martín <[email protected]>
  • Loading branch information
mmartinv committed Jan 29, 2024
1 parent 9f3c548 commit 0c543b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/manifest/os.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,6 @@ func (p *OS) serialize() osbuild.Pipeline {
Kernel: []string{p.kernelVer},
AddModules: []string{"fips"},
}))
p.Files = append(p.Files, osbuild.GenFIPSFiles()...)
}

if !p.KernelOptionsBootloader {
Expand Down Expand Up @@ -727,6 +726,7 @@ func (p *OS) serialize() osbuild.Pipeline {
}

if p.FIPS {
p.Files = append(p.Files, osbuild.GenFIPSFiles()...)
for _, stage := range osbuild.GenFIPSStages() {
pipeline.AddStage(stage)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/manifest/ostree_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {

if p.FIPS {
kernelOpts = append(kernelOpts, osbuild.GenFIPSKernelOptions(p.PartitionTable)...)
p.Files = append(p.Files, osbuild.GenFIPSFiles()...)
}

var ref string
Expand Down Expand Up @@ -408,6 +407,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
}

if p.FIPS {
p.Files = append(p.Files, osbuild.GenFIPSFiles()...)
for _, stage := range osbuild.GenFIPSStages() {
stage.MountOSTree(p.osName, ref, 0)
pipeline.AddStage(stage)
Expand Down

0 comments on commit 0c543b0

Please sign in to comment.