Sure, it's attached.  It is a modified version of the spec file that was
in the 2.5.3 source rpm I downloaded from sourceforge.

~Jason


On Wed, 2003-03-12 at 17:57, Federico Sacerdoti wrote:
> I think your ideas are good ones. Could you send me your spec file?
> 
> 
> On Wednesday, March 12, 2003, at 02:09 PM, Jason A. Smith wrote:
> 
> > I have a few suggestions for the rpm packages:
> >
> > First, for the ganglia-webfrontend package, I like that this package is
> > relocatable, but could the "ganglia-webfrontend" part of the path be
> > moved to the default prefix instead of being a mandatory part of the
> > installation path?  This way, when I install the rpm with the --prefix
> > option to relocate it, I can pick the exact directory I want to install
> > the files into.  Right now I have no choice and everything goes into a
> > "ganglia-webfrontend" sub-directory of the prefix that I specify.  
> > Could
> > source rpms for this package also be made available, or maybe the spec
> > file included in the tarball?
> >
> > Second, for the ganglia-monitor-core spec file, I would suggest adding
> > the noreplace option to the two config files in the file list, in case
> > you don't know since rpm is very poorly documented, you do it like:
> >
> > %config(noreplace) /etc/gmetad.conf
> >
> > This way, when upgrading ganglia, rpm will not rename your modified
> > config file to .rpmsave.  I believe this would only happen if the new
> > package comes with a new version of the config file, but it is better 
> > to
> > be safe and not replace a config file that has been customized.  With
> > the noreplace option, rpm will just install the new version of the
> > config file with .rpmnew appended to the filename.
> >
> > Also, for the post scripts I would move the /sbin/chkconfig --add
> > command outside of the if statement since it will then guarantee that 
> > it
> > is added to the appropriate run-levels during package installs and
> > upgrades.  Since the priority has changed for gmond, it might actually
> > be better to execute chkconfig with the reset command instead of --add
> > since this will force it to remake all of the symlinks, even if they 
> > are
> > already there.
> >
> > The last comment I have is that currently the daemons are not restarted
> > during a package upgrade.  In packages that I make, I usually put it 
> > all
> > in the post script, instead of the postun script.  I would suggest 
> > doing
> > something like this to fix both of these problems:
> >
> > %post gmond
> > /sbin/chkconfig gmond reset
> > if [ "$1" -eq "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
> >
> > Comments/suggestions?
> >
> > ~Jason
> >
> >
> > -- 
> > /------------------------------------------------------------------\
> > |  Jason A. Smith                          Email:  [EMAIL PROTECTED] |
> > |  Atlas Computing Facility, Bldg. 510M    Phone:  (631)344-4226   |
> > |  Brookhaven National Lab, P.O. Box 5000  Fax:    (631)344-7616   |
> > |  Upton, NY 11973-5000                                            |
> > \------------------------------------------------------------------/
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by:Crypto Challenge is now open!
> > Get cracking and register here for some mind boggling fun and
> > the chance of winning an Apple iPod:
> > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > _______________________________________________
> > Ganglia-developers mailing list
> > Ganglia-developers@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ganglia-developers
> >
> Federico
> 
> Rocks Cluster Group, SDSC, San Diego
> GPG Fingerprint: 3C5E 47E7 BDF8 C14E ED92  92BB BA86 B2E6 0390 8845
-- 
/------------------------------------------------------------------\
|  Jason A. Smith                          Email:  [EMAIL PROTECTED] |
|  Atlas Computing Facility, Bldg. 510M    Phone:  (631)344-4226   |
|  Brookhaven National Lab, P.O. Box 5000  Fax:    (631)344-7616   |
|  Upton, NY 11973-5000                                            |
\------------------------------------------------------------------/
#
# $Id: ganglia.spec.in,v 1.8 2002/11/08 04:40:01 massie Exp $
#
# ganglia.spec.  Generated from ganglia.spec.in by configure.
#
Summary: Ganglia Cluster Toolkit http://ganglia.sourceforge.net/
Name: ganglia-monitor-core
Version: 2.5.3
Release: 1 
Copyright: BSD
Vendor: Ganglia Development Team <ganglia-developers@lists.sourceforge.net>
Group: System Environment/Base
Source: %{name}-%{version}.tar.gz
Buildroot: /tmp/%{name}-%{version}-buildroot
Prefix: /usr

%description
Ganglia is a scalable, real-time monitoring and execution environment
with all execution requests and statistics expressed in an open
well-defined XML format.


%package gmetad
Summary: Ganglia Meta daemon http://ganglia.sourceforge.net/
Group: System Environment/Base
Obsoletes: 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 can aggregate monitoring data from several clusters
to form a monitoring grid. It also keeps metric history using the RRD tool.


%package gmond
Summary: Ganglia Monitor daemon http://ganglia.sourceforge.net/
Group: System Environment/Base
Obsoletes: 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 lib
Summary: Ganglia Toolkit Library http://ganglia.sourceforge.net/
Group: System Environment/Base

%description lib
The Ganglia Monitoring Core library provides a set of functions that programmers
can use to build scalable cluster or grid applications

##
## PREP
##

%prep 
%setup

##
## BUILD
##
%build
./configure --with-gmetad --prefix=/usr
make

##
## POST GMETA
##
%post gmetad
/sbin/chkconfig gmetad reset
if [ "$1" -eq "1" ]; then
   /etc/rc.d/init.d/gmetad start
elif [ "$1" -gt "1" ]; then
   /etc/rc.d/init.d/gmetad restart
fi

##
## POST GMON
##
%post gmond
/sbin/chkconfig gmond reset
if [ "$1" -eq "1" ]; then
   /etc/rc.d/init.d/gmond start
elif [ "$1" -gt "1" ]; then
   /etc/rc.d/init.d/gmond restart
fi

##
## PREUN GMETA
##
%preun gmetad
if [ "$1" = 0 ]
then
   /etc/rc.d/init.d/gmetad stop
   /sbin/chkconfig --del gmetad
fi

##
## PREUN GMON
##
%preun gmond
if [ "$1" = 0 ]
then
   /etc/rc.d/init.d/gmond stop
   /sbin/chkconfig --del gmond
fi

##
## INSTALL
##
%install
%__mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
%__mkdir -p $RPM_BUILD_ROOT/usr/include/ganglia
%__mkdir -p $RPM_BUILD_ROOT/var/lib/ganglia/rrds
%__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
%__cp -f %{_builddir}/%{name}-%{version}/gmond/gmond.conf 
$RPM_BUILD_ROOT/etc/gmond.conf
%__cp -f %{_builddir}/%{name}-%{version}/gmetad/gmetad.conf 
$RPM_BUILD_ROOT/etc/gmetad.conf
%__make install prefix=$RPM_BUILD_ROOT/usr

##
## FILES GMETA
##
%files gmetad
%defattr(-,root,root)
%attr(0755,nobody,nobody)/var/lib/ganglia/rrds
/usr/sbin/gmetad
/etc/rc.d/init.d/gmetad
%config(noreplace) /etc/gmetad.conf

##
## FILES GMON
##
%files gmond
%defattr(-,root,root)
%attr(0500,root,root)/usr/bin/gmetric
%attr(0555,root,root)/usr/bin/gstat
/usr/sbin/gmond
/etc/rc.d/init.d/gmond
%config(noreplace) /etc/gmond.conf

%files lib
/usr/include/ganglia.h
/usr/include/ganglia
/usr/lib/libganglia*

##
## CLEAN
##
%clean
%__rm -rf $RPM_BUILD_ROOT

##
## CHANGELOG
##
%changelog
* Mon Oct 14 2002 Federico Sacerdoti <[EMAIL PROTECTED]>
- Split package into -gmetad and -gmond subpackages for clarity,
  and separation of purpose/functionality.
* Thu Sep 19 2002 Federico Sacerdoti <[EMAIL PROTECTED]>
- Added config files, made /var/lib/ganglia for RRD storage.
* Mon Mar 11 2002 Matt Massie <[EMAIL PROTECTED]>
- Added support for libganglia, added Prefix: for RPM relocation
* Wed Feb 27 2002 Matt Massie <[EMAIL PROTECTED]>
- Merge gmetric and gmond together into one RPM.  Fix some small bugs.
* Fri Nov  2 2001 Matt Massie <[EMAIL PROTECTED]>
- initial release

Reply via email to