Build and serve signed Linux ARM64 agent releases

This commit is contained in:
2026-11-18 17:58:12 +01:00
parent c599baa494
commit 247646a2ba
27 changed files with 151 additions and 88 deletions
+7 -3
View File
@@ -19,9 +19,11 @@ from urllib.parse import urlencode, urlsplit
import uuid
LINUX = 'x86_64-unknown-linux-gnu'
LINUX_ARM64 = 'aarch64-unknown-linux-gnu'
WINDOWS = 'x86_64-pc-windows-msvc'
FILES = {LINUX: ('rmm-agent', 'rmm-privileged-helper', 'rmm-agent-updater'),
WINDOWS: ('rmm-agent-windows.exe', 'rmm-helper-windows.exe', 'rmm-updater-windows.exe')}
FILES[LINUX_ARM64] = FILES[LINUX]
WINDOWS_GNU = 'x86_64-pc-windows-gnu'
FILES[WINDOWS_GNU] = FILES[WINDOWS]
LIMIT = 256 * 1024 * 1024
@@ -55,9 +57,11 @@ def verify_native_image(path, target, size):
with path.open('rb') as binary:
header = binary.read(64)
check(len(header) == 64, 'truncated binary header: ' + path.name)
if target == LINUX:
if target in (LINUX, LINUX_ARM64):
machine = 62 if target == LINUX else 183
check(header[:6] == b'\x7fELF\x02\x01' and header[16:18] in (b'\x02\x00', b'\x03\x00')
and header[18:20] == b'\x3e\x00', 'Linux x86-64 ELF image required: ' + path.name)
and int.from_bytes(header[18:20], 'little') == machine,
f'{target} ELF image required: {path.name}')
else:
pe = int.from_bytes(header[60:64], 'little')
check(header[:2] == b'MZ' and 64 <= pe <= size - 26, 'Windows PE image required: ' + path.name)
@@ -130,7 +134,7 @@ def release_label(platform, official_windows):
if official_windows:
check(platform == WINDOWS_GNU, 'official Windows releases require a GNU x64 build receipt')
return 'windows-gnu-official'
return {LINUX: 'linux', WINDOWS: 'windows', WINDOWS_GNU: 'windows-gnu'}[platform]
return {LINUX: 'linux', LINUX_ARM64: 'linux-arm64', WINDOWS: 'windows', WINDOWS_GNU: 'windows-gnu'}[platform]
def prepare(args):