Documentation fixes.
[virt-hostinfo.git] / virt-hostinfo.spec.in
1 Summary:       Access host information and statistics from virtual machines
2 Name:          virt-hostinfo
3 Version:       @VERSION@
4 Release:       1%{?dist}
5 License:       GPLv2+
6 Group:         System Environment/Daemons
7 URL:           http://et.redhat.com/~rjones/hostinfo/
8 Source0:       http://et.redhat.com/~rjones/hostinfo/files/%{name}-%{version}.tar.gz
9 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root
10
11 BuildRequires: apr-devel >= 1.2.7
12 BuildRequires: perl
13 BuildRequires: libvirt-devel >= 0.2.1
14 BuildRequires: perl-Sys-Virt
15 BuildRequires: perl-XML-XPath
16
17 Requires(post): chkconfig
18 Requires(preun): chkconfig
19 Requires(preun): initscripts
20 Requires(postun): initscripts
21
22 Requires:      %{name}-tools = %{version}-%{release}
23
24
25 %description
26 Allow a virtual machine to look at host information (such as number of
27 physical, not just virtual CPUs), and statistics like the load on the
28 host. Users have asked for this primarily as a diagnostic tool -- for
29 example, poor performance of a virtual machine might be caused by
30 excessive load on the host.
31
32 Normally we try to isolate virtual machines from accessing any such
33 details from the host, and there are very good reasons for that too,
34 such as security of the host, commercial confidentiality, and the
35 privacy of other virtual machines running on the host. As a result, at
36 the moment there is no mechanism for accessing host information.
37
38 Hostinfo allows the host administrator, at their discretion, and only
39 of limited data to limited virtual machines, to export host
40 information and statistics to virtual machines.
41
42 Administrators have to:
43
44  * explicitly enable this feature,
45  * select the virtual machines and/or data they wish to be seen in guests,
46  * select the frequency that guests can ask for data. 
47
48 Hostinfo runs a daemon on the host which collects the statistics. The
49 information will be exported to guests over a spare (virtual) serial
50 port.
51
52 Guests request information by sending a plain text command to the
53 serial port, and receive information in the form of a simple, plain
54 text message. No special drivers or software are required by the
55 guest.
56
57
58 %package tools
59 Summary:       Hostinfo server configuration tools
60 Group:         Applications/System
61
62
63 %description tools
64 This package contains server configuration tools for
65 %{name}.
66
67
68 %package client
69 Summary:       Hostinfo client and test tools
70 Group:         Applications/System
71
72
73 %description client
74 This package contains client and test tools for testing
75 %{name}.
76
77 It should be installed inside a virtual machine running on a
78 hostinfo-enabled host.
79
80
81 %prep
82 %setup -q
83
84
85 %build
86 %{configure}
87 make
88
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 make DESTDIR=$RPM_BUILD_ROOT install
93
94
95 %clean
96 rm -rf $RPM_BUILD_ROOT
97
98
99 %post
100 /sbin/chkconfig --add hostinfo
101
102
103 %preun
104 if [ $1 = 0 ] ; then
105   /sbin/service hostinfo stop >/dev/null 2>&1
106   /sbin/chkconfig --del hostinfo
107 fi
108
109
110 %postun
111 if [ "$1" -ge "1" ] ; then
112   /sbin/service hostinfo condrestart >/dev/null 2>&1 || :
113 fi
114
115
116 %files
117 %defattr(-,root,root,-)
118 %doc COPYING README
119 %dir %{_sysconfdir}/hostinfo
120 %config(noreplace) %{_sysconfdir}/hostinfo/guests.conf
121 %config(noreplace) %{_sysconfdir}/hostinfo/hostinfo.conf
122 %{_sysconfdir}/init.d/hostinfo
123 %config(noreplace) %{_sysconfdir}/sysconfig/hostinfod
124 %{_sbindir}/hostinfod
125 %{_mandir}/man5/hostinfo-protocol.5*
126 %{_mandir}/man8/hostinfo.8*
127 %{_mandir}/man8/hostinfod.8*
128 %dir %attr(0775,root,qemu) %{_localstatedir}/lib/hostinfo
129
130
131 %files tools
132 %defattr(-,root,root,-)
133 %doc COPYING
134 %{_bindir}/hostinfo-set
135 %{_bindir}/hostinfo-status
136 %{_mandir}/man8/hostinfo-set.8*
137 %{_mandir}/man8/hostinfo-status.8*
138
139
140 %files client
141 %defattr(-,root,root,-)
142 %doc COPYING
143 %{_bindir}/hostinfo-test
144 %{_mandir}/man1/hostinfo-test.1*
145
146
147 %changelog
148 * Tue Aug 11 2009 Richard W.M. Jones <rjones@redhat.com> - @VERSION@-1
149 - Initial RPM packaging.