Backport patch from upstream PR 1690

(cherry picked from commit 9ee6caf117 (fedora_master))
This commit is contained in:
Lubomír Sedlář 2023-07-19 08:55:30 +03:00 committed by Stepan Oksanichenko
parent 1d146bb8d5
commit 57443cd0aa
Signed by: soksanichenko
GPG Key ID: AB9983172AB1E45B
2 changed files with 57 additions and 0 deletions

53
1690.patch Normal file
View File

@ -0,0 +1,53 @@
From bd64894a03628d52be8cbe89b79ef724293d2053 Mon Sep 17 00:00:00 2001
From: Lubomír Sedlář <lsedlar@redhat.com>
Date: Jul 18 2023 06:44:26 +0000
Subject: ostree: Add configuration for custom runroot packages
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
diff --git a/doc/configuration.rst b/doc/configuration.rst
index 3912e47..70a0534 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 c5ef3f8..3bd334e 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 cbfcd76..90578ae 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")

View File

@ -8,6 +8,7 @@ Summary: Distribution compose tool
License: GPL-2.0-only
URL: https://pagure.io/pungi
Source0: %{name}-%{version}.tar.bz2
Patch0: 1690.patch
BuildRequires: make
BuildRequires: python3-pytest
@ -164,6 +165,9 @@ rm %{buildroot}%{_bindir}/pungi
* Tue Jul 25 2023 Stepan Oksanichenko <soksanichenko@cloudlinux.com> - 4.3.7-8
- Option `excluded-packages` for script `pungi-gather-rpms`
* Wed Jul 19 2023 Lubomír Sedlář <lsedlar@redhat.com> - 4.4.0-2
- Backport ostree runroot package additions
* Mon Jun 19 2023 Python Maint <python-maint@redhat.com> - 4.4.0-2
- Rebuilt for Python 3.12