stages/rpm: add format version 2 support

Explicitly declare the schema for version 2. Notable differences
are the declaration of the `packages` input as well is the lack
of that property in `options`.
This commit is contained in:
Christian Kellner 2021-02-10 17:53:02 +00:00
parent b05b9ba508
commit ae33d37698

View file

@ -79,6 +79,32 @@ SCHEMA = """
"""
SCHEMA_2 = """
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"gpgkeys": {
"description": "Array of GPG key contents to import",
"type": "array",
"items": { "type": "string" }
}
}
},
"inputs": {
"type": "object",
"additionalProperties": false,
"required": ["packages"],
"properties": {
"packages": {
"type": "object",
"additionalProperties": true
}
}
}
"""
def generate_package_metadata(tree):
query = r"""\{
"name": "%{NAME}",