build:add journald stage to thel 8/9 pipeline
Adds the new journald stage to rhel 8/9 rpmostree commit pipeline.This will add the dropin file `10-persitent.conf` with the storage option set as persistent. Co-authored-by: Sayan Paul <paul.sayan@gmail.com> Co-authored-by: Irene Diez <idiez@redhat.com> Signed-off-by: Sayan Paul <saypaul@redhat.com>
This commit is contained in:
parent
217cc64425
commit
6f56bee611
2 changed files with 25 additions and 0 deletions
|
|
@ -664,6 +664,19 @@ func osPipeline(t *imageType,
|
|||
}))
|
||||
}
|
||||
|
||||
if t.rpmOstree {
|
||||
p.AddStage(osbuild.NewSystemdJournaldStage(
|
||||
&osbuild.SystemdJournaldStageOptions{
|
||||
Filename: "10-persistent.conf",
|
||||
Config: osbuild.SystemdJournaldConfigDropin{
|
||||
Journal: osbuild.SystemdJournaldConfigJournalSection{
|
||||
Storage: osbuild.StoragePresistent,
|
||||
},
|
||||
},
|
||||
},
|
||||
))
|
||||
}
|
||||
|
||||
// Relabel the tree, unless the `NoSElinux` flag is explicitly set to `true`
|
||||
if imageConfig.NoSElinux == nil || imageConfig.NoSElinux != nil && !*imageConfig.NoSElinux {
|
||||
p.AddStage(osbuild.NewSELinuxStage(selinuxStageOptions(false)))
|
||||
|
|
|
|||
|
|
@ -530,6 +530,18 @@ func (p *OS) serialize() osbuild.Pipeline {
|
|||
}))
|
||||
}
|
||||
|
||||
if p.OSTreeRef != "" {
|
||||
pipeline.AddStage(osbuild.NewSystemdJournaldStage(
|
||||
&osbuild.SystemdJournaldStageOptions{
|
||||
Filename: "10-persistent.conf",
|
||||
Config: osbuild.SystemdJournaldConfigDropin{
|
||||
Journal: osbuild.SystemdJournaldConfigJournalSection{
|
||||
Storage: osbuild.StoragePresistent,
|
||||
},
|
||||
},
|
||||
}))
|
||||
}
|
||||
|
||||
if p.SElinux != "" {
|
||||
pipeline.AddStage(osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
|
||||
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SElinux),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue