From 96cda0dd5d1128d3cf52228a9105184f676ec222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Sch=C3=A4fer?= Date: Tue, 22 Oct 2024 10:53:25 +0200 Subject: [PATCH] Add vagrantconfig rule for vagrant format If the format="vagrant" attribute is set, a vagrantconfig section becomes mandatory. This commit enforces this rule on the schema. This Fixes #2666 --- kiwi/schema/kiwi.rnc | 7 +++++++ kiwi/schema/kiwi.rng | 3 +++ 2 files changed, 10 insertions(+) diff --git a/kiwi/schema/kiwi.rnc b/kiwi/schema/kiwi.rnc index 8224862a7f..ae927af91e 100644 --- a/kiwi/schema/kiwi.rnc +++ b/kiwi/schema/kiwi.rnc @@ -1426,6 +1426,13 @@ div { "image types: $types" ] ] + sch:rule [ + context = "type[@format='vagrant']" + sch:assert [ + test = "vagrantconfig[@provider]" + " section is required for the vagrant format" + ] + ] ] sch:pattern [ abstract = "true" diff --git a/kiwi/schema/kiwi.rng b/kiwi/schema/kiwi.rng index 89f9d2421d..a9966f26cb 100644 --- a/kiwi/schema/kiwi.rng +++ b/kiwi/schema/kiwi.rng @@ -2165,6 +2165,9 @@ volume management system $attr attribute must be set for the following image types: $types + + <vagrantconfig> section is required for the vagrant format +