From feb3ec3fbef43b5e874a48c10f71cdab7f188c20 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Sun, 17 Mar 2024 14:44:03 +0100 Subject: [PATCH] Switch to debian unstable temporarily in default image and tests pacman got removed from Debian Testing, so let's use unstable until it's added back. --- .github/workflows/ci.yml | 2 ++ mkosi.conf.d/20-debian-tools.conf | 7 +++++++ mkosi.conf.d/20-debian/mkosi.conf | 1 + tests/__init__.py | 2 ++ tests/conftest.py | 6 ++++++ 5 files changed, 18 insertions(+) create mode 100644 mkosi.conf.d/20-debian-tools.conf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a86bb32a..8abeffd09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,5 +181,7 @@ jobs: --verbose \ -m integration \ --distribution ${{ matrix.distro }} \ + $([ "${{ matrix.distro }}" = "debian" ] && echo --release=unstable) \ + $([ "${{ matrix.tools }}" = "debian" ] && echo --tools-tree-release=unstable) \ --tools-tree-distribution ${{ matrix.tools }} \ tests/ diff --git a/mkosi.conf.d/20-debian-tools.conf b/mkosi.conf.d/20-debian-tools.conf new file mode 100644 index 000000000..51cf22188 --- /dev/null +++ b/mkosi.conf.d/20-debian-tools.conf @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Match] +ToolsTreeDistribution=debian + +[Host] +@ToolsTreeRelease=unstable diff --git a/mkosi.conf.d/20-debian/mkosi.conf b/mkosi.conf.d/20-debian/mkosi.conf index 5958f1ca8..71f6934e6 100644 --- a/mkosi.conf.d/20-debian/mkosi.conf +++ b/mkosi.conf.d/20-debian/mkosi.conf @@ -4,6 +4,7 @@ Distribution=debian [Distribution] +@Release=unstable Repositories=non-free-firmware [Content] diff --git a/tests/__init__.py b/tests/__init__.py index 74e05694f..b59d5621b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -24,6 +24,7 @@ class Image: distribution: Distribution release: str tools_tree_distribution: Optional[Distribution] + tools_tree_release: Optional[str] debug_shell: bool def __init__(self, config: Config, options: Sequence[PathString] = []) -> None: @@ -78,6 +79,7 @@ class Image: if self.config.tools_tree_distribution else [] ), + *(["--tools-tree-release", self.config.tools_tree_release] if self.config.tools_tree_release else []), *self.options, *options, "--output-dir", self.output_dir, diff --git a/tests/conftest.py b/tests/conftest.py index 5de10c8ad..e653c8891 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -34,6 +34,11 @@ def pytest_addoption(parser: Any) -> None: type=Distribution, choices=[Distribution(d) for d in Distribution.values()], ) + parser.addoption( + "--tools-tree-release", + metavar="RELEASE", + help="Use the given tools tree release instead of the default one", + ) parser.addoption( "--debug-shell", help="Pass --debug-shell when running mkosi", @@ -49,6 +54,7 @@ def config(request: Any) -> Image.Config: distribution=distribution, release=release, tools_tree_distribution=cast(Distribution, request.config.getoption("--tools-tree-distribution")), + tools_tree_release=request.config.getoption("--tools-tree-release"), debug_shell=request.config.getoption("--debug-shell"), ) -- 2.47.2