rpms/sysusage/EL-5 sysusage-2.6.cfg, NONE, 1.1 sysusage.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Rob Myers (rmyers) fedora-extras-commits at redhat.com
Mon Nov 19 13:27:27 UTC 2007


Author: rmyers

Update of /cvs/extras/rpms/sysusage/EL-5
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv798/EL-5

Modified Files:
	.cvsignore sources 
Added Files:
	sysusage-2.6.cfg sysusage.spec 
Log Message:
initial import of sysusage-2.6-3.el5.src.rpm



--- NEW FILE sysusage-2.6.cfg ---
# This part configure the default settings of Sysusage perl scripts
[GENERAL]
DEBUG     = 0
DATA_DIR  = /var/lib/sysusage
PID_FILE  = /var/run
DEST_DIR  = /var/www/html/sysusage
SAR_BIN   = /usr/bin/sar
UPTIME    = /usr/bin/uptime
HOSTNAME  = /bin/hostname
INTERVAL  = 60
SKIP      = 

# This part enable/disable and configure smtp alarm report
# when threshold min/max exceed are detected
[ALARM]
WARN_MODE   = 0
ALARM_PROG  = /usr/bin/sysusagewarn
SMTP        = localhost
FROM        = root at localhost
TO          = root at localhost

# This part allow system monitoring. There's three format. The first one is
# the most used:
#
#	type:ThresholdMax:ThresholdMin
#
# where type is the type of monitoring.
# The second format is only used for process and queue monitoring:
#
#	type:what:ThresholdMax:ThresholdMin
#
# where type can be 'proc' or 'queue' and what is the related thing to monitor.
# If type is 'proc' then what is a process name, if type is 'queue' then what
# is a directory path to monitor.
#
# The last one is used for disk space monitoring:
#
#       disk:ThresholdMax:exclusion
#
# where exclusion is a semicolon (;) separated list of mount point to exclude
# from monitoring.
#
# A ThresholdMax value set to 0 or omitted mean disable warning
# Omitting ThresholdMin disable warning
#
[MONITOR]
load:
cpu:
wait:0
cswch:
intr:
mem:
swap:
sock:
io:
file:
page:
pcrea:
pswap:
net:
err:
disk:


--- NEW FILE sysusage.spec ---
%define uname SysUsage
%define vname Sar
%define wname sysusage
%define webdir %{_localstatedir}/www/html/%{wname}

Name: %{wname}
Epoch: 0
Version: 2.6
Release: 3%{?dist}
Summary: System monitoring based on perl, rrdtool, and sysstat

Group: System Environment/Daemons
License: GPL+ or Artistic
URL: http://www.samse.fr/GPL/%{wname}
Source0: http://www.samse.fr/GPL/%{wname}/%{uname}-%{vname}-%{version}.tar.gz
Source1: %{wname}-%{version}.cfg
BuildArch: noarch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

Requires: rrdtool
Requires: sysstat
Requires: httpd

%description
SysUsage is a tool used to continuously monitor a system and generate a
daily/weekly/monthly/yearly graphical report using rrdtool and sar.

%prep
%setup -q -n %{uname}-%{vname}-%{version}

# create default crontab entry
echo "#*/1 * * * *    root    %{_bindir}/%{wname} > /dev/null 2>&1" > %{wname}.cron
echo "#*/5 * * * *    root    %{_bindir}/%{wname}graph > /dev/null 2>&1" >> %{wname}.cron

# create default httpd configuration
cat > %{wname}.conf << _EOF_
#
# By default %{wname} statistics are only accessible from the local host.
# 
Alias /%{wname} %{webdir}

<Directory %{webdir}>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
    # Allow from .example.com
</Directory>
_EOF_

# create README.Fedora
cat > README.Fedora << _EOF_
1. Setup a cronjob to run %{wname}.  Uncomment the entries in
   %{_sysconfdir}/cron.d/%{wname} or create a custom cronjob.

2. Ensure that httpd is running.

3. Browse to http://localhost/%{wname} to ensure that things are working
   properly.

4. If necessary, give additional hosts access to %{wname} by adding them to
   %{_sysconfdir}/httpd/conf.d/%{wname}.conf.
_EOF_

# remove the hardcoded /usr/local/sysusage path
%{__sed} -i -e 's,/usr/local/sysusage,,g' bin/%{wname}
%{__sed} -i -e 's,/usr/local/sysusage,,g' bin/%{wname}graph
# fix spelling annoyance
%{__sed} -i -e 's,seconde,second,g' bin/%{wname}graph

%build
# nope, gotta love perl

%install
%{__rm} -rf %{buildroot}
# set up path structure
%{__install} -d -m 0755 %{buildroot}/%{_bindir}
%{__install} -d -m 0755 %{buildroot}/%{_sysconfdir}
%{__install} -d -m 0755 %{buildroot}/%{_localstatedir}/lib/%{wname}
%{__install} -d -m 0755 %{buildroot}/%{perl_vendorlib}/%{uname}
%{__install} -d -m 0755 %{buildroot}/%{webdir}
# install files
%{__install} -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{wname}.cfg
%{__install} -m 0644 %{vname}.pm %{buildroot}/%{perl_vendorlib}/%{uname}
%{__install} -m 0755 bin/%{wname} %{buildroot}/%{_bindir}
%{__install} -m 0755 bin/%{wname}graph %{buildroot}/%{_bindir}
%{__install} -m 0755 bin/%{wname}warn %{buildroot}/%{_bindir}
%{__install} -D -m 0644 %{wname}.cron %{buildroot}/%{_sysconfdir}/cron.d/%{wname}
%{__install} -D -m 0644 %{wname}.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/%{wname}.conf

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(0644,root,root,0755)
%doc Changes INSTALL README TODO README.Fedora
%attr(0755,root,root) %{_bindir}/%{wname}
%attr(0755,root,root) %{_bindir}/%{wname}graph
%attr(0755,root,root) %{_bindir}/%{wname}warn
%config(noreplace) %{_sysconfdir}/%{wname}.cfg
%config(noreplace) %{_sysconfdir}/cron.d/%{wname}
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{wname}.conf
%{perl_vendorlib}/%{uname}
%dir %{_localstatedir}/lib/%{wname}
%dir %{webdir}

%changelog
* Thu Nov 15 2007 Rob Myers <rob.myers at gtri.gatech.edu> 0:2.6-3
- fix minor license issue
- add a default crontab entry
- add a default httpd configuration
- add README.Fedora

* Fri Nov  9 2007 Rob Myers <rob.myers at gtri.gatech.edu> 0:2.6-2
- seds really belong in prep

* Thu Nov  8 2007 Rob Myers <rob.myers at gtri.gatech.edu> 0:2.6-1
- move seds to build section
- remove perl requires
- update to 2.6

* Mon Jul 16 2007 Rob Myers <rob.myers at gtri.gatech.edu> 0:2.5-3
- define vname and wname in case this package should be renamed to
  perl-%%{uname}-%%{vname}

* Fri Jul 13 2007 Rob Myers <rob.myers at gtri.gatech.edu> 0:2.5-2
- change /var/db/sysusage to /var/lib/sysusage
- change perl_vendorarch to perl_vendorlib to build noarch
- update license
- add dist tag
- misc spec changes and/or cleanups

* Fri Jul  6 2007 Jason Corley <jason.corley at gmail.com> 0:2.5-1
- first packaging attempt



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/sysusage/EL-5/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	17 Nov 2007 04:25:00 -0000	1.1
+++ .cvsignore	19 Nov 2007 13:26:55 -0000	1.2
@@ -0,0 +1 @@
+SysUsage-Sar-2.6.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/sysusage/EL-5/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	17 Nov 2007 04:25:00 -0000	1.1
+++ sources	19 Nov 2007 13:26:55 -0000	1.2
@@ -0,0 +1 @@
+c93f4bd64252fd93b7e793b0898e06c5  SysUsage-Sar-2.6.tar.gz




More information about the fedora-extras-commits mailing list