Laszlo Ersek
2022-May-25 07:20 UTC
[Libguestfs] [libguestfs-common PATCH] mlcustomize: refresh generated files
Refresh the generated mlcustomize files after libguestfs patch 'generator/customize: reintroduce "--selinux-relabel" as a compat option'. Fixes: 3420d5f14f6d0a713a40d1c2ac56677eba3c5ac8 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2089748 Signed-off-by: Laszlo Ersek <lersek at redhat.com> --- mlcustomize/customize_cmdline.mli | 2 ++ mlcustomize/customize_cmdline.ml | 10 ++++++++++ mlcustomize/customize-options.pod | 4 ++++ mlcustomize/customize-synopsis.pod | 2 +- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mlcustomize/customize_cmdline.mli b/mlcustomize/customize_cmdline.mli index 7ee882a6499b..7d14e782887b 100644 --- a/mlcustomize/customize_cmdline.mli +++ b/mlcustomize/customize_cmdline.mli @@ -103,6 +103,8 @@ and flags = { (* --password-crypto md5|sha256|sha512 *) no_selinux_relabel : bool; (* --no-selinux-relabel *) + selinux_relabel_ignored : bool; + (* --selinux-relabel *) sm_credentials : Subscription_manager.sm_credentials option; (* --sm-credentials SELECTOR *) } diff --git a/mlcustomize/customize_cmdline.ml b/mlcustomize/customize_cmdline.ml index 5d404e84490a..a17bed40e2fd 100644 --- a/mlcustomize/customize_cmdline.ml +++ b/mlcustomize/customize_cmdline.ml @@ -111,6 +111,8 @@ and flags = { (* --password-crypto md5|sha256|sha512 *) no_selinux_relabel : bool; (* --no-selinux-relabel *) + selinux_relabel_ignored : bool; + (* --selinux-relabel *) sm_credentials : Subscription_manager.sm_credentials option; (* --sm-credentials SELECTOR *) } @@ -122,6 +124,7 @@ let rec argspec () let scrub_logfile = ref false in let password_crypto = ref None in let no_selinux_relabel = ref false in + let selinux_relabel_ignored = ref false in let sm_credentials = ref None in let rec get_ops () = { @@ -132,6 +135,7 @@ let rec argspec () scrub_logfile = !scrub_logfile; password_crypto = !password_crypto; no_selinux_relabel = !no_selinux_relabel; + selinux_relabel_ignored = !selinux_relabel_ignored; sm_credentials = !sm_credentials; } in @@ -464,6 +468,12 @@ let rec argspec () s_"Do not relabel files with correct SELinux labels" ), None, "Do not attempt to correct the SELinux labels of files in the guest.\n\nIn such guests that support SELinux, customization automatically\nrelabels files so that they have the correct SELinux label. (The\nrelabeling is performed immediately, but if the operation fails,\ncustomization will instead touch F</.autorelabel> on the image to\nschedule a relabel operation for the next time the image boots.) This\noption disables the automatic relabeling.\n\nThe option is a no-op for guests that do not support SELinux."; + ( + [ L"selinux-relabel" ], + Getopt.Set selinux_relabel_ignored, + s_"Compatibility option doing nothing" + ), + None, "This is a compatibility option that does nothing."; ( [ L"sm-credentials" ], Getopt.String ( diff --git a/mlcustomize/customize-options.pod b/mlcustomize/customize-options.pod index a83c80a567d0..8aafacde669d 100644 --- a/mlcustomize/customize-options.pod +++ b/mlcustomize/customize-options.pod @@ -310,6 +310,10 @@ It cannot delete directories, only regular files. =back +=item B<--selinux-relabel> + +This is a compatibility option that does nothing. + =item B<--sm-attach> SELECTOR Attach to a pool using C<subscription-manager>. diff --git a/mlcustomize/customize-synopsis.pod b/mlcustomize/customize-synopsis.pod index 252085380a99..9e2c4b2bc990 100644 --- a/mlcustomize/customize-synopsis.pod +++ b/mlcustomize/customize-synopsis.pod @@ -13,4 +13,4 @@ [--uninstall PKG,PKG..] [--update] [--upload FILE:DEST] [--write FILE:CONTENT] [--no-logfile] [--password-crypto md5|sha256|sha512] [--no-selinux-relabel] - [--sm-credentials SELECTOR] + [--selinux-relabel] [--sm-credentials SELECTOR] -- 2.19.1.3.g30247aa5d201
Richard W.M. Jones
2022-May-25 09:36 UTC
[Libguestfs] [libguestfs-common PATCH] mlcustomize: refresh generated files
I have tested both patches this time with the three affected tools (virt-builder, virt-customize & virt-sysprep) and the --selinux-relabel option is now present and ignored. For the series: Reviewed-by: Richard W.M. Jones <rjones at redhat.com> Thanks for fixing this, I'll get it into C9S soon. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit