From 630a6aadcf5e69b26c613b2caacd746aa3cbe720 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:09:35 +0100 Subject: [PATCH] packages/cloud-hypervisor: fix build This supresses the `missing_docs` lint which breaks compilation on Rust 1.83.0+. --- ...p-fix-panic-when-rejecting-extended-guest-report.patch | 3 +-- ...rvisor-mshv-implement-extended-guest-requests-wi.patch | 3 +-- packages/by-name/microsoft/cloud-hypervisor/package.nix | 8 ++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/by-name/microsoft/cloud-hypervisor/0001-snp-fix-panic-when-rejecting-extended-guest-report.patch b/packages/by-name/microsoft/cloud-hypervisor/0001-snp-fix-panic-when-rejecting-extended-guest-report.patch index 4452767262..5e0f87620e 100644 --- a/packages/by-name/microsoft/cloud-hypervisor/0001-snp-fix-panic-when-rejecting-extended-guest-report.patch +++ b/packages/by-name/microsoft/cloud-hypervisor/0001-snp-fix-panic-when-rejecting-extended-guest-report.patch @@ -23,6 +23,5 @@ index f60d8ceb..b8fccf31 100644 self.fd .gpa_write(&mut swei2_rw_gpa_arg) .map_err(|e| cpu::HypervisorCpuError::GpaWrite(e.into()))?; --- +-- 2.45.2 - diff --git a/packages/by-name/microsoft/cloud-hypervisor/0002-hypervisor-mshv-implement-extended-guest-requests-wi.patch b/packages/by-name/microsoft/cloud-hypervisor/0002-hypervisor-mshv-implement-extended-guest-requests-wi.patch index d6129dd16e..732082d962 100644 --- a/packages/by-name/microsoft/cloud-hypervisor/0002-hypervisor-mshv-implement-extended-guest-requests-wi.patch +++ b/packages/by-name/microsoft/cloud-hypervisor/0002-hypervisor-mshv-implement-extended-guest-requests-wi.patch @@ -120,6 +120,5 @@ index 307326dd..69b12364 100644 +pub const GHCB_RBX_OFFSET: u64 = 0x0318; pub const GHCB_SW_EXITINFO1_OFFSET: u64 = 0x398; pub const GHCB_SW_EXITINFO2_OFFSET: u64 = 0x3A0; --- +-- 2.45.2 - diff --git a/packages/by-name/microsoft/cloud-hypervisor/package.nix b/packages/by-name/microsoft/cloud-hypervisor/package.nix index 6a836e6169..d7ad696746 100644 --- a/packages/by-name/microsoft/cloud-hypervisor/package.nix +++ b/packages/by-name/microsoft/cloud-hypervisor/package.nix @@ -39,6 +39,14 @@ rustPlatform.buildRustPackage rec { }; }; + # Allow compilation with Rust 1.83.0, which requires public methods in + # test modules to have documentation when the `missing_docs` lint is enabled. + # Upstream issue: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/6903 + postPatch = '' + substituteInPlace rate_limiter/src/lib.rs \ + --replace-fail '#![deny(missing_docs)]' "" + ''; + patches = [ ./0001-snp-fix-panic-when-rejecting-extended-guest-report.patch ./0002-hypervisor-mshv-implement-extended-guest-requests-wi.patch