Blame SPECS/virt-what.spec

e10a2d
Name:           virt-what
e10a2d
Version:        1.18
741a94
Release:        11%{?dist}
e10a2d
Summary:        Detect if we are running in a virtual machine
e10a2d
License:        GPLv2+
e10a2d
e10a2d
URL:            http://people.redhat.com/~rjones/virt-what/
e10a2d
Source0:        http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz
e10a2d
e10a2d
# Some of the patches below apply to .gitignore, but that file was not
e10a2d
# included in the tarball before v1.20.  This is the version from
e10a2d
# v1.18 upstream allowing patching to go ahead.
e10a2d
Source1:        gitignore
e10a2d
e10a2d
# Patches from upstream since 1.18 was released.
e10a2d
Patch0001:      0001-Missing-have_cpuinfo-check.patch
e10a2d
Patch0002:      0002-Remove-bashisms.patch
e10a2d
Patch0003:      0003-As-xen-pv-guest-can-access-cpuid-from-Intel-CPUs-sta.patch
e10a2d
Patch0004:      0004-Recognize-ppc64le-little-endian-virtualization-RHBZ-.patch
e10a2d
Patch0005:      0005-Determine-architecture-via-uname-m.patch
e10a2d
Patch0006:      0006-Allow-using-sysctl-for-example-when-proc-isn-t-avail.patch
e10a2d
Patch0007:      0007-Replace-with-since-the-former-is-a-bash-ism.patch
e10a2d
# AWS support:
e10a2d
Patch0008:      0008-aws-Detect-AWS-from-dmidecode-information.patch
e10a2d
Patch0009:      0009-tests-Fix-tests-when-run-on-AWS.patch
e10a2d
Patch0010:      0010-aws-Add-regression-test-for-AWS-on-KVM-on-x86_64-arc.patch
e10a2d
Patch0011:      0011-aws-Add-regression-test-for-AWS-on-baremetal-on-x86_.patch
e10a2d
Patch0012:      0012-aws-Add-regression-test-for-AWS-on-Xen-on-x86_64-arc.patch
e10a2d
Patch0013:      0013-aws-Add-regression-test-for-AWS-on-KVM-on-ARM-archit.patch
e10a2d
# Refactor build and tests.
e10a2d
Patch0014:      0014-build-Remove-files-on-make-clean.patch
e10a2d
Patch0015:      0015-Arrange-tests-in-subdirectories.patch
e10a2d
Patch0016:      0016-build-Add-.gitignore-to-tarball.patch
e10a2d
Patch0017:      0017-maintainer-Add-rules-for-maintainers.patch
e10a2d
# Support for Nutanix AHV (RHBZ#1756381).
e10a2d
Patch0018:      0018-Fix-virt-what-cpuid-helper.patch
e10a2d
Patch0019:      0019-Add-support-for-Nutanix-Acropolis-Hypervisor-AHV-RHB.patch
e10a2d
Patch0020:      0020-helper-Fix-KVM-signature.patch
e10a2d
# Support for virtualized MS Surfacebook 2.
e10a2d
Patch0021:      0021-Fix-incorrect-detection-of-MS-Surfacebook-2-as-a-vir.patch
e10a2d
e10a2d
# Fix crash on non-KVM platforms through incorrect use of CPUID in
e10a2d
# patch 0018 (https://bugzilla.redhat.com/show_bug.cgi?id=1756381#c15).
e10a2d
Patch0022:      0001-Simplify-and-fix-invocation-of-cpuid.patch
e10a2d
e10a2d
# Patches touch Makefile.am:
e10a2d
BuildRequires:  autoconf, automake
e10a2d
BuildRequires:  git
e10a2d
e10a2d
# This is provided by the build root, but we make it explicit
e10a2d
# anyway in case this was dropped from the build root in future.
e10a2d
BuildRequires:  /usr/bin/pod2man
e10a2d
e10a2d
# Required at build time in order to do 'make check' (for getopt).
e10a2d
BuildRequires:  util-linux
e10a2d
e10a2d
# virt-what script uses dmidecode and getopt (from util-linux).
e10a2d
# RPM cannot detect this so make the dependencies explicit here.
e10a2d
%ifarch aarch64 %{ix86} x86_64
e10a2d
Requires:       dmidecode
e10a2d
%endif
e10a2d
Requires:       util-linux
e10a2d
e10a2d
# Runs the 'which' program to find the helper.
e10a2d
Requires:       which
e10a2d
e10a2d
e10a2d
%description
e10a2d
virt-what is a shell script which can be used to detect if the program
e10a2d
is running in a virtual machine.
e10a2d
e10a2d
The program prints out a list of "facts" about the virtual machine,
e10a2d
derived from heuristics.  One fact is printed per line.
e10a2d
e10a2d
If nothing is printed and the script exits with code 0 (no error),
e10a2d
then it can mean either that the program is running on bare-metal or
e10a2d
the program is running inside a type of virtual machine which we don't
e10a2d
know about or can't detect.
e10a2d
e10a2d
Current types of virtualization detected:
e10a2d
e10a2d
 - aws          Amazon Web Services
e10a2d
 - bhyve        FreeBSD hypervisor
e10a2d
 - docker       Docker container
e10a2d
 - hyperv       Microsoft Hyper-V
e10a2d
 - ibm_power-kvm
e10a2d
                IBM POWER KVM
e10a2d
 - ibm_power-lpar_shared
e10a2d
 - ibm_power-lpar_dedicated
e10a2d
                IBM POWER LPAR (hardware partition)
e10a2d
 - ibm_systemz-*
e10a2d
                IBM SystemZ Direct / LPAR / z/VM / KVM
e10a2d
 - ldoms        Oracle VM Server for SPARC Logical Domains
e10a2d
 - linux_vserver
e10a2d
                Linux VServer container
e10a2d
 - lxc          Linux LXC container
e10a2d
 - kvm          Linux Kernel Virtual Machine (KVM)
e10a2d
 - lkvm         LKVM / kvmtool
e10a2d
 - openvz       OpenVZ or Virtuozzo
e10a2d
 - ovirt        oVirt node
e10a2d
 - parallels    Parallels Virtual Platform
e10a2d
 - powervm_lx86 IBM PowerVM Lx86 Linux/x86 emulator
e10a2d
 - qemu         QEMU (unaccelerated)
e10a2d
 - rhev         Red Hat Enterprise Virtualization
e10a2d
 - uml          User-Mode Linux (UML)
e10a2d
 - virtage      Hitachi Virtualization Manager (HVM) Virtage LPAR
e10a2d
 - virtualbox   VirtualBox
e10a2d
 - virtualpc    Microsoft VirtualPC
e10a2d
 - vmm          vmm OpenBSD hypervisor
e10a2d
 - vmware       VMware
e10a2d
 - xen          Xen
e10a2d
 - xen-dom0     Xen dom0 (privileged domain)
e10a2d
 - xen-domU     Xen domU (paravirtualized guest domain)
e10a2d
 - xen-hvm      Xen guest fully virtualized (HVM)
e10a2d
e10a2d
e10a2d
%prep
e10a2d
# We can go back to autosetup once we rebase to >= v1.20 which
e10a2d
# includes the .gitignore file in the tarball.
e10a2d
#autosetup -S git
e10a2d
# But until then ...
e10a2d
%setup -q -n %{name}-%{version}
e10a2d
cp %{SOURCE1} .gitignore
e10a2d
git init
e10a2d
git config user.email "noone@example.com"
e10a2d
git config user.name "no one"
e10a2d
git add .
e10a2d
git commit -a -q -m "%{version} baseline"
e10a2d
git am %{patches} 
e10a2d
e10a2d
e10a2d
%build
e10a2d
# Patches touch Makefile.am:
e10a2d
autoreconf -i
e10a2d
%configure
e10a2d
make
e10a2d
e10a2d
e10a2d
%install
e10a2d
make install DESTDIR=$RPM_BUILD_ROOT
e10a2d
e10a2d
e10a2d
%check
e10a2d
if ! make check ; then
e10a2d
    cat test-suite.log
e10a2d
    exit 1
e10a2d
fi
e10a2d
e10a2d
%files
e10a2d
%doc README COPYING
e10a2d
%{_sbindir}/virt-what
e10a2d
%{_libexecdir}/virt-what-cpuid-helper
e10a2d
%{_mandir}/man1/*.1*
e10a2d
e10a2d
e10a2d
%changelog
741a94
* Wed Jun 02 2021 Richard W.M. Jones <rjones@redhat.com> - 1.18-11
741a94
- Add gating tests
741a94
  resolves: rhbz#1967094
741a94
e9744c
* Wed Apr 28 2021 Richard W.M. Jones <rjones@redhat.com> - 1.18-10
e9744c
- Rebuild for fixed binutils on aarch64
e9744c
  resolves: rhbz#1954455
e9744c
e10a2d
* Tue Apr 13 2021 Richard W.M. Jones <rjones@redhat.com> - 1.18-9
e10a2d
- Fix crash on non-KVM platforms through incorrect use of CPUID
e10a2d
  related: rhbz#1756381
e10a2d
e10a2d
* Tue Dec 10 2019 Richard W.M. Jones <rjones@redhat.com> - 1.18-8
e10a2d
- Add support for Nutanix AHV
e10a2d
  resolves: rhbz#1756381
e10a2d
- Add all patches since 1.18 was released, up to 1.20 and beyond.
e10a2d
e10a2d
* Thu Mar 21 2019 Richard W.M. Jones <rjones@redhat.com> - 1.18-7
e10a2d
- Add gating tests resolves: rhbz#1682785
e10a2d
e10a2d
* Wed Oct 31 2018 Richard W.M. Jones <rjones@redhat.com> - 1.18-6
e10a2d
- Add further patches to fix AWS support
e10a2d
  resolves: rhbz#1644497
e10a2d
e10a2d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-5
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e10a2d
e10a2d
* Tue Oct 17 2017 Richard W.M. Jones <rjones@redhat.com> - 1.18-4
e10a2d
- Include upstream patches since 1.18 was released.
e10a2d
- dmidecode is also available on aarch64.
e10a2d
e10a2d
* Mon Jul 31 2017 Richard W.M. Jones <rjones@redhat.com> - 1.18-1
e10a2d
- New upstream version 1.18.
e10a2d
- Update RPM description section with complete list of supported guests.
e10a2d
- If ‘make check’ fails, dump ‘test-suite.log’.
e10a2d
e10a2d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-6
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e10a2d
e10a2d
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-5
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e10a2d
e10a2d
* Tue Jun 14 2016 Richard W.M. Jones <rjones@redhat.com> - 1.15-4
e10a2d
- Require 'which' program.
e10a2d
e10a2d
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-3
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
e10a2d
e10a2d
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.15-2
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
e10a2d
e10a2d
* Tue Apr 21 2015 Richard W.M. Jones <rjones@redhat.com> - 1.15-1
e10a2d
- New upstream version 1.15.
e10a2d
- Remove patches, now upstream.
e10a2d
e10a2d
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-5
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
e10a2d
e10a2d
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-4
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
e10a2d
e10a2d
* Mon Oct 28 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-3
e10a2d
- Suppress warning message on Amazon EC2:
e10a2d
  "grep: /proc/xen/capabilities: No such file or directory"
e10a2d
e10a2d
* Wed Sep 11 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-2
e10a2d
- Include two upstream patches for detecting Xen and Linux VServer better
e10a2d
  (RHBZ#973663).
e10a2d
- Modernize the spec file.
e10a2d
e10a2d
* Mon Jul 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-1
e10a2d
- New upstream version 1.13.
e10a2d
e10a2d
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-3
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e10a2d
e10a2d
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-2
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
e10a2d
e10a2d
* Sat Mar 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1.12-1
e10a2d
- New upstream version 1.12.
e10a2d
e10a2d
* Wed Feb 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1.11-3
e10a2d
- Remove ExclusiveArch, but don't require dmidecode except on
e10a2d
  i?86 and x86-64 (RHBZ#791370).
e10a2d
e10a2d
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
e10a2d
e10a2d
* Fri May 27 2011 Richard W.M. Jones <rjones@redhat.com> - 1.11-1
e10a2d
- New upstream version 1.11.
e10a2d
e10a2d
* Wed May 25 2011 Richard W.M. Jones <rjones@redhat.com> - 1.10-1
e10a2d
- New upstream version 1.10.
e10a2d
e10a2d
* Tue Mar  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1.9-1
e10a2d
- New upstream version 1.9.
e10a2d
e10a2d
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-2
e10a2d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
e10a2d
e10a2d
* Mon Jan 31 2011 Richard W.M. Jones <rjones@redhat.com> - 1.8-1
e10a2d
- New upstream version 1.8.
e10a2d
e10a2d
* Thu Jan 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1.7-1
e10a2d
- New upstream version 1.7.
e10a2d
e10a2d
* Wed Jan 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1.6-2
e10a2d
- New upstream version 1.6.
e10a2d
- BuildRequires 'getopt' from util-linux-ng.
e10a2d
e10a2d
* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1.5-1
e10a2d
- New upstream version 1.5.
e10a2d
- Add 'make check' section.
e10a2d
e10a2d
* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1.4-1
e10a2d
- New upstream version 1.4.
e10a2d
- More hypervisor types detected.
e10a2d
e10a2d
* Thu Oct 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-4
e10a2d
- Move configure into build (not prep).
e10a2d
e10a2d
* Thu Oct 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-3
e10a2d
- Initial import into Fedora.
e10a2d
e10a2d
* Tue Oct 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-2
e10a2d
- Make changes suggested by reviewer (RHBZ#644259).
e10a2d
e10a2d
* Tue Oct 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-1
e10a2d
- Initial release.