Blame SPECS/virt-what.spec

45b90b
Name:           virt-what
45b90b
Version:        1.13
201bb7
Release:        10%{?dist}
45b90b
Summary:        Detect if we are running in a virtual machine
45b90b
License:        GPLv2+
45b90b
45b90b
URL:            http://people.redhat.com/~rjones/virt-what/
45b90b
Source0:        http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz
45b90b
201bb7
# These patches are kept in the upstream git repo, in the rhel-7.4 branch.
201bb7
# http://git.annexia.org/?p=virt-what.git;a=shortlog;h=refs/heads/rhel-7.4
f83e65
Patch0001:      0001-Differentiate-between-vserver-host-and-guest.patch
f83e65
Patch0002:      0002-Detect-new-Xen-VMs-RHBZ-973663.patch
f83e65
Patch0003:      0003-xen-Don-t-emit-warning-message-if-proc-xen-capabilit.patch
f83e65
Patch0004:      0004-Fix-various-typos-and-mistakes-in-comments.patch
f83e65
Patch0005:      0005-Fix-spelling-mistake-in-the-man-page-RHBZ-1099289.patch
f83e65
Patch0006:      0006-Added-check-and-test-routines-for-Docker.patch
f83e65
Patch0007:      0007-Added-documentation-for-Docker-tests.patch
f83e65
Patch0008:      0008-virt-what.in-remove-bash-ism.patch
f83e65
Patch0009:      0009-virt-what.in-get-effective-uid-in-a-portable-way.patch
f83e65
Patch0010:      0010-virt-what.in-warn-about-missing-cpuid-virt-helper-pr.patch
f83e65
Patch0011:      0011-virt-what.in-verify-files-exists-before-grepping-the.patch
f83e65
Patch0012:      0012-virt-what.in-make-option-processing-portable.patch
f83e65
Patch0013:      0013-build-use-portable-Makefile-variables.patch
f83e65
Patch0014:      0014-Add-space-before-parens-in-function-defns-for-readab.patch
f83e65
Patch0015:      0015-Add-lkvm-detection.patch
f83e65
Patch0016:      0016-Add-ARM-support.patch
f83e65
Patch0017:      0017-xen-arm-Fix-path-in-EXTRA_DIST.patch
f83e65
Patch0018:      0018-Update-copyright-years.patch
f83e65
Patch0019:      0019-Add-QEMU-KVM-detection-for-ACPI-boot-ARM.patch
f83e65
Patch0020:      0020-trivial-comment-fixup.patch
f83e65
Patch0021:      0021-Add-oVirt-RHBZ-1249438.patch
f83e65
Patch0022:      0022-trivial-virt-what.in-doesn-t-use-tabs.patch
f83e65
Patch0023:      0023-qemu-kvm-try-dmidecode-on-all-targets.patch
f83e65
Patch0024:      0024-qemu-kvm-dmidecode-look-for-KVM.patch
f83e65
Patch0025:      0025-Add-support-for-detecting-ppc64-LPAR-as-virt-guests.patch
f83e65
Patch0026:      0026-Update-the-previous-commit-to-use-system-virt-standa.patch
201bb7
Patch0027:      0027-Add-detection-of-Red-Hat-Enterprise-Virtualization-h.patch
45b90b
45b90b
# This is provided by the build root, but we make it explicit
45b90b
# anyway in case this was dropped from the build root in future.
45b90b
BuildRequires:  /usr/bin/pod2man
45b90b
45b90b
# Required at build time in order to do 'make check' (for getopt).
45b90b
BuildRequires:  util-linux
45b90b
201bb7
# Runs the 'which' program to find the helper.
201bb7
Requires:       which
201bb7
b6cf65
# git is used for patch management.  Since some patches touch autoconf
b6cf65
# files, we must also install autotools.
b6cf65
BuildRequires:  git
b6cf65
BuildRequires:  autoconf
b6cf65
BuildRequires:  automake
b6cf65
45b90b
# virt-what script uses dmidecode and getopt (from util-linux).
45b90b
# RPM cannot detect this so make the dependencies explicit here.
f83e65
%ifarch aarch64 %{ix86} x86_64
45b90b
Requires:       dmidecode
45b90b
%endif
45b90b
Requires:       util-linux
45b90b
45b90b
45b90b
%description
45b90b
virt-what is a shell script which can be used to detect if the program
45b90b
is running in a virtual machine.
45b90b
45b90b
The program prints out a list of "facts" about the virtual machine,
45b90b
derived from heuristics.  One fact is printed per line.
45b90b
45b90b
If nothing is printed and the script exits with code 0 (no error),
45b90b
then it can mean either that the program is running on bare-metal or
45b90b
the program is running inside a type of virtual machine which we don't
45b90b
know about or can't detect.
45b90b
45b90b
Current types of virtualization detected:
45b90b
45b90b
 - hyperv       Microsoft Hyper-V
45b90b
 - kvm          Linux Kernel Virtual Machine (KVM)
45b90b
 - openvz       OpenVZ or Virtuozzo
45b90b
 - powervm_lx86 IBM PowerVM Lx86 Linux/x86 emulator
45b90b
 - qemu         QEMU (unaccelerated)
45b90b
 - uml          User-Mode Linux (UML)
45b90b
 - virtage      Hitachi Virtualization Manager (HVM) Virtage LPAR
45b90b
 - virtualbox   VirtualBox
45b90b
 - virtualpc    Microsoft VirtualPC
45b90b
 - vmware       VMware
45b90b
 - xen          Xen
45b90b
 - xen-dom0     Xen dom0 (privileged domain)
45b90b
 - xen-domU     Xen domU (paravirtualized guest domain)
45b90b
 - xen-hvm      Xen guest fully virtualized (HVM)
45b90b
45b90b
45b90b
%prep
45b90b
%setup -q
45b90b
b6cf65
# Use git to manage patches.
b6cf65
# http://rwmj.wordpress.com/2011/08/09/nice-rpm-git-patch-management-trick/
b6cf65
git init
b6cf65
git config user.email "rjones@redhat.com"
b6cf65
git config user.name "virt-what"
b6cf65
git add .
b6cf65
git commit -a -q -m "%{version} baseline"
b6cf65
git am %{patches}
45b90b
45b90b
45b90b
%build
45b90b
%configure
45b90b
make
45b90b
45b90b
45b90b
%install
45b90b
make install DESTDIR=$RPM_BUILD_ROOT
45b90b
45b90b
45b90b
%check
45b90b
make check
45b90b
45b90b
45b90b
%files
45b90b
%doc README COPYING
45b90b
%{_sbindir}/virt-what
45b90b
%{_libexecdir}/virt-what-cpuid-helper
45b90b
%{_mandir}/man1/*.1*
45b90b
45b90b
45b90b
%changelog
201bb7
* Tue Mar 28 2017 Richard W.M. Jones <rjones@redhat.com> - 1.13-10
201bb7
- Require 'which' program
201bb7
  resolves: rhbz#1433005
201bb7
201bb7
* Thu Feb 16 2017 Richard W.M. Jones <rjones@redhat.com> - 1.13-9
201bb7
- Detect RHEV/oVirt (second fix)
201bb7
  resolves: rhbz#1249438
201bb7
f83e65
* Wed Jul 27 2016 Richard W.M. Jones <rjones@redhat.com> - 1.13-8
f83e65
- Depend on dmidecode on aarch64
f83e65
  resolves: rhbz#1360699
f83e65
f83e65
* Mon Jun 20 2016 Richard W.M. Jones <rjones@redhat.com> - 1.13-7
f83e65
- Add support for detecting POWER KVM and LPAR
f83e65
  resolves: rhbz#1147876
f83e65
- Detect RHEV/oVirt
f83e65
  resolves: rhbz#1249438
f83e65
- Detect ACPI boot aarch64 guest
f83e65
  resolves: rhbz#1275349
f83e65
- Fix typo in manual page
f83e65
  resolves: rhbz#1099289
f83e65
b6cf65
* Tue Apr 21 2015 Richard W.M. Jones <rjones@redhat.com> - 1.13-6
b6cf65
- Fix detection of aarch64
b6cf65
  resolves: rhbz#1201845
b6cf65
  Add all commits to version 1.15.
b6cf65
9b5b92
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.13-5
9b5b92
- Mass rebuild 2014-01-24
9b5b92
9b5b92
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.13-4
9b5b92
- Mass rebuild 2013-12-27
9b5b92
45b90b
* Mon Oct 28 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-3
45b90b
- Suppress warning message on Amazon EC2:
45b90b
  "grep: /proc/xen/capabilities: No such file or directory"
45b90b
45b90b
* Wed Sep 11 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-2
45b90b
- Include two upstream patches for detecting Xen and Linux VServer better
45b90b
  (RHBZ#973663).
45b90b
- Modernize the spec file.
45b90b
45b90b
* Mon Jul 29 2013 Richard W.M. Jones <rjones@redhat.com> - 1.13-1
45b90b
- New upstream version 1.13.
45b90b
45b90b
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-3
45b90b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
45b90b
45b90b
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-2
45b90b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
45b90b
45b90b
* Sat Mar 17 2012 Richard W.M. Jones <rjones@redhat.com> - 1.12-1
45b90b
- New upstream version 1.12.
45b90b
45b90b
* Wed Feb 29 2012 Richard W.M. Jones <rjones@redhat.com> - 1.11-3
45b90b
- Remove ExclusiveArch, but don't require dmidecode except on
45b90b
  i?86 and x86-64 (RHBZ#791370).
45b90b
45b90b
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-2
45b90b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
45b90b
45b90b
* Fri May 27 2011 Richard W.M. Jones <rjones@redhat.com> - 1.11-1
45b90b
- New upstream version 1.11.
45b90b
45b90b
* Wed May 25 2011 Richard W.M. Jones <rjones@redhat.com> - 1.10-1
45b90b
- New upstream version 1.10.
45b90b
45b90b
* Tue Mar  8 2011 Richard W.M. Jones <rjones@redhat.com> - 1.9-1
45b90b
- New upstream version 1.9.
45b90b
45b90b
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8-2
45b90b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
45b90b
45b90b
* Mon Jan 31 2011 Richard W.M. Jones <rjones@redhat.com> - 1.8-1
45b90b
- New upstream version 1.8.
45b90b
45b90b
* Thu Jan 20 2011 Richard W.M. Jones <rjones@redhat.com> - 1.7-1
45b90b
- New upstream version 1.7.
45b90b
45b90b
* Wed Jan 19 2011 Richard W.M. Jones <rjones@redhat.com> - 1.6-2
45b90b
- New upstream version 1.6.
45b90b
- BuildRequires 'getopt' from util-linux-ng.
45b90b
45b90b
* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1.5-1
45b90b
- New upstream version 1.5.
45b90b
- Add 'make check' section.
45b90b
45b90b
* Tue Jan 18 2011 Richard W.M. Jones <rjones@redhat.com> - 1.4-1
45b90b
- New upstream version 1.4.
45b90b
- More hypervisor types detected.
45b90b
45b90b
* Thu Oct 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-4
45b90b
- Move configure into build (not prep).
45b90b
45b90b
* Thu Oct 28 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-3
45b90b
- Initial import into Fedora.
45b90b
45b90b
* Tue Oct 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-2
45b90b
- Make changes suggested by reviewer (RHBZ#644259).
45b90b
45b90b
* Tue Oct 19 2010 Richard W.M. Jones <rjones@redhat.com> - 1.3-1
45b90b
- Initial release.