3 %bcond_without tests # build without tests
5 Summary: Detect if we are running in a virtual machine
10 Group: Applications/Emulators
11 Source0: http://people.redhat.com/~rjones/virt-what/files/%{name}-%{version}.tar.gz
12 # Source0-md5: 28d3be1d8981e7fd83c012ebf0d95bb1
13 Patch0: bashisms.patch
14 URL: http://people.redhat.com/~rjones/virt-what/
15 # This is provided by the build root, but we make it explicit
16 # anyway in case this was dropped from the build root in future.
17 BuildRequires: /usr/bin/pod2man
19 # Required at build time in order to do 'make check' (for getopt).
20 BuildRequires: util-linux
22 # virt-what script uses dmidecode and getopt (from util-linux).
23 # RPM cannot detect this so make the dependencies explicit here.
24 %ifarch %{ix86} %{x8664}
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 virt-what is a shell script which can be used to detect if the program
32 is running in a virtual machine.
34 The program prints out a list of "facts" about the virtual machine,
35 derived from heuristics. One fact is printed per line.
37 If nothing is printed and the script exits with code 0 (no error),
38 then it can mean either that the program is running on bare-metal or
39 the program is running inside a type of virtual machine which we don't
40 know about or can't detect.
42 Current types of virtualization detected:
43 - hyperv Microsoft Hyper-V
44 - kvm Linux Kernel Virtual Machine (KVM)
45 - openvz OpenVZ or Virtuozzo
46 - powervm_lx86 IBM PowerVM Lx86 Linux/x86 emulator
47 - qemu QEMU (unaccelerated)
48 - uml User-Mode Linux (UML)
49 - virtage Hitachi Virtualization Manager (HVM) Virtage LPAR
50 - virtualbox VirtualBox
51 - virtualpc Microsoft VirtualPC
54 - xen-dom0 Xen dom0 (privileged domain)
55 - xen-domU Xen domU (paravirtualized guest domain)
56 - xen-hvm Xen guest fully virtualized (HVM)
71 rm -rf $RPM_BUILD_ROOT
73 DESTDIR=$RPM_BUILD_ROOT
76 rm -rf $RPM_BUILD_ROOT
79 %defattr(644,root,root,755)
81 %attr(755,root,root) %{_sbindir}/virt-what
82 %attr(755,root,root) %{_libdir}/virt-what-cpuid-helper
83 %{_mandir}/man1/virt-what.1*