stages/oscap.autotailor: make profile id required

According to `autotailor(8)` arguments passed in via the cli take
precedence over the JSON tailoring file contents.

Make the `new_profile` a required field for the json tailoring too and
pass it as an option to the `autotailor` command. This approach has some
trade-offs. It allows us to maintain the explicitness of the manifest
that is consumed by `osbuild`. The downside is that it will override the
profile id that is set by the user in the JSON tailoring file.
This commit is contained in:
Gianluca Zuccarelli 2024-05-29 10:55:21 +01:00 committed by Sanne Raymaekers
parent 2a28acbc85
commit 92bb161501
5 changed files with 18 additions and 4 deletions

View file

@ -902,6 +902,7 @@
"filepath": "/usr/share/osbuild/oscap/tailoring.xml",
"config": {
"datastream": "/usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml",
"tailored_profile_id": "ospp_osbuild_tailoring",
"tailoring_file": "/json-tailoring.json"
}
}

View file

@ -76,4 +76,5 @@ pipelines:
filepath: /usr/share/osbuild/oscap/tailoring.xml
config:
datastream: /usr/share/xml/scap/ssg/content/ssg-fedora-ds.xml
tailored_profile_id: "ospp_osbuild_tailoring"
tailoring_file: /json-tailoring.json