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
+1 -1
View File
@@ -103,7 +103,7 @@ impl Observer {
}
self.cached()
.cloned()
.unwrap_or_else(|| Observation::not_configured(Platform::LinuxX64, chrono::Utc::now()))
.unwrap_or_else(|| Observation::not_configured(Platform::NATIVE_LINUX, chrono::Utc::now()))
}
pub fn catalog_record(&self) -> Option<GuardedRecord> {
self.cached()?;
+7 -6
View File
@@ -15,7 +15,7 @@ use rmm_domain::{
};
use rmm_privileged_helper::{Binding, TrustedClock};
use rmm_updater::{
ActiveRelease, Platform as ReleasePlatform, ReleaseRelation, SignedRelease, TrustedContext,
ActiveRelease, ReleaseRelation, SignedRelease, TrustedContext,
TrustedUpdateKey, UpdateKeyring, verify_release,
};
use serde::Deserialize;
@@ -346,12 +346,12 @@ impl Trust {
.try_into()
.map_err(|_| anyhow::anyhow!("UPDATE_CATALOG_KEY_SIZE"))?;
ensure!(
key.platform == Platform::LinuxX64 && key.public_key_hex != binding.public_key_hex,
key.platform == Platform::NATIVE_LINUX && key.public_key_hex != binding.public_key_hex,
"UPDATE_CATALOG_KEY_SEPARATION"
);
trusted.push(TrustedUpdateKey::new(
public,
ReleasePlatform::LinuxX64,
Platform::NATIVE_LINUX.into(),
key.first_sequence,
key.last_sequence,
key.revoked,
@@ -426,7 +426,7 @@ impl Trust {
},
&self.keys,
&TrustedContext {
platform: ReleasePlatform::LinuxX64,
platform: Platform::NATIVE_LINUX.into(),
now_utc_seconds: now,
keyring_generation: self.generation,
protocol_major: self.protocol,
@@ -522,9 +522,10 @@ async fn request(
async fn fetch(client: &reqwest::Client, address: SocketAddr) -> Result<Vec<u8>> {
let response = client
.get(format!(
"https://{}:{}/agent/v1/releases/current?platform=x86_64-unknown-linux-gnu",
"https://{}:{}/agent/v1/releases/current?platform={}",
crate::https_channel::server_name()?,
address.port()
address.port(),
Platform::NATIVE_LINUX.target_triple()
))
.send()
.await?;
+1 -1
View File
@@ -319,7 +319,7 @@ pub fn context(
let scope = match job.action {
rmm_domain::jobs::Action::UpdateAgent { ref update } => {
match update.manifest().map_err(anyhow::Error::msg)?.platform {
update::Platform::LinuxX64 => "linux.base",
update::Platform::LinuxX64 | update::Platform::LinuxArm64 => "linux.base",
update::Platform::WindowsX64 | update::Platform::WindowsGnuX64 => "windows.base",
}
}
+2
View File
@@ -465,6 +465,8 @@ impl<C: reconcile::SyncClock> Agent<C> {
"heartbeat/1".into(),
"agent.update/1".into(),
];
#[cfg(target_arch = "aarch64")]
capabilities.push(rmm_domain::agent_update::LINUX_ARM64_RELEASE_CAPABILITY.into());
if self.binding.is_some() {
capabilities.push("rmm.sync.v1".into());
}