Blob Blame History Raw
From 7b22bc65e5df2bbe9f5ccf8ab05e67afb5a4cb8f Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Tue, 10 May 2022 12:53:07 +0200
Subject: [PATCH] adopt inversion of SELinux relabeling in virt-customize

Remove "--selinux-relabel" options.

Do not add any "--no-selinux-relabel" options; rely on the internal check
for SELinux support instead ("is_selinux_guest" in
"common/mlcustomize/SELinux_relabel.ml").

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554735
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2075718
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20220510105307.15402-1-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
[lersek@redhat.com: incorporate common submodule update]
(cherry picked from commit 0c24fc6015ce7719acff3bcead7eb227b6de3f21)
---
 common                          | 2 +-
 tests/test-v2v-conversion-of.sh | 7 -------
 2 files changed, 1 insertion(+), 8 deletions(-)

Submodule common 201632e4..af6cb55b (rewind):
diff --git a/common/mlcustomize/guest_packages.ml b/common/mlcustomize/guest_packages.ml
index 7c29a2ab..4c3c34ed 100644
--- a/common/mlcustomize/guest_packages.ml
+++ b/common/mlcustomize/guest_packages.ml
@@ -73,9 +73,9 @@ let install_command packages package_management =
   | "zypper" -> sprintf "zypper -n in -l %s" quoted_args
 
   | "unknown" ->
-    error_unknown_package_manager "--install"
+    error_unknown_package_manager (s_"--install")
   | pm ->
-    error_unimplemented_package_manager "--install" pm
+    error_unimplemented_package_manager (s_"--install") pm
 
 let update_command package_management =
   match package_management with
@@ -103,9 +103,9 @@ let update_command package_management =
   | "zypper" -> "zypper -n update -l"
 
   | "unknown" ->
-    error_unknown_package_manager "--update"
+    error_unknown_package_manager (s_"--update")
   | pm ->
-    error_unimplemented_package_manager "--update" pm
+    error_unimplemented_package_manager (s_"--update") pm
 
 let uninstall_command packages package_management =
   let quoted_args = String.concat " " (List.map quote packages) in
@@ -127,6 +127,6 @@ let uninstall_command packages package_management =
   | "zypper" -> sprintf "zypper -n rm %s" quoted_args
 
   | "unknown" ->
-    error_unknown_package_manager "--uninstall"
+    error_unknown_package_manager (s_"--uninstall")
   | pm ->
-    error_unimplemented_package_manager "--uninstall" pm
+    error_unimplemented_package_manager (s_"--uninstall") pm
diff --git a/tests/test-v2v-conversion-of.sh b/tests/test-v2v-conversion-of.sh
index 5a974d1b..5c5cae7c 100755
--- a/tests/test-v2v-conversion-of.sh
+++ b/tests/test-v2v-conversion-of.sh
@@ -53,13 +53,6 @@ fi
 # Some guests need special virt-builder parameters.
 # See virt-builder --notes "$guestname"
 declare -a extra
-case "$guestname" in
-    fedora*|rhel*|centos*)
-        extra[${#extra[*]}]='--selinux-relabel'
-        ;;
-    *)
-        ;;
-esac
 
 # Don't try to update Windows versions.
 case "$guestname" in