From 76687febf72d00693d94382f782f4fd960848a03 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 25 Mar 2024 12:22:12 +0100 Subject: [PATCH 1/2] kernel-install: Don't copy pacman gpg sockets These should be created in /run but gpg's logic for that is broken for the root user (it checks for /run/user/0 which will never exist) so the sockets are created in the gpg home dir (/etc/pacman.d/gnupg) instead. Let's make sure we don't try to copy those as they cause issues with cp -R. Fixes #2547 --- kernel-install/50-mkosi.install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel-install/50-mkosi.install b/kernel-install/50-mkosi.install index a1c68f292..96686bf97 100644 --- a/kernel-install/50-mkosi.install +++ b/kernel-install/50-mkosi.install @@ -14,7 +14,6 @@ from mkosi.archive import make_cpio from mkosi.config import OutputFormat, __version__ from mkosi.log import die, log_setup from mkosi.run import find_binary, run, uncaught_exception_handler -from mkosi.tree import copy_tree from mkosi.types import PathString from mkosi.util import umask @@ -176,7 +175,11 @@ def main() -> None: continue (Path(d) / "etc" / p).parent.mkdir(parents=True, exist_ok=True) - copy_tree(Path("/etc") / p, Path(d) / "etc" / p, dereference=True) + if (Path("/etc") / p).resolve().is_file(): + shutil.copy2(Path("/etc") / p, Path(d) / "etc" / p) + else: + shutil.copytree(Path("/etc") / p, Path(d) / "etc" / p, + ignore=shutil.ignore_patterns("S.*"), dirs_exist_ok=True) cmdline += ["--package-manager-tree", d] From 4604084074252cc29ad5976296eecead74507988 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Mon, 25 Mar 2024 13:29:43 +0100 Subject: [PATCH 2/2] ci: Use ruff check instead of ruff Fixes deprecation warning --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 054e9dfee..534550529 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - name: Run ruff run: | ruff --version - ruff mkosi/ tests/ kernel-install/50-mkosi.install + ruff check mkosi/ tests/ kernel-install/50-mkosi.install - name: Check that tabs are not used in code run: sh -c '! git grep -P "\\t" "*.py"'