forked from sflow/host-sflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hsflowd-xen.spec
80 lines (70 loc) · 2.22 KB
/
hsflowd-xen.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Summary: host sFlow daemon
Name: hsflowd
Version: 2.0.12
Release: 2
License: http://sflow.net/license.html
Group: Applications/Internet
URL: http://sflow.net
Source0: %{name}-%{version}-%{release}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
%define debug_package %{nil}
%description
This program implements the host sFlow(R) standard - sending
key performance metrics to an sFlow collector to enable
highly-scalable monitoring of all critical resources in
the network. If Open VSwitch is present, will also control
the Open VSwitch sFlow configuration.
%prep
%setup -n %{name}-%{version}-%{release}
%build
make FEATURES="XEN"
%install
rm -rf %{buildroot}
make INSTROOT=%{buildroot} install
%clean
rm -rf %{buildroot}
make clean
%files
%defattr(-,root,root,-)
/usr/sbin/hsflowd
%config(noreplace) /etc/hsflowd.conf
%config(noreplace) /etc/dbus-1/system.d/net.sflow.hsflowd.conf
/etc/init.d/hsflowd
/lib/systemd/system/hsflowd.service
%doc README LICENSE INSTALL.Linux
/etc/hsflowd/modules/
%post
# need this logic just for Xenserver package. It preserves config
# across Xenserver upgrades by copying the config to another directory
# so that we get a chance to merge the old and new configs.
if [ -n "$XS_PREVIOUS_INSTALLATION" ]; then
# upgrade in progress
if [ -r $XS_PREVIOUS_INSTALLATION/etc/hsflowd.conf ]; then
mv -f /etc/hsflowd.conf /etc/hsflowd.conf.rpmnew
cp -fp $XS_PREVIOUS_INSTALLATION/etc/hsflowd.conf /etc
# TODO: insert ovs {} ?
fi
fi
%preun
if [ $1 = 0 ]; then
/sbin/service hsflowd stop > /dev/null 2>&1;
fi
%changelog
* Thu Jan 19 2017 nhm <[email protected]>
- update for XenServer 7.0 and systemd
* Tue Jul 26 2016 nhm <[email protected]>
- fork custom spec file for xen
* Wed Jul 20 2016 nhm <[email protected]>
- add systemd service file
- remove sflowovsd (now an hsflowd module)
- remove automatic scheduling
* Fri Oct 08 2010 nhm <[email protected]>
- move install from /usr/local/sbin to /usr/sbin
* Mon Aug 30 2010 nhm <[email protected]>
- add sflowovsd
* Thu Jul 22 2010 nhm <[email protected]>
- use BuildRoot
* Fri Jul 09 2010 nhm <[email protected]>
- added post and preun, and require chkconfig
* Thu Feb 11 2010 nhm <[email protected]>
- Initial build.