From 73186b154ca3a50bd6d2967417a2e051889df045 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 15 Nov 2024 11:38:26 +0000 Subject: [PATCH] generator: Remove common/mlv2v/uefi.ml{,i} files Stop generating these files. They are currently only used by virt-v2v -o qemu mode, and there are better ways to locate the UEFI files there. Update the common submodule to bring in: Richard W.M. Jones (5): mlcustomize: Add heuristic support for Windows Server 2025 mlcustomize/customize_run.ml: Move 'in' to new line mlstdutils/guestfs_config: Define host_os mlcustomize, mltools: Check guest OS is compatible before allowing --run Remove mlv2v/ subdirectory --- Makefile.am | 3 +-- common | 2 +- generator/UEFI.ml | 58 +++------------------------------------------- generator/UEFI.mli | 2 -- generator/main.ml | 8 ------- 5 files changed, 5 insertions(+), 68 deletions(-) diff --git a/Makefile.am b/Makefile.am index 593704407..305b75c36 100644 --- a/Makefile.am +++ b/Makefile.am @@ -447,7 +447,6 @@ maintainer-check-extra-dist: grep -v '^common/mlgettext/' | \ grep -v '^common/mlprogress/' | \ grep -v '^common/mltools/' | \ - grep -v '^common/mlv2v/' | \ grep -v '^common/mlvisit/' | \ grep -v '^common/mlxml/' | \ grep -v '^intltool-.*\.in' | \ @@ -458,7 +457,7 @@ maintainer-check-extra-dist: cat tmp/comm-out [ ! -s tmp/comm-out ] @echo Checking for generated files missing from the tarball ... - @for f in `cat generator/files-generated.txt | grep -v '^common/mlcustomize' | grep -v '^common/mlv2v/'`; do \ + @for f in `cat generator/files-generated.txt | grep -v '^common/mlcustomize'`; do \ if ! grep -sq "^$$f\$$" tmp/tarfiles; then \ echo generated file missing from tarball: $$f; \ exit 1; \ diff --git a/common b/common index e9eea65a4..9293e5eb5 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit e9eea65a49581edab8b11bbac2616e1b07098248 +Subproject commit 9293e5eb5b8f7a8c596cc6f7701c6bbc3bd86f25 diff --git a/generator/UEFI.ml b/generator/UEFI.ml index 953ef28ae..d8db68c19 100644 --- a/generator/UEFI.ml +++ b/generator/UEFI.ml @@ -23,9 +23,9 @@ open Utils open Pr open Docstrings -(* danpb is proposing that libvirt supports Eloader type="efi"/E - * (L). If that happens we can - * simplify or even remove this code. +(* This code is currently only used when starting the appliance + * on aarch64 (and probably only on RHEL). (See lib/appliance-uefi.c) + * It is vestigial and we should think about deleting it. *) (* Order is significant *within architectures only*. *) @@ -110,55 +110,3 @@ let generate_uefi_c () = ) firmware; pr "};\n"; ) arches - -let generate_uefi_ml () = - generate_header OCamlStyle GPLv2plus; - - pr "\ -type uefi_firmware = { - code : string; - code_debug : string option; - vars : string; - flags : uefi_flags; -} -and uefi_flags = uefi_flag list -and uefi_flag = UEFI_FLAG_SECURE_BOOT_REQUIRED -"; - List.iter ( - fun arch -> - let firmware = - List.filter (fun (arch', _, _, _, _) -> arch = arch') firmware in - pr "\n"; - pr "let uefi_%s_firmware = [\n" arch; - List.iter ( - fun (_, code, code_debug, vars, flags) -> - pr " { code = %S;\n" code; - (match code_debug with - | None -> pr " code_debug = None;\n" - | Some code_debug -> pr " code_debug = Some %S;\n" code_debug - ); - pr " vars = %S;\n" vars; - pr " flags = [%s];\n" (String.concat "; " flags); - pr " };\n"; - ) firmware; - pr "]\n"; - ) arches - -let generate_uefi_mli () = - generate_header OCamlStyle GPLv2plus; - - pr "\ -(** UEFI paths. *) - -type uefi_firmware = { - code : string; (** code file *) - code_debug : string option; (** code debug file *) - vars : string; (** vars template file *) - flags : uefi_flags; (** flags *) -} -and uefi_flags = uefi_flag list -and uefi_flag = UEFI_FLAG_SECURE_BOOT_REQUIRED - -"; - - List.iter (pr "val uefi_%s_firmware : uefi_firmware list\n") arches diff --git a/generator/UEFI.mli b/generator/UEFI.mli index 64aa1f837..ecd71ce54 100644 --- a/generator/UEFI.mli +++ b/generator/UEFI.mli @@ -17,5 +17,3 @@ *) val generate_uefi_c : unit -> unit -val generate_uefi_ml : unit -> unit -val generate_uefi_mli : unit -> unit diff --git a/generator/main.ml b/generator/main.ml index ff5e964a0..821ea1747 100644 --- a/generator/main.ml +++ b/generator/main.ml @@ -347,14 +347,6 @@ Run it from the top source directory using the command output_to "gobject/src/session.c" GObject.generate_gobject_session_source; - (* mlv2v may not be shipped in this source. *) - if is_regular_file "common/mlv2v/Makefile.am" then ( - output_to "common/mlv2v/uefi.ml" - UEFI.generate_uefi_ml; - output_to "common/mlv2v/uefi.mli" - UEFI.generate_uefi_mli; - ); - (* mlcustomize may not be shipped in this source. *) if is_regular_file "common/mlcustomize/Makefile.am" then ( output_to "common/mlcustomize/customize_cmdline.mli"