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 <teg@jklm.no>
This commit is contained in:
Tom Gundersen 2020-06-09 16:58:59 +02:00 committed by Lars Karlitski
parent 5c3f4193e5
commit cbf19d1319

View file

@ -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",