File logdigest.spec of Package logdigest
#
# spec file for package logdigest (Version 0.1.7)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: logdigest
Url: http://logdigest.cmdline.net/
Version: 0.1.7
Release: 32
Summary: Mail Digests of System Log Files to the System Administrator
License: GPL v2 or later
Group: System/Monitoring
AutoReqProv: on
PreReq: /bin/chmod /bin/touch
Source: http://www.cmdline.net/logdigest/logdigest-%{version}.tar.bz2
Patch: logdigest-0.1.7-ignores.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} >= 1010
Recommends: cron
%endif
%description
Logdigest, run by cron at night, greps through system log files
(var/log/messages, /var/log/mail, etc.) to find "interesting" content.
Lines matching the regular expressions in /etc/logdigest are simply
ignored. More expressions can be added to /etc/logdigest/ignore.local.
See /etc/logdigest/config for some general settings.
The results are mailed to the sysadmin daily.
Authors:
--------
Peter Poeml <poeml@suse.de>
Craig H. Rowland <crowland@psionic.com>
%prep
%setup -n logdigest-%{version}
%patch -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
aclocal
autoconf
automake --add-missing
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} --with-tmpdir=/var/lib/logdigest
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p %{buildroot}/etc/cron.d
cat >%{buildroot}/etc/cron.d/logdigest-ignores-autogeneration <<-EOF
# Cron snippet which concatenates the ignore files into a single file
# /etc/logdigest/ignores.autogenerated, pruned by spaces.
#
# That file can be used by other programs (e.g. eddie-tool) for
# log-scanning.
-*/30 * * * * root cd /etc/logdigest && f=ignore.all.autogenerated; if ! [ -e \$f ]; then touch \$f; chmod 600 \$f; fi; grep -h -v "^[[:space:]]*$" ignore ignore.local > \$f
EOF
%post
# add .local conf files if they are not there
cd etc/logdigest
for i in alarming ignore; do
test -e $i.local || { touch $i.local; chmod 600 $i.local; }
done
%preun
# remove .local conf files if empty
cd etc/logdigest
for i in alarming ignore; do
test -s $i.local || rm -f $i.local
done
%files
%defattr(-,root,root)
%doc README AUTHORS COPYING ChangeLog INSTALL NEWS TODO BUGS VERSION
%dir /etc/logdigest
%config(noreplace) /etc/logdigest/*
/usr/bin/logtail
/var/lib/logdigest
/etc/cron.daily/logdigest
%config %attr(640,root,root) /etc/cron.d/logdigest-ignores-autogeneration
%changelog
* Sun Apr 13 2008 poeml@suse.de
- don't try to use "Recommends" tag on very old distro
* Wed Mar 26 2008 poeml@suse.de
- update ignores to svn r78 (fix openvpn rule)
* Tue Feb 19 2008 poeml@suse.de
- add "Recommends: cron" [bnc #354704]
* Tue Feb 05 2008 poeml@suse.de
- update ignores to svn r77 (more cyrus and named ignores)
* Wed Jan 30 2008 poeml@suse.de
- update ignores to svn r76 (postfix/cleanup rule fixed)
* Tue Jan 29 2008 poeml@suse.de
- update ignores to svn r75
* Mon Jan 28 2008 poeml@suse.de
- add logdigest-0.1.7-ignores.patch, with ignores from svn r74
* Fri Jan 25 2008 poeml@suse.de
- fix creation of cron snippet (forgot to quote the dollar signs)
* Thu Jan 24 2008 poeml@suse.de
- chmod 600 the ignores.autogenerated, just as the source files.
* Thu Jan 24 2008 poeml@suse.de
- update to 0.1.7
- add ignores for syslog-ng
* Thu Jan 24 2008 poeml@suse.de
- install /etc/cron.d/logdigest-ignores-autogeneration, a cron
snippet which concatenates the ignore files into a single file,
/etc/logdigest/ignores.autogenerated pruned by spaces. That file
can be used by other programs (e.g. eddie-tool) for
log-scanning.
* Fri Sep 28 2007 poeml@suse.de
- update to 0.1.6
- add some regexps (postfix, auditd); add to TODO
- use CFLAGS in Makefile.am
* Tue Jan 16 2007 poeml@suse.de
- use RPM_OPT_FLAGS
- remove special case for SuSE Linux 8.0
* Fri Nov 17 2006 mge@suse.de
- fix SPEC-file for Mandriva and Fedora: mix of filelist
and explicitly given files not possible, ...
* Thu Nov 02 2006 poeml@suse.de
- bump version (0.1.5)
- ignore empty lines in the regexp files [#207883]
- fold in logdigest-0.1.4-apparmor.dif
- add some keywords to ignore (zmd, smartd, stunnel, imap, sshd)
* Thu Feb 16 2006 poeml@suse.de
- add the linux audit framework daemons log location to the
default configuration (AppArmor will make use of the audit
framework if its running). - add AppArmor keywords to the
alarming list. (Patch from Steve Beattie)
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Mon Oct 31 2005 dmueller@suse.de
- don't build as root
* Fri Jan 14 2005 ro@suse.de
- fix typo in specfile
* Wed Jan 14 2004 poeml@suse.de
- update to 0.1.4. Some more regexps
* Thu Aug 07 2003 poeml@suse.de
- update to 0.1.3. More added regexps
* Fri Jul 25 2003 poeml@suse.de
- update to 0.1.2
- added a number of regexps
* Thu Aug 01 2002 poeml@suse.de
- use PreReq
- fix check for SuSE-release
* Fri Mar 22 2002 ro@suse.de
- fix broken check for SuSE-release
* Mon Feb 25 2002 poeml@suse.de
- version 0.1.1
- don't send empty mails
- don't print login stats
- remove temp files
- always print mail queue
* Sun Jan 20 2002 poeml@suse.de
- initial package