From 9bcd219528713c2acb02097d2d405fa7d764effc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Tue, 29 Jun 2021 08:44:45 +0200 Subject: [PATCH] distro/rhel90: make selinux stage the last one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are currently some context mismatches in the image because of the new files from the sysconfig stage. Let's move the selinux stage to the end so we fix them. Signed-off-by: Ondřej Budai --- internal/distro/rhel90/distro.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/distro/rhel90/distro.go b/internal/distro/rhel90/distro.go index 3f29b3564..06998519f 100644 --- a/internal/distro/rhel90/distro.go +++ b/internal/distro/rhel90/distro.go @@ -381,8 +381,6 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp p.AddStage(osbuild.NewZiplStage(&osbuild.ZiplStageOptions{})) } - p.AddStage(osbuild.NewSELinuxStage(t.selinuxStageOptions())) - // These are the current defaults for the sysconfig stage. This can be changed to be image type exclusive if different configs are needed. p.AddStage(osbuild.NewSysconfigStage(&osbuild.SysconfigStageOptions{ Kernel: osbuild.SysconfigKernelOptions{ @@ -424,6 +422,9 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp } } + // SELinux stage should be the last so everything has the right label. + p.AddStage(osbuild.NewSELinuxStage(t.selinuxStageOptions())) + p.Assembler = t.assembler(pt, options, t.arch) return p, nil