From bd64894a03628d52be8cbe89b79ef724293d2053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Mon, 17 Jul 2023 16:09:59 +0200 Subject: [PATCH] ostree: Add configuration for custom runroot packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- doc/configuration.rst | 2 ++ pungi/checks.py | 3 +++ pungi/phases/ostree.py | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/configuration.rst b/doc/configuration.rst index 3912e475..70a0534c 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -1800,6 +1800,8 @@ repository with a new commit. * ``tag_ref`` -- (*bool*, default ``True``) If set to ``False``, a git reference will not be created. * ``ostree_ref`` -- (*str*) To override value ``ref`` from ``treefile``. + * ``runroot_packages`` -- (*list*) A list of additional package names to be + installed in the runroot environment in Koji. Example config -------------- diff --git a/pungi/checks.py b/pungi/checks.py index c5ef3f88..3bd334ef 100644 --- a/pungi/checks.py +++ b/pungi/checks.py @@ -1059,6 +1059,9 @@ def make_schema(): "config_branch": {"type": "string"}, "tag_ref": {"type": "boolean"}, "ostree_ref": {"type": "string"}, + "runroot_packages": { + "$ref": "#/definitions/list_of_strings", + }, }, "required": [ "treefile", diff --git a/pungi/phases/ostree.py b/pungi/phases/ostree.py index cbfcd76e..90578ae5 100644 --- a/pungi/phases/ostree.py +++ b/pungi/phases/ostree.py @@ -168,7 +168,9 @@ class OSTreeThread(WorkerThread): ("unified-core", config.get("unified_core", False)), ] ) - packages = ["pungi", "ostree", "rpm-ostree"] + default_packages = ["pungi", "ostree", "rpm-ostree"] + additional_packages = config.get("runroot_packages", []) + packages = default_packages + additional_packages log_file = os.path.join(self.logdir, "runroot.log") mounts = [compose.topdir, config["ostree_repo"]] runroot = Runroot(compose, phase="ostree")