osbuild: Add "labels" field into the SELinux stage

The SELinux stage supports labeling specific files with specific labels
like this:
7b0db90c76/stages/org.osbuild.selinux (L37)

This can be useful for preventing some SELinux issues during the image
build. You can find example usage here:
7b0db90c76/test/data/stages/selinux/test_basic.json (L5)

And more reasoning here:
e80130a830
This commit is contained in:
Martin Sehnoutka 2020-06-29 10:43:08 +02:00 committed by Tom Gundersen
parent 636b761b6b
commit f8f35016d6

View file

@ -5,7 +5,8 @@ package osbuild
// A file contexts configuration file is sepcified that describes
// the filesystem labels to apply to the image.
type SELinuxStageOptions struct {
FileContexts string `json:"file_contexts"`
FileContexts string `json:"file_contexts"`
Labels map[string]string `json:"labels,omitempty"`
}
func (SELinuxStageOptions) isStageOptions() {}