File smokeping.spec of Package smokeping
# norootforbuild
%define home_dir %{_var}/lib/%{name}
%define data_dir %{home_dir}/data
%define run_dir %{_var}/run/%{name}
%define cache_dir %{_var}/cache/%{name}
%define conf_dir %{_sysconfdir}/%{name}
%define cgi_dir /srv/www/cgi-bin/
%define apache_conf %{_sysconfdir}/apache2/conf.d/
#
Name: smokeping
Version: 2.4.2
Release: 1
#
Group: System/Monitoring
License: GPL v2
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# for path ownership
BuildRequires: apache2-prefork
PreReq: %insserv_prereq %fillup_prereq
Requires: perl-Socket6 perl-Net-Telnet perl-Net-DNS
Requires: perl-IO-Socket-SSL perl-ldap perl-ldap-ssl
Requires: bind-utils fping echoping curl rrdtool curl
#
URL: http://oss.oetiker.ch/smokeping/
Source: http://oss.oetiker.ch/smokeping/pub/%{name}-%{version}.tar.gz
Source1: %{name}.init
Source2: %{name}.conf
Source3: README.SuSE
Patch: smokeping-%{version}_no_speedy.patch
Patch1: smokeping-%{version}_remove_use_lib.patch
Patch2: smokeping-%{version}_distro_paths.patch
#
Summary: SmokePing is a network latency monitor
%description
SmokePing is a network latency monitor which works in a way that is similar to
MRTG. It measures network latency to a configurable set of destinations on the
network, and displays its findings in easy-to-read Web pages. SmokePing has
special support for monitoring hosts with dynamic IP addresses. SmokePing uses
RRDtool as its logging and graphing back-end, making the system very efficient.
The presentation of the data on the Web is done through a CGI which creates
graphs on demand.
%package perl
Summary: perl modules
Group: System/Monitoring
Requires: %name = %version
%description perl
Digest perl modules
%prep
%setup
%patch
%patch1
%patch2
cp %{S:3} .
#
find -name \*.rej -or -name \*.orig -print0 | xargs -r0 rm -v
# as we use cp sometimes we should make sure that the permissions
# are ok
chmod -vR u=rwX,go=rX $PWD
find -type f -print0 | xargs -r0 chmod -v a-x
%build
%{__make}
# fix the paths
for i in {bin,htdocs}/*.dist ; do
%{__mv} -v "$i" "${i%%.dist}"
done
for i in etc/*.dist ; do
%{__cp} -v "$i" "${i%%.dist}"
done
# create a clean html doc tree
cp -rv doc html
find html -type f -not -name \*.html -print0 | xargs -r0 rm -v
%install
%{__install} -Dd -m 0755 \
%{buildroot}%{_sbindir} %{buildroot}%{perl_vendorlib} \
%{buildroot}%{conf_dir} %{buildroot}%{home_dir} \
%{buildroot}%{data_dir} %{buildroot}%{cache_dir} \
%{buildroot}%{run_dir} %{buildroot}%{cgi_dir}
#
# install scripts
%{__install} -m 0755 bin/* %{buildroot}%{_sbindir}/
%{__install} -m 0755 htdocs/%{name}.cgi %{buildroot}%{cgi_dir}/%{name}
%{__cp} -av htdocs/cropper/ %{buildroot}%{cgi_dir}/
# install perl libraries
cp -av lib/* %{buildroot}%{perl_vendorlib}/
# install config
%{__install} -m 0644 etc/* %{buildroot}%{conf_dir}/
# install man pages
for i in 1 3 5 7 ; do
%{__install} -m 0755 -Dd %{buildroot}%{_mandir}/man$i/
%{__install} -m 0644 $(find -name "*$i") %{buildroot}%{_mandir}/man$i/
done
# init script
%{__install} -D -m 0755 %{S:1} %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__ln_s} -f %{_sysconfdir}/init.d/%{name} %{buildroot}%{_sbindir}/rc%{name}
# apache config
%{__install} -D -m 0644 %{S:2} %{buildroot}%{apache_conf}/%{name}.conf
%clean
%{__rm} -rf %{buildroot}
%pre
/usr/sbin/groupadd -r %{name} &>/dev/null ||:
/usr/sbin/useradd -o -g %{name} -s /bin/false -r -c "user for %{name}" -d %{home_dir} %{name} &>/dev/null ||:
%post
%fillup_and_insserv %{name}
%preun
%stop_on_removal %{name}
%postun
%restart_on_update %{name}
%{insserv_cleanup}
%files
%defattr(-, root, root, 0755)
%dir %attr(0751,root,%{name}) %{conf_dir}
%config(noreplace) %attr(0644,root,%{name}) %{conf_dir}/*
%config(noreplace) %{apache_conf}/%{name}.conf
#
%{_sysconfdir}/init.d/%{name}
%{_sbindir}/rc%{name}
%{_sbindir}/%{name}
%{_sbindir}/tSmoke
%{cgi_dir}/%{name}
%{cgi_dir}/cropper/
#
%{_mandir}/man?/*
%{perl_vendorlib}/BER.pm
%{perl_vendorlib}/Config/
%{perl_vendorlib}/Smokeping/
%{perl_vendorlib}/Smokeping.pm
%{perl_vendorlib}/SNMP_Session.pm
%{perl_vendorlib}/SNMP_util.pm
#
%doc CHANGES CONTRIBUTORS COPYING COPYRIGHT README TODO README.SuSE
%doc doc/examples/ html/
#
%dir %attr(0751,root,root) %{home_dir}/
%dir %attr(0751,%{name},root) %{data_dir}/
%dir %attr(0751,wwwrun,root) %{cache_dir}/
%dir %attr(0750,%{name},root) %{run_dir}/
%files perl
%defattr(-, root, root)
%{perl_vendorlib}/Digest
%{perl_vendorlib}/CGI
%{perl_vendorlib}/JSON.pm
%{perl_vendorlib}/JSON
%{perl_vendorlib}/Qooxdoo
%changelog
* Fri Jul 25 2008 Carsten Schoene <cs@linux-administrator.com>
- update to version 2.4.2
- added strict to both wrappers and fixed some followup errors
- kill taint error in Smokeping.pm
- better master/slave secrets documentation
- do not load :sys_wait_h from POSIX perl module since this seems to
be missing in some linux distros and we can do alright without.
- version 2.4.1 changes:
- fixed js packaging error ... s/VERSION/x/ was a bad idea
* Wed Jun 11 2008 Carsten Schoene <cs@linux-administrator.com>
- update to version 2.4.0
- building a --static version of the smokeping page is broken. Make
it a little less broken by providing a dummyCGI->script_name method
- added blazemode option to FPing, so that it sends an extra ping to
blaze a path to the destionation and then discarges it
- fix for telneJunOSPing
- fixed FPing regression created in r680 it broke the proper handling of old
version of fping.
- first cut at mtr integration ... added new menuextra config item
to build mtr links
- ise localtime to construct the rawlog filename
- allow slave names to have . in them but not target sections
* Sun Apr 27 2008 Carsten Schoene <cs@linux-administrator.com>
- update to version 2.3.6
- add custom style for active menu link
- honour the 'linkstyle' variable when zooming
- the 'ralf' fix for cgi which is not able to read the secrets file
- display "all the smoke" even when it gets cut at the top end of the graph
* Sat Apr 05 2008 Carsten Schoene <cs@linux-administrator.com>
- update to version 2.3.5
- make slaves kill their old children off before forking new ones when
the configuration changes. Reported by David Behr.
- changes in version 2.3.4
- fix 'loss_background' documentation. Reported by David Tomic.
- fix local variable override handling in connection with nomasterpoll
- add protocol level master/slave protocol to control upgrades
- fix ordering of menu entries again
- bail out if the master/slave shared secret file is world-readable
or writable
- add some security notes to the master/slave documentation
- Switch message hash generation to Digest::HMAC_MD5 (bundled) since this
prevents the extension attack. Note that this change requires that you
upgrade client and server in sync (you should do that anyway, but
especially because of this)!
- make sure when loading the sortercache that we only load info about
graphs presently in the config.
- optionally precreate the directory structure under 'dyndir' if
'precreateperms' is set
- store the slave updates in 'dyndir', defaulting to 'datadir'
- change the slave update locking code so that reading works without
write access to the temporary storage file
- allow SSH probe to config rsa1 key
- make zooming work properly even for graphs generated with the
navigator form time range fields.
* Tue Mar 18 2008 Carsten Schoene <cs@linux-administrator.com>
- update to version 2.3.3
- use separate slave cache and longer slave timeout. this
helps with slave congestion
- add an optional --pid-dir option to specify the pid directory
when running as a slave.
- slaves were not polling targets where nomasterpoll was set
- changes in version 2.3.2
- make ajax mode work on IE again
- make rawlog mode work again
- make ajax mode work for nomasterpol targets
- fixe ordering of menu versus overview page
* Sun Feb 17 2008 Carsten Schoene <cs@linux-administrator.com>
- update to 2.3.1
* Master should not generate alerts for nomasterpoll targets
* Fixed div structure in hierarchy and filter form
* Wed Feb 13 2008 Carsten Schoene <cs@linux-administrator.com>
- update to 2.3.0
- adapted patches to new version
* Sun Mar 04 2007 - mrueckert@suse.de
- updated urls in the spec