]> git.pld-linux.org Git - packages/virt-what.git/blob - virt-what.spec
differenciate between vserver host and guest
[packages/virt-what.git] / virt-what.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Detect if we are running in a virtual machine
6 Name:           virt-what
7 Version:        1.13
8 Release:        1
9 License:        GPL v2+
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
19 %if %{with tests}
20 # Required at build time in order to do 'make check' (for getopt).
21 BuildRequires:  util-linux
22 %endif
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}
26 Requires:       dmidecode
27 %endif
28 Requires:       util-linux
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 virt-what is a shell script which can be used to detect if the program
33 is running in a virtual machine.
34
35 The program prints out a list of "facts" about the virtual machine,
36 derived from heuristics. One fact is printed per line.
37
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.
42
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
53  - vmware VMware
54  - xen Xen
55  - xen-dom0 Xen dom0 (privileged domain)
56  - xen-domU Xen domU (paravirtualized guest domain)
57  - xen-hvm Xen guest fully virtualized (HVM)
58
59 %prep
60 %setup -q
61 %patch0 -p1
62 %patch1 -p1
63
64 %build
65 %configure
66 %{__make}
67
68 %if %{with tests}
69 %{__make} check
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 %{__make} install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %files
81 %defattr(644,root,root,755)
82 %doc README COPYING
83 %attr(755,root,root) %{_sbindir}/virt-what
84 %attr(755,root,root) %{_libdir}/virt-what-cpuid-helper
85 %{_mandir}/man1/virt-what.1*
This page took 0.051277 seconds and 3 git commands to generate.