From fe1ce092424df1fe321b83037a83affef75d232b Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 20 Aug 2024 21:15:34 +0100 Subject: [PATCH] generator: Don't include virt-customize --inject* options in virt-v2v Virt-v2v already includes facilities for injecting QEMU guest agent etc. We shouldn't add the virt-customize options for this. Update common submodule to include: Richard W.M. Jones (2): mlcustomize: Move virt-customize modules to mlcustomize/ mlcustomize: Update generated options for virt-v2v --- common | 2 +- generator/customize.ml | 122 ++++++++++++++++++++++++++++++---------- generator/customize.mli | 4 +- generator/main.ml | 6 +- 4 files changed, 101 insertions(+), 33 deletions(-) diff --git a/common b/common index a78839676..b6e703dcc 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit a78839676bef05e4fd61a37557d44a77c740b75c +Subproject commit b6e703dccbbec2d8e68bce5e5779abf4d34d1196 diff --git a/generator/customize.ml b/generator/customize.ml index e110be7ad..dc36afe70 100644 --- a/generator/customize.ml +++ b/generator/customize.ml @@ -26,14 +26,15 @@ open Pr let generate_header = generate_header ~inputs:["generator/customize.ml"] -(* Command-line arguments used by virt-customize, virt-builder and - * virt-sysprep. +(* Command-line arguments used by virt-customize, virt-builder, + * virt-sysprep and (some for) virt-v2v. *) type op = { op_name : string; (* argument name, without "--" *) op_type : op_type; (* argument value type *) op_discrim : string; (* argument discriminator in OCaml code *) + op_exclude_v2v : bool; (* if true, don't include for virt-v2v *) op_shortdesc : string; (* single-line description *) op_pod_longdesc : string; (* multi-line description *) } @@ -54,6 +55,7 @@ let ops = [ { op_name = "append-line"; op_type = StringPair "FILE:LINE"; op_discrim = "`AppendLine"; + op_exclude_v2v = false; op_shortdesc = "Append line(s) to the file"; op_pod_longdesc = "\ Append a single line of text to the C. If the file does not already @@ -88,6 +90,7 @@ To insert a blank line before the appended line, do: { op_name = "chmod"; op_type = StringPair "PERMISSIONS:FILE"; op_discrim = "`Chmod"; + op_exclude_v2v = false; op_shortdesc = "Change the permissions of a file"; op_pod_longdesc = "\ Change the permissions of C to C. @@ -99,6 +102,7 @@ it with C<0> to get octal, ie. use C<0700> not C<700>."; { op_name = "chown"; op_type = StringTriplet "UID:GID:PATH"; op_discrim = "`Chown"; + op_exclude_v2v = false; op_shortdesc = "Change the owner user and group ID of a file or directory"; op_pod_longdesc = "\ Change the owner user and group ID of a file or directory in the guest. @@ -127,6 +131,7 @@ See also: I<--upload>."; { op_name = "commands-from-file"; op_type = StringFn ("FILENAME", "customize_read_from_file"); op_discrim = "`CommandsFromFile"; + op_exclude_v2v = false; op_shortdesc = "Read customize commands from file"; op_pod_longdesc = "\ Read the customize commands from a file, one (and its arguments) @@ -155,6 +160,7 @@ line."; { op_name = "copy"; op_type = StringPair "SOURCE:DEST"; op_discrim = "`Copy"; + op_exclude_v2v = false; op_shortdesc = "Copy files in disk image"; op_pod_longdesc = "\ Copy files or directories recursively inside the guest. @@ -165,6 +171,7 @@ Wildcards cannot be used."; { op_name = "copy-in"; op_type = StringPair "LOCALPATH:REMOTEDIR"; op_discrim = "`CopyIn"; + op_exclude_v2v = false; op_shortdesc = "Copy local files or directories into image"; op_pod_longdesc = "\ Copy local files or directories recursively into the disk image, @@ -176,6 +183,7 @@ Wildcards cannot be used."; { op_name = "delete"; op_type = String "PATH"; op_discrim = "`Delete"; + op_exclude_v2v = false; op_shortdesc = "Delete a file or directory"; op_pod_longdesc = "\ Delete a file from the guest. Or delete a directory (and all its @@ -193,6 +201,7 @@ See also: I<--upload>, I<--scrub>."; { op_name = "edit"; op_type = StringPair "FILE:EXPR"; op_discrim = "`Edit"; + op_exclude_v2v = false; op_shortdesc = "Edit file using Perl expression"; op_pod_longdesc = "\ Edit C using the Perl expression C. @@ -208,6 +217,7 @@ See L."; { op_name = "firstboot"; op_type = String "SCRIPT"; op_discrim = "`FirstbootScript"; + op_exclude_v2v = false; op_shortdesc = "Run script at first guest boot"; op_pod_longdesc = "\ Install C