630866
Name:           virt-what
689bb6
Version:        1.25
f3cb73
Release:        3%{?dist}
630866
Summary:        Detect if we are running in a virtual machine
630866
License:        GPLv2+
630866
630866
URL:            http://people.redhat.com/~rjones/virt-what/
689bb6
Source0:        http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz
630866
689bb6
# Maintainer script which helps with handling patches.
689bb6
Source1:       copy-patches.sh
689bb6
689bb6
# Patches are maintained in the following repository:
f3cb73
# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-9.2
689bb6
689bb6
# Patches.
f3cb73
Patch0001:     0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch
f3cb73
Patch0002:     0002-Move-docker-and-podman-tests-up-add-comments.patch
f3cb73
Patch0003:     0003-podman-Fix-location-of-test-file-proc-1-environ.patch
f3cb73
Patch0004:     0004-Detect-OCI-containers.patch
f3cb73
Patch0005:     0005-Add-support-for-Alibaba-cloud-on-aarch64.patch
630866
630866
BuildRequires:  make
630866
BuildRequires:  git
630866
BuildRequires:  autoconf, automake, libtool
630866
630866
# This is provided by the build root, but we make it explicit
630866
# anyway in case this was dropped from the build root in future.
630866
BuildRequires:  gcc
630866
BuildRequires:  /usr/bin/pod2man
630866
630866
# Required at build time in order to do 'make check' (for getopt).
630866
BuildRequires:  util-linux
630866
630866
# virt-what script uses dmidecode and getopt (from util-linux).
630866
# RPM cannot detect this so make the dependencies explicit here.
630866
%ifarch aarch64 %{ix86} x86_64
630866
Requires:       dmidecode
630866
%endif
630866
Requires:       util-linux
630866
630866
# Runs the 'which' program to find the helper.
630866
Requires:       which
630866
630866
630866
%description
630866
virt-what is a shell script which can be used to detect if the program
630866
is running in a virtual machine.
630866
630866
The program prints out a list of "facts" about the virtual machine,
630866
derived from heuristics.  One fact is printed per line.
630866
630866
If nothing is printed and the script exits with code 0 (no error),
630866
then it can mean either that the program is running on bare-metal or
630866
the program is running inside a type of virtual machine which we don't
630866
know about or can't detect.
630866
630866
Current types of virtualization detected:
630866
689bb6
 - alibaba_cloud      Alibaba cloud
689bb6
 - alibaba_cloud-ebm
689bb6
 - aws                Amazon Web Services
689bb6
 - bhyve              FreeBSD hypervisor
689bb6
 - docker             Docker container
689bb6
 - google_cloud       Google cloud
689bb6
 - hyperv             Microsoft Hyper-V
689bb6
 - ibm_power-kvm      IBM POWER KVM
689bb6
 - ibm_power-lpar_shared IBM POWER LPAR (hardware partition)
630866
 - ibm_power-lpar_dedicated
689bb6
 - ibm_systemz-*      IBM SystemZ Direct / LPAR / z/VM / KVM
689bb6
 - illumos-lx         Illumos with Linux syscall emulation
689bb6
 - ldoms              Oracle VM Server for SPARC Logical Domains
689bb6
 - linux_vserver      Linux VServer container
689bb6
 - lxc                Linux LXC container
689bb6
 - kvm                Linux Kernel Virtual Machine (KVM)
689bb6
 - lkvm               LKVM / kvmtool
689bb6
 - nutanix_ahv        Nutanix Acropolis Hypervisor (AHV)
689bb6
 - openvz             OpenVZ or Virtuozzo
689bb6
 - ovirt              oVirt node
689bb6
 - parallels          Parallels Virtual Platform
689bb6
 - podman             Podman container
689bb6
 - powervm_lx86       IBM PowerVM Lx86 Linux/x86 emulator
689bb6
 - qemu               QEMU (unaccelerated)
689bb6
 - redhat             Red Hat hypervisor
689bb6
 - rhev               Red Hat Enterprise Virtualization
689bb6
 - uml                User-Mode Linux (UML)
689bb6
 - virtage            Hitachi Virtualization Manager (HVM) Virtage LPAR
689bb6
 - virtualbox         VirtualBox
689bb6
 - virtualpc          Microsoft VirtualPC
689bb6
 - vmm                vmm OpenBSD hypervisor
689bb6
 - vmware             VMware
689bb6
 - xen                Xen
689bb6
 - xen-dom0           Xen dom0 (privileged domain)
689bb6
 - xen-domU           Xen domU (paravirtualized guest domain)
689bb6
 - xen-hvm            Xen guest fully virtualized (HVM)
630866
630866
630866
%prep
630866
%autosetup -S git
630866
630866
# Always rebuild upstream autotools files.
630866
autoreconf -i
630866
630866
630866
%build
630866
%configure
630866
make
630866
630866
630866
%install
630866
%make_install
630866
630866
630866
%check
689bb6
if ! make -k check ; then
689bb6
    find -name test-suite.log -exec cat {} \;
630866
    exit 1
630866
fi
630866
630866
%files
630866
%doc README COPYING
630866
%{_sbindir}/virt-what
630866
%{_libexecdir}/virt-what-cpuid-helper
630866
%{_mandir}/man1/*.1*
630866
630866
630866
%changelog
f3cb73
* Mon Jan 30 2023 Richard W.M. Jones <rjones@redhat.com> - 1.25-3
f3cb73
- Add support for Alibaba Cloud on aarch64
f3cb73
  resolves: rhbz#2165285
f3cb73
f3cb73
* Thu Jan 05 2023 Richard W.M. Jones <rjones@redhat.com> - 1.25-2
f3cb73
- Add support for OCI containers
f3cb73
  resolves: rhbz#2155233
f3cb73
689bb6
* Wed Aug 17 2022 Richard W.M. Jones <rjones@redhat.com> - 1.25-1
689bb6
- Rebase to 1.25
689bb6
  resolves: rhbz#2118997
689bb6
689bb6
* Tue Aug 09 2022 Richard W.M. Jones <rjones@redhat.com> - 1.22-2
689bb6
- Detect KVM on GCE and AWS Arm instances
689bb6
  resolves: rhbz#2114997
689bb6
689bb6
* Thu Apr 14 2022 Richard W.M. Jones <rjones@redhat.com> - 1.22-1
689bb6
- New upstream version 1.22.
689bb6
  resolves: rhbz#2074476
689bb6
- Fix Source0 line.
689bb6
630866
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.21-2.2
630866
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
630866
  Related: rhbz#1991688
630866
630866
* Fri Jun 18 2021 Richard W.M. Jones <rjones@redhat.com> - 1.21-1.el9.2
630866
- Support for VMware on aarch64
630866
  resolves: rhbz#1959174
630866
630866
* Wed Jun  2 2021 Richard W.M. Jones <rjones@redhat.com> - 1.21-1.el9.1
630866
- Add gating tests for RHEL 9
630866
630866
* Mon Apr 19 2021 Richard W.M. Jones <rjones@redhat.com> - 1.21-1
630866
- New upstream version 1.21.
630866
630866
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.20-6
630866
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
630866
630866
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-5
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
630866
630866
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-4
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
630866
630866
* Tue Jul 14 2020 Tom Stellard <tstellar@redhat.com> - 1.20-3
630866
- Use make macros
630866
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
630866
630866
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-2
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
630866
630866
* Thu Oct  3 2019 Richard W.M. Jones <rjones@redhat.com> - 1.20-1
630866
- New upstream version 1.20.
630866
630866
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.19-3
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
630866
630866
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.19-2
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
630866
630866
* Wed Oct 31 2018 Richard W.M. Jones <rjones@redhat.com> - 1.19-1
630866
- New upstream version 1.19.
630866
- Fixes support for AWS.
630866
- Remove patches which are now upstream.
630866
630866
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-6
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
630866
630866
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-5
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
630866
630866
* Tue Oct 17 2017 Richard W.M. Jones <rjones@redhat.com> - 1.18-4
630866
- Include upstream patches since 1.18 was released.
630866
- dmidecode is also available on aarch64.
630866
630866
* Mon Jul 31 2017 Richard W.M. Jones <rjones@redhat.com> - 1.18-1
630866
- New upstream version 1.18.
630866
- Update RPM description section with complete list of supported guests.
630866
- If ‘make check’ fails, dump ‘test-suite.log’.
630866
630866
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-6
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
630866
630866
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-5
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
630866
630866
* Tue Jun 14 2016 Richard W.M. Jones <rjones@redhat.com> - 1.15-4
630866
- Require 'which' program.
630866
630866
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-3
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
630866
630866
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-2
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
630866
630866
* Tue Apr 21 2015 Richard W.M. Jones <rjones@redhat.com> - 1.15-1
630866
- New upstream version 1.15.
630866
- Remove patches, now upstream.
630866
630866
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-5
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
630866
630866
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-4
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
630866
630866
* Mon Oct 28 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-3
630866
- Suppress warning message on Amazon EC2:
630866
  "grep: /proc/xen/capabilities: No such file or directory"
630866
630866
* Wed Sep 11 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-2
630866
- Include two upstream patches for detecting Xen and Linux VServer better
630866
  (RHBZ#973663).
630866
- Modernize the spec file.
630866
630866
* Mon Jul 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-1
630866
- New upstream version 1.13.
630866
630866
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-3
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
630866
630866
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-2
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
630866
630866
* Sat Mar 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1.12-1
630866
- New upstream version 1.12.
630866
630866
* Wed Feb 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1.11-3
630866
- Remove ExclusiveArch, but don't require dmidecode except on
630866
  i?86 and x86-64 (RHBZ#791370).
630866
630866
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
630866
630866
* Fri May 27 2011 Richard W.M. Jones <rjones@redhat.com> - 1.11-1
630866
- New upstream version 1.11.
630866
630866
* Wed May 25 2011 Richard W.M. Jones <rjones@redhat.com> - 1.10-1
630866
- New upstream version 1.10.
630866
630866
* Tue Mar  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1.9-1
630866
- New upstream version 1.9.
630866
630866
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-2
630866
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
630866
630866
* Mon Jan 31 2011 Richard W.M. Jones <rjones@redhat.com> - 1.8-1
630866
- New upstream version 1.8.
630866
630866
* Thu Jan 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1.7-1
630866
- New upstream version 1.7.
630866
630866
* Wed Jan 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1.6-2
630866
- New upstream version 1.6.
630866
- BuildRequires 'getopt' from util-linux-ng.
630866
630866
* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1.5-1
630866
- New upstream version 1.5.
630866
- Add 'make check' section.
630866
630866
* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1.4-1
630866
- New upstream version 1.4.
630866
- More hypervisor types detected.
630866
630866
* Thu Oct 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-4
630866
- Move configure into build (not prep).
630866
630866
* Thu Oct 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-3
630866
- Initial import into Fedora.
630866
630866
* Tue Oct 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-2
630866
- Make changes suggested by reviewer (RHBZ#644259).
630866
630866
* Tue Oct 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-1
630866
- Initial release.