# $Id: smeserver-sme7admin.spec,v 1.19 2009/08/24 17:58:13 slords Exp $ # Authority: vip-ire # Name: Daniel Berteaud Summary: A graphical monitor, alert raising, and services supervision tool for your SME Server. %define name smeserver-sme7admin Name: %{name} %define version 1.1.1 %define release 15 Version: %{version} Release: %{release}%{?dist} License: GPL Group: Networking/Daemons Source: %{name}-%{version}.tar.gz Patch1: smeserver-sme6admin-1.1.1-toenglish.patch Patch2: smeserver-sme7admin-1.1.1-locale-2009-03-05.patch #Patch3: smeserver-sme7admin-1.1.1-extralink.patch Patch4: smeserver-sme7admin-1.1.1-detect_locale.patch Patch5: smeserver-sme7admin-1.1.1-detect_locales_regexp.patch Patch6: smeserver-sme7admin-1.1.1-locale-2009-04-27.patch Patch7: smeserver-sme7admin-1.1.1-locale-2009-05-20.patch Patch8: smeserver-sme7admin-1.1.1-fixe_mail_status.patch Patch9: smeserver-sme7admin-1.1.1-locale-2009-05-26.patch Patch10: smeserver-sme7admin-1.1.1-locale-2009-06-05.patch Patch11: smeserver-sme7admin-1.1.1-locale-2009-06-15.patch Patch12: smeserver-sme7admin-1.1.1-locale-2009-07-22.patch Patch13: smeserver-sme7admin-1.1.1-locale-2009-08-24.patch Patch14: smeserver-sme7admin-1.1.1-locale-2009-09-28.patch BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot BuildArchitectures: noarch BuildRequires: e-smith-devtools BuildRequires: gettext Requires: e-smith-base Requires: rrdtool-perl Requires: rrdtool Requires: hddtemp Requires: sysstat < 5.1 Requires: lm_sensors AutoReqProv: no %changelog * Tue Sep 29 2009 Daniel B. 1.1.1-15.sme - apply locale patch 2009-09-28 * Mon Aug 24 2009 SME Translation Server 1.1.1-14.sme - apply locale 2009-08-24 patch * Wed Jul 22 2009 Daniel B. 1.1.1-13.sme - apply locale 2009-07-22 patch * Mon Jun 15 2009 Daniel B. 1.1.1-12.sme - apply locale 2009-06-15 patch * Fri Jun 05 2009 Daniel B. 1.1.1-11.sme - apply locale 2009-06-05 patch * Tue May 25 2009 Daniel B. 1.1.1-10.sme - apply locale 2009-05-26 patch * Tue May 25 2009 Daniel B. 1.1.1-9.sme - Fixe typo in DB parameters for status emails * Wed May 20 2009 SME Translation Server 1.1.1-8.sme - apply locale 2009-05-20 patch * Mon Apr 27 2009 SME Translation Server 1.1.1-7.sme - apply locale 2009-04-27 patch * Mon Mar 16 2009 Daniel B. 1.1.1-6.sme - Use a regexp to detect the locale (thanks Shad Lords) * Mon Mar 9 2009 Daniel B. 1.1.1-5.sme - detection of locales supported by SME server - re-enable additionnal link (required to access graphs with userpanels contrib) * Thu Mar 5 2009 Shad L. Lords 1.1.1-4.sme - Remove extra panel links * Thu Mar 05 2009 SME Translation Server 1.1.1-3.sme - apply locale 2009-03-05 patch * Thu Mar 5 2009 Daniel B. 1.1.1-2.sme - translate spec file in english * Thu Mar 5 2009 Shad L. Lords 1.1.1-1.sme - Roll new version in prep for translation - Convert base strings to english * Tue Mar 03 2009 Daniel B. 1.1.0-7 - Split Requires in several lines - Add e-smith-devtools as a build dependency * Tue Feb 17 2009 Daniel B. 1.1.0-6 - Fixes in spec file - Fix links for graphs in userpanels - move db initialization from spec file to source archive * Thu Aug 13 2008 Daniel B. 1.1.0-5 - Fix configuration db flush when we use the mini form to configure alerts [SME: 4435] * Mon Jun 23 2008 Daniel B. 1.1.0-4 - fix a bug when a configuration value is 0 [SME: 4420] - fix service name (smbd, not smb) [SME: 4419] * Fri Jun 13 2008 Daniel B. 1.1.0-3 - compatibility with rrdtool 1.2 [SME: 3729] - compatibility with new service status output [SME: 2987] - correct sme7admind not starting after a crash (existing pid file)[SME: 1451][SME: 3022] - configuration is stored in the db - unique radom mysql password for new install - fixed some warnings in httpd/admin_error_log - clean the spec file - some code cleaning * Wed Feb 01 2006 Landry Breuil - v1.1.0 - renamed to smeserver-sme7admin - only compatible with sme7 from now - Major rewrite, BIG code cleanup - configuration stored in a file - a LOT more things configurable - Add sme7 specific services - Add a link for thresold configuration in alerts emails - Add 'netstat -tpl' and 'w' on the main page * Mon Oct 03 2005 Cyril Dumas - v1.0.5 - Fix some bugs so it can run on sme7 - lots of modifications for sme7 * Tue Feb 01 2005 Landry Breuil - v1.0.4 - use gettext for all text outputs - english translation for panel and emails - include .po files for french and english * Tue Sep 14 2004 Landry Breuil - v1.0.3 - Add afp in sessions graph - Network graphs enhancement - Add server trafic other than forward - Enhance panel and short_status (easter-egg ;)) - Fix ftp anonymous client bug - possibility to disable alerts - clean /var/tmp during logrotate * Thu Aug 26 2004 Landry Breuil - v1.0.2 - Full Compatibility with 5.6 - Support for US locale (0.0 => 0,0) - Added temp hd 2 - Correct regexp on hostname * Tue Aug 10 2004 Landry Breuil - Fix postinstall and preun scripts for upgrades - Fix service not starting after a reboot * Mon Aug 9 2004 Landry Breuil - v1.0.1 - Add status interval parameter - Better compatibility with SME 5.6 * Fri Aug 6 2004 Landry Breuil - v1.0.0 %description The main part of sme7admin is a daemon which gathers informations from logs and other tools like systat, it then feed a mysql database and create RRD graphs about your system state. This daemon can also send periodics mails (with some logs), and alerts mails based on configurable thresolds. A panel is also available in the server-manager, with which you can access gathered data, display the RRD graphs and configure the service. This contrib is a bit inspired by e-smith-sysmon from Shad Lords. %prep %setup %patch1 -p1 %patch2 -p1 #%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 %build perl createlinks %{__mkdir_p} root/etc/e-smith/web/panels/manager/html/sme7admin %{__mkdir_p} root/usr/share/locale/en_US/LC_MESSAGES xgettext --from-code UTF-8 -F --no-wrap -L perl \ -o root/usr/share/locale/en_US/LC_MESSAGES/sme7admin.po \ root/etc/e-smith/web/functions/sme7admin \ root/usr/bin/sme7admind /sbin/e-smith/generate-lexicons %install rm -rf $RPM_BUILD_ROOT (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT > %{name}-%{version}-filelist %clean rm -rf $RPM_BUILD_ROOT %pre # This is to correct a bug in the previous version if [ -e /etc/e-smith/web/panels/manager/html/sme7admin/sme7admin.conf ]; then cp -a /etc/e-smith/web/panels/manager/html/sme7admin/sme7admin.conf \ /etc/e-smith/web/panels/manager/html/sme7admin/_sme7admin.conf fi %preun %post if [ $1 -eq 1 ] then if [ -d /var/lib/sme6admin ] && [ -d /var/lib/mysql/sme6admin/ ] then echo "You may now safely remove sme6admin. Datas were migrated to sme7admin." echo "Execute 'rpm -e e-smith-sme6admin' and maybe 'mysqladmin drop sme6admin' and 'rm -Rf /var/lib/sme6admin' to completely remove sme6admin." fi fi %postun %files -f %{name}-%{version}-filelist %defattr(-,root,root) %attr(755,root,root) /etc/e-smith/sql/init/sme7admin