From c10dbd16594c386a313ee40fa54834b415e4e21c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 8 Jun 2023 12:44:05 +0100 Subject: [PATCH] Don't match Nutanix-based baremetal systems resolves: rhbz#2211980 --- ...arrange-lxc-test-to-avoid-use-of-cat.patch | 2 +- ...ker-and-podman-tests-up-add-comments.patch | 2 +- ...location-of-test-file-proc-1-environ.patch | 2 +- 0004-Detect-OCI-containers.patch | 2 +- ...support-for-Alibaba-cloud-on-aarch64.patch | 2 +- ...atch-Nutanix-based-baremetal-systems.patch | 38 +++++++++++++++++++ copy-patches.sh | 2 +- virt-what.spec | 9 ++++- 8 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 0006-nutanix-Don-t-match-Nutanix-based-baremetal-systems.patch diff --git a/0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch b/0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch index 4446201..a70ad4e 100644 --- a/0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch +++ b/0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch @@ -23,5 +23,5 @@ index d090898e5..170bc24ab 100644 fi -- -2.31.1 +2.39.1 diff --git a/0002-Move-docker-and-podman-tests-up-add-comments.patch b/0002-Move-docker-and-podman-tests-up-add-comments.patch index 10b115c..68ac80e 100644 --- a/0002-Move-docker-and-podman-tests-up-add-comments.patch +++ b/0002-Move-docker-and-podman-tests-up-add-comments.patch @@ -79,5 +79,5 @@ index 170bc24ab..c6e4a1e00 100644 # example /proc/cpuinfo line indicating 'not baremetal' -- -2.31.1 +2.39.1 diff --git a/0003-podman-Fix-location-of-test-file-proc-1-environ.patch b/0003-podman-Fix-location-of-test-file-proc-1-environ.patch index 2ddd094..8f408e6 100644 --- a/0003-podman-Fix-location-of-test-file-proc-1-environ.patch +++ b/0003-podman-Fix-location-of-test-file-proc-1-environ.patch @@ -32,5 +32,5 @@ similarity index 100% rename from tests/podman/1/environ rename to tests/podman/proc/1/environ -- -2.31.1 +2.39.1 diff --git a/0004-Detect-OCI-containers.patch b/0004-Detect-OCI-containers.patch index f8e9a57..793894a 100644 --- a/0004-Detect-OCI-containers.patch +++ b/0004-Detect-OCI-containers.patch @@ -884,5 +884,5 @@ index 2c346bded..9dbc079f9 100644 Status: contributed by Jordan Webb -- -2.31.1 +2.39.1 diff --git a/0005-Add-support-for-Alibaba-cloud-on-aarch64.patch b/0005-Add-support-for-Alibaba-cloud-on-aarch64.patch index 0043482..f054f72 100644 --- a/0005-Add-support-for-Alibaba-cloud-on-aarch64.patch +++ b/0005-Add-support-for-Alibaba-cloud-on-aarch64.patch @@ -367,5 +367,5 @@ index 102e23f67..fbf8c54c5 100644 # The test for KVM above failed, so now we know we're # not using KVM acceleration. -- -2.31.1 +2.39.1 diff --git a/0006-nutanix-Don-t-match-Nutanix-based-baremetal-systems.patch b/0006-nutanix-Don-t-match-Nutanix-based-baremetal-systems.patch new file mode 100644 index 0000000..c0146f7 --- /dev/null +++ b/0006-nutanix-Don-t-match-Nutanix-based-baremetal-systems.patch @@ -0,0 +1,38 @@ +From 5f10aff9e4b06fb07eb09411d58ee8c8209ff477 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Wed, 7 Jun 2023 10:10:03 +0100 +Subject: [PATCH] nutanix: Don't match Nutanix-based baremetal systems + +Nutanix ship baremetal systems which have modified firmware that +reports similar to: + + Manufacturer: Nutanix + Product Name: NX-T00-4NL3-G5 + +This is not a virtual machine, but was recognised as such. Make sure +we match on 'Product Name: AHV' to identify only virtual machines. + +Thanks: Scott Yeager, Shaoyu Shang +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2211980 +(cherry picked from commit eeb7d8a1e7c73fc9c5b4e987d92a04136d61b07d) +--- + virt-what.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/virt-what.in b/virt-what.in +index fbf8c54c5..e310f339b 100644 +--- a/virt-what.in ++++ b/virt-what.in +@@ -259,7 +259,8 @@ if echo "$dmi" | grep -q 'Vendor: Parallels'; then + fi + + # Check for Nutanix AHV. +-if echo "$dmi" | grep -q 'Manufacturer: Nutanix'; then ++if echo "$dmi" | grep -q 'Manufacturer: Nutanix' && ++ echo "$dmi" | grep -q 'Product Name: AHV'; then + echo nutanix_ahv + fi + +-- +2.39.1 + diff --git a/copy-patches.sh b/copy-patches.sh index 01507ca..9047e8b 100755 --- a/copy-patches.sh +++ b/copy-patches.sh @@ -8,7 +8,7 @@ set -e # ./copy-patches.sh project=virt-what -rhel_version=9.2 +rhel_version=9.3 # Check we're in the right directory. if [ ! -f $project.spec ]; then diff --git a/virt-what.spec b/virt-what.spec index 5d8c955..ca4b3bc 100644 --- a/virt-what.spec +++ b/virt-what.spec @@ -1,6 +1,6 @@ Name: virt-what Version: 1.25 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Detect if we are running in a virtual machine License: GPLv2+ @@ -11,7 +11,7 @@ Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{versi Source1: copy-patches.sh # Patches are maintained in the following repository: -# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-9.2 +# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-9.3 # Patches. Patch0001: 0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch @@ -19,6 +19,7 @@ Patch0002: 0002-Move-docker-and-podman-tests-up-add-comments.patch Patch0003: 0003-podman-Fix-location-of-test-file-proc-1-environ.patch Patch0004: 0004-Detect-OCI-containers.patch Patch0005: 0005-Add-support-for-Alibaba-cloud-on-aarch64.patch +Patch0006: 0006-nutanix-Don-t-match-Nutanix-based-baremetal-systems.patch BuildRequires: make BuildRequires: git @@ -125,6 +126,10 @@ fi %changelog +* Thu Jun 08 2023 Richard W.M. Jones - 1.25-4 +- Don't match Nutanix-based baremetal systems + resolves: rhbz#2211980 + * Mon Jan 30 2023 Richard W.M. Jones - 1.25-3 - Add support for Alibaba Cloud on aarch64 resolves: rhbz#2165285