-
Notifications
You must be signed in to change notification settings - Fork 246
/
ganglia.spec.aix
245 lines (199 loc) · 6.42 KB
/
ganglia.spec.aix
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
Summary: Ganglia Distributed Monitoring System
Name: ganglia
Version: 3.0.4
URL: http://ganglia.info/
Release: 1
License: BSD
Vendor: Ganglia Development Team <ganglia-developers@lists.sourceforge.net>
Group: System Environment/Base
Source: %{name}-%{version}.tar.gz
Source1: gmond.aix.init
Source2: gmetad.aix.init
###Patch0: ganglia-3.0.3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: rrdtool-devel
Prefix: /opt/freeware
%description
Ganglia is a scalable, real-time monitoring and execution environment
%package gmetad
Summary: Ganglia Meta daemon http://ganglia.sourceforge.net/
Group: System Environment/Base
Requires: rrdtool
Obsoletes: ganglia-monitor-core-gmetad ganglia-monitor-core
%description gmetad
Ganglia is a scalable, real-time monitoring and execution environment
with all execution requests and statistics expressed in an open
well-defined XML format.
This gmetad daemon aggregates monitoring data from several clusters
to form a monitoring grid. It also keeps metric history using rrdtool.
%package gmond
Summary: Ganglia Monitor daemon http://ganglia.sourceforge.net/
Group: System Environment/Base
Obsoletes: ganglia-monitor-core-gmond ganglia-monitor-core
%description gmond
Ganglia is a scalable, real-time monitoring and execution environment
with all execution requests and statistics expressed in an open
well-defined XML format.
This gmond daemon provides the ganglia service within a single cluster or
Multicast domain.
%package devel
Summary: Ganglia Library http://ganglia.sourceforge.net/
Group: System Environment/Base
Obsoletes: ganglia-monitor-core-lib
%description devel
The Ganglia Monitoring Core library provides a set of functions that programmers
can use to build scalable cluster or grid applications.
##
## PREP
##
%prep
%setup -q
###%patch0 -p1
##
## BUILD
##
%build
export CC=xlc_r
export CFLAGS="-O"
./configure --prefix=/opt/freeware --disable-shared --enable-static CFLAGS="-I/opt/freeware/include" CPPFLAGS="-I/opt/freeware/include" LDFLAGS="-L/opt/freeware/lib" --with-gmetad
## now we can start the make process...
make
##
## PRE
##
%pre
##
## POST GMETA
##
%post gmetad
if [ "$1" = 1 ]; then
# Installing new package - start gmetad
/etc/rc.d/init.d/gmetad start
elif [ "$1" -gt 1 ]; then
# Upgrading ganglia package - restart gmetad
/etc/rc.d/init.d/gmetad restart
fi
##
## POST GMON
##
%post gmond
if [ "$1" = 1 ]; then
# Installing new package - start gmond
/etc/rc.d/init.d/gmond start
elif [ "$1" -gt 1 ]; then
# Upgrading ganglia package - restart gmond
/etc/rc.d/init.d/gmond restart
fi
##
## PREUN GMETA
##
%preun gmetad
if [ "$1" = 0 ]
then
/etc/rc.d/init.d/gmetad stop
fi
##
## PREUN GMON
##
%preun gmond
if [ "$1" = 0 ]
then
/etc/rc.d/init.d/gmond stop
fi
##
## INSTALL
##
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
## Create the directory structure
%__mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
%__mkdir -p $RPM_BUILD_ROOT/var/lib/ganglia/rrds
%__mkdir -p $RPM_BUILD_ROOT/opt/freeware/man/man5
## Move the files into the structure
%__cp -f %{_builddir}/%{name}-%{version}/gmond/gmond.init $RPM_BUILD_ROOT/etc/rc.d/init.d/gmond
%__cp -f %{_builddir}/%{name}-%{version}/gmetad/gmetad.init $RPM_BUILD_ROOT/etc/rc.d/init.d/gmetad
# We just output the default gmond.conf from gmond using the '-t' flag
%{_builddir}/%{name}-%{version}/gmond/gmond -t > $RPM_BUILD_ROOT/etc/gmond.conf
%__cp -f %{_builddir}/%{name}-%{version}/gmetad/gmetad.conf $RPM_BUILD_ROOT/etc/gmetad.conf
%__cp -f %{_builddir}/%{name}-%{version}/gmond/gmond.conf.5 $RPM_BUILD_ROOT/opt/freeware/man/man5/gmond.conf.5
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d/
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/gmond
install -m 0755 %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/gmetad
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc2.d/
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/rc3.d/
ln -sf '../init.d/gmond' $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S20gmond
ln -sf '../init.d/gmond' $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K20gmond
ln -sf '../init.d/gmond' $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S20gmond
ln -sf '../init.d/gmond' $RPM_BUILD_ROOT/etc/rc.d/rc3.d/K20gmond
ln -sf '../init.d/gmetad' $RPM_BUILD_ROOT/etc/rc.d/rc2.d/S20gmetad
ln -sf '../init.d/gmetad' $RPM_BUILD_ROOT/etc/rc.d/rc2.d/K20gmetad
ln -sf '../init.d/gmetad' $RPM_BUILD_ROOT/etc/rc.d/rc3.d/S20gmetad
ln -sf '../init.d/gmetad' $RPM_BUILD_ROOT/etc/rc.d/rc3.d/K20gmetad
##
## FILES GMETA
##
%files gmetad
%defattr(-,root,root)
%attr(0755,nobody,nobody)/var/lib/ganglia/rrds
/opt/freeware/sbin/gmetad
%config(noreplace) /etc/gmetad.conf
/etc/rc.d/init.d/gmetad
/etc/rc.d/rc2.d/S20gmetad
/etc/rc.d/rc2.d/K20gmetad
/etc/rc.d/rc3.d/S20gmetad
/etc/rc.d/rc3.d/K20gmetad
##
## FILES GMOND
##
%files gmond
%defattr(-,root,root)
%attr(0500,root,root)/opt/freeware/bin/gmetric
%attr(0555,root,root)/opt/freeware/bin/gstat
/opt/freeware/sbin/gmond
%attr(0555,root,root)/opt/freeware/man/man5/gmond.conf.5*
%config(noreplace) /etc/gmond.conf
/etc/rc.d/init.d/gmond
/etc/rc.d/rc2.d/S20gmond
/etc/rc.d/rc2.d/K20gmond
/etc/rc.d/rc3.d/S20gmond
/etc/rc.d/rc3.d/K20gmond
##
## FILES DEVEL
##
%files devel
%defattr(-,root,root)
/opt/freeware/include/ganglia.h
/opt/freeware/lib/libganglia*
/opt/freeware/bin/ganglia-config
##
## CLEAN
##
%clean
%__rm -rf $RPM_BUILD_ROOT
##
## CHANGELOG
##
%changelog
* Fri Apr 21 2006 Michael Perzl <michael@perzl.org>
- adapted for Ganglia v3.0.3
* Thu Feb 23 2006 Michael Perzl <michael@perzl.org>
- first version for AIX V5.1 and higher
* Fri Dec 10 2004 Matt Massie <massie@cs.berkeley.edu>
- Updated the spec file for 2.6.0 release
* Tue Apr 13 2004 Brooks Davis <brooks@one-eyed-alien.net>
- Use the autoconf variable varstatedir instead of /var/lib for consistency.
* Thu Feb 19 2004 Matt Massie <massie@cs.berkeley.edu>
- Removed the /usr/include/ganglia directory from the lib rpm and
changed the deprecated Copyright to License
* Mon Oct 14 2002 Federico Sacerdoti <fds@sdsc.edu>
- Split package into -gmetad and -gmond subpackages for clarity,
and separation of purpose/functionality.
* Thu Sep 19 2002 Federico Sacerdoti <fds@sdsc.edu>
- Added config files, made /var/lib/ganglia for RRD storage.
* Mon Mar 11 2002 Matt Massie <massie@cs.berkeley.edu>
- Added support for libganglia, added Prefix: for RPM relocation
* Wed Feb 27 2002 Matt Massie <massie@cs.berkeley.edu>
- Merge gmetric and gmond together into one RPM. Fix some small bugs.
* Fri Nov 2 2001 Matt Massie <massie@cs.berkeley.edu>
- initial release