Blame SOURCES/0012-adopt-inversion-of-SELinux-relabeling-in-virt-custom.patch

c1a9fa
From 7b22bc65e5df2bbe9f5ccf8ab05e67afb5a4cb8f Mon Sep 17 00:00:00 2001
c1a9fa
From: Laszlo Ersek <lersek@redhat.com>
c1a9fa
Date: Tue, 10 May 2022 12:53:07 +0200
c1a9fa
Subject: [PATCH] adopt inversion of SELinux relabeling in virt-customize
c1a9fa
c1a9fa
Remove "--selinux-relabel" options.
c1a9fa
c1a9fa
Do not add any "--no-selinux-relabel" options; rely on the internal check
c1a9fa
for SELinux support instead ("is_selinux_guest" in
c1a9fa
"common/mlcustomize/SELinux_relabel.ml").
c1a9fa
c1a9fa
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1554735
c1a9fa
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2075718
c1a9fa
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
c1a9fa
Message-Id: <20220510105307.15402-1-lersek@redhat.com>
c1a9fa
Acked-by: Richard W.M. Jones <rjones@redhat.com>
c1a9fa
[lersek@redhat.com: incorporate common submodule update]
c1a9fa
(cherry picked from commit 0c24fc6015ce7719acff3bcead7eb227b6de3f21)
c1a9fa
---
c1a9fa
 common                          | 2 +-
c1a9fa
 tests/test-v2v-conversion-of.sh | 7 -------
c1a9fa
 2 files changed, 1 insertion(+), 8 deletions(-)
c1a9fa
c1a9fa
Submodule common 201632e4..af6cb55b (rewind):
c1a9fa
diff --git a/common/mlcustomize/guest_packages.ml b/common/mlcustomize/guest_packages.ml
c1a9fa
index 7c29a2ab..4c3c34ed 100644
c1a9fa
--- a/common/mlcustomize/guest_packages.ml
c1a9fa
+++ b/common/mlcustomize/guest_packages.ml
c1a9fa
@@ -73,9 +73,9 @@ let install_command packages package_management =
c1a9fa
   | "zypper" -> sprintf "zypper -n in -l %s" quoted_args
c1a9fa
 
c1a9fa
   | "unknown" ->
c1a9fa
-    error_unknown_package_manager "--install"
c1a9fa
+    error_unknown_package_manager (s_"--install")
c1a9fa
   | pm ->
c1a9fa
-    error_unimplemented_package_manager "--install" pm
c1a9fa
+    error_unimplemented_package_manager (s_"--install") pm
c1a9fa
 
c1a9fa
 let update_command package_management =
c1a9fa
   match package_management with
c1a9fa
@@ -103,9 +103,9 @@ let update_command package_management =
c1a9fa
   | "zypper" -> "zypper -n update -l"
c1a9fa
 
c1a9fa
   | "unknown" ->
c1a9fa
-    error_unknown_package_manager "--update"
c1a9fa
+    error_unknown_package_manager (s_"--update")
c1a9fa
   | pm ->
c1a9fa
-    error_unimplemented_package_manager "--update" pm
c1a9fa
+    error_unimplemented_package_manager (s_"--update") pm
c1a9fa
 
c1a9fa
 let uninstall_command packages package_management =
c1a9fa
   let quoted_args = String.concat " " (List.map quote packages) in
c1a9fa
@@ -127,6 +127,6 @@ let uninstall_command packages package_management =
c1a9fa
   | "zypper" -> sprintf "zypper -n rm %s" quoted_args
c1a9fa
 
c1a9fa
   | "unknown" ->
c1a9fa
-    error_unknown_package_manager "--uninstall"
c1a9fa
+    error_unknown_package_manager (s_"--uninstall")
c1a9fa
   | pm ->
c1a9fa
-    error_unimplemented_package_manager "--uninstall" pm
c1a9fa
+    error_unimplemented_package_manager (s_"--uninstall") pm
c1a9fa
diff --git a/tests/test-v2v-conversion-of.sh b/tests/test-v2v-conversion-of.sh
c1a9fa
index 5a974d1b..5c5cae7c 100755
c1a9fa
--- a/tests/test-v2v-conversion-of.sh
c1a9fa
+++ b/tests/test-v2v-conversion-of.sh
c1a9fa
@@ -53,13 +53,6 @@ fi
c1a9fa
 # Some guests need special virt-builder parameters.
c1a9fa
 # See virt-builder --notes "$guestname"
c1a9fa
 declare -a extra
c1a9fa
-case "$guestname" in
c1a9fa
-    fedora*|rhel*|centos*)
c1a9fa
-        extra[${#extra[*]}]='--selinux-relabel'
c1a9fa
-        ;;
c1a9fa
-    *)
c1a9fa
-        ;;
c1a9fa
-esac
c1a9fa
 
c1a9fa
 # Don't try to update Windows versions.
c1a9fa
 case "$guestname" in