From cbf19d13195ec00f58afe9267bb2029e17f4a723 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Tue, 9 Jun 2020 16:58:59 +0200 Subject: [PATCH] distro/rhel8: label the build root We require the right SELinux labels to be set on some of the tools we use, make sure the policy is installed and the labels applied in the buildroot, in the same way as in the target image. Signed-off-by: Tom Gundersen --- internal/distro/rhel8/distro.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/distro/rhel8/distro.go b/internal/distro/rhel8/distro.go index 3fb65bee9..88116cb25 100644 --- a/internal/distro/rhel8/distro.go +++ b/internal/distro/rhel8/distro.go @@ -304,6 +304,7 @@ func (t *imageType) pipeline(c *blueprint.Customizations, options distro.ImageOp func (t *imageType) buildPipeline(repos []rpmmd.RepoConfig, arch architecture, buildPackageSpecs []rpmmd.PackageSpec) *osbuild.Pipeline { p := &osbuild.Pipeline{} p.AddStage(osbuild.NewRPMStage(t.rpmStageOptions(arch, repos, buildPackageSpecs))) + p.AddStage(osbuild.NewSELinuxStage(t.selinuxStageOptions())) return p } @@ -865,6 +866,7 @@ func New() distro.Distro { "policycoreutils", "python36", "qemu-img", + "selinux-policy-targeted", "systemd", "tar", "xfsprogs",