Skip to content

Commit 471bd8c

Browse files
committed
Add 'Patch ukify (AZL3)' step to fix ukify for TestCustomizeImageVerityUsrUkiRecustomize
1 parent 5f59ff4 commit 471bd8c

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From c66a29f6f7b070bc653bce88e14fc5296e226768 Mon Sep 17 00:00:00 2001
2+
From: Vince Perri <5596945+vinceaperri@users.noreply.github.com>
3+
Date: Tue, 21 Apr 2026 22:46:42 +0000
4+
Subject: [PATCH] ukify: fix insertion of padding in merged sections
5+
6+
Original patch:
7+
https://github.com/systemd/systemd/commit/ec1d031f3de02f84beca89e2b402d085fba62be4
8+
9+
---
10+
ukify | 3 +--
11+
1 file changed, 1 insertion(+), 2 deletions(-)
12+
13+
diff --git a/ukify b/ukify
14+
index 7f9d6e6..232ebe4 100755
15+
--- a/ukify
16+
+++ b/ukify
17+
@@ -618,9 +618,8 @@ def pe_add_sections(uki: UKI, output: str):
18+
if new_section.Misc_VirtualSize > s.SizeOfRawData:
19+
raise PEError(f'Not enough space in existing section {section.name} to append new data.')
20+
21+
- padding = bytes(new_section.SizeOfRawData - new_section.Misc_VirtualSize)
22+
+ padding = bytes(s.SizeOfRawData - new_section.Misc_VirtualSize)
23+
pe.__data__ = pe.__data__[:s.PointerToRawData] + data + padding + pe.__data__[pe.sections[i+1].PointerToRawData:]
24+
- s.SizeOfRawData = new_section.SizeOfRawData
25+
s.Misc_VirtualSize = new_section.Misc_VirtualSize
26+
break
27+
else:
28+
--
29+
2.45.4
30+

.github/workflows/tests-functional.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ jobs:
6868
env:
6969
HOST_ARCH: ${{ inputs.hostArch }}
7070

71+
- name: Patch ukify (AZL3)
72+
if: inputs.hostDistro == 'azl3'
73+
run: |
74+
set -eux
75+
76+
UKIFY_PATH=$(which ukify)
77+
sudo patch "$UKIFY_PATH" ./repo/.github/workflows/scripts/ukify-fix-insertion-of-padding-in-merged-sections.patch
78+
7179
- name: Install prerequisites (Ubuntu 24.04)
7280
if: inputs.hostDistro == 'ubuntu2404'
7381
run: |

0 commit comments

Comments
 (0)