-
Notifications
You must be signed in to change notification settings - Fork 1
/
warewulf-monitor-legacy.spec.in
183 lines (135 loc) · 4.32 KB
/
warewulf-monitor-legacy.spec.in
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
%{!?_rel:%{expand:%%global _rel 0.r%(test "@SVNVERSION@" != "0000" && echo "@SVNVERSION@" || svnversion | sed 's/[^0-9].*$//' | grep '^[0-9][0-9]*$' || git svn find-rev `git show -s --pretty=format:%h` || echo 0000)}}
%define debug_package %{nil}
Summary: Legacy Monitoring Package from Warewulf
Name: warewulf-monitor-legacy
Version: @PACKAGE_VERSION@
Release: %{_rel}%{?dist}
#Release: 1%{?dist}
License: GPL
Group: System Environment/Clustering
URL: http://warewulf.lbl.gov/
Source: %{name}-%{version}.tar.gz
ExclusiveOS: linux
Requires: %{name}-common = %{version}-%{release}
Prefix: %{_prefix}
BuildRoot: %{?_tmppath}%{!?_tmppath:/var/tmp}/%{name}-%{version}-%{release}-root
%description
Warewulf is a cluster management/monitoring toolset.
This package contains the warewulfd server daemon.
%package common
Summary: Files common to all warewulf packages
Group: System Environment/Clustering
%description common
Warewulf is a cluster management/monitoring toolset.
This package contains files needed by other warewulf subpackages.
%package tools
Summary: The Warewulf user tools
Group: System Enviornment/Clustering
Requires: %{name}-common = %{version}-%{release}
%description tools
Warewulf is a cluster management/monitoring toolset.
This subpackage includes the tools to communicate with the main
daemon or a proxy.
%package wulfd
Summary: The Warewulf node daemon
Group: System Enviornment/Daemons
Requires: chkconfig
%description wulfd
Warewulf is a cluster management/monitoring toolset.
This subpackage includes the node daemon that will communicate its
stats to the master node.
%package proxy
Summary: The Warewulf node daemon proxy service
Group: System Enviornment/Daemons
Requires: chkconfig
Requires: %{name}-common = %{version}-%{release}
%description proxy
Warewulf is a cluster management/monitoring toolset.
This subpackage provides support for aggregating multiple Warewulf
daemons together, or "relaying" the data to multiple login nodes.
%package web
Summary: The Warewulf web frontend
Group: System Enviornment/monitoring
Requires: httpd
Requires: %{name}-common = %{version}-%{release}
%description web
Warewulf is a cluster management/monitoring toolset.
This subpackage provides a web-based CGI/frontend to the Warewulf
daemon or proxy daemon. It can monitor 1 or more clusters.
%prep
%setup -q
%build
%configure
%{__make} %{?mflags}
%install
%{__make} install DESTDIR=$RPM_BUILD_ROOT %{?mflags_install}
%post
/sbin/chkconfig --add warewulf
/sbin/chkconfig warewulf on
%post wulfd
/sbin/chkconfig --add wulfd
/sbin/chkconfig wulfd on
%post web
/sbin/service httpd condrestart >/dev/null 2>&1 ||:
/sbin/service apache2 condrestart >/dev/null 2>&1 ||:
/usr/sbin/setsebool -P httpd_can_network_connect 1 >/dev/null 2>&1 ||:
chcon --reference=/var/www/html/ %{_datadir}/warewulf-legacy/web/cgi/* >/dev/null 2>&1 ||:
%post proxy
/sbin/chkconfig --add wwproxy
/sbin/chkconfig wwproxy on
%preun
if [ $1 -eq '0' ]; then
/sbin/service warewulf stop >/dev/null ||:
/sbin/chkconfig --del warewulf
fi
%preun wulfd
if [ $1 -eq '0' ]; then
/sbin/service wulfd stop >/dev/null ||:
/sbin/chkconfig --del wulfd
fi
%preun proxy
if [ $1 -eq '0' ]; then
/sbin/service wwproxy stop >/dev/null ||:
/sbin/chkconfig --del wwproxy
fi
%postun web
/sbin/service httpd condrestart >/dev/null 2>&1 ||:
/sbin/service apache2 condrestart >/dev/null 2>&1 ||:
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
%{_sysconfdir}/init.d/warewulf
%{_sbindir}/warewulfd
%files common
%defattr(-,root,root)
%{_prefix}/lib/warewulf-legacy
%files tools
%defattr(-,root,root)
%dir %{_sysconfdir}/warewulf-legacy
%config(noreplace) %{_sysconfdir}/warewulf-legacy/client.conf
%{_bindir}/wwnodes
%{_bindir}/wwstats
%{_bindir}/wwsummary
%{_bindir}/wwtop
%{_bindir}/wwmpirun
#%{_bindir}/wwps
%files wulfd
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/wulfd.conf
%{_sysconfdir}/init.d/wulfd
%{_sbindir}/wulfd
%files proxy
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/wwproxy.conf
%{_sysconfdir}/init.d/wwproxy
%{_sbindir}/wwproxy
%files web
%defattr(-,root,root)
%dir %{_datadir}/warewulf-legacy
%dir %{_datadir}/warewulf-legacy/web
%config(noreplace) %{_sysconfdir}/httpd/conf.d/*.conf
%{_datadir}/warewulf-legacy/web/cgi
%{_datadir}/warewulf-legacy/web/images
%changelog