Remove virt-customize subscription-manager options
resolves: RHEL-122307
This commit is contained in:
parent
e982f73685
commit
e5e46352ba
427
0014-common-update-submodule.patch
Normal file
427
0014-common-update-submodule.patch
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
From 5ed99959b689fc6fa287d9c6100e92a18bc1c9be Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Robinson <crobinso@redhat.com>
|
||||||
|
Date: Tue, 14 Oct 2025 14:07:40 -0400
|
||||||
|
Subject: [PATCH] common: update submodule
|
||||||
|
|
||||||
|
Cole Robinson (1):
|
||||||
|
mlcustomize: deprecate and remove --sm-* options
|
||||||
|
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
(cherry picked from commit 57b225d8d324d15d79fab2ccc6944868c1168a42)
|
||||||
|
---
|
||||||
|
common | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
Submodule common da55dc4d7..90399dd18:
|
||||||
|
diff --git a/common/mlcustomize/Makefile.am b/common/mlcustomize/Makefile.am
|
||||||
|
index 6e03bfea3..351524c80 100644
|
||||||
|
--- a/common/mlcustomize/Makefile.am
|
||||||
|
+++ b/common/mlcustomize/Makefile.am
|
||||||
|
@@ -47,7 +47,6 @@ SOURCES_MLI = \
|
||||||
|
random_seed.mli \
|
||||||
|
SELinux_relabel.mli \
|
||||||
|
ssh_key.mli \
|
||||||
|
- subscription_manager.mli \
|
||||||
|
timezone.mli
|
||||||
|
|
||||||
|
# This list must be in dependency order.
|
||||||
|
@@ -58,7 +57,6 @@ SOURCES_ML = \
|
||||||
|
perl_edit.ml \
|
||||||
|
random_seed.ml \
|
||||||
|
ssh_key.ml \
|
||||||
|
- subscription_manager.ml \
|
||||||
|
timezone.ml \
|
||||||
|
crypt.ml \
|
||||||
|
password.ml \
|
||||||
|
diff --git a/common/mlcustomize/customize-options.pod b/common/mlcustomize/customize-options.pod
|
||||||
|
index 157145ebc..c8de3953c 100644
|
||||||
|
--- a/common/mlcustomize/customize-options.pod
|
||||||
|
+++ b/common/mlcustomize/customize-options.pod
|
||||||
|
@@ -392,35 +392,6 @@ It cannot delete directories, only regular files.
|
||||||
|
|
||||||
|
This is a compatibility option that does nothing.
|
||||||
|
|
||||||
|
-=item B<--sm-attach> SELECTOR
|
||||||
|
-
|
||||||
|
-Attach to a pool using C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-See L<virt-builder(1)/SUBSCRIPTION-MANAGER> for the format of
|
||||||
|
-the C<SELECTOR> field.
|
||||||
|
-
|
||||||
|
-=item B<--sm-credentials> SELECTOR
|
||||||
|
-
|
||||||
|
-Set the credentials for C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-See L<virt-builder(1)/SUBSCRIPTION-MANAGER> for the format of
|
||||||
|
-the C<SELECTOR> field.
|
||||||
|
-
|
||||||
|
-=item B<--sm-register>
|
||||||
|
-
|
||||||
|
-Register the guest using C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-This requires credentials being set using I<--sm-credentials>.
|
||||||
|
-
|
||||||
|
-=item B<--sm-remove>
|
||||||
|
-
|
||||||
|
-Remove all the subscriptions from the guest using
|
||||||
|
-C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-=item B<--sm-unregister>
|
||||||
|
-
|
||||||
|
-Unregister the guest using C<subscription-manager>.
|
||||||
|
-
|
||||||
|
=item B<--ssh-inject> USER[:SELECTOR]
|
||||||
|
|
||||||
|
Inject an ssh key so the given C<USER> will be able to log in over
|
||||||
|
diff --git a/common/mlcustomize/customize-synopsis.pod b/common/mlcustomize/customize-synopsis.pod
|
||||||
|
index 957de8cf2..f5eeb69dd 100644
|
||||||
|
--- a/common/mlcustomize/customize-synopsis.pod
|
||||||
|
+++ b/common/mlcustomize/customize-synopsis.pod
|
||||||
|
@@ -8,11 +8,10 @@
|
||||||
|
[--install PKG,PKG..] [--link TARGET:LINK[:LINK..]] [--mkdir DIR]
|
||||||
|
[--move SOURCE:DEST] [--password USER:SELECTOR]
|
||||||
|
[--root-password SELECTOR] [--run SCRIPT]
|
||||||
|
- [--run-command 'CMD+ARGS'] [--scrub FILE] [--sm-attach SELECTOR]
|
||||||
|
- [--sm-register] [--sm-remove] [--sm-unregister]
|
||||||
|
+ [--run-command 'CMD+ARGS'] [--scrub FILE]
|
||||||
|
[--ssh-inject USER[:SELECTOR]] [--tar-in TARFILE:REMOTEDIR]
|
||||||
|
[--timezone TIMEZONE] [--touch FILE] [--truncate FILE]
|
||||||
|
[--truncate-recursive PATH] [--uninstall PKG,PKG..] [--update]
|
||||||
|
[--upload FILE:DEST] [--write FILE:CONTENT] [--no-logfile]
|
||||||
|
[--password-crypto md5|sha256|sha512] [--no-selinux-relabel]
|
||||||
|
- [--selinux-relabel] [--sm-credentials SELECTOR]
|
||||||
|
+ [--selinux-relabel]
|
||||||
|
diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml
|
||||||
|
index 7451f1325..786f4ee49 100644
|
||||||
|
--- a/common/mlcustomize/customize_cmdline.ml
|
||||||
|
+++ b/common/mlcustomize/customize_cmdline.ml
|
||||||
|
@@ -85,14 +85,6 @@ and op = [
|
||||||
|
(* --run-command 'CMD+ARGS' *)
|
||||||
|
| `Scrub of string
|
||||||
|
(* --scrub FILE *)
|
||||||
|
- | `SMAttach of Subscription_manager.sm_pool
|
||||||
|
- (* --sm-attach SELECTOR *)
|
||||||
|
- | `SMRegister
|
||||||
|
- (* --sm-register *)
|
||||||
|
- | `SMRemove
|
||||||
|
- (* --sm-remove *)
|
||||||
|
- | `SMUnregister
|
||||||
|
- (* --sm-unregister *)
|
||||||
|
| `SSHInject of string * Ssh_key.ssh_key_selector
|
||||||
|
(* --ssh-inject USER[:SELECTOR] *)
|
||||||
|
| `TarIn of string * string
|
||||||
|
@@ -123,8 +115,6 @@ and flags = {
|
||||||
|
(* --no-selinux-relabel *)
|
||||||
|
selinux_relabel_ignored : bool;
|
||||||
|
(* --selinux-relabel *)
|
||||||
|
- sm_credentials : Subscription_manager.sm_credentials option;
|
||||||
|
- (* --sm-credentials SELECTOR *)
|
||||||
|
}
|
||||||
|
|
||||||
|
type argspec = Getopt.keys * Getopt.spec * Getopt.doc
|
||||||
|
@@ -135,7 +125,6 @@ let rec argspec ?(v2v = false) () =
|
||||||
|
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 () = {
|
||||||
|
ops = List.rev !ops;
|
||||||
|
@@ -146,7 +135,6 @@ let rec argspec ?(v2v = false) () =
|
||||||
|
password_crypto = !password_crypto;
|
||||||
|
no_selinux_relabel = !no_selinux_relabel;
|
||||||
|
selinux_relabel_ignored = !selinux_relabel_ignored;
|
||||||
|
- sm_credentials = !sm_credentials;
|
||||||
|
}
|
||||||
|
in
|
||||||
|
|
||||||
|
@@ -386,35 +374,6 @@ let rec argspec ?(v2v = false) () =
|
||||||
|
s_"Scrub a file"
|
||||||
|
),
|
||||||
|
Some "FILE", "Scrub a file from the guest. This is like I<--delete> except that:\n\n=over 4\n\n=item *\n\nIt scrubs the data so a guest could not recover it.\n\n=item *\n\nIt cannot delete directories, only regular files.\n\n=back", false;
|
||||||
|
- (
|
||||||
|
- [ L"sm-attach" ],
|
||||||
|
- Getopt.String (
|
||||||
|
- s_"SELECTOR",
|
||||||
|
- fun s ->
|
||||||
|
- let sel = Subscription_manager.parse_pool_selector s in
|
||||||
|
- List.push_front (`SMAttach sel) ops
|
||||||
|
- ),
|
||||||
|
- s_"Attach to a subscription-manager pool"
|
||||||
|
- ),
|
||||||
|
- Some "SELECTOR", "Attach to a pool using C<subscription-manager>.\n\nSee L<virt-builder(1)/SUBSCRIPTION-MANAGER> for the format of\nthe C<SELECTOR> field.", false;
|
||||||
|
- (
|
||||||
|
- [ L"sm-register" ],
|
||||||
|
- Getopt.Unit (fun () -> List.push_front `SMRegister ops),
|
||||||
|
- s_"Register using subscription-manager"
|
||||||
|
- ),
|
||||||
|
- None, "Register the guest using C<subscription-manager>.\n\nThis requires credentials being set using I<--sm-credentials>.", false;
|
||||||
|
- (
|
||||||
|
- [ L"sm-remove" ],
|
||||||
|
- Getopt.Unit (fun () -> List.push_front `SMRemove ops),
|
||||||
|
- s_"Remove all the subscriptions"
|
||||||
|
- ),
|
||||||
|
- None, "Remove all the subscriptions from the guest using\nC<subscription-manager>.", false;
|
||||||
|
- (
|
||||||
|
- [ L"sm-unregister" ],
|
||||||
|
- Getopt.Unit (fun () -> List.push_front `SMUnregister ops),
|
||||||
|
- s_"Unregister using subscription-manager"
|
||||||
|
- ),
|
||||||
|
- None, "Unregister the guest using C<subscription-manager>.", false;
|
||||||
|
(
|
||||||
|
[ L"ssh-inject" ],
|
||||||
|
Getopt.String (
|
||||||
|
@@ -529,16 +488,6 @@ let rec argspec ?(v2v = false) () =
|
||||||
|
s_"Compatibility option doing nothing"
|
||||||
|
),
|
||||||
|
None, "This is a compatibility option that does nothing.", false;
|
||||||
|
- (
|
||||||
|
- [ L"sm-credentials" ],
|
||||||
|
- Getopt.String (
|
||||||
|
- s_"SELECTOR",
|
||||||
|
- fun s ->
|
||||||
|
- sm_credentials := Some (Subscription_manager.parse_credentials_selector s)
|
||||||
|
- ),
|
||||||
|
- s_"Credentials for subscription-manager"
|
||||||
|
- ),
|
||||||
|
- Some "SELECTOR", "Set the credentials for C<subscription-manager>.\n\nSee L<virt-builder(1)/SUBSCRIPTION-MANAGER> for the format of\nthe C<SELECTOR> field.", false;
|
||||||
|
]
|
||||||
|
and customize_read_from_file filename =
|
||||||
|
let forbidden_commands = [
|
||||||
|
diff --git a/common/mlcustomize/customize_cmdline.mli b/common/mlcustomize/customize_cmdline.mli
|
||||||
|
index cc32f3af4..baacda9d3 100644
|
||||||
|
--- a/common/mlcustomize/customize_cmdline.mli
|
||||||
|
+++ b/common/mlcustomize/customize_cmdline.mli
|
||||||
|
@@ -77,14 +77,6 @@ and op = [
|
||||||
|
(* --run-command 'CMD+ARGS' *)
|
||||||
|
| `Scrub of string
|
||||||
|
(* --scrub FILE *)
|
||||||
|
- | `SMAttach of Subscription_manager.sm_pool
|
||||||
|
- (* --sm-attach SELECTOR *)
|
||||||
|
- | `SMRegister
|
||||||
|
- (* --sm-register *)
|
||||||
|
- | `SMRemove
|
||||||
|
- (* --sm-remove *)
|
||||||
|
- | `SMUnregister
|
||||||
|
- (* --sm-unregister *)
|
||||||
|
| `SSHInject of string * Ssh_key.ssh_key_selector
|
||||||
|
(* --ssh-inject USER[:SELECTOR] *)
|
||||||
|
| `TarIn of string * string
|
||||||
|
@@ -115,8 +107,6 @@ and flags = {
|
||||||
|
(* --no-selinux-relabel *)
|
||||||
|
selinux_relabel_ignored : bool;
|
||||||
|
(* --selinux-relabel *)
|
||||||
|
- sm_credentials : Subscription_manager.sm_credentials option;
|
||||||
|
- (* --sm-credentials SELECTOR *)
|
||||||
|
}
|
||||||
|
|
||||||
|
type argspec = Getopt.keys * Getopt.spec * Getopt.doc
|
||||||
|
diff --git a/common/mlcustomize/customize_run.ml b/common/mlcustomize/customize_run.ml
|
||||||
|
index 64afd3ab5..1baf0f3cf 100644
|
||||||
|
--- a/common/mlcustomize/customize_run.ml
|
||||||
|
+++ b/common/mlcustomize/customize_run.ml
|
||||||
|
@@ -279,43 +279,6 @@ let run (g : G.guestfs) root (ops : ops) =
|
||||||
|
message (f_"Scrubbing: %s") path;
|
||||||
|
g#scrub_file path
|
||||||
|
|
||||||
|
- | `SMAttach pool ->
|
||||||
|
- (match pool with
|
||||||
|
- | Subscription_manager.PoolAuto ->
|
||||||
|
- message (f_"Attaching to compatible subscriptions");
|
||||||
|
- let cmd = "subscription-manager attach --auto" in
|
||||||
|
- do_run ~display:cmd ~warn_failed_no_network:true cmd
|
||||||
|
- | Subscription_manager.PoolId id ->
|
||||||
|
- message (f_"Attaching to the pool %s") id;
|
||||||
|
- let cmd = sprintf "subscription-manager attach --pool=%s" (quote id) in
|
||||||
|
- do_run ~display:cmd ~warn_failed_no_network:true cmd
|
||||||
|
- )
|
||||||
|
-
|
||||||
|
- | `SMRegister ->
|
||||||
|
- message (f_"Registering with subscription-manager");
|
||||||
|
- let creds =
|
||||||
|
- match ops.flags.sm_credentials with
|
||||||
|
- | None ->
|
||||||
|
- error (f_"subscription-manager credentials required for \
|
||||||
|
- --sm-register")
|
||||||
|
- | Some c -> c in
|
||||||
|
- let cmd = sprintf "subscription-manager register \
|
||||||
|
- --username=%s --password=%s"
|
||||||
|
- (quote creds.Subscription_manager.sm_username)
|
||||||
|
- (quote creds.Subscription_manager.sm_password) in
|
||||||
|
- do_run ~display:"subscription-manager register"
|
||||||
|
- ~warn_failed_no_network:true cmd
|
||||||
|
-
|
||||||
|
- | `SMRemove ->
|
||||||
|
- message (f_"Removing all the subscriptions");
|
||||||
|
- let cmd = "subscription-manager remove --all" in
|
||||||
|
- do_run ~display:cmd ~warn_failed_no_network:true cmd
|
||||||
|
-
|
||||||
|
- | `SMUnregister ->
|
||||||
|
- message (f_"Unregistering with subscription-manager");
|
||||||
|
- let cmd = "subscription-manager unregister" in
|
||||||
|
- do_run ~display:cmd ~warn_failed_no_network:true cmd
|
||||||
|
-
|
||||||
|
| `SSHInject (user, selector) ->
|
||||||
|
if unix_like (g#inspect_get_type root) then (
|
||||||
|
message (f_"SSH key inject: %s") user;
|
||||||
|
diff --git a/common/mlcustomize/subscription_manager.ml b/common/mlcustomize/subscription_manager.ml
|
||||||
|
deleted file mode 100644
|
||||||
|
index 104602462..000000000
|
||||||
|
--- a/common/mlcustomize/subscription_manager.ml
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,54 +0,0 @@
|
||||||
|
-(* virt-customize
|
||||||
|
- * Copyright (C) 2015 Red Hat Inc.
|
||||||
|
- *
|
||||||
|
- * This program is free software; you can redistribute it and/or modify
|
||||||
|
- * it under the terms of the GNU General Public License as published by
|
||||||
|
- * the Free Software Foundation; either version 2 of the License, or
|
||||||
|
- * (at your option) any later version.
|
||||||
|
- *
|
||||||
|
- * This program is distributed in the hope that it will be useful,
|
||||||
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
- * GNU General Public License for more details.
|
||||||
|
- *
|
||||||
|
- * You should have received a copy of the GNU General Public License along
|
||||||
|
- * with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
- *)
|
||||||
|
-
|
||||||
|
-open Std_utils
|
||||||
|
-open Tools_utils
|
||||||
|
-open Common_gettext.Gettext
|
||||||
|
-
|
||||||
|
-type sm_credentials = {
|
||||||
|
- sm_username : string;
|
||||||
|
- sm_password : string;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-type sm_pool =
|
||||||
|
-| PoolAuto
|
||||||
|
-| PoolId of string
|
||||||
|
-
|
||||||
|
-let rec parse_credentials_selector arg =
|
||||||
|
- parse_credentials_selector_list arg (String.nsplit ":" arg)
|
||||||
|
-
|
||||||
|
-and parse_credentials_selector_list orig_arg = function
|
||||||
|
- | [ username; "password"; password ] ->
|
||||||
|
- { sm_username = username; sm_password = password }
|
||||||
|
- | [ username; "file"; filename ] ->
|
||||||
|
- { sm_username = username; sm_password = read_first_line_from_file filename }
|
||||||
|
- | _ ->
|
||||||
|
- error (f_"invalid sm-credentials selector ‘%s’; see the man page") orig_arg
|
||||||
|
-
|
||||||
|
-let rec parse_pool_selector arg =
|
||||||
|
- parse_pool_selector_list arg (String.nsplit ":" arg)
|
||||||
|
-
|
||||||
|
-and parse_pool_selector_list orig_arg = function
|
||||||
|
- | [ "auto" ] ->
|
||||||
|
- PoolAuto
|
||||||
|
- | [ "pool"; pool ] ->
|
||||||
|
- PoolId pool
|
||||||
|
- | [ "file"; filename ] ->
|
||||||
|
- PoolId (read_first_line_from_file filename)
|
||||||
|
- | _ ->
|
||||||
|
- error (f_"invalid sm-attach selector ‘%s’; see the man page") orig_arg
|
||||||
|
diff --git a/common/mlcustomize/subscription_manager.mli b/common/mlcustomize/subscription_manager.mli
|
||||||
|
deleted file mode 100644
|
||||||
|
index bb6b92014..000000000
|
||||||
|
--- a/common/mlcustomize/subscription_manager.mli
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,34 +0,0 @@
|
||||||
|
-(* virt-customize
|
||||||
|
- * Copyright (C) 2015 Red Hat Inc.
|
||||||
|
- *
|
||||||
|
- * This program is free software; you can redistribute it and/or modify
|
||||||
|
- * it under the terms of the GNU General Public License as published by
|
||||||
|
- * the Free Software Foundation; either version 2 of the License, or
|
||||||
|
- * (at your option) any later version.
|
||||||
|
- *
|
||||||
|
- * This program is distributed in the hope that it will be useful,
|
||||||
|
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
- * GNU General Public License for more details.
|
||||||
|
- *
|
||||||
|
- * You should have received a copy of the GNU General Public License along
|
||||||
|
- * with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
- *)
|
||||||
|
-
|
||||||
|
-type sm_credentials = {
|
||||||
|
- sm_username : string;
|
||||||
|
- sm_password : string;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-type sm_pool =
|
||||||
|
-| PoolAuto (** Automatic entitlements. *)
|
||||||
|
-| PoolId of string (** Specific pool. *)
|
||||||
|
-
|
||||||
|
-val parse_credentials_selector : string -> sm_credentials
|
||||||
|
-(** Parse the selector field in --sm-credentials. Exits if the format
|
||||||
|
- is not valid. *)
|
||||||
|
-
|
||||||
|
-val parse_pool_selector : string -> sm_pool
|
||||||
|
-(** Parse the selector field in --sm-attach. Exits if the format
|
||||||
|
- is not valid. *)
|
||||||
|
diff --git a/common/mlcustomize/v2v-customize-options.pod b/common/mlcustomize/v2v-customize-options.pod
|
||||||
|
index 0974f4592..f02f05dac 100644
|
||||||
|
--- a/common/mlcustomize/v2v-customize-options.pod
|
||||||
|
+++ b/common/mlcustomize/v2v-customize-options.pod
|
||||||
|
@@ -338,35 +338,6 @@ It cannot delete directories, only regular files.
|
||||||
|
|
||||||
|
This is a compatibility option that does nothing.
|
||||||
|
|
||||||
|
-=item B<--sm-attach> SELECTOR
|
||||||
|
-
|
||||||
|
-Attach to a pool using C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-See L<virt-builder(1)/SUBSCRIPTION-MANAGER> for the format of
|
||||||
|
-the C<SELECTOR> field.
|
||||||
|
-
|
||||||
|
-=item B<--sm-credentials> SELECTOR
|
||||||
|
-
|
||||||
|
-Set the credentials for C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-See L<virt-builder(1)/SUBSCRIPTION-MANAGER> for the format of
|
||||||
|
-the C<SELECTOR> field.
|
||||||
|
-
|
||||||
|
-=item B<--sm-register>
|
||||||
|
-
|
||||||
|
-Register the guest using C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-This requires credentials being set using I<--sm-credentials>.
|
||||||
|
-
|
||||||
|
-=item B<--sm-remove>
|
||||||
|
-
|
||||||
|
-Remove all the subscriptions from the guest using
|
||||||
|
-C<subscription-manager>.
|
||||||
|
-
|
||||||
|
-=item B<--sm-unregister>
|
||||||
|
-
|
||||||
|
-Unregister the guest using C<subscription-manager>.
|
||||||
|
-
|
||||||
|
=item B<--ssh-inject> USER[:SELECTOR]
|
||||||
|
|
||||||
|
Inject an ssh key so the given C<USER> will be able to log in over
|
||||||
|
diff --git a/common/mlcustomize/v2v-customize-synopsis.pod b/common/mlcustomize/v2v-customize-synopsis.pod
|
||||||
|
index 7eb0a941c..4c1a1547b 100644
|
||||||
|
--- a/common/mlcustomize/v2v-customize-synopsis.pod
|
||||||
|
+++ b/common/mlcustomize/v2v-customize-synopsis.pod
|
||||||
|
@@ -7,11 +7,9 @@
|
||||||
|
[--link TARGET:LINK[:LINK..]] [--mkdir DIR] [--move SOURCE:DEST]
|
||||||
|
[--password USER:SELECTOR] [--root-password SELECTOR]
|
||||||
|
[--run SCRIPT] [--run-command 'CMD+ARGS'] [--scrub FILE]
|
||||||
|
- [--sm-attach SELECTOR] [--sm-register] [--sm-remove]
|
||||||
|
- [--sm-unregister] [--ssh-inject USER[:SELECTOR]]
|
||||||
|
- [--tar-in TARFILE:REMOTEDIR] [--timezone TIMEZONE] [--touch FILE]
|
||||||
|
- [--truncate FILE] [--truncate-recursive PATH]
|
||||||
|
- [--uninstall PKG,PKG..] [--update] [--upload FILE:DEST]
|
||||||
|
- [--write FILE:CONTENT] [--no-logfile]
|
||||||
|
+ [--ssh-inject USER[:SELECTOR]] [--tar-in TARFILE:REMOTEDIR]
|
||||||
|
+ [--timezone TIMEZONE] [--touch FILE] [--truncate FILE]
|
||||||
|
+ [--truncate-recursive PATH] [--uninstall PKG,PKG..] [--update]
|
||||||
|
+ [--upload FILE:DEST] [--write FILE:CONTENT] [--no-logfile]
|
||||||
|
[--password-crypto md5|sha256|sha512] [--no-selinux-relabel]
|
||||||
|
- [--selinux-relabel] [--sm-credentials SELECTOR]
|
||||||
|
+ [--selinux-relabel]
|
||||||
150
0015-pod-Document-removal-of-sm-options.patch
Normal file
150
0015-pod-Document-removal-of-sm-options.patch
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
From de70086dbe2eb8a6ec023ebbd0c84489a8719ba1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Cole Robinson <crobinso@redhat.com>
|
||||||
|
Date: Tue, 14 Oct 2025 14:16:19 -0400
|
||||||
|
Subject: [PATCH] pod: Document removal of --sm-* options
|
||||||
|
|
||||||
|
Update podcheck.pl to allow for still documenting these
|
||||||
|
in virt-builder.pod
|
||||||
|
|
||||||
|
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
||||||
|
(cherry picked from commit 7bad703d724cd976cc3b7760b09af353aab46ff0)
|
||||||
|
---
|
||||||
|
builder/virt-builder.pod | 73 +++++++++++++-----------------------
|
||||||
|
customize/virt-customize.pod | 8 ++++
|
||||||
|
podcheck.pl | 13 ++++++-
|
||||||
|
3 files changed, 46 insertions(+), 48 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod
|
||||||
|
index ff0ec250c..f043939ca 100644
|
||||||
|
--- a/builder/virt-builder.pod
|
||||||
|
+++ b/builder/virt-builder.pod
|
||||||
|
@@ -878,53 +878,6 @@ F<C:\Program Files\Guestfs\Firstboot\log.txt>.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
-=head2 SUBSCRIPTION-MANAGER
|
||||||
|
-
|
||||||
|
-It is possible to automate the registration and attaching of the
|
||||||
|
-system using C<subscription-manager>. This is typical on
|
||||||
|
-Red Hat Enterprise Linux guests. There are few options which ease
|
||||||
|
-this process, avoid executing commands manually and exposing
|
||||||
|
-passwords on command line.
|
||||||
|
-
|
||||||
|
-I<--sm-register> starts the registration process, and requires
|
||||||
|
-I<--sm-credentials> to be specified; the format of the C<SELECTOR>
|
||||||
|
-of I<--sm-credentials> is one of the following formats:
|
||||||
|
-
|
||||||
|
-=over 4
|
||||||
|
-
|
||||||
|
-=item B<--sm-credentials> USER:file:FILENAME
|
||||||
|
-
|
||||||
|
-Read the password for the specified C<USER> from F<FILENAME>.
|
||||||
|
-
|
||||||
|
-=item B<--sm-credentials> USER:password:PASSWORD
|
||||||
|
-
|
||||||
|
-Use the literal string C<PASSWORD> for the specified C<USER>.
|
||||||
|
-
|
||||||
|
-=back
|
||||||
|
-
|
||||||
|
-I<--sm-attach> attaches the system to subscriptions; the format
|
||||||
|
-of its C<SELECTOR> is one of the following:
|
||||||
|
-
|
||||||
|
-=over 4
|
||||||
|
-
|
||||||
|
-=item B<--sm-attach> auto
|
||||||
|
-
|
||||||
|
-C<subscription-manager> attaches to the best-fitting subscriptions
|
||||||
|
-for the system.
|
||||||
|
-
|
||||||
|
-=item B<--sm-attach> file:FILENAME
|
||||||
|
-
|
||||||
|
-Read the pool ID from F<FILENAME>.
|
||||||
|
-
|
||||||
|
-=item B<--sm-attach> pool:POOL
|
||||||
|
-
|
||||||
|
-Use the literal string C<POOL> as pool ID.
|
||||||
|
-
|
||||||
|
-=back
|
||||||
|
-
|
||||||
|
-I<--sm-remove> removes all the subscriptions from the guest, while
|
||||||
|
-I<--sm-unregister> completely unregister the system.
|
||||||
|
-
|
||||||
|
=head2 INSTALLATION PROCESS
|
||||||
|
|
||||||
|
When you invoke virt-builder, installation proceeds as follows:
|
||||||
|
@@ -1764,6 +1717,32 @@ them, which is normal and harmless.
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
|
+=head2 DEPRECATED OPTIONS
|
||||||
|
+
|
||||||
|
+In version 1.56 the subscription-manager options were removed.
|
||||||
|
+
|
||||||
|
+=over 4
|
||||||
|
+
|
||||||
|
+=item B<--sm-credentials>
|
||||||
|
+
|
||||||
|
+=item B<--sm-register>
|
||||||
|
+
|
||||||
|
+Use --run='subscription-manager register --username=USER --password=PASS'
|
||||||
|
+
|
||||||
|
+=item B<--sm-unregister>
|
||||||
|
+
|
||||||
|
+Use --run='subscription-manager unregister'
|
||||||
|
+
|
||||||
|
+=item B<--sm-attach>
|
||||||
|
+
|
||||||
|
+Use --run='subscription-manager attach ...'
|
||||||
|
+
|
||||||
|
+=item B<--sm-remove>
|
||||||
|
+
|
||||||
|
+Use --run='subscription-manager remove --all'
|
||||||
|
+
|
||||||
|
+=back
|
||||||
|
+
|
||||||
|
=head1 MACHINE READABLE OUTPUT
|
||||||
|
|
||||||
|
The I<--machine-readable> option can be used to make the output more
|
||||||
|
diff --git a/customize/virt-customize.pod b/customize/virt-customize.pod
|
||||||
|
index fb3d65665..9fee64ebc 100644
|
||||||
|
--- a/customize/virt-customize.pod
|
||||||
|
+++ b/customize/virt-customize.pod
|
||||||
|
@@ -248,6 +248,14 @@ existing ones.
|
||||||
|
|
||||||
|
For further details, see L<virt-builder(1)/SELINUX>.
|
||||||
|
|
||||||
|
+=head1 DEPRECATED OPTIONS
|
||||||
|
+
|
||||||
|
+In version 1.56 the subscription-manager options were removed:
|
||||||
|
+B<--sm-credentials>, B<--sm-register>, B<--sm-unregister>,
|
||||||
|
+B<--sm-attach>, B<--sm-remove>
|
||||||
|
+
|
||||||
|
+For further details, see L<virt-builder(1)/DEPRECATED OPTIONS>.
|
||||||
|
+
|
||||||
|
=head1 EXIT STATUS
|
||||||
|
|
||||||
|
This program returns 0 on success, or 1 if there was an error.
|
||||||
|
diff --git a/podcheck.pl b/podcheck.pl
|
||||||
|
index 795fe0e9b..047bbf8da 100755
|
||||||
|
--- a/podcheck.pl
|
||||||
|
+++ b/podcheck.pl
|
||||||
|
@@ -203,7 +203,18 @@ my $pod_options_checked = 0;
|
||||||
|
|
||||||
|
my %pod_options = ();
|
||||||
|
$pod_options{$_} = 1 foreach ( $content =~ /^=item.*B<(-[-\w]+)(?:=.*)?>/gm );
|
||||||
|
-foreach (sort keys %pod_options) {
|
||||||
|
+
|
||||||
|
+my %pod_option_exists = ();
|
||||||
|
+$pod_option_exists{$_} = 1 foreach keys %pod_options;
|
||||||
|
+
|
||||||
|
+# Removed from the tool but we still document them
|
||||||
|
+delete $pod_option_exists{"--sm-credentials"};
|
||||||
|
+delete $pod_option_exists{"--sm-register"};
|
||||||
|
+delete $pod_option_exists{"--sm-unregister"};
|
||||||
|
+delete $pod_option_exists{"--sm-remove"};
|
||||||
|
+delete $pod_option_exists{"--sm-attach"};
|
||||||
|
+
|
||||||
|
+foreach (sort keys %pod_option_exists) {
|
||||||
|
unless ($ignore{$_}) {
|
||||||
|
$pod_options_checked++;
|
||||||
|
unless (exists $tool_option_exists{$_}) {
|
||||||
@ -1,4 +1,4 @@
|
|||||||
From f114d864dfd4fd947f44126480d7916ad371f703 Mon Sep 17 00:00:00 2001
|
From df670d9ce28791b2adfbecd52be305ef9e66f88f Mon Sep 17 00:00:00 2001
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
Date: Tue, 7 Jul 2015 09:28:03 -0400
|
Date: Tue, 7 Jul 2015 09:28:03 -0400
|
||||||
Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for
|
Subject: [PATCH] RHEL: Reject use of libguestfs-winsupport features except for
|
||||||
@ -1,4 +1,4 @@
|
|||||||
From 5bb3b3c53a6d91acf6aa73b1581be2662a6c5cfc Mon Sep 17 00:00:00 2001
|
From 51014489c0d57727744d2a7921f2a3a5edfb27d2 Mon Sep 17 00:00:00 2001
|
||||||
From: "Richard W.M. Jones" <rjones@redhat.com>
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
Date: Mon, 21 Nov 2022 13:03:22 +0000
|
Date: Mon, 21 Nov 2022 13:03:22 +0000
|
||||||
Subject: [PATCH] RHEL: builder: Disable opensuse repository
|
Subject: [PATCH] RHEL: builder: Disable opensuse repository
|
||||||
@ -16,7 +16,7 @@
|
|||||||
Summary: Tools to access and modify virtual machine disk images
|
Summary: Tools to access and modify virtual machine disk images
|
||||||
Name: guestfs-tools
|
Name: guestfs-tools
|
||||||
Version: 1.54.0
|
Version: 1.54.0
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
License: GPL-2.0-or-later AND LGPL-2.0-or-later
|
||||||
|
|
||||||
# Build only for architectures that have a kernel
|
# Build only for architectures that have a kernel
|
||||||
@ -58,8 +58,10 @@ Patch0010: 0010-builder-templates-make-template.ml-Add-str-and-unix-.patch
|
|||||||
Patch0011: 0011-daemon-generator-Use-power-of-2-for-initial-size-of-.patch
|
Patch0011: 0011-daemon-generator-Use-power-of-2-for-initial-size-of-.patch
|
||||||
Patch0012: 0012-builder-Build-fedora-42-template.patch
|
Patch0012: 0012-builder-Build-fedora-42-template.patch
|
||||||
Patch0013: 0013-Update-common-submodule.patch
|
Patch0013: 0013-Update-common-submodule.patch
|
||||||
Patch0014: 0014-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
|
Patch0014: 0014-common-update-submodule.patch
|
||||||
Patch0015: 0015-RHEL-builder-Disable-opensuse-repository.patch
|
Patch0015: 0015-pod-Document-removal-of-sm-options.patch
|
||||||
|
Patch0016: 0016-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch
|
||||||
|
Patch0017: 0017-RHEL-builder-Disable-opensuse-repository.patch
|
||||||
|
|
||||||
# Basic build requirements.
|
# Basic build requirements.
|
||||||
BuildRequires: autoconf, automake, libtool, gettext-devel
|
BuildRequires: autoconf, automake, libtool, gettext-devel
|
||||||
@ -112,8 +114,11 @@ BuildRequires: perl-generators
|
|||||||
BuildRequires: gnupg2
|
BuildRequires: gnupg2
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Temporary, remove when libguestfs 1.57.5 is available in RHEL 10.2
|
||||||
|
BuildRequires: passt
|
||||||
|
|
||||||
# Ensure a minimum version of libguestfs is installed.
|
# Ensure a minimum version of libguestfs is installed.
|
||||||
Requires: libguestfs%{?_isa} >= 1:1.57.3-2.el10
|
Requires: libguestfs%{?_isa} >= 1:1.57.5-1.el10
|
||||||
|
|
||||||
# For virt-builder:
|
# For virt-builder:
|
||||||
Requires: curl
|
Requires: curl
|
||||||
@ -411,12 +416,14 @@ end
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Sep 23 2025 Richard W.M. Jones <rjones@redhat.com> - 1.54.0-5
|
* Fri Oct 17 2025 Richard W.M. Jones <rjones@redhat.com> - 1.54.0-6
|
||||||
- Fix pnputils after virt-customize --inject-virtio-win
|
- Fix pnputils after virt-customize --inject-virtio-win
|
||||||
resolves: RHEL-116537
|
resolves: RHEL-116537
|
||||||
- Unify spec files between Fedora and RHEL.
|
- Unify spec files between Fedora and RHEL.
|
||||||
- Ensure a minimum version of libguestfs is installed at build and run time.
|
- Ensure a minimum version of libguestfs is installed at build and run time.
|
||||||
resolves: RHEL-116716
|
resolves: RHEL-116716
|
||||||
|
- Remove virt-customize subscription-manager options
|
||||||
|
resolves: RHEL-122307
|
||||||
|
|
||||||
* Wed Aug 13 2025 Richard W.M. Jones <rjones@redhat.com> - 1.54.0-3
|
* Wed Aug 13 2025 Richard W.M. Jones <rjones@redhat.com> - 1.54.0-3
|
||||||
- Rebase to guestfs-tools 1.54.0
|
- Rebase to guestfs-tools 1.54.0
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user