Rebase 0003-Add-versioned-x86_64-arches-support.patch for pesign 117 #2

Merged
eabdullin merged 1 commit from triage/fix-pesign-75 into a10s 2026-10-08 15:31:02 +00:00

Automatically opened by releng-monitoring: the AlmaLinux build of pesign failed because a downstream patch no longer applies to the updated upstream source.

Diagnosis

pesign failed in %prep on every architecture it was attempted on (x86_64, x86_64_v2, aarch64, i686, riscv64) — a deterministic, reproducible failure, not transient. The git am step rejects the autopatch-managed patch 0003-Add-versioned-x86_64-arches-support.patch against the new source:

error: patch failed: src/pesign-rpmbuild-helper.in:144
error: src/pesign-rpmbuild-helper.in: patch does not apply

The package was bumped 116-8 → 117-1 (ref changed/a10s/pesign-117-1.el10.alma.1). The patch contains a single-line change in the target_cpu normalization block of src/pesign-rpmbuild-helper.in:

-    target_cpu="${target_cpu/x86_64/x64}"
+    target_cpu="${target_cpu/x86_64*/x64}"

Reading the 117 tarball copy of src/pesign-rpmbuild-helper.in confirms the block now reads:

target_cpu="${target_cpu/i?86/ia32}"
target_cpu="${target_cpu/x86_64/x64}"
target_cpu="${target_cpu/aarch64/aa64}"
target_cpu="${target_cpu/arm*/arm/}"
target_cpu="${target_cpu/loongarch64/la64/}"

Two facts follow. (1) The change is NOT obsolete: 117 still has the unversioned ${target_cpu/x86_64/x64} substitution, which turns a versioned arch string such as x86_64_v2 into x64_v2 instead of x64, so the patch is still required for the x86_64_v2 build to resolve its EFI arch. deprecate_autopatch is therefore wrong. (2) The reason it no longer applies is purely a context shift: 117 inserted a new target_cpu="${target_cpu/loongarch64/la64/}" line immediately after the arm*/arm/ line, where the patch's hunk (@@ -144,7 +144,7 @@) expects a blank trailing context line. git am applies with zero fuzz, so the mismatched trailing context causes the reject.

Fix: rebase the patch against 117 so the hunk's trailing context is the new loongarch line instead of the blank line, e.g.

@@ -143,7 +143,7 @@
     target_cpu="${target_cpu/i?86/ia32}"
-    target_cpu="${target_cpu/x86_64/x64}"
+    target_cpu="${target_cpu/x86_64*/x64}"
     target_cpu="${target_cpu/aarch64/aa64}"
     target_cpu="${target_cpu/arm*/arm/}"
     target_cpu="${target_cpu/loongarch64/la64/}"

The one changed line (x86_64 → x86_64*) is unchanged; only the surrounding context needs refreshing. After updating the autopatch file, rebuild.

What this changes

Files: files/0003-Add-versioned-x86_64-arches-support.patch, config.yaml

pesign 117 added a new target_cpu="${target_cpu/loongarch64/la64/}" line in the target_cpu normalization block of src/pesign-rpmbuild-helper.in, right after the arm*/arm/ substitution. The patch's last context line was a blank line at that position, so git am rejected the hunk in %prep.

The single hunk was regenerated against the 117 source with git. The functional change is the same as before: ${target_cpu/x86_64/x64} becomes ${target_cpu/x86_64*/x64}, so versioned arches such as x86_64_v2 still resolve to the x64 EFI arch. The only other differences are the refreshed trailing context line (now the loongarch64 line) and the blob index line. The hunk header is still @@ -144,7 +144,7 @@.

pesign 117 still has the unversioned x86_64/x64 substitution, so this patch is still needed.

Verified on a clean copy of the pesign-117 source with git apply --check, patch -p1 --fuzz=0 --dry-run, and git am. All three applied cleanly.

Patch-author notes: Only the trailing context line changed; the functional change is identical. The diff was regenerated with git and checked on a clean copy of src/ with git apply --check, patch --fuzz=0 and git am, all exit 0. The header stays at -144 because the hunk starts at the fi line (144). The triage note's suggested -143 header was off by one.

How it was verified

The rebased patch was applied against the unpacked Source0 tree with patch -p1 --fuzz=0 — the same thing %prep does — on the monitoring host, independently of the agent that wrote it.

What happens after you merge

Merging pushes this to a10s, which makes autopatch-tool re-run and tag changed/a10s/<nvr>.alma.N+1. releng-monitoring then rebuilds pesign from that tag by itself — nothing else is needed from you.

Failed build: https://build.almalinux.org/build/89540
Upstream import: imports/c10s/pesign-117-1.el10

Automatically opened by releng-monitoring: the AlmaLinux build of `pesign` failed because a downstream patch no longer applies to the updated upstream source. ### Diagnosis pesign failed in %prep on every architecture it was attempted on (x86_64, x86_64_v2, aarch64, i686, riscv64) — a deterministic, reproducible failure, not transient. The `git am` step rejects the autopatch-managed patch `0003-Add-versioned-x86_64-arches-support.patch` against the new source: error: patch failed: src/pesign-rpmbuild-helper.in:144 error: src/pesign-rpmbuild-helper.in: patch does not apply The package was bumped 116-8 → 117-1 (ref changed/a10s/pesign-117-1.el10.alma.1). The patch contains a single-line change in the target_cpu normalization block of src/pesign-rpmbuild-helper.in: - target_cpu="${target_cpu/x86_64/x64}" + target_cpu="${target_cpu/x86_64*/x64}" Reading the 117 tarball copy of src/pesign-rpmbuild-helper.in confirms the block now reads: target_cpu="${target_cpu/i?86/ia32}" target_cpu="${target_cpu/x86_64/x64}" target_cpu="${target_cpu/aarch64/aa64}" target_cpu="${target_cpu/arm*/arm/}" target_cpu="${target_cpu/loongarch64/la64/}" Two facts follow. (1) The change is NOT obsolete: 117 still has the unversioned `${target_cpu/x86_64/x64}` substitution, which turns a versioned arch string such as `x86_64_v2` into `x64_v2` instead of `x64`, so the patch is still required for the x86_64_v2 build to resolve its EFI arch. deprecate_autopatch is therefore wrong. (2) The reason it no longer applies is purely a context shift: 117 inserted a new `target_cpu="${target_cpu/loongarch64/la64/}"` line immediately after the `arm*/arm/` line, where the patch's hunk (@@ -144,7 +144,7 @@) expects a blank trailing context line. git am applies with zero fuzz, so the mismatched trailing context causes the reject. Fix: rebase the patch against 117 so the hunk's trailing context is the new loongarch line instead of the blank line, e.g. @@ -143,7 +143,7 @@ target_cpu="${target_cpu/i?86/ia32}" - target_cpu="${target_cpu/x86_64/x64}" + target_cpu="${target_cpu/x86_64*/x64}" target_cpu="${target_cpu/aarch64/aa64}" target_cpu="${target_cpu/arm*/arm/}" target_cpu="${target_cpu/loongarch64/la64/}" The one changed line (`x86_64` → `x86_64*`) is unchanged; only the surrounding context needs refreshing. After updating the autopatch file, rebuild. ### What this changes Files: `files/0003-Add-versioned-x86_64-arches-support.patch`, `config.yaml` pesign 117 added a new `target_cpu="${target_cpu/loongarch64/la64/}"` line in the target_cpu normalization block of `src/pesign-rpmbuild-helper.in`, right after the `arm*/arm/` substitution. The patch's last context line was a blank line at that position, so `git am` rejected the hunk in %prep. The single hunk was regenerated against the 117 source with git. The functional change is the same as before: `${target_cpu/x86_64/x64}` becomes `${target_cpu/x86_64*/x64}`, so versioned arches such as `x86_64_v2` still resolve to the `x64` EFI arch. The only other differences are the refreshed trailing context line (now the loongarch64 line) and the blob index line. The hunk header is still `@@ -144,7 +144,7 @@`. pesign 117 still has the unversioned `x86_64/x64` substitution, so this patch is still needed. Verified on a clean copy of the pesign-117 source with `git apply --check`, `patch -p1 --fuzz=0 --dry-run`, and `git am`. All three applied cleanly. Patch-author notes: Only the trailing context line changed; the functional change is identical. The diff was regenerated with git and checked on a clean copy of src/ with git apply --check, patch --fuzz=0 and git am, all exit 0. The header stays at -144 because the hunk starts at the `fi` line (144). The triage note's suggested -143 header was off by one. ### How it was verified The rebased patch was applied against the unpacked `Source0` tree with `patch -p1 --fuzz=0` — the same thing `%prep` does — on the monitoring host, independently of the agent that wrote it. ### What happens after you merge Merging pushes this to `a10s`, which makes autopatch-tool re-run and tag `changed/a10s/<nvr>.alma.N+1`. releng-monitoring then rebuilds `pesign` from that tag by itself — nothing else is needed from you. Failed build: https://build.almalinux.org/build/89540 Upstream import: `imports/c10s/pesign-117-1.el10`
eabdullin deleted branch triage/fix-pesign-75 2026-10-08 15:31:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
autopatch/pesign!2
No description provided.