From 0a11ceaaaef8e4080acd31e9cd039c4ac2fa6ce0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Poho=C5=99elsk=C3=BD?= Date: Thu, 25 Jun 2026 15:06:57 +0200 Subject: [PATCH] Remove git signature from generated patches --- agents_as_skills/backport/SKILL.md | 8 ++++---- ymir/agents/prompts/backport/instructions.j2 | 4 ++-- ymir/agents/prompts/backport/instructions_zstream.j2 | 4 ++-- ymir/tools/unprivileged/wicked_git.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/agents_as_skills/backport/SKILL.md b/agents_as_skills/backport/SKILL.md index fdbcc9bc..6d731f80 100644 --- a/agents_as_skills/backport/SKILL.md +++ b/agents_as_skills/backport/SKILL.md @@ -526,7 +526,7 @@ a backport that won't actually fix the shipped RPM. - The tool automatically uses the base commit recorded in step 4e to include ALL cherry-picked commits, not just the last one - For multi-patch (when maintainer rules request one patch per commit), - use `run_shell_command` with `git format-patch -1 --stdout > ` + use `run_shell_command` with `git format-patch --no-signature -1 --stdout > ` per commit instead of `git_patch_create` - IMPORTANT: Only create NEW patch files. Do NOT modify existing patches in the dist-git repository @@ -561,7 +561,7 @@ a backport that won't actually fix the shipped RPM. (default: `.patch`) in the current working directory (the dist-git repository root) - The tool automatically captures all applied changes into one patch file. - - For multi-patch, use `run_shell_command` with `git format-patch` + - For multi-patch, use `run_shell_command` with `git format-patch --no-signature` per commit instead of `git_patch_create` 5. Update the spec file. Add new `Patch` tag(s) for each patch file generated in step 4. @@ -872,7 +872,7 @@ a backport that won't actually fix the shipped RPM. - The tool automatically uses the base commit recorded in step 3i to include ALL cherry-picked commits, not just the last one - For multi-patch (when maintainer rules request one patch per commit), - use `run_shell_command` with `git format-patch -1 --stdout > ` + use `run_shell_command` with `git format-patch --no-signature -1 --stdout > ` per commit instead of `git_patch_create` - IMPORTANT: Only create NEW patch files. Do NOT modify existing patches in the dist-git repository @@ -909,7 +909,7 @@ a backport that won't actually fix the shipped RPM. (default: `.patch`) in the current working directory (the dist-git repository root) - The tool automatically captures all applied changes into one patch file. - - For multi-patch, use `run_shell_command` with `git format-patch` + - For multi-patch, use `run_shell_command` with `git format-patch --no-signature` per commit instead of `git_patch_create` 4. Update the spec file. Add new `Patch` tag(s) for each patch file generated above. diff --git a/ymir/agents/prompts/backport/instructions.j2 b/ymir/agents/prompts/backport/instructions.j2 index 1a639d7b..65c1423c 100644 --- a/ymir/agents/prompts/backport/instructions.j2 +++ b/ymir/agents/prompts/backport/instructions.j2 @@ -209,7 +209,7 @@ a backport that won't actually fix the shipped RPM. - The tool automatically uses the base commit recorded in step 4e to include ALL cherry-picked commits, not just the last one - For multi-patch (when maintainer rules request one patch per commit), - use `run_shell_command` with `git format-patch -1 --stdout > ` + use `run_shell_command` with `git format-patch --no-signature -1 --stdout > ` per commit instead of `git_patch_create` - IMPORTANT: Only create NEW patch files. Do NOT modify existing patches in the dist-git repository @@ -244,7 +244,7 @@ a backport that won't actually fix the shipped RPM. (default: `.patch`) in the current working directory (the dist-git repository root) - The tool automatically captures all applied changes into one patch file. - - For multi-patch, use `run_shell_command` with `git format-patch` + - For multi-patch, use `run_shell_command` with `git format-patch --no-signature` per commit instead of `git_patch_create` 5. Update the spec file. Add new `Patch` tag(s) for each patch file generated in step 4. diff --git a/ymir/agents/prompts/backport/instructions_zstream.j2 b/ymir/agents/prompts/backport/instructions_zstream.j2 index 338e92a2..efa9b57f 100644 --- a/ymir/agents/prompts/backport/instructions_zstream.j2 +++ b/ymir/agents/prompts/backport/instructions_zstream.j2 @@ -204,7 +204,7 @@ a backport that won't actually fix the shipped RPM. - The tool automatically uses the base commit recorded in step 3i to include ALL cherry-picked commits, not just the last one - For multi-patch (when maintainer rules request one patch per commit), - use `run_shell_command` with `git format-patch -1 --stdout > ` + use `run_shell_command` with `git format-patch --no-signature -1 --stdout > ` per commit instead of `git_patch_create` - IMPORTANT: Only create NEW patch files. Do NOT modify existing patches in the dist-git repository @@ -241,7 +241,7 @@ a backport that won't actually fix the shipped RPM. (default: `.patch`) in the current working directory (the dist-git repository root) - The tool automatically captures all applied changes into one patch file. - - For multi-patch, use `run_shell_command` with `git format-patch` + - For multi-patch, use `run_shell_command` with `git format-patch --no-signature` per commit instead of `git_patch_create` 4. Update the spec file. Add new `Patch` tag(s) for each patch file generated above. diff --git a/ymir/tools/unprivileged/wicked_git.py b/ymir/tools/unprivileged/wicked_git.py index 18b1f823..98c21399 100644 --- a/ymir/tools/unprivileged/wicked_git.py +++ b/ymir/tools/unprivileged/wicked_git.py @@ -522,7 +522,7 @@ async def _run( "or 'apply_downstream_patches' is run before this tool. " f"Options: {self.options}" ) - cmd = ["git", "format-patch", "--stdout", f"{base_commit_sha}..HEAD"] + cmd = ["git", "format-patch", "--no-signature", "--stdout", f"{base_commit_sha}..HEAD"] exit_code, stdout, stderr = await run_subprocess(cmd, cwd=tool_input.repository_path) if exit_code != 0: raise ToolError(f"Command git-format-patch failed: {stderr}")