debian/0000755000000000000000000000000012052515776007200 5ustar debian/rules0000755000000000000000000000305012052515776010256 0ustar #!/usr/bin/make -f DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) configure: dh_testdir autoconf cp /usr/share/misc/config.guess /usr/share/misc/config.sub . config.status: configure ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr --sysconfdir=/etc --mandir=\$${prefix}/share/man \ --localstatedir=/var --with-site-perl=/usr/share/perl5 build-arch: build build-indep: build build: config.status dh_testdir $(MAKE) touch build-stamp clean: dh_testdir [ ! -f Makefile ] || $(MAKE) distclean dh_clean rm -f build-stamp config.guess config.sub configure rm -Rf debian/epylog install: build dh_testdir $(MAKE) install DOCDIRS="doc/*" pkgdocdir="/usr/share/doc/epylog" DESTDIR="$(CURDIR)/debian/epylog" rm $(CURDIR)/debian/epylog/usr/share/doc/epylog/INSTALL \ $(CURDIR)/debian/epylog/usr/share/doc/epylog/LICENSE \ $(CURDIR)/debian/epylog/usr/share/doc/epylog/ChangeLog find $(CURDIR)/debian/epylog -name *.pyc | xargs rm -f chmod 755 $(CURDIR)/debian/epylog/usr/share/epylog/modules/*.py mv $(CURDIR)/debian/epylog/etc/cron.daily/epylog.cron $(CURDIR)/debian/epylog/etc/cron.daily/epylog binary-indep: build install dh_testdir dh_testroot dh_installman dh_installdocs -X.svn dh_installchangelogs ChangeLog dh_compress dh_pysupport dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary-arch: binary: binary-indep binary-arch .PHONY: build binary-indep binary install debian/source/0000755000000000000000000000000012052515776010500 5ustar debian/source/format0000644000000000000000000000001412052515776011706 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000203112052515776011127 0ustar This package was debianized by Tiago Bortoletto Vaz on Wed, 26 Oct 2005 07:51:44 -0200. It was downloaded from http://linux.duke.edu/projects/epylog/ Copyright (C) 2009: Konstantin Ryabitsev License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2,'. debian/control0000644000000000000000000000134412052515776010605 0ustar Source: epylog Section: python Priority: extra Maintainer: Tiago Bortoletto Vaz Build-Depends-Indep: python-libxml2, lynx, autotools-dev, autoconf, python-support (>= 0.4) Build-Depends: debhelper (>= 9) Standards-Version: 3.9.3 Vcs-Browser: http://git.debian.org/git/collab-maint/epylog.git Vcs-Git: git://git.debian.org/git/collab-maint/epylog.git Homepage: https://fedorahosted.org/epylog/ Package: epylog Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-libxml2 Description: New logs analyzer and parser This is a syslog parser which runs periodically, looks at your logs, processes some of the entries in order to present them in a more comprehensible format, and then mails you the output. debian/changelog0000644000000000000000000000732412052515776011060 0ustar epylog (1.0.7-2) unstable; urgency=low * Adding patch to support ISO-8601 timestamps. Thanks to Olaf Ohlenmacher. (Closes: #693615) -- Tiago Bortoletto Vaz Mon, 19 Nov 2012 15:42:57 -0500 epylog (1.0.7-1) unstable; urgency=low [ Tiago Bortoletto Vaz ] * New upstream release. Thanks to Micha vor dem Berge. (Closes: #659449, #603259) [ Jari Aalto ] * Remove deprecated dpatch and upgrade to packaging format "3.0 quilt". (Closes: #668487) * Update to Standards-Version to 3.9.3 and debhelper to 9. * Add build-arch and build-indep targets; use dh_prep in rules file. * Fix no-homepage-field (Lintian). -- Tiago Bortoletto Vaz Fri, 20 Apr 2012 09:09:27 -0400 epylog (1.0.3-7) unstable; urgency=low * moving from svn to git in collab-main * debian/control + add Vcs-Browser: and Vcs-Git: fields + remove Julien Louis from Uploaders list (Closes: #513859) + add Dm-Upload-Allowed field * fix minor lintian warnings * add man3 file which was not being installed due to a wrong patch -- Tiago Bortoletto Vaz Mon, 09 Mar 2009 13:32:19 -0400 epylog (1.0.3-6) unstable; urgency=low * Add 03_check_binary_in_crontab patch to check if binary exists before running epylof in crontab (Closes: #435992). -- Julien Louis Sun, 05 Aug 2007 10:19:43 +0200 epylog (1.0.3-5) unstable; urgency=low [ Tiago Bortoletto Vaz ] * A lot of changes to be in conformity with the new python policy. (Closes: #380788) [ Julien Louis ] * debian/control: + Remove perl-doc from Build-Depends. * Add patch 02_fix_perl_man_generation to build epylog.3 correctly (Closes: #379927). * debian/rules: + Remove unneeded configure call in build target. * Don't hardcode path of *.pyc modules (Closes: #385203). -- Julien Louis Wed, 30 Aug 2006 00:59:39 +0200 epylog (1.0.3-4) unstable; urgency=low * Fix default paths in config files. Now it uses /var/log/syslog,mail.log,auth.log instead of /var/log/messages,maillog,secure. Thanks to Sami Haahtinen. Closes: #373656 * Fix minor lintian warnings -- Tiago Bortoletto Vaz Sun, 23 Jul 2006 16:38:55 -0400 epylog (1.0.3-3) unstable; urgency=low * Add myself as uploader. * Ack previous NMU. Closes: #364869, #366449, #364898 * Add Julien Louis as uploader too since he did a lot of improvements in the package in his NMU. * Remove bashism from debian/rules so it follow POSIX shell. -- Otavio Salvador Sat, 3 Jun 2006 14:19:44 -0300 epylog (1.0.3-2) unstable; urgency=low * Fixed problems in Build-Depends (thanks to Daniel Schepler). Closes: #364869 * Fixed epylog.cron file name (thanks to Jason Lunz). Closes: #364898 -- Tiago Bortoletto Vaz Fri, 28 Apr 2006 13:00:00 -0400 epylog (1.0.3-1.1) unstable; urgency=low * Non-maintainer upload. * Update debhelper compatibility to 5. * debian/control: - Add debhelper (>= 5) to Build-Depends - Add python and python-libxml2 to Build-Depends-Indep (Closes: #364869, #366449). - Add perl-doc to Build-Depends-Indep. - Add lynx to Build-Depends-Indep. - Bump standards version. No changes needed. - Change Architecture from any to all since package does no ship any architecture dependent file. * Install perl module in a perl-policy compliant directory. * Rename cron job in /etc/cron.daily (Closes: #364898). -- Julien Louis Wed, 31 May 2006 20:00:18 +0200 epylog (1.0.3-1) unstable; urgency=low * Initial release Closes: #274726 -- Tiago Bortoletto Vaz Wed, 26 Oct 2005 07:51:44 -0200 debian/patches/0000755000000000000000000000000012052515776010627 5ustar debian/patches/03_check_binary_in_crontab.patch0000644000000000000000000000042312052515776016770 0ustar From: Subject: test if the binary is there before calling it in crontab --- a/cron/epylog.cron.in +++ b/cron/epylog.cron.in @@ -1,6 +1,6 @@ #!/bin/sh # Run epylog daily. # -# $Id$ -# +[ -x %%sbindir%%/epylog ] || exit 0 + %%sbindir%%/epylog --cron debian/patches/02_fix_perl_man_generation.patch0000755000000000000000000000150212052515776017030 0ustar From: Julien Louis Subject: fix perl man generation diff -urNad epylog~/perl/Makefile.in epylog/perl/Makefile.in --- epylog~/perl/Makefile.in 2009-03-09 13:26:42.000000000 -0400 +++ epylog/perl/Makefile.in 2009-03-09 13:27:53.956647338 -0400 @@ -33,18 +33,18 @@ INSTALLDIRS = $(PERL_MODULE_DIR) $(mandir)/man3 all: - perldoc epylog.pm > epylog.3 + pod2man -s 3pm epylog.pm epylog.3pm install: all installdirs $(INSTALL_DATA) epylog.pm $(DESTDIR)$(PERL_MODULE_DIR)/epylog.pm - $(INSTALL_DATA) epylog.3 $(DESTDIR)$(mandir)/man3/epylog.3 + $(INSTALL_DATA) epylog.3pm $(DESTDIR)$(mandir)/man3/epylog.3pm uninstall: $(RM) $(PERL_MODULE_DIR)/epylog.pm - $(RM) $(mandir)/man3/epylog.3 + $(RM) $(mandir)/man3/epylog.3pm clean: - $(RM) epylog.3 + $(RM) epylog.3pm distclean: clean $(RM) Makefile debian/patches/05_support_iso_8651_timestamps.patch0000644000000000000000000000414312052515776017475 0ustar --- a/py/epylog/__init__.py +++ b/py/epylog/__init__.py @@ -52,6 +52,7 @@ GREP_LINES = 10000 QUEUE_LIMIT = 500 LOG_SPLIT_RE = re.compile(r'(.{15,15})\s+(\S+)\s+(.*)$') +LOG_SPLIT_ISO_TS_RE = re.compile(r'(\S+)\s+(\S+)\s+(.*)$') SYSLOG_NG_STRIP = re.compile(r'.*[@/]') MESSAGE_REPEATED_RE = re.compile(r'last message repeated (\S+) times') --- a/py/epylog/log.py +++ b/py/epylog/log.py @@ -70,10 +70,21 @@ Takes a syslog date string and makes a timestamp out of it. """ try: - (m, d, t) = datestr.split()[:3] - y = str(monthmap[m]) - datestr = string.join([y, m, d, t], ' ') - tuptime = time.strptime(datestr, '%Y %b %d %H:%M:%S') + # time may be in ISO-8601 format + if datestr[10] == 'T': + # The timestamp can be given at arbitrary TZ, dependent of the + # TZ setting of the local (or remote?) syslog daemon. + # For now assume timestamps given in correct local TZ and ignore + # the specified TZ which can not be parsed with time.strptime(). + # Format of the ISO time string: + # YYYY-mm-ddTHH:MM:SS[.fraction] + # FIXME: assume timestamp in local TZ + tuptime = time.strptime(datestr[:19], '%Y-%m-%dT%H:%M:%S') + else: + (m, d, t) = datestr.split()[:3] + y = str(monthmap[m]) + datestr = string.join([y, m, d, t], ' ') + tuptime = time.strptime(datestr, '%Y %b %d %H:%M:%S') ## # Python 2.2.2 (at least) breaks with DST. # Work around. @@ -92,7 +103,11 @@ This function takes a syslog line and returns the timestamp of the event, the system where it occured, and the message. """ - mo = epylog.LOG_SPLIT_RE.match(line) + # Assume ISO-8601 timestmps when the 11'th character is 'T' + if line[10] == 'T': + mo = epylog.LOG_SPLIT_ISO_TS_RE.match(line) + else: + mo = epylog.LOG_SPLIT_RE.match(line) if not mo: raise ValueError('Unknown line format: %s' % line) time, sys, msg = mo.groups() stamp = mkstamp_from_syslog_datestr(time, monthmap) debian/patches/series0000644000000000000000000000025212052515776012043 0ustar 05_support_iso_8651_timestamps.patch 01_fix_paths_in_cfg_files.patch 02_fix_perl_man_generation.patch 03_check_binary_in_crontab.patch 04_fix_minor_manpages_issues.patch debian/patches/01_fix_paths_in_cfg_files.patch0000755000000000000000000000544312052515776016635 0ustar From: Tiago Bortoletto Vaz Subject: Fix paths for logfiles in modules.d/* diff -urNad trunk~/etc/modules.d/logins.conf.in trunk/etc/modules.d/logins.conf.in --- trunk~/etc/modules.d/logins.conf.in 2006-06-16 07:42:51.000000000 -0400 +++ trunk/etc/modules.d/logins.conf.in 2006-07-23 16:11:26.000000000 -0400 @@ -1,7 +1,7 @@ [module] desc = Logins exec = %%MODULES_DIR%%/logins_mod.py -files = /var/log/messages[.#], /var/log/secure[.#] +files = /var/log/syslog[.#], /var/log/auth.log[.#] enabled = yes internal = yes outhtml = yes diff -urNad trunk~/etc/modules.d/mail.conf.in trunk/etc/modules.d/mail.conf.in --- trunk~/etc/modules.d/mail.conf.in 2006-06-16 07:42:51.000000000 -0400 +++ trunk/etc/modules.d/mail.conf.in 2006-07-23 16:09:54.000000000 -0400 @@ -1,7 +1,7 @@ [module] desc = Mail Report exec = %%MODULES_DIR%%/mail_mod.py -files = /var/log/maillog[.#] +files = /var/log/mail.log[.#] enabled = yes internal = yes outhtml = yes diff -urNad trunk~/etc/modules.d/notices.conf.in trunk/etc/modules.d/notices.conf.in --- trunk~/etc/modules.d/notices.conf.in 2006-06-16 07:42:51.000000000 -0400 +++ trunk/etc/modules.d/notices.conf.in 2006-07-23 16:11:55.000000000 -0400 @@ -1,7 +1,7 @@ [module] desc = Notices exec = %%MODULES_DIR%%/notices_mod.py -files = /var/log/messages[.#], /var/log/secure[.#], /var/log/maillog[.#] +files = /var/log/syslog[.#], /var/log/auth.log[.#], /var/log/mail.log[.#] enabled = yes internal = yes outhtml = yes diff -urNad trunk~/etc/modules.d/packets.conf.in trunk/etc/modules.d/packets.conf.in --- trunk~/etc/modules.d/packets.conf.in 2006-06-16 07:42:51.000000000 -0400 +++ trunk/etc/modules.d/packets.conf.in 2006-07-23 16:08:09.000000000 -0400 @@ -1,7 +1,7 @@ [module] desc = Packet Filter exec = %%MODULES_DIR%%/packets_mod.py -files = /var/log/messages[.#] +files = /var/log/syslog[.#] enabled = yes internal = yes outhtml = yes diff -urNad trunk~/etc/modules.d/spamd.conf.in trunk/etc/modules.d/spamd.conf.in --- trunk~/etc/modules.d/spamd.conf.in 2006-06-16 07:42:51.000000000 -0400 +++ trunk/etc/modules.d/spamd.conf.in 2006-07-23 16:10:22.000000000 -0400 @@ -1,7 +1,7 @@ [module] desc = Spamassassin exec = %%MODULES_DIR%%/spamd_mod.py -files = /var/log/maillog[.#] +files = /var/log/mail.log[.#] enabled = no internal = yes outhtml = yes diff -urNad trunk~/etc/modules.d/weeder.conf.in trunk/etc/modules.d/weeder.conf.in --- trunk~/etc/modules.d/weeder.conf.in 2006-06-16 07:42:51.000000000 -0400 +++ trunk/etc/modules.d/weeder.conf.in 2006-07-23 16:12:16.000000000 -0400 @@ -1,7 +1,7 @@ [module] desc = Weedeater exec = %%MODULES_DIR%%/weeder_mod.py -files = /var/log/messages[.#], /var/log/secure[.#], /var/log/maillog[.#] +files = /var/log/syslog[.#], /var/log/auth.log[.#], /var/log/mail.log[.#] enabled = yes internal = yes outhtml = yes debian/patches/04_fix_minor_manpages_issues.patch0000755000000000000000000000307312052515776017421 0ustar From: Tiago Bortoletto Vaz Subject: Fix minor issue to avoid warnings from man diff -urNad epylog~/man/epylog-modules.5 epylog/man/epylog-modules.5 --- epylog~/man/epylog-modules.5 2008-08-31 08:37:45.000000000 -0400 +++ epylog/man/epylog-modules.5 2009-03-09 14:29:18.031880105 -0400 @@ -37,8 +37,8 @@ List the logfiles requested by this module in this field. Separate multiple entries by comma. Epylog will handle rotated files, but you need to specify the mask appropriately. E.g. the most common logrotate -setup will place rotated files in the same directory and add .0, .1, -\.2, etc to the end of the file. Therefore, a file entry would look +setup will place rotated files in the same directory and add .0, .1, .2, +etc to the end of the file. Therefore, a file entry would look like so: .br .B /var/log/filename[.#] diff -urNad epylog~/man/epylog.conf.5 epylog/man/epylog.conf.5 --- epylog~/man/epylog.conf.5 2009-03-09 13:51:15.000000000 -0400 +++ epylog/man/epylog.conf.5 2009-03-09 14:29:35.623885679 -0400 @@ -82,7 +82,7 @@ .br .B smtpserv = mail.example.com .br -.B smtpserv = /usr/sbin/sendmail -t +.B smtpserv = /usr/sbin/sendmail \-t .TP .B mailto The list of email addresses where to mail the report. Separate @@ -140,7 +140,7 @@ .TP .B smtpserv Use this smtp server when sending notifications. Can be either a -hostname or a path to sendmail. Defaults to "/usr/sbin/sendmail -t". +hostname or a path to sendmail. Defaults to "/usr/sbin/sendmail \-t". .TP .B pubroot When generating a notification message, use this as publication root debian/pyversions0000644000000000000000000000000512052515776011337 0ustar 2.3- debian/compat0000644000000000000000000000000212052515776010376 0ustar 9