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 Patch1: vserver-type.patch
15 URL: http://people.redhat.com/~rjones/virt-what/
16 # This is provided by the build root, but we make it explicit
17 # anyway in case this was dropped from the build root in future.
18 BuildRequires: /usr/bin/pod2man
20 # Required at build time in order to do 'make check' (for getopt).
21 BuildRequires: util-linux
23 # virt-what script uses dmidecode and getopt (from util-linux).
24 # RPM cannot detect this so make the dependencies explicit here.
25 %ifarch %{ix86} %{x8664}
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 virt-what is a shell script which can be used to detect if the program
33 is running in a virtual machine.
35 The program prints out a list of "facts" about the virtual machine,
36 derived from heuristics. One fact is printed per line.
38 If nothing is printed and the script exits with code 0 (no error),
39 then it can mean either that the program is running on bare-metal or
40 the program is running inside a type of virtual machine which we don't
41 know about or can't detect.
43 Current types of virtualization detected:
44 - hyperv Microsoft Hyper-V
45 - kvm Linux Kernel Virtual Machine (KVM)
46 - openvz OpenVZ or Virtuozzo
47 - powervm_lx86 IBM PowerVM Lx86 Linux/x86 emulator
48 - qemu QEMU (unaccelerated)
49 - uml User-Mode Linux (UML)
50 - virtage Hitachi Virtualization Manager (HVM) Virtage LPAR
51 - virtualbox VirtualBox
52 - virtualpc Microsoft VirtualPC
55 - xen-dom0 Xen dom0 (privileged domain)
56 - xen-domU Xen domU (paravirtualized guest domain)
57 - xen-hvm Xen guest fully virtualized (HVM)
73 rm -rf $RPM_BUILD_ROOT
75 DESTDIR=$RPM_BUILD_ROOT
78 rm -rf $RPM_BUILD_ROOT
81 %defattr(644,root,root,755)
83 %attr(755,root,root) %{_sbindir}/virt-what
84 %attr(755,root,root) %{_libdir}/virt-what-cpuid-helper
85 %{_mandir}/man1/virt-what.1*