diff --git a/.gitignore b/.gitignore index 6c20baf6..fe291c82 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ tests/data/repo-krb5-lookaside tests/_composes htmlcov/ .coverage +.eggs .idea/ .tox .venv diff --git a/doc/configuration.rst b/doc/configuration.rst index a199d956..4600e69b 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1451,6 +1451,7 @@ Live Media Settings * ``repo`` (*str|[str]*) -- repos specified by URL or variant UID * ``title`` (*str*) * ``install_tree_from`` (*str*) -- variant to take install tree from + * ``nomacboot`` (*bool*) Image Build Settings diff --git a/pungi/checks.py b/pungi/checks.py index 81c11699..a08b5638 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -981,6 +981,7 @@ def make_schema(): "arches": {"$ref": "#/definitions/list_of_strings"}, "failable": {"$ref": "#/definitions/list_of_strings"}, "release": {"$ref": "#/definitions/optional_string"}, + "nomacboot": {"type": "boolean"}, }, "required": ["name", "kickstart"], "additionalProperties": False, diff --git a/pungi/phases/livemedia_phase.py b/pungi/phases/livemedia_phase.py index 9796418a..f28c68a3 100644 --- a/pungi/phases/livemedia_phase.py +++ b/pungi/phases/livemedia_phase.py @@ -71,6 +71,7 @@ class LiveMediaPhase(PhaseLoggerMixin, ImageConfigMixin, ConfigGuardedPhase): "ksurl": self.get_ksurl(image_conf), "ksversion": image_conf.get("ksversion"), "scratch": image_conf.get("scratch", False), + "nomacboot": image_conf.get("nomacboot", False), "release": self.get_release(image_conf), "skip_tag": image_conf.get("skip_tag"), "name": name, diff --git a/pungi/wrappers/kojiwrapper.py b/pungi/wrappers/kojiwrapper.py index 140b2bfc..b11f5e6f 100644 --- a/pungi/wrappers/kojiwrapper.py +++ b/pungi/wrappers/kojiwrapper.py @@ -391,6 +391,9 @@ class KojiWrapper(object): if "can_fail" in options: cmd.append("--can-fail=%s" % ",".join(options["can_fail"])) + if options.get("nomacboot"): + cmd.append("--nomacboot") + if wait: cmd.append("--wait") diff --git a/tests/test_livemediaphase.py b/tests/test_livemediaphase.py index 7a2b878f..7a406716 100644 --- a/tests/test_livemediaphase.py +++ b/tests/test_livemediaphase.py @@ -60,6 +60,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "Rawhide", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ) @@ -116,6 +117,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "Rawhide", "subvariant": "Server", "failable_arches": ["amd64", "x86_64"], + "nomacboot": False, }, ) ) @@ -178,6 +180,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "Rawhide", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ), @@ -201,6 +204,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "Rawhide", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ), @@ -224,6 +228,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "25", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ), @@ -286,6 +291,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "Rawhide", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ), @@ -309,6 +315,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "Rawhide", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ), @@ -332,6 +339,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "25", "subvariant": "Server", "failable_arches": [], + "nomacboot": False, }, ) ), @@ -423,6 +431,7 @@ class TestLiveMediaPhase(PungiTestCase): "install_tree_from": "Server-optional", "subvariant": "Something", "failable": ["*"], + "nomacboot": True, } ] } @@ -436,6 +445,7 @@ class TestLiveMediaPhase(PungiTestCase): phase.run() self.assertTrue(phase.pool.add.called) + self.assertEqual( phase.pool.queue_put.call_args_list, [ @@ -464,6 +474,7 @@ class TestLiveMediaPhase(PungiTestCase): "version": "25", "subvariant": "Something", "failable_arches": ["x86_64"], + "nomacboot": True, }, ) )