From 9cb82f8a2db6f6897f472fc5b9372fea1ac2b24d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 8 Jun 2026 12:11:26 +0200 Subject: [PATCH 1/8] update to version 26.6 Signed-off-by: Gerd Hoffmann --- sources | 2 +- virt-firmware-rs.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index afcd309..d9227df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-firmware-rs-v26.4.tar.gz) = 966251e7a6912055eb8f12c9475650b7a61adc445499cd9ef8652bd238ddc0a1b3dce7e8831c84e339adbaaee2160c9e5b1586f97d35f943a30fe2fc40bf7b95 +SHA512 (virt-firmware-rs-v26.6.tar.gz) = 9b59e80c147bd7eb3c5c921efb948def7fdf5029826481da30e8cb46295331b4679343382ee9d8c3b598d990639f1cfc1c560d6a498f15ff91df44e6ef0fed0c diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index 4d71f55..7902b5d 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -18,7 +18,7 @@ BuildRequires: rust-std-static-x86_64-unknown-uefi %endif Name: virt-firmware-rs -Version: 26.4 +Version: 26.6 Release: %autorelease Summary: Tools for EFI and virtual machine firmware From b2e3a7d13f1c0cb8bf716340f228fc005d05a79f Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 24 Jun 2026 15:59:37 +0200 Subject: [PATCH 2/8] add update-generate-boot-csv.patch --- update-generate-boot-csv.patch | 92 ++++++++++++++++++++++++++++++++++ virt-firmware-rs.spec | 1 + 2 files changed, 93 insertions(+) create mode 100644 update-generate-boot-csv.patch diff --git a/update-generate-boot-csv.patch b/update-generate-boot-csv.patch new file mode 100644 index 0000000..d0516a6 --- /dev/null +++ b/update-generate-boot-csv.patch @@ -0,0 +1,92 @@ +diff --git a/efi-tools/src/bin/generate-boot-csv.rs b/efi-tools/src/bin/generate-boot-csv.rs +index c3f74d9aa182..f940940bf321 100644 +--- a/efi-tools/src/bin/generate-boot-csv.rs ++++ b/efi-tools/src/bin/generate-boot-csv.rs +@@ -4,7 +4,7 @@ + + use clap::Parser; + use log::{debug, error, info}; +-use std::path::PathBuf; ++use std::path::{Path, PathBuf}; + use std::process::ExitCode; + + use virtfw_efi_tools::shimcsv::write_boot_csv; +@@ -23,6 +23,10 @@ struct Args { + #[arg(long, value_name = "ESP")] + esp: Option, + ++ /// add efi binary ++ #[arg(long, value_name = "EFI")] ++ add: Vec, ++ + /// override csv output location + #[arg(long, value_name = "CSV")] + csv: Option, +@@ -32,6 +36,26 @@ struct Args { + cmdline: Option, + } + ++fn create_csv_line(esp_path: &Path, shim_name: &str, binary: &Path, cmdline: &str) -> String { ++ let efi = binary ++ .strip_prefix(esp_path) ++ .unwrap() ++ .display() ++ .to_string() ++ .replace("/", "\\"); ++ info!("efi: -> \\{efi}"); ++ let title = binary.file_name().unwrap().to_str().unwrap(); ++ let line = format!( ++ "{},{},\\{} {},{}\n", ++ shim_name, ++ title, ++ efi, ++ cmdline.trim(), ++ "Comment" ++ ); ++ line ++} ++ + fn main() -> ExitCode { + let args = Args::parse(); + +@@ -77,26 +101,24 @@ fn main() -> ExitCode { + + let mut csv = String::new(); + let esp_path = std::path::Path::new(&esp); ++ ++ for app in args.add { ++ if !app.starts_with(&esp) { ++ error!("{app} is not on esp ({esp})"); ++ return ExitCode::from(1); ++ } ++ let binary = std::path::Path::new(&app); ++ info!("add: {}", binary.display()); ++ let line = create_csv_line(esp_path, &shim_name, binary, ""); ++ csv.push_str(&line); ++ } ++ + for uki in glob::glob(&uki_glob).expect("uki glob failed").flatten() { + info!("uki: {}", uki.display()); +- let efi = uki +- .strip_prefix(esp_path) +- .unwrap() +- .display() +- .to_string() +- .replace("/", "\\"); +- info!("efi: -> \\{efi}"); +- let title = uki.file_name().unwrap().to_str().unwrap(); +- let line = format!( +- "{},{},\\{} {},{}\n", +- shim_name, +- title, +- efi, +- cmdline.trim(), +- "Comment" +- ); ++ let line = create_csv_line(esp_path, &shim_name, &uki, &cmdline); + csv.push_str(&line); + } ++ + if csv.is_empty() { + error!("no uki images found ({uki_glob})"); + return ExitCode::from(1); diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index 7902b5d..df5e189 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -39,6 +39,7 @@ URL: https://gitlab.com/kraxel/virt-firmware-rs Source: https://gitlab.com/kraxel/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz Patch1: downgrade-dialoguer.patch +Patch2: update-generate-boot-csv.patch ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cargo-rpm-macros >= 24 From 6de2387519f95a31c40ab8cf332e88b5b0491040 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 8 Jun 2026 19:49:55 +0200 Subject: [PATCH 3/8] tmt: rework test plans --- plans.fmf | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/plans.fmf b/plans.fmf index e37d567..7ed6d72 100644 --- a/plans.fmf +++ b/plans.fmf @@ -1,6 +1,46 @@ summary: run tests from distgit tarball -discover: - how: fmf - dist-git-source: true execute: how: tmt + +/tmt: + summary: run upstream tmt tests + provision: + how: virtual + hardware: + memory: '>= 4 GB' + cpu: + processors: ">= 2" + virtualization: + is-supported: true + prepare: + - name: install dependencies + how: install + package: + - virt-firmware-rs + - qemu-system-x86-core + discover: + how: fmf + dist-git-source: true + +/cargo: + summary: run upstream cargo tests + prepare: + - name: install dependencies + how: install + package: + - git + - make + - cargo + - rustc + - openssl-devel + - systemd-devel + discover: + how: shell + dist-git-source: true + tests: + - name: /run/make/test + test: | + set -ex + version=$(rpmspec -q --qf '%{version}\n' $TMT_SOURCE_DIR/*.spec | head -1) + prepdir="$TMT_SOURCE_DIR/virt-firmware-rs-v${version}" + make -C $prepdir test From 13e9592f3b78bd1feb42f2d3e6a382c08859c7b7 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 24 Jun 2026 18:20:26 +0200 Subject: [PATCH 4/8] update License: tag --- virt-firmware-rs.spec | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index df5e189..26693e7 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -24,15 +24,18 @@ Summary: Tools for EFI and virtual machine firmware SourceLicense: MIT License: %{shrink: - Apache-2.0 - Apache-2.0 OR BSL-1.0 - Apache-2.0 OR MIT - Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT - BSD-2-Clause OR Apache-2.0 OR MIT - MIT - MIT OR Apache-2.0 - MPL-2.0 - Unlicense OR MIT +((MIT OR Apache-2.0) AND Unicode-DFS-2016) AND +(0BSD OR MIT OR Apache-2.0) AND +(Apache-2.0) AND +(Apache-2.0 OR MIT) AND +(Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND +(BSD-2-Clause OR Apache-2.0 OR MIT) AND +(BSD-3-Clause) AND +(MIT) AND +(MIT OR Apache-2.0) AND +(MIT OR Zlib OR Apache-2.0) AND +(MPL-2.0) AND +(Unlicense OR MIT) } URL: https://gitlab.com/kraxel/virt-firmware-rs From 1089072ef56ec2e6e502b888b1c5378f2fb94bf6 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 8 Jul 2026 14:36:18 +0100 Subject: [PATCH 5/8] No longer downgrade the dialoguer dependency --- downgrade-dialoguer.patch | 13 ------------- virt-firmware-rs.spec | 1 - 2 files changed, 14 deletions(-) delete mode 100644 downgrade-dialoguer.patch diff --git a/downgrade-dialoguer.patch b/downgrade-dialoguer.patch deleted file mode 100644 index cae1aa7..0000000 --- a/downgrade-dialoguer.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/efi-tools/Cargo.toml b/efi-tools/Cargo.toml -index 4cbf7ed1c4a5..95ace01b1822 100644 ---- a/efi-tools/Cargo.toml -+++ b/efi-tools/Cargo.toml -@@ -33,7 +33,7 @@ env_logger.workspace = true - log.workspace = true - uguid.workspace = true - --dialoguer = "0.12" -+dialoguer = "0.11" - glob = "0.3" - - virtfw-libefi = { workspace = true, features = [ "std", "sbdata", "x509" ] } diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index 26693e7..280b583 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -41,7 +41,6 @@ License: %{shrink: URL: https://gitlab.com/kraxel/virt-firmware-rs Source: https://gitlab.com/kraxel/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz -Patch1: downgrade-dialoguer.patch Patch2: update-generate-boot-csv.patch ExclusiveArch: x86_64 aarch64 riscv64 From a15c78920bb0fa8c0cd2bc9e72993c4ae5132c05 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 22 Jul 2026 12:16:00 +0200 Subject: [PATCH 6/8] update to version 26.7 --- sources | 2 +- update-generate-boot-csv.patch | 92 ---------------------------------- virt-firmware-rs.spec | 4 +- 3 files changed, 2 insertions(+), 96 deletions(-) delete mode 100644 update-generate-boot-csv.patch diff --git a/sources b/sources index d9227df..0f01624 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-firmware-rs-v26.6.tar.gz) = 9b59e80c147bd7eb3c5c921efb948def7fdf5029826481da30e8cb46295331b4679343382ee9d8c3b598d990639f1cfc1c560d6a498f15ff91df44e6ef0fed0c +SHA512 (virt-firmware-rs-v26.7.tar.gz) = 06061dc4a6a6a10c9b373db08a45acdbe799b96bfb418a03e7214f72a8f6db06c50126381680d0f022fbfdb60a763f346ec1939bf2eb392df2a45400e07b4510 diff --git a/update-generate-boot-csv.patch b/update-generate-boot-csv.patch deleted file mode 100644 index d0516a6..0000000 --- a/update-generate-boot-csv.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/efi-tools/src/bin/generate-boot-csv.rs b/efi-tools/src/bin/generate-boot-csv.rs -index c3f74d9aa182..f940940bf321 100644 ---- a/efi-tools/src/bin/generate-boot-csv.rs -+++ b/efi-tools/src/bin/generate-boot-csv.rs -@@ -4,7 +4,7 @@ - - use clap::Parser; - use log::{debug, error, info}; --use std::path::PathBuf; -+use std::path::{Path, PathBuf}; - use std::process::ExitCode; - - use virtfw_efi_tools::shimcsv::write_boot_csv; -@@ -23,6 +23,10 @@ struct Args { - #[arg(long, value_name = "ESP")] - esp: Option, - -+ /// add efi binary -+ #[arg(long, value_name = "EFI")] -+ add: Vec, -+ - /// override csv output location - #[arg(long, value_name = "CSV")] - csv: Option, -@@ -32,6 +36,26 @@ struct Args { - cmdline: Option, - } - -+fn create_csv_line(esp_path: &Path, shim_name: &str, binary: &Path, cmdline: &str) -> String { -+ let efi = binary -+ .strip_prefix(esp_path) -+ .unwrap() -+ .display() -+ .to_string() -+ .replace("/", "\\"); -+ info!("efi: -> \\{efi}"); -+ let title = binary.file_name().unwrap().to_str().unwrap(); -+ let line = format!( -+ "{},{},\\{} {},{}\n", -+ shim_name, -+ title, -+ efi, -+ cmdline.trim(), -+ "Comment" -+ ); -+ line -+} -+ - fn main() -> ExitCode { - let args = Args::parse(); - -@@ -77,26 +101,24 @@ fn main() -> ExitCode { - - let mut csv = String::new(); - let esp_path = std::path::Path::new(&esp); -+ -+ for app in args.add { -+ if !app.starts_with(&esp) { -+ error!("{app} is not on esp ({esp})"); -+ return ExitCode::from(1); -+ } -+ let binary = std::path::Path::new(&app); -+ info!("add: {}", binary.display()); -+ let line = create_csv_line(esp_path, &shim_name, binary, ""); -+ csv.push_str(&line); -+ } -+ - for uki in glob::glob(&uki_glob).expect("uki glob failed").flatten() { - info!("uki: {}", uki.display()); -- let efi = uki -- .strip_prefix(esp_path) -- .unwrap() -- .display() -- .to_string() -- .replace("/", "\\"); -- info!("efi: -> \\{efi}"); -- let title = uki.file_name().unwrap().to_str().unwrap(); -- let line = format!( -- "{},{},\\{} {},{}\n", -- shim_name, -- title, -- efi, -- cmdline.trim(), -- "Comment" -- ); -+ let line = create_csv_line(esp_path, &shim_name, &uki, &cmdline); - csv.push_str(&line); - } -+ - if csv.is_empty() { - error!("no uki images found ({uki_glob})"); - return ExitCode::from(1); diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index 280b583..c5a0651 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -18,7 +18,7 @@ BuildRequires: rust-std-static-x86_64-unknown-uefi %endif Name: virt-firmware-rs -Version: 26.6 +Version: 26.7 Release: %autorelease Summary: Tools for EFI and virtual machine firmware @@ -41,8 +41,6 @@ License: %{shrink: URL: https://gitlab.com/kraxel/virt-firmware-rs Source: https://gitlab.com/kraxel/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz -Patch2: update-generate-boot-csv.patch - ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cargo-rpm-macros >= 24 BuildRequires: pkgconfig(libudev) From 471531723b14001a3735fb66bf0b36604faf26ee Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 26 Aug 2026 20:13:31 +0200 Subject: [PATCH 7/8] update to version 26.8 --- sources | 2 +- virt-firmware-rs.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 0f01624..4de98a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (virt-firmware-rs-v26.7.tar.gz) = 06061dc4a6a6a10c9b373db08a45acdbe799b96bfb418a03e7214f72a8f6db06c50126381680d0f022fbfdb60a763f346ec1939bf2eb392df2a45400e07b4510 +SHA512 (virt-firmware-rs-v26.8.tar.gz) = 4573b05f567f2b4e17b2f7a0f54dd154b16e55f5b773a52358d42ffc841086be0c7a9231fa66150d55b5da267187a62b19d382ed10bd0c4558a264cb7baad68d diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index c5a0651..a1f241f 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -18,7 +18,7 @@ BuildRequires: rust-std-static-x86_64-unknown-uefi %endif Name: virt-firmware-rs -Version: 26.7 +Version: 26.8 Release: %autorelease Summary: Tools for EFI and virtual machine firmware From 42e58711184606443062e7b45f4b84c2a05783f9 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 26 Aug 2026 21:03:20 +0200 Subject: [PATCH 8/8] go back to x509-cert 0.2.x --- downgrade-x509.patch | 60 +++++++++++++++++++++++++++++++++++++++++++ virt-firmware-rs.spec | 1 + 2 files changed, 61 insertions(+) create mode 100644 downgrade-x509.patch diff --git a/downgrade-x509.patch b/downgrade-x509.patch new file mode 100644 index 0000000..76a94bf --- /dev/null +++ b/downgrade-x509.patch @@ -0,0 +1,60 @@ +diff --git a/Cargo.toml b/Cargo.toml +index 2a38a77d0a32..ed0d5a2f7314 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -24,7 +24,7 @@ byteorder = { version = "1", default-features = false } + clap = { version = "4.5.4", features = [ "derive", "wrap_help" ] } + clap_mangen = { version = ">= 0.2.30, < 0.4" } + env_logger = { version = "0.11" } +-der = { version = "0.8" } ++der = { version = "0.7.10" } + fdt = { version = "0.1" } + igvm = { version = "0.4" } + igvm_defs = { version = "0.4" } +@@ -38,7 +38,7 @@ spin = { version = ">= 0.10, < 0.13" } + uefi = { version = "0.39" } + uefi-raw = { version = "0.15.1" } + uguid = { version = "2" } +-x509-cert = { version = "0.3", default-features = false } ++x509-cert = { version = "0.2.5", default-features = false } + zerocopy = { version = "0.8", features = [ "derive" ] } + + virtfw-libhw = { path = "libhw", version = "0.5.2" } +diff --git a/libefi/src/sb/certs/info.rs b/libefi/src/sb/certs/info.rs +index 5926898c0e9d..0cd31bc376cc 100644 +--- a/libefi/src/sb/certs/info.rs ++++ b/libefi/src/sb/certs/info.rs +@@ -20,8 +20,8 @@ pub struct CertInfo { + + impl CertInfo { + fn attr(name: &Name, oid: &ObjectIdentifier) -> Option { +- for attr in name.iter_rdn() { +- if attr.iter().any(|x| x.oid == *oid) { ++ for attr in name.0.iter() { ++ if attr.0.iter().any(|x| x.oid == *oid) { + return Some(attr.to_string()); + } + } +@@ -30,16 +30,15 @@ impl CertInfo { + + pub fn new_from_der(der: &[u8]) -> Option { + let cert = Certificate::from_der(der).ok()?; +- let tbs = cert.tbs_certificate(); +- let subject = tbs.subject(); +- let issuer = tbs.issuer(); +- let not_before = tbs.validity().not_before.to_date_time(); +- let not_after = tbs.validity().not_after.to_date_time(); ++ let subject = cert.tbs_certificate.subject; ++ let issuer = cert.tbs_certificate.issuer; ++ let not_before = cert.tbs_certificate.validity.not_before.to_date_time(); ++ let not_after = cert.tbs_certificate.validity.not_after.to_date_time(); + let info = Self { + subject: subject.to_string(), +- subject_cn: Self::attr(subject, &OID_CN), ++ subject_cn: Self::attr(&subject, &OID_CN), + issuer: issuer.to_string(), +- issuer_cn: Self::attr(issuer, &OID_CN), ++ issuer_cn: Self::attr(&issuer, &OID_CN), + not_before: EfiTime::from(¬_before), + not_after: EfiTime::from(¬_after), + }; diff --git a/virt-firmware-rs.spec b/virt-firmware-rs.spec index a1f241f..ba8db1f 100644 --- a/virt-firmware-rs.spec +++ b/virt-firmware-rs.spec @@ -40,6 +40,7 @@ License: %{shrink: URL: https://gitlab.com/kraxel/virt-firmware-rs Source: https://gitlab.com/kraxel/%{name}/-/archive/v%{version}/%{name}-v%{version}.tar.gz +Patch1: downgrade-x509.patch ExclusiveArch: x86_64 aarch64 riscv64 BuildRequires: cargo-rpm-macros >= 24