File ganglia-monitor-core.spec of Package ganglia-monitor-core

#
# spec file for package ganglia-monitor-core (Version 2.5.7)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           ganglia-monitor-core
BuildRequires:  freetype2-devel libart_lgpl-devel libpng-devel rrdtool-devel
Url:            http://ganglia.sourceforge.net
Summary:        Scalable Distributed Monitoring System
Version:        2.5.7
Release:        172.<RELEASE40>
License:        X11/MIT
Group:          System/Monitoring
Source:         ganglia-monitor-core-%{version}.tar.gz
Source1:        ganglia_docs.tar.bz2
Source2:        ganglia-webfrontend-2.5.7.tar.gz
Prefix:         /usr
Patch:          ganglia-monitor-core-%{version}-init.dif
Patch1:         includefiles.patch
Patch2:         ganglia-monitor-core-%{version}-pageshift.patch
Patch3:         ganglia-monitor-core-umask.patch
Patch4:         ganglia-monitor-core.dif
Patch5:         ganglia-monitor-core-%{version}-gcc4.patch
Patch6:         warn.diff
Patch7:         ganglia-monitor-core-2.5.7_sysconf_hz.patch
Patch8:         ganglia-monitor-core-2.5.7_missing_includes.patch
Patch9:         ganglia-monitor-core-2.5.7_strncat_usage.patch
Patch10:        ganglia-monitor-core-buildroot.patch
Patch11:        ganglia-monitor-core-2.5.7_r1959.patch
Patch12:        ganglia-monitor-core-2.5.7_r1960.patch
PreReq:         /bin/sed %insserv_prereq %fillup_prereq /usr/bin/tr
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%package gmetad
License:        X11/MIT
Summary:        Scalable distributed monitoring system
Group:          System/Monitoring
Requires:       ganglia-monitor-core, http_daemon

%package gmond
License:        X11/MIT
Summary:        Scalable distributed monitoring system
Group:          System/Monitoring
Requires:       ganglia-monitor-core, http_daemon

%package -n ganglia-webfrontend
License:        X11/MIT
Summary:        Scalable distributed monitoring system
Group:          System/Monitoring
Requires:       ganglia-monitor-core, http_daemon

%package devel
License:        X11/MIT
Summary:        Libraries and header files for Ganglia
Group:          System/Monitoring
Requires:       glibc-devel
Requires:       %{name} = %{version}

%description
Ganglia is a scalable distributed monitoring system for
high-performance computing systems, such as clusters and grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor the
state within clusters and uses a tree of point-to-point connections
among representative cluster nodes to federate clusters and aggregate
their state. It leverages widely-used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.



Authors:
--------
    Matt Massie <massie@cs.berkeley.edu>
    Preston Smith <psmith@physics.purdue.edu>
    Steve Wagner
    Federico Sacerdoti <fds@sdsc.edu>

%description gmetad
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.



Authors:
--------
    Matt Massie <massie@cs.berkeley.edu>
    Preston Smith <psmith@physics.purdue.edu>
    Steve Wagner
    Federico Sacerdoti <fds@sdsc.edu>

%description gmond
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.



Authors:
--------
    Matt Massie <massie@cs.berkeley.edu>
    Preston Smith <psmith@physics.purdue.edu>
    Steve Wagner
    Federico Sacerdoti <fds@sdsc.edu>

%description -n ganglia-webfrontend
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.



Authors:
--------
    Matt Massie <massie@cs.berkeley.edu>
    Preston Smith <psmith@physics.purdue.edu>
    Steve Wagner
    Federico Sacerdoti <fds@sdsc.edu>

%description devel
Ganglia is a scalable distributed monitoring system for
high-performance computing systems such as clusters and Grids. It is
based on a hierarchical design targeted at federations of clusters. It
relies on a multicast-based listen/announce protocol to monitor state
within clusters and uses a tree of point-to-point connections amongst
representative cluster nodes to federate clusters and aggregate their
state. It leverages widely used technologies such as XML for data
representation, XDR for compact, portable data transport, and RRDtool
for data storage and visualization.



Authors:
--------
    Matt Massie <massie@cs.berkeley.edu>
    Preston Smith <psmith@physics.purdue.edu>
    Steve Wagner
    Federico Sacerdoti <fds@sdsc.edu>

%prep 
%setup -q -a 1 -a 2
%patch0
#%patch1
%patch2
%patch3
%patch4
%patch5 -p1
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
##
## BUILD
##

%build
autoreconf --install --force
export CFLAGS="%{optflags} -fno-strict-aliasing"
%configure --with-gmetad --enable-gexec
make

%install
install -d  $RPM_BUILD_ROOT/etc/init.d
install -d  $RPM_BUILD_ROOT/usr/sbin
install -m 0755 gmond/gmond.init $RPM_BUILD_ROOT/etc/init.d/gmond
install -m 0755 gmetad/gmetad.init $RPM_BUILD_ROOT/etc/init.d/gmetad
(
cd $RPM_BUILD_ROOT/usr/sbin;
ln -sf ../../etc/init.d/gmond rcgmond
ln -sf ../../etc/init.d/gmetad rcgmetad
)
install -d  $RPM_BUILD_ROOT/usr/include/ganglia
install -d  $RPM_BUILD_ROOT/var/lib/ganglia/rrds
install -m 0644  gmond/gmond.conf $RPM_BUILD_ROOT/etc/gmond.conf
install -m 0644 gmetad/gmetad.conf $RPM_BUILD_ROOT/etc/gmetad.conf
make DESTDIR=$RPM_BUILD_ROOT install 
install -d  $RPM_BUILD_ROOT/srv/www/htdocs/ganglia-webfrontend
cp -a ganglia-webfrontend-2.5.7/* $RPM_BUILD_ROOT/srv/www/htdocs/ganglia-webfrontend/

%post   -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%preun gmetad
%stop_on_removal gmetad

%postun gmetad
%insserv_cleanup
%restart_on_update gmetad

%preun gmond
%stop_on_removal gmond

%postun gmond
%insserv_cleanup
%restart_on_update gmond
##
## FILES
##

%files
%defattr(-,root,root)
%doc ganglia_docs/*
/usr/%_lib/libganglia.so.*

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

%files gmetad
%defattr(-,root,root)
%config /etc/gmetad.conf
/usr/sbin/gmetad
/usr/sbin/rcgmetad
/etc/init.d/gmetad
%dir /var/lib/ganglia
%attr(0755,nobody,nobody)/var/lib/ganglia/rrds

%files devel
%defattr(-,root,root)
/usr/include/ganglia.h
%dir /usr/include/ganglia
/usr/include/ganglia/*
/usr/%_lib/libganglia.so
/usr/%_lib/libganglia.a
/usr/%_lib/libganglia.la

%files -n ganglia-webfrontend
%defattr(-,root,root)
%dir /srv/www/htdocs/ganglia-webfrontend
/srv/www/htdocs/ganglia-webfrontend/*

%clean
%__rm -rf $RPM_BUILD_ROOT

%changelog
* Thu May 14 2009 mrueckert@suse.de
- added ganglia-monitor-core-2.5.7_r1959.patch and
  ganglia-monitor-core-2.5.7_r1960.patch: fixing buffer overflow in
  gmetad (bnc#484338) CVE-2009-0241
- cleanup %%pre/%%post scriptlets
* Thu Aug 28 2008 ro@suse.de
- fix init scripts
* Sat Apr 26 2008 coolo@suse.de
- fix build
* Sat Jul 14 2007 aj@suse.de
- Fix build.
* Mon Feb 12 2007 ro@suse.de
- fix build as non-root
* Tue Jan 23 2007 mrueckert@suse.de
- added ganglia-monitor-core-2.5.7_strncat_usage.patch:
  fix potential buffer overflows in strncat()
* Tue Aug 08 2006 mrueckert@suse.de
- added ganglia-monitor-core-2.5.7_sysconf_hz.patch:
  define HZ as sysconf(_SC_CLK_TCK) if undefined
- added ganglia-monitor-core-2.5.7_missing_includes.patch:
  include unistd.h for read()
- compile with optflags
- compile with -fno-strict-aliasing
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Fri Dec 09 2005 ro@suse.de
- removed ddt from nfb
* Wed May 11 2005 schwab@suse.de
- Add freetype2{,-devel}, libart_lgpl{,-devel} and ddt to nfb, needed by
  rrdtool.
- Fix missing declarations.
* Mon May 02 2005 yxu@suse.de
- fixed for GCC4
* Mon Nov 15 2004 nashif@suse.de
- Update to 2.5.7
* Wed Sep 29 2004 nashif@suse.de
- Added missing PreReq (#46473)
* Fri May 14 2004 ro@suse.de
- added missing return value to non-void function
* Sat Apr 24 2004 nashif@suse.de
- Added -fno-strict-aliasing to CFLAGS
* Fri Mar 05 2004 ro@suse.de
- added libpng to neededforbuild (for rrdtool)
* Wed Feb 18 2004 nashif@suse.de
- Update to 2.5.6
* Tue Sep 23 2003 nashif@suse.de
- Set correct umask to prevent work writable rrd files (#30493)
* Mon Aug 11 2003 nashif@suse.de
- Update to version 2.5.4
* Thu Jun 12 2003 nashif@suse.de
- Fixed file list
* Fri May 16 2003 nashif@suse.de
- use getpagesize() instead of PAGE_SHIFT to make it compile on ia64
- Added missing files
* Thu May 15 2003 nashif@suse.de
- Initial version (2.5.3)
openSUSE Build Service is sponsored by