--- rsyslog-3.18.6.orig/debian/rsyslog-pgsql.conf.template +++ rsyslog-3.18.6/debian/rsyslog-pgsql.conf.template @@ -0,0 +1,5 @@ +### Configuration file for rsyslog-pgsql +### Changes are preserved + +$ModLoad ompgsql +*.* :ompgsql:_DBC_DBSERVER_,_DBC_DBNAME_,_DBC_DBUSER_,_DBC_DBPASS_ --- rsyslog-3.18.6.orig/debian/changelog +++ rsyslog-3.18.6/debian/changelog @@ -0,0 +1,434 @@ +rsyslog (3.18.6-4) unstable; urgency=medium + + * debian/patches/message_locking_fix.patch + - Proper message locking on message destruct to avoid a race condition + which could lead to a segfault. Closes: #509292 + Patch cherry-picked from upstream git. + * Urgency medium for the RC bug fix. + * Use the dbconfig-common template mechanism to generate the configuration + files for rsyslog-mysql and rsyslog-pgsql. This not only simplifies + postinst quite a bit, but also makes sure we don't read any unset debconf + values. Closes: #513589 + * debian/README.Debian + - Add notes about the Debian specific configuration of rsyslog and outline + some of the changes between rsyslog and sysklogd which should ease the + migration. Closes: #484083 + - Add instructions how to avoid doubled hostname entries when sending + syslog messages from rsyslog to a sysklogd server. Closes: #512663 + + -- Michael Biebl Sun, 08 Feb 2009 00:54:39 +0100 + +rsyslog (3.18.6-3) unstable; urgency=medium + + * debian/rsyslog.conf + - Create new directories with more sane permissions. Closes: #511054 + * debian/rsyslog.init + - Update the LSB header to not provide the reserved 'syslog' facility. Use + 'rsyslog' instead to avoid clashes. Thanks to Petter Reinholdtsen for + the hint. + * debian/patches/allowed_sender_reload.patch + - Fix segfault on reload when using $AllowedSender. Closes: #511562 + Patch cherry picked from upstream git. + + -- Michael Biebl Thu, 15 Jan 2009 17:50:06 +0100 + +rsyslog (3.18.6-2) unstable; urgency=low + + * debian/rsyslog.postinst + - Use $(($var)) syntax for arithmetic expressions, as dash from etch is + not SUSv3 compliant in that regard which leads to failing dist upgrades + when dash is used as /bin/sh. Closes: #508943 + + -- Michael Biebl Wed, 17 Dec 2008 00:29:43 +0100 + +rsyslog (3.18.6-1) unstable; urgency=high + + * New upstream bugfix release. + - Fix "$AllowedSender" security bypass vulnerability. The "$AllowedSender" + configuration directive was not respected, allowing unrestricted network + access to the application. Closes: #508027 + No CVE id yet. + * Urgency high for the security fix. + * debian/patches/manpage_fixes.patch + - Fix typos in rsyslogd man page. Closes: #506925 + Thanks to Geoff Simmons for the patch. + + -- Michael Biebl Fri, 12 Dec 2008 17:36:02 +0100 + +rsyslog (3.18.5-1) unstable; urgency=low + + * New upstream bugfix release. + - Fix potential segfault in imfile on rsyslogd HUP (reload) and + termination (stop). Closes: #503940 + - Disable input throttling for imuxsock as this can lead to denial of + service. Closes: #505991 + * debian/rsyslog-{mysql,pgsql}.config + - Do not ignore errors in config maintainer scripts. + * debian/rsyslog.postinst + - Rotate old .0 log files when migrating from sysklogd. Closes: #491672 + * debian/rules + - Exclude sample conf file from being compressed as it is referenced in + the html documentation with the non-compressed file name. + - Depend on $(QUILT_STAMPFN) instead of patch; patch is a phony target and + thus always out of date. + - Move $(QUILT_STAMPFN) dependency to config.status to avoid potential + issues with parallel make. + * debian/rsyslog-doc.links + - Add a symlink index.html pointing at manual.html. Closes: #494634 + * debian/rsyslog.default + - Fix a few spelling errors. + * Disable the logrotate file when removing the package to avoid log + rotation failures. Closes: #500569 + Thanks to Kobayashi Noritada for the patch + * debian/rsyslog.postrm + - Rename /etc/logrotate.d/rsyslog to /etc/logrotate.d/rsyslog.disabled + when removing the package. + - Remove /etc/logrotate.d/rsyslog.disabled when purging and replacing + the package. + * debian/rsyslog.preinst + - Rename /etc/logrotate.d/rsyslog.disabled to /etc/logrotate.d/rsyslog + when reinstalling. + + -- Michael Biebl Thu, 20 Nov 2008 14:09:10 +0100 + +rsyslog (3.18.2-1) unstable; urgency=low + + * New upstream release. + * debian/rsyslog.init + - Restore default SELinux security context when creating /dev/xconsole. + Closes: #493171 + - Add "status" action. + * debian/control + - Bump dependency on lsb-base to >= 3.2-14, which provides status_of_proc. + + -- Michael Biebl Mon, 11 Aug 2008 00:25:33 +0200 + +rsyslog (3.18.1-1) unstable; urgency=low + + * New upstream release. Closes: #490445 + - List Debian in doc/rsyslog_packages.html. Closes: #488870 + - Fix compilation of imklog module on GNU/kFreeBSD. Closes: #491193 + * debian/rsyslog-doc.install + - Install the example config file. Closes: #488860 + * debian/rules + - Enable mail output plugin. + - Make sure all directories are created by calling dh_installdirs for both + binary-arch and binary-indep. Closes: #491459 + * debian/rsyslog.install + - Install mail output plugin (ommail.so). + * debian/control + - Add Suggests www-browser to rsyslog-doc as the package contains mostly + html documents. + - Update feature list. + - Adjust priorities, set rsyslog priority to important. + + -- Michael Biebl Wed, 23 Jul 2008 02:22:32 +0200 + +rsyslog (3.16.2-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl Wed, 25 Jun 2008 15:41:21 +0200 + +rsyslog (3.16.1-2) unstable; urgency=low + + * debian/rules + - Build the doc package in binary-indep. + * Bump Standards-Version to 3.8.0. + - Add debian/README.source as recommended by the new policy. + + -- Michael Biebl Fri, 20 Jun 2008 07:11:24 +0200 + +rsyslog (3.16.1-1) unstable; urgency=low + + * New upstream release. + - Fixes a segfault in the imklog input plugin. Closes: #479117 + + -- Michael Biebl Sat, 03 May 2008 09:59:59 +0200 + +rsyslog (3.14.2-3) unstable; urgency=low + + * debian/rsyslog-doc.install + - Fix a typo in the install path of the dia files. Closes: #477489 + Thanks to Justin B Rye for the patch. + + -- Michael Biebl Wed, 23 Apr 2008 16:46:39 +0200 + +rsyslog (3.14.2-2) unstable; urgency=low + + * debian/rsyslog.conf + - Disable high precision timestamps until other affected packages have + been updated to support them. See bug #475303 for details. + + -- Michael Biebl Tue, 22 Apr 2008 20:02:28 +0200 + +rsyslog (3.14.2-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl Thu, 10 Apr 2008 08:32:23 +0200 + +rsyslog (3.14.1-1) unstable; urgency=low + + * First upstream release of the new stable v3 series. + * debian/copyright + - Update copyright notice as rsyslog has been relicensed under GPL3+. + * debian/rsyslog.init + - The kernel logging functionality is now implemented via an input plugin + and has replaced the separate rklogd binary. Remove all traces of rklogd + from the init script. + - General cleanup and simplification. + * debian/rsyslog.default + - Remove obsolete RKLOGD_OPTIONS configuration variable. + - Document deprecated command line options. + - Start rsyslogd in v3 compat mode, its native interface. + * debian/rsyslog.conf + - Load the input modules imuxsock (local system logging) and imklog + (kernel logging) by default. + * debian/rsyslog-doc.install + - Install jpeg images and dia files. + * debian/rsyslog.install + - Install input modules (im*.so) and library plugins (lm*.so). + * debian/rules + - Enable imfile input plugin. + - Use dh_installinit "-r" (no-restart-on-upgrade) option. + * debian/rsyslog.postinst + - Minimize downtime by restarting rsyslog in postinst instead of stop in + prerm and start in postinst. Closes: #471051 + * debian/rsyslog.logrotate + - Group together related log files. + - Rotate daemon.log and kern.log weekly, to match sysklogd behaviour. + - Add options "missingok", "delaycompress" and "sharedscripts" as + suggested by Paul Slootman. Closes: #473546 + + -- Michael Biebl Sun, 06 Apr 2008 16:54:08 +0200 + +rsyslog (2.0.4-1) unstable; urgency=low + + * New upstream release. + * debian/control + - Add Vcs-Git and Vcs-Browser fields. + + -- Michael Biebl Sat, 29 Mar 2008 12:17:22 +0100 + +rsyslog (2.0.3-1) unstable; urgency=low + + * New upstream release. + * debian/patches/man_page_format.patch + - Removed, merged upstream. + + -- Michael Biebl Thu, 13 Mar 2008 14:22:35 +0100 + +rsyslog (2.0.2-2) unstable; urgency=low + + * debian/rsyslog-doc.doc-base + - Update the Section: field to comply with the new doc-base Manual. + * debian/rules + - Don't install rfc3195d and its man page. The rfc3195d binary is + currently only a dummy. + * debian/rsyslog.conf + - Fix the path to the rsyslog documentation which is now in rsyslog-doc. + - Set the default permissions of new log files to 0640 and make them + readable by group adm. + - Include external config files at the beginning. This allows to drop log + messages before they end up in the standard log files. + + -- Michael Biebl Thu, 06 Mar 2008 02:49:17 +0100 + +rsyslog (2.0.2-1) unstable; urgency=low + + * New upstream release. + * debian/rsyslog.init + - Make /dev/xconsole readable by group adm. Closes: #464695 + * debian/control + - Fix a typo in the rsyslog-pgsql package description. + * debian/patches/man_page_format.patch + - Fix a few format errors in the man pages. + + -- Michael Biebl Tue, 12 Feb 2008 19:56:47 +0100 + +rsyslog (2.0.1-2) unstable; urgency=low + + * debian/control + - Drop Replaces: system-log-daemon, linux-kernel-log-daemon. There are no + conflicting files with other syslog packages so this line is not needed. + - Add new package rsyslog-doc. + - Add Suggests: rsyslog-doc to rsyslog. + * debian/rsyslog.install, debian/rsyslog-doc.install + - Move the html files from rsyslog to rsyslog-doc. + * debian/rsyslog-doc.doc-base + - Integrate the documentation with doc-base. + + -- Michael Biebl Sat, 02 Feb 2008 17:00:49 +0100 + +rsyslog (2.0.1-1) unstable; urgency=low + + * New upstream bug fix release. + + -- Michael Biebl Thu, 24 Jan 2008 18:35:20 +0100 + +rsyslog (2.0.0-2) unstable; urgency=low + + * debian/rsyslog.init + - Fix LSB init header. Use $remote_fs instead of $local_fs as the rsyslogd + daemon requires /usr to be mounted. + + -- Michael Biebl Thu, 10 Jan 2008 13:22:42 +0100 + +rsyslog (2.0.0-1) unstable; urgency=low + + * New upstream release of the stable branch of rsyslog v2. + + -- Michael Biebl Wed, 02 Jan 2008 15:39:19 +0100 + +rsyslog (1.21.2-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl Sun, 30 Dec 2007 02:11:58 +0100 + +rsyslog (1.21.1-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl Sun, 23 Dec 2007 19:02:11 +0100 + +rsyslog (1.21.0-1) unstable; urgency=low + + * New upstream release. + * debian/patches/ignore_non_conf_files.patch + - Dropped. A more powerful alternative has been implemented upstream which + allows to include configuration files based on wildcards. + * debian/rsyslog.conf + - Include all configuration files matching /etc/rsyslog.d/*.conf. + + -- Michael Biebl Wed, 19 Dec 2007 09:54:18 +0100 + +rsyslog (1.20.1-1) unstable; urgency=low + + * New upstream release. + * debian/rules + - Enable the PostgreSQL database support. + - Use "install -D" to install the SQL schema file for MySQL and + PostgreSQL. + * debian/control + - Add a Build-Depends on libpq-dev for the PostgreSQL support. + - Add the binary package rsyslog-pgsql. + * debian/patches/no_create_db.patch + - Updated. Only setup the tables. Leave the database creation to + dbconfig-common. + * debian/rsyslog-pgsql.install + - Install the ompgsql.so plugin. + * debian/rsyslog-pgsql.config + - Preseed the default values for dbconfig-common, database name is + "Syslog", database user "rsyslog". + * debian/rsyslog-pgsql.{postinst,prerm,postrm} + - Use dbconfig-common to setup the PostgreSQL database. + - Generate a configuration file /etc/rsyslog.d/pgsql.conf with the values + provided by dbconfig-common and use ucf and ucfr to manage this file. + * debian/rsyslog-mysql.postinst + - Use the new ":ommysql:" output selector instead of ">". + * debian/rsyslog-mysql.install + - Only install the ommysql.so plugin. + + -- Michael Biebl Wed, 12 Dec 2007 20:54:41 +0100 + +rsyslog (1.19.12-1) unstable; urgency=low + + * New upstream release. + * debian/control + - Add Depends: lsb-base (>= 3.0-6) as the init script uses the LSB logging + functions. + - Bump Standards-Version to 3.7.3. No further changes required. + + -- Michael Biebl Mon, 03 Dec 2007 19:42:19 +0100 + +rsyslog (1.19.10-1) unstable; urgency=low + + * New upstream release. + * debian/patches/man_page_format.patch + - Removed, merged upstream. + + -- Michael Biebl Fri, 19 Oct 2007 17:21:49 +0200 + +rsyslog (1.19.9-1) unstable; urgency=low + + * New upstream release. + * debian/patches/udp_msg_reception.patch + - Deleted, merged upstream. + * The mysql output plugin is now in a separate subdirectory. Change the + path to the createDB.sql script accordingly. + + -- Michael Biebl Sun, 14 Oct 2007 11:55:12 +0200 + +rsyslog (1.19.7-2) unstable; urgency=low + + * debian/patches/udp_msg_reception.patch + - Pull patch from CVS which fixes broken UDP message reception. + * debian/control + - Use the new "Homepage:" field to specify the upstream URL. + + -- Michael Biebl Fri, 28 Sep 2007 15:30:06 +0200 + +rsyslog (1.19.7-1) unstable; urgency=low + + * New upstream release. + * debian/patches/man_page_format.patch + - Fix a formatting glitch in the rsyslog.conf man page. + + -- Michael Biebl Tue, 25 Sep 2007 22:54:04 +0200 + +rsyslog (1.19.3-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl Sun, 02 Sep 2007 20:15:02 +0200 + +rsyslog (1.19.2-1) unstable; urgency=low + + * New upstream release. + + * Enable the mysql output plugin and split it into a separate binary package + named rsyslog-mysql. Use the dbconfig-common framework to handle the + database administration. Generate a configuration file + /etc/rsyslog.d/mysql.conf with the values provided by dbconfig-common and + use ucf to manage this file. + * debian/control + - Add a build dependency on quilt and libmysqlclient15-dev. + - Add the binary package rsyslog-mysql. + - Add Suggests: rsyslog-mysql to the rsyslog package. + * debian/rules + - Include the quilt makefile and add calls to the patch/unpatch targets. + - Pass --enable-mysql to ./configure. + - Install the SQL schema file for dbconfig-common. + * debian/rsyslog-mysql.config + - Setup the default values for dbconfig-common. + * debian/rsyslog-mysql.{postinst,prerm,postrm} + - Include the dbconfig-common scripts and call the dbc_go function. + - Use ucf and ucfr to manage the generated configuration file mysql.conf. + * debian/patches/ignore_non_conf_files.patch + - Let rsyslog ignore all configuration files not ending with *.conf. + * debian/patches/no_create_db.patch + - The database creation is handled by dbconfig-common so we only need the + createDB.sql SQL schema file for setting up the tables. + * debian/patches/series + - Added, needed by quilt. Include the two patches above. + * debian/rsyslog-mysql.dirs + - Create the install directory for the SQL schema file. + * debian/rsyslog-mysql.install + - Install the mysql output plugin ommysql.so. + + -- Michael Biebl Sun, 02 Sep 2007 18:39:47 +0200 + +rsyslog (1.19.1-1) unstable; urgency=low + + * New upstream release. + + -- Michael Biebl Mon, 27 Aug 2007 19:17:14 +0200 + +rsyslog (1.18.2-1) unstable; urgency=low + + * Initial release. Closes: #435884 + + -- Michael Biebl Mon, 13 Aug 2007 19:20:48 +0200 + --- rsyslog-3.18.6.orig/debian/rsyslog-doc.install +++ rsyslog-3.18.6/debian/rsyslog-doc.install @@ -0,0 +1,3 @@ +doc/*.html usr/share/doc/rsyslog-doc/html/ +doc/*.jpg usr/share/doc/rsyslog-doc/html/ +doc/*.conf usr/share/doc/rsyslog-doc/html/ --- rsyslog-3.18.6.orig/debian/rsyslog.dirs +++ rsyslog-3.18.6/debian/rsyslog.dirs @@ -0,0 +1 @@ +/etc/rsyslog.d/ --- rsyslog-3.18.6.orig/debian/rsyslog.default +++ rsyslog-3.18.6/debian/rsyslog.default @@ -0,0 +1,8 @@ +# Options for rsyslogd +# -m 0 disables 'MARK' messages (deprecated, only used in compat mode < 3) +# -r enables logging from remote machines (deprecated, only used in compat mode < 3) +# -x disables DNS lookups on messages received with -r +# -c compatibility mode +# See rsyslogd(8) for more details +RSYSLOGD_OPTIONS="-c3" + --- rsyslog-3.18.6.orig/debian/rsyslog.logrotate +++ rsyslog-3.18.6/debian/rsyslog.logrotate @@ -0,0 +1,37 @@ +/var/log/syslog +{ + rotate 7 + daily + missingok + notifempty + delaycompress + compress + postrotate + invoke-rc.d rsyslog reload > /dev/null + endscript +} + +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +/var/log/mail.log +/var/log/daemon.log +/var/log/kern.log +/var/log/auth.log +/var/log/user.log +/var/log/lpr.log +/var/log/cron.log +/var/log/debug +/var/log/messages +{ + rotate 4 + weekly + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + invoke-rc.d rsyslog reload > /dev/null + endscript +} --- rsyslog-3.18.6.orig/debian/rsyslog-pgsql.config +++ rsyslog-3.18.6/debian/rsyslog-pgsql.config @@ -0,0 +1,18 @@ +#!/bin/sh +# config maintainer script for rsyslog-pgsql + +set -e + +# source debconf stuff +. /usr/share/debconf/confmodule + +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/config.pgsql ]; then + . /usr/share/dbconfig-common/dpkg/config.pgsql + + dbc_dbname="Syslog" + dbc_dbuser="rsyslog" + + dbc_go rsyslog-pgsql $@ +fi + --- rsyslog-3.18.6.orig/debian/rsyslog-mysql.conf.template +++ rsyslog-3.18.6/debian/rsyslog-mysql.conf.template @@ -0,0 +1,5 @@ +### Configuration file for rsyslog-mysql +### Changes are preserved + +$ModLoad ommysql +*.* :ommysql:_DBC_DBSERVER_,_DBC_DBNAME_,_DBC_DBUSER_,_DBC_DBPASS_ --- rsyslog-3.18.6.orig/debian/rsyslog-mysql.postrm +++ rsyslog-3.18.6/debian/rsyslog-mysql.postrm @@ -0,0 +1,55 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi +if [ -f /usr/share/dbconfig-common/dpkg/postrm.mysql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.mysql + dbc_go rsyslog-mysql $@ +fi + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + purge) + CONFIGFILE=/etc/rsyslog.d/mysql.conf + + for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do + rm -f $CONFIGFILE$ext + done + + rm -f $CONFIGFILE + + if which ucf >/dev/null; then + ucf --purge $CONFIGFILE + fi + if which ucfr >/dev/null; then + ucfr --purge rsyslog-mysql $CONFIGFILE + fi + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/rsyslog-mysql.config +++ rsyslog-3.18.6/debian/rsyslog-mysql.config @@ -0,0 +1,18 @@ +#!/bin/sh +# config maintainer script for rsyslog-mysql + +set -e + +# source debconf stuff +. /usr/share/debconf/confmodule + +# source dbconfig-common shell library, and call the hook function +if [ -f /usr/share/dbconfig-common/dpkg/config.mysql ]; then + . /usr/share/dbconfig-common/dpkg/config.mysql + + dbc_dbname="Syslog" + dbc_dbuser="rsyslog" + + dbc_go rsyslog-mysql $@ +fi + --- rsyslog-3.18.6.orig/debian/rsyslog-doc.examples +++ rsyslog-3.18.6/debian/rsyslog-doc.examples @@ -0,0 +1 @@ +debian/sample.conf --- rsyslog-3.18.6.orig/debian/rsyslog-pgsql.install +++ rsyslog-3.18.6/debian/rsyslog-pgsql.install @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/rsyslog/ompgsql.so +debian/rsyslog-pgsql.conf.template usr/share/rsyslog-pgsql/ --- rsyslog-3.18.6.orig/debian/copyright +++ rsyslog-3.18.6/debian/copyright @@ -0,0 +1,39 @@ +This package was debianized by Michael Biebl on +Wed, 18 Jul 2007 16:22:23 +0200. + +It was downloaded from http://www.rsyslog.com + +Upstream Authors: + + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +Copyright: + + Copyright (C) 1995,1996 Dr. G.W. Wettstein + Copyright (C) 1996 Enjellic Systems Development + Copyright (C) 1995 Martin Schulze + Copyright (C) 2003-2007 Rainer Gerhards and Adiscon GmbH + +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; either version 3 of the License, or + (at your option) any later version. + + 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 systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + +The Debian packaging is (C) 2007, Michael Biebl and +is licensed under the GPL, see above. + --- rsyslog-3.18.6.orig/debian/rsyslog.preinst +++ rsyslog-3.18.6/debian/rsyslog.preinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "install" -a -n "$2" ] ; then + [ -f /etc/logrotate.d/rsyslog.disabled ] && mv -f /etc/logrotate.d/rsyslog.disabled /etc/logrotate.d/rsyslog +fi + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/rsyslog-pgsql.postrm +++ rsyslog-3.18.6/debian/rsyslog-pgsql.postrm @@ -0,0 +1,55 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi +if [ -f /usr/share/dbconfig-common/dpkg/postrm.pgsql ]; then + . /usr/share/dbconfig-common/dpkg/postrm.pgsql + dbc_go rsyslog-pgsql $@ +fi + +case "$1" in + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + purge) + CONFIGFILE=/etc/rsyslog.d/pgsql.conf + + for ext in '~' '%' .bak .ucf-new .ucf-old .ucf-dist; do + rm -f $CONFIGFILE$ext + done + + rm -f $CONFIGFILE + + if which ucf >/dev/null; then + ucf --purge $CONFIGFILE + fi + if which ucfr >/dev/null; then + ucfr --purge rsyslog-pgsql $CONFIGFILE + fi + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/rsyslog.install +++ rsyslog-3.18.6/debian/rsyslog.install @@ -0,0 +1,6 @@ +debian/rsyslog.conf /etc/ +debian/tmp/usr/sbin/ +debian/tmp/usr/share/man/ +debian/tmp/usr/lib/rsyslog/im*.so +debian/tmp/usr/lib/rsyslog/lm*.so +debian/tmp/usr/lib/rsyslog/ommail.so --- rsyslog-3.18.6.orig/debian/rsyslog-mysql.install +++ rsyslog-3.18.6/debian/rsyslog-mysql.install @@ -0,0 +1,2 @@ +debian/tmp/usr/lib/rsyslog/ommysql.so +debian/rsyslog-mysql.conf.template usr/share/rsyslog-mysql/ --- rsyslog-3.18.6.orig/debian/rsyslog-doc.links +++ rsyslog-3.18.6/debian/rsyslog-doc.links @@ -0,0 +1 @@ +usr/share/doc/rsyslog-doc/html/manual.html usr/share/doc/rsyslog-doc/html/index.html --- rsyslog-3.18.6.orig/debian/rsyslog-pgsql.prerm +++ rsyslog-3.18.6/debian/rsyslog-pgsql.prerm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/prerm.pgsql + +dbc_go rsyslog-pgsql $@ + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/rsyslog-mysql.postinst +++ rsyslog-3.18.6/debian/rsyslog-mysql.postinst @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/postinst.mysql + + +dbc_generate_include_args="-o template_infile=/usr/share/rsyslog-mysql/rsyslog-mysql.conf.template" +dbc_generate_include=template:/etc/rsyslog.d/mysql.conf +dbc_go rsyslog-mysql $@ + + +case "$1" in + configure) + ucfr rsyslog-mysql /etc/rsyslog.d/mysql.conf + + invoke-rc.d rsyslog reload + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/watch +++ rsyslog-3.18.6/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://freshmeat.net/projects/rsyslog/ .*rsyslog-(.*)\.tar\.gz --- rsyslog-3.18.6.orig/debian/rules +++ rsyslog-3.18.6/debian/rules @@ -0,0 +1,125 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# debian/rules file for the rsyslog package. +# Author: Michael Biebl + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +# For quilt patch management. +include /usr/share/quilt/quilt.make + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: $(QUILT_STAMPFN) configure + dh_testdir + # Add here commands to configure the package. +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info \ + --enable-mysql \ + --enable-pgsql \ + --enable-mail \ + --enable-imfile \ + CFLAGS="$(CFLAGS)" + + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch $@ + +clean: clean-source unpatch +clean-source: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + + # Add here commands to install the package into debian/rsyslog. + $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + install --mode=644 -D plugins/ommysql/createDB.sql debian/rsyslog-mysql/usr/share/dbconfig-common/data/rsyslog-mysql/install/mysql + install --mode=644 -D plugins/ompgsql/createDB.sql debian/rsyslog-pgsql/usr/share/dbconfig-common/data/rsyslog-pgsql/install/pgsql + +# Build architecture-independent files here. +binary-indep: DH_OPTIONS=-i +binary-indep: build install + dh_testdir + dh_testroot + dh_installdirs + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install + dh_link + dh_compress -X .conf + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture-dependent files here. +binary-arch: DH_OPTIONS=-a +binary-arch: build install + dh_testdir + dh_testroot + dh_installdirs + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install + dh_installlogrotate + dh_installinit -r -- start 10 2 3 4 5 . stop 90 0 1 6 . + dh_installman + dh_installdebconf + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- rsyslog-3.18.6.orig/debian/sample.conf +++ rsyslog-3.18.6/debian/sample.conf @@ -0,0 +1,284 @@ +# This is a sample configuation file for rsyslogd. See the +# doc/manual.html for details. If you can not find the +# manual set, please visit +# +# http://www.rsyslog.com/doc/ +# +# to obtain it online. +# +# WARNING: We do NOT keep the comments in this file always +# up to date. Be sure to consult the doc set that +# came with your package, especially the file on +# rsyslog.conf - it probably has some better information +# than is provided here in comments. The main purpose +# of sample.conf is to show you some actual directives, +# not to be the authorative doc source. +# +# Please note that rsyslogd by default +# reads /etc/rsyslogd.conf (and NOT /etc/syslogd.conf!). +# +# A commented sample configuration. More a man page than a real +# sample ;) +# +# We try to keep things as consistent with existing syslog implementation +# as possible. We use "$" to start lines that contain new directives. + +# We limit who can send us messages: +$AllowedSender UDP, 192.0.2.0/24, 10.0.0.1 # all machines in 192.0.2 as well as 10.0.0.1 +$AllowedSender TCP, 10.0.0.1 # for TCP, we allow only 10.0.0.1 +# remove the AllowedSender directives if you do not want to limit +# who can send rsyslogd messages (not recommended) + +# Templates are a key feature of rsyslog. They allow to specify any +# format a user might want. Every output in rsyslog uses templates - this +# holds true for files, user messages and so on. The database writer +# expects its template to be a proper SQL statement - so this is highly +# customizable too. You might ask how does all of this work when no templates +# at all are specified. Good question ;) The answer is simple, though. Templates +# compatible with the stock syslogd formats are hardcoded into rsyslog. So if +# no template is specified, we use one of these hardcoded templates. Search for +# "template_" in syslogd.c and you will find the hardcoded ones. +# +# A template consists of a template directive, a name, the actual template text +# and optional options. A sample is: +# +# $template MyTemplateName,"\7Text %property% some more text\n", +# +# The "$template" is the template directive. It tells rsyslog that this +# line contains a template. +# +# "MyTemplateName" is the template name. All other config lines refer to +# this name. +# +# The text within quotes is the actual template text. The backslash is +# a escape character, much as in C. It does all these "cool" things. For +# example, \7 rings the bell (this is an ASCII value), \n is a new line. +# C programmers and perl coders have the advantage of knowing this, but the +# set in rsyslog is a bit restricted currently. All text in the template +# is used literally, except for things within percent signs. These are +# properties and allow you access to the contents of the syslog message. +# Properties are accessed via the property replacer (nice name, huh) and +# it can do cool things, too. For example, it can pick a substring or +# do date-specific formatting. More on this is below, on some lines of the +# property replacer. +# +# The part is optional. It carries options that influence the +# template as whole. Details are below. Be sure NOT to mistake template +# options with property options - the later ones are processed by the +# property replacer and apply to a SINGLE property, only (and not the +# whole template). +# +# Template options are case-insensitive. Currently defined are: +# sql - format the string suitable for a SQL statement. This will replace single +# quotes ("'") by two single quotes ("''") inside each field. This option MUST +# be specified when a template is used for writing to a database, otherwise SQL +# injection might occur. +# +# Please note that the database writer *checks* that the sql option is +# present in the template. If it is not present, the write database action +# is disabled. This is to guard you against accidential forgetting it and +# then becoming vulnerable for SQL injection. +# The sql option can also be useful with files - especially if you want +# to run them on another machine for performance reasons. However, do NOT +# use it if you do not have a real need for it - among others, it takes +# some toll on the processing time. Not much, but on a really busy system +# you might notice it ;) +# +# To escape: +# % = \% +# \ = \\ +# --> '\' is used to escape (as in C) +#$template TraditionalFormat,%timegenerated% %HOSTNAME% %syslogtag%%msg%\n" +# +# Properties can be accessed by the property replacer. They are accessed +# inside the template by putting them between percent signs. Properties +# can be modifed by the property replacer. The full syntax is as follows: +# +# %propname:fromChar:toChar:options% +# +# propname is the name of the property to access. This IS case-sensitive! +# Currently supported are: +# msg the MSG part of the message (aka "the message" ;)) +# rawmsg the message excactly as it was received from the +# socket. Should be useful for debugging. +# UxTradMsg will disappear soon - do NOT use! +# HOSTNAME hostname from the message +# source alias for HOSTNAME +# syslogtag TAG from the message +# PRI PRI part of the message - undecoded (single value) +# IUT the monitorware InfoUnitType - used when talking to a +# MonitorWare backend (also for phpLogCon) +# syslogfacility the facility from the message - in numerical form +# syslogpriority the priority (actully severity!) from the +# message - in numerical form +# timegenerated timestamp when the message was RECEIVED. Always in high +# resolution +# timereported timestamp from the message. Resolution depends on what +# was provided in the message (in most cases, only seconds) +# TIMESTAMP alias for timereported +# +# Other properties might be available at the time you read this. Be sure +# to consult the property replacer documentation in the doc set for all +# properties. +# +# FromChar and toChar are used to build substrings. They specify the +# offset within the string that should be copied. Offset counting +# starts at 1, so if you need to obtain the first 2 characters of the +# message text, you can use this syntax: "%msg:1:2%". +# If you do not whish to specify from and to, but you want to +# specify options, you still need to include the colons. For example, +# if you would like to convert the full message text to lower case +# only, use "%msg:::lowercase%". +# +# property options are case-insensitive, currently defined are: +# uppercase convert property to lowercase only +# lowercase convert property text to uppercase only +# drop-last-lf The last LF in the message (if any), is dropped. +# Especially useful for PIX. +# date-mysql format as mysql date +# date-rfc3164 format as RFC 3164 date +# date-rfc3339 format as RFC 3339 date +# escape-cc NOT yet implemented + +# Below find some samples of what a template can do. Have a good +# time finding out what they do [or just tun them] ;) + +# A template that resambles traditional syslogd file output: +$template TraditionalFormat,"%timegenerated% %HOSTNAME% %syslogtag%%msg:::drop-last-lf%\n" + +# a template useful for debugging format issues +$template DEBUG,"Debug line with all properties:\nFROMHOST: '%FROMHOST%', HOSTNAME: '%HOSTNAME%', PRI: %PRI%,\nsyslogtag '%syslogtag%', programname: '%programname%', APP-NAME: '%APP-NAME%', PROCID: '%PROCID%', MSGID: '%MSGID%',\nTIMESTAMP: '%TIMESTAMP%', STRUCTURED-DATA: '%STRUCTURED-DATA%',\nmsg: '%msg%'\nescaped msg: '%msg:::drop-cc%'\nrawmsg: '%rawmsg%'\n\n" +# +# A template that resembles RFC 3164 on-the-wire format: +# (yes, there is NO space betwen syslogtag and msg! that's important!) +$template RFC3164fmt,"<%PRI%>%TIMESTAMP% %HOSTNAME% %syslogtag%%msg%" + +# a template resembling traditional wallmessage format: +$template wallmsg,"\r\n\7Message from syslogd@%HOSTNAME% at %timegenerated% ...\r\n %syslogtag%%msg%\n\r" + +# The template below emulates winsyslog format, but we need to check the time +# stamps used. for now, it is good enough ;) This format works best with +# other members of the MonitorWare product family. It is also a good sample +# where you can see the property replacer in action. +$template WinSyslogFmt,"%HOSTNAME%,%timegenerated:1:10:date-rfc3339%,%timegenerated:12:19:date-rfc3339%,%timegenerated:1:10:date-rfc3339%,%timegenerated:12:19:date-rfc3339%,%syslogfacility%,%syslogpriority%,%syslogtag%%msg%\n" + +# A template used for database writing (notice it *is* an actual +# sql-statement): +$template dbFormat,"insert into SystemEvents (Message, Facility,FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%',%syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')",sql + +# Selector lines are somewhat different from stock syslogd. With +# rsyslog, you can add a semicolon ";" after the target and then +# the template name. That will assign this template to the respective +# action. If no template name is given, a hardcoded template is used. +# If a template name is given, but the template was not defined, the +# selector line is DEACTIVATED. +# +# ############# +# # IMPORTANT # +# ############# +# Templates MUST be defined BEFORE they are used! It is OK to +# intermix template definitions and selector lines within the +# config file, but each template MUST be defined before it is +# used the first time! +# + +# We have some very rough samples here - This sample file focusses +# on the new syntax, so we do NOT describe all possible selections. +# Use the syslog.conf if you are interested to see how to select +# based on facility and severits (aka priority). + +*.* /var/log/winsyslog-like.log;WinSyslogFmt + +# A selector using the traditional format defined above: +*.* /var/log/traditionalfile.log;TraditionalFormat + +# And another one using the hardcoded traditional format: +*.* /var/log/anothertraditionalfile.log + +# Templates are also fully supportd for forwarding: +*.* @172.19.2.16;RFC3164fmt + +# And this finally is a database action +# The semicolon at the end is not necessary, +# but some previous versions of rsyslogd had a bug that +# made them abort if it were missing. As Dennis Olvany +# pointed out, it would be extremely nice to have this +# semicolon in the sample conf - so we did in a previous +# version and it still sticks around ;) +*.* >hostname,dbname,userid,password; +# It uses the default schema (MonitorWare format). The parameters +# should be self-explanatory. + +# And this one uses the template defined above: +*.* >hostname,dbname,userid,password;dbFormat + + +# +# Rsyslog supports TCP-based syslog. To enable receiving TCP messages, +# use the -t command line option (where port is the port it +# shall listen to. To forward messages to the remote host, you must +# specify a forwarding action and include the host and port. TCP +# and UDP-based forwarding has basically the same syntax, except that +# TCP delivery is triggered by specifying a second at-sign (@) in the +# message. +# This is UDP forwarding to port 514: +*.* @172.19.2.16 +# This is UDP forwarding to port 1514: +*.* @172.19.2.16:1514 +# This is TCP forwarding to port 1514: +*.* @@172.19.2.16:1514 +# The second @-sign is all you need (except, of course, a tcp-capable +# syslogd like rsyslogd ;)). +# Of course, you can also specify a template with TCP: +*.* @@172.19.2.16:1514;RFC3164Fmt +# There are also some options you can select. These come between +# paranthesis. Available are: +# z - turn on compression, number is compression mode 0 - none, 9 max +# o - (tcp only) use octet counting for framing EXPERIMENTAL +# +# Forward via TCP with maximum compression and octet couting framing: +*.* @@(z9,o)172.19.2.16:1514;RFC3164Fmt +# Forward via UDP with maximum compression to port 1514 +*.* @(z9)172.19.2.16:1514 + +# We also support property-based filters, which allow for nice +# things. Let's for example assume that you receive a lot of +# nonsense messages with "ID-4711" in the message text. You know +# that you will never need these messages. So you simply discard them +:msg, contains, "ID-4711" ~ + +# or you would like to store messages from a specific host to +# a different file: +:FROMHOST, isequal,"myhost.example.com" /var/log/myhost.log + +# everyting that does not contain "error" should also be +# discarded +:msg, !contains, "error" ~ +# and the rest go to a seperate file +*.* /var/log/error +# (keep in mind that the two directives shown immediately +# above must be kept in that order to actually work) + +# you can also execute a script. Let's assume, for example, you need +# to execute "turn-diesel-generator-on" when "power failed" is contained +# in a message... ;) +:msg, contains, "power failed" ^turn-diesel-generator-on +# (The script is passed the syslog message as first and only parameter. +# Other parameters can currently not be specified.) + +# Note that boolean operations (other than not [!]) are not +# currently supported. As such, you can not filter out different +# facilities from different machines - hopefully later ;) + +# +# A final world. rsyslog is considered a part of Adiscon's MonitorWare product line. +# As such, you can find current information as well as information on the +# other product line members on http://www.monitorware.com. Please be warned, there +# are a number of closed-source commercial Windows applications among these products ;) +# +# You might want to check the GPL'ed phpLogCon (http://www.phplogcon.org) +# as a web-based front-end to a syslog message database. +# +# I hope this work is useful. +# 2005-09-27 Rainer Gerhards +# --- rsyslog-3.18.6.orig/debian/rsyslog-pgsql.postinst +++ rsyslog-3.18.6/debian/rsyslog-pgsql.postinst @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/postinst.pgsql + + +dbc_generate_include_args="-o template_infile=/usr/share/rsyslog-pgsql/rsyslog-pgsql.conf.template" +dbc_generate_include=template:/etc/rsyslog.d/pgsql.conf +dbc_go rsyslog-pgsql $@ + + +case "$1" in + configure) + ucfr rsyslog-pgsql /etc/rsyslog.d/pgsql.conf + + invoke-rc.d rsyslog reload + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/README.source +++ rsyslog-3.18.6/debian/README.source @@ -0,0 +1,3 @@ +This package uses the quilt patch management system. + +Please refer to /usr/share/doc/quilt/README.source for further information. --- rsyslog-3.18.6.orig/debian/rsyslog-doc.doc-base +++ rsyslog-3.18.6/debian/rsyslog-doc.doc-base @@ -0,0 +1,9 @@ +Document: rsyslog-doc +Title: Rsyslog Documentation +Author: Rainer Gerhards +Abstract: This documentation covers the configuration of rsyslog. +Section: System/Administration + +Format: HTML +Index: /usr/share/doc/rsyslog-doc/html/manual.html +Files: /usr/share/doc/rsyslog-doc/html/*.html --- rsyslog-3.18.6.orig/debian/rsyslog.postrm +++ rsyslog-3.18.6/debian/rsyslog.postrm @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ]; then + [ -f /etc/logrotate.d/rsyslog ] && mv -f /etc/logrotate.d/rsyslog /etc/logrotate.d/rsyslog.disabled +fi + +if [ "$1" = "purge" -o "$1" = "dissappear" ]; then + [ -f /etc/logrotate.d/rsyslog.disabled ] && rm -f /etc/logrotate.d/rsyslog.disabled +fi + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/compat +++ rsyslog-3.18.6/debian/compat @@ -0,0 +1 @@ +5 --- rsyslog-3.18.6.orig/debian/rsyslog.postinst +++ rsyslog-3.18.6/debian/rsyslog.postinst @@ -0,0 +1,82 @@ +#!/bin/sh + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +rotate_old_log_files() +{ + log_files="syslog mail.info mail.warn mail.err mail.log daemon.log \ + kern.log auth.log user.log lpr.log cron.log debug messages" + skipped_files="" + dir=/var/log + + for f in $log_files; do + if [ -e $dir/$f.0 ]; then + rotate="yes" + if [ -e $dir/$f.1.gz ]; then + date0=$(stat --format=%Y $dir/$f.0) + date1=$(stat --format=%Y $dir/$f.1.gz) + if [ $date0 -lt $date1 ] ; then + # .0 log file is older than .1 + skipped_files="$dir/$f.0\n$skipped_files" + rotate="no" + fi + fi + if [ "$rotate" = "yes" ] ; then + for s in $(seq 9 -1 1) ; do + if [ -e $dir/$f.$s.gz ]; then + mv $dir/$f.$s.gz $dir/$f.$(($s+1)).gz + fi + done + mv $dir/$f.0 $dir/$f.1 + fi + fi + done + if [ -n "$skipped_files" ]; then + printf "The following old log files were found which could not be rotated safely.\n" + printf "\n$skipped_files\n" + printf "Please inspect them manually and delete them, if no longer required.\n" + fi +} + + +case "$1" in + configure) + # Rotate .0 log files when migrating from sysklogd + if dpkg --compare-versions "$2" lt "3.18.5-1"; then + rotate_old_log_files + fi + + # Stop the service on upgrades before it is started again. + # dh_installinit -r will create the start code. + if [ -n "$2" ]; then + if [ -x "/etc/init.d/rsyslog" ]; then + invoke-rc.d rsyslog stop || true + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/rsyslog.init +++ rsyslog-3.18.6/debian/rsyslog.init @@ -0,0 +1,129 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: rsyslog +# Required-Start: $remote_fs $time +# Required-Stop: $remote_fs $time +# Should-Start: $network +# Should-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: enhanced syslogd +# Description: Rsyslog is an enhanced multi-threaded syslogd. +# It is quite compatible to stock sysklogd and can be +# used as a drop-in replacement. +### END INIT INFO + +# +# Author: Michael Biebl +# + +# Do NOT "set -e" + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="enhanced syslogd" +NAME=rsyslog + +RSYSLOGD=rsyslogd +RSYSLOGD_BIN=/usr/sbin/rsyslogd +RSYSLOGD_OPTIONS="-c3" +RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid + +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$RSYSLOGD_BIN" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Define LSB log_* functions. +. /lib/lsb/init-functions + +do_start() +{ + DAEMON="$RSYSLOGD_BIN" + DAEMON_ARGS="$RSYSLOGD_OPTIONS" + PIDFILE="$RSYSLOGD_PIDFILE" + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # other if daemon could not be started or a failure occured + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS +} + +do_stop() +{ + NAME="$RSYSLOGD" + PIDFILE="$RSYSLOGD_PIDFILE" + + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # other if daemon could not be stopped or a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME +} + +# +# Tell rsyslogd to reload its configuration +# +do_reload() { + NAME="$RSYSLOGD" + PIDFILE="$RSYSLOGD_PIDFILE" + + start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE --name $NAME +} + +create_xconsole() { + if [ ! -e /dev/xconsole ] + then + mknod -m 640 /dev/xconsole p + chown root:adm /dev/xconsole + [ -x /sbin/restorecon ] && /sbin/restorecon /dev/xconsole + fi +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$RSYSLOGD" + create_xconsole + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already started" + log_end_msg 0 ;; + *) log_end_msg $? ;; + esac + + ;; + stop) + log_daemon_msg "Stopping $DESC" "$RSYSLOGD" + do_stop + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already stopped" + log_end_msg 0 ;; + *) log_end_msg $? ;; + esac + + ;; + reload|force-reload) + log_daemon_msg "Reloading $DESC" "$RSYSLOGD" + do_reload + log_end_msg $? + ;; + restart) + $0 stop + $0 start + ;; + status) + status_of_proc -p $RSYSLOGD_PIDFILE $RSYSLOGD_BIN $RSYSLOGD && exit 0 || exit $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 + exit 3 + ;; +esac + +: --- rsyslog-3.18.6.orig/debian/control +++ rsyslog-3.18.6/debian/control @@ -0,0 +1,65 @@ +Source: rsyslog +Section: admin +Priority: important +Maintainer: Michael Biebl +Build-Depends: debhelper (>= 5), quilt, autotools-dev, zlib1g-dev, libmysqlclient15-dev, libpq-dev +Standards-Version: 3.8.0 +Vcs-Git: git://git.debian.org/git/users/biebl/rsyslog.git +Vcs-Browser: http://git.debian.org/?p=users/biebl/rsyslog.git;a=summary +Homepage: http://www.rsyslog.com/ + +Package: rsyslog +Architecture: any +Priority: important +Conflicts: system-log-daemon, linux-kernel-log-daemon +Provides: system-log-daemon, linux-kernel-log-daemon +Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base (>= 3.2-14) +Recommends: logrotate +Suggests: rsyslog-mysql | rsyslog-pgsql, rsyslog-doc +Description: enhanced multi-threaded syslogd + Rsyslog is an enhanced syslogd supporting, amongst others: + * reliable syslog over TCP + * on-demand disk buffering + * email alerting + * writing to MySQL or PostgreSQL databases (via separate output plugins) + * permitted sender lists + * filtering on any part of the syslog message + * on-the-wire message compression + * fine grained output format control + * backup log destinations + . + It is quite compatible to stock sysklogd and can be used as a drop-in + replacement. Its advanced features make it suitable for enterprise-class, + encryption protected syslog relay chains while at the same time being very + easy to setup for the novice user. + +Package: rsyslog-doc +Section: doc +Priority: extra +Architecture: all +Conflicts: rsyslog (<< 2.0.1-2) +Replaces: rsyslog (<< 2.0.1-2) +Suggests: doc-base, www-browser +Description: documentation for rsyslog + This package contains detailed HTML documentation of rsyslog. + . + It describes the general configuration file syntax, like filters, actions and + templates and has detailed information for all available configuration + directives. + +Package: rsyslog-mysql +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends}, rsyslog (= ${binary:Version}), dbconfig-common, ucf +Recommends: mysql-server +Description: MySQL output plugin for rsyslog + This plugin allows rsyslog to write the syslog messages into a MySQL database. + +Package: rsyslog-pgsql +Architecture: any +Priority: extra +Depends: ${shlibs:Depends}, ${misc:Depends}, rsyslog (= ${binary:Version}), dbconfig-common, ucf +Recommends: postgresql +Description: PostgreSQL output plugin for rsyslog + This plugin allows rsyslog to write the syslog messages into a PostgreSQL + database. --- rsyslog-3.18.6.orig/debian/rsyslog.conf +++ rsyslog-3.18.6/debian/rsyslog.conf @@ -0,0 +1,115 @@ +# /etc/rsyslog.conf Configuration file for rsyslog v3. +# +# For more information see +# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html + + +################# +#### MODULES #### +################# + +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +#$ModLoad immark # provides --MARK-- message capability + +# provides UDP syslog reception +#$ModLoad imudp +#$UDPServerRun 514 + +# provides TCP syslog reception +#$ModLoad imtcp +#$InputTCPServerRun 514 + + +########################### +#### GLOBAL DIRECTIVES #### +########################### + +# +# Use traditional timestamp format. +# To enable high precision timestamps, comment out the following line. +# +$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat + +# +# Set the default permissions for all log files. +# +$FileOwner root +$FileGroup adm +$FileCreateMode 0640 +$DirCreateMode 0755 + +# +# Include all config files in /etc/rsyslog.d/ +# +$IncludeConfig /etc/rsyslog.d/*.conf + + +############### +#### RULES #### +############### + +# +# First some standard log files. Log by facility. +# +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +#cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log + +# +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. +# +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err + +# +# Logging for INN news system. +# +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice + +# +# Some "catch-all" log files. +# +*.=debug;\ + auth,authpriv.none;\ + news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ + auth,authpriv.none;\ + cron,daemon.none;\ + mail,news.none -/var/log/messages + +# +# Emergencies are sent to everybody logged in. +# +*.emerg * + +# +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. +# +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 + +# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, +# you must invoke `xconsole' with the `-file' option: +# +# $ xconsole -file /dev/xconsole [...] +# +# NOTE: adjust the list below, or you'll go crazy if you have a reasonably +# busy site.. +# +daemon.*;mail.*;\ + news.err;\ + *.=debug;*.=info;\ + *.=notice;*.=warn |/dev/xconsole --- rsyslog-3.18.6.orig/debian/README.Debian +++ rsyslog-3.18.6/debian/README.Debian @@ -0,0 +1,83 @@ +rsyslog for Debian +================== + +Configuration file(s) +--------------------- +The default configuration file for rsyslog is /etc/rsyslog.conf. + +Its format is based on the standard syslog.conf format. As rsyslog +has a lot more advanced features than sysklogd, it extends this format +with special configuration directives which all start with the '$' +prefix. See the rsyslogd(8) and rsyslog.conf(5) man pages for further +information or install the rsyslog-doc package which provides much +more detailed documentation. + +The Debian default configuration for rsyslog uses: + + $IncludeConfig /etc/rsyslog.d/*.conf + +That means, all configuration files in /etc/rsyslog.d/ with a .conf file +extension are read by rsyslog. This allows to easily extend the rsyslog +configuration (either by package maintainers or local administrators). + + +Command line arguments, modules and compatibility levels +-------------------------------------------------------- +With version 3, rsyslog became much more modular. A lot of +functionality has been moved into loadable modules, e.g. udp reception, +which must be loaded explicitly. +To keep compatibility with sysklogd, rsyslog introduced the concept of +compatibility modes, which can be selected with the -c command line +argument. E.g. with -c0, rsyslog becomes command line compatible with +sysklogd and loads a default set of modules automatically. + +The default in Debian is -c3, i.e. command line arguments like -r or +-m 0 have no effect and instead have to be configured via special +configuration directives in rsyslog.conf. + +The options that are passed to rsyslog can be changed easily by +modifying the RSYSLOGD_OPTIONS variable in /etc/default/rsyslog. + +If you have an existing, customized syslog.conf, it is recommended that +you migrate your custom logging rules to rsyslog.conf or into a separate +configuration file in /etc/rsyslog.d (in most cases it should be as +simple as copy&paste). + +To read more about this topic please see +/usr/share/doc/rsyslog-doc/html/v3compatibility.html or +http://www.rsyslog.com/doc-v3compatibility.html. + + +Log rotation +------------ +Rsyslog uses the logrotate(8) utilitiy to rotate the standard Debian +log files. The configuration file can be found at +/etc/logrotate.d/rsyslog. + +The rotation cycle starts with .1, as this is the logrotate default. +In contrast to sysklogd, which starts with .0. + +When upgrading from sysklogd, the postinst script will automatically +rotate the existing standard Debian log files, if it is safe to do so +(i.e. only if .0 is newer than .1). + + +Forwarding messages to sysklogd +------------------------------- +If you are forwarding messages from a rsyslog client to a sysklogd +server, it can lead to doubled hostnames in the syslog message on the +server side. The reason is a limitation in sysklogd which does not parse +the hostname in the syslog header (as defined by RFC 3164). See Debian +bug #514051 for more details. + +A simple workaround in rsyslog is, to define a custom template, which +does not include the hostname: + + $template sysklogd,"<%PRI%>%TIMESTAMP% %syslogtag%%msg%" + *.* @remote-host;sysklogd + +This creates a template called "sysklogd" and assigns it to the forward +rule when logging to "remote-host". + + + -- Michael Biebl Sat, 07 Feb 2009 18:54:37 +0100 --- rsyslog-3.18.6.orig/debian/rsyslog-mysql.prerm +++ rsyslog-3.18.6/debian/rsyslog-mysql.prerm @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +. /usr/share/dbconfig-common/dpkg/prerm.mysql + +dbc_go rsyslog-mysql $@ + +#DEBHELPER# + +exit 0 --- rsyslog-3.18.6.orig/debian/patches/series +++ rsyslog-3.18.6/debian/patches/series @@ -0,0 +1,4 @@ +no_create_db.patch +manpage_fixes.patch +allowed_sender_reload.patch +message_locking_fix.patch --- rsyslog-3.18.6.orig/debian/patches/allowed_sender_reload.patch +++ rsyslog-3.18.6/debian/patches/allowed_sender_reload.patch @@ -0,0 +1,59 @@ +From: Rainer Gerhards +Date: Mon, 12 Jan 2009 12:05:45 +0000 (+0100) +Subject: fixed a potential segfault condition with $AllowedSender directive +X-Git-Url: http://git.adiscon.com/?p=rsyslog.git;a=commitdiff_plain;h=20ff1ed403f05606b68c13e4d5c591c6b8706f86 + +fixed a potential segfault condition with $AllowedSender directive + +On HUP, the root pointers were not properly cleaned up. Thanks to +Michael Biebel, olgoat, and Juha Koho for reporting and analyzing +the bug. +--- + +diff --git a/net.c b/net.c +index 54d162b..788d541 100644 +--- a/net.c ++++ b/net.c +@@ -105,6 +105,30 @@ setAllowRoot(struct AllowedSenders **ppAllowRoot, uchar *pszType) + finalize_it: + RETiRet; + } ++/* re-initializes (sets to NULL) the correct allow root pointer ++ * rgerhards, 2009-01-12 ++ */ ++static inline rsRetVal ++reinitAllowRoot(uchar *pszType) ++{ ++ DEFiRet; ++ ++ if(!strcmp((char*)pszType, "UDP")) ++ pAllowedSenders_UDP = NULL; ++ else if(!strcmp((char*)pszType, "TCP")) ++ pAllowedSenders_TCP = NULL; ++#ifdef USE_GSSAPI ++ else if(!strcmp((char*)pszType, "GSS")) ++ pAllowedSenders_GSS = NULL; ++#endif ++ else { ++ dbgprintf("program error: invalid allowed sender ID '%s', denying...\n", pszType); ++ ABORT_FINALIZE(RS_RET_CODE_ERR); /* everything is invalid for an invalid type */ ++ } ++ ++finalize_it: ++ RETiRet; ++} + + + /* Code for handling allowed/disallowed senders +@@ -214,6 +238,11 @@ clearAllowedSenders(uchar *pszType) + free(pPrev->allowedSender.addr.NetAddr); + free(pPrev); + } ++ ++ /* indicate root pointer is de-init (was forgotten previously, resulting in ++ * all kinds of interesting things) -- rgerhards, 2009-01-12 ++ */ ++ reinitAllowRoot(pszType); + } + + --- rsyslog-3.18.6.orig/debian/patches/manpage_fixes.patch +++ rsyslog-3.18.6/debian/patches/manpage_fixes.patch @@ -0,0 +1,73 @@ +--- rsyslog-3.18.5.orig/rsyslogd.8 ++++ rsyslog-3.18.5/rsyslogd.8 +@@ -68,7 +68,7 @@ + ensure that rsyslogd follows its default, standard BSD behavior. Of course, + some configuration file changes are necessary in order to support the + template system. However, rsyslogd should be able to use a standard +-syslog.conf and act like the orginal syslogd. However, an original syslogd ++syslog.conf and act like the original syslogd. However, an original syslogd + will not work correctly with a rsyslog-enhanced configuration file. At + best, it will generate funny looking file names. + The second important concept to note is that this version of rsyslogd +@@ -92,13 +92,13 @@ + .B -c option controls the backward compatibility mode in use. + .TP + .BI "\-A" +-When sending UDP messages, there are potentially multiple pathes to ++When sending UDP messages, there are potentially multiple paths to + the target destination. By default, + .B rsyslogd + only sends to the first target it can successfully send to. If -A + is given, messages are sent to all targets. This may improve +-reliability, but may also cause message duplicaton. This option +-should enabled only if it is fully understood. ++reliability, but may also cause message duplication. This option ++should be enabled only if it is fully understood. + .TP + .BI "\-4" + Causes +@@ -129,7 +129,7 @@ + .B Please note that rsyslogd issues warning messages if the -c3 + .B command line option is not given. + This is to alert you that your are running in compatibility +-mode. Compatibility mode interfers with you rsyslog.conf commands and ++mode. Compatibility mode interferes with your rsyslog.conf commands and + may cause some undesired side-effects. It is meant to be used with a + plain old rsyslog.conf - if you use new features, things become + messy. So the best advice is to work through this document, convert +@@ -167,7 +167,7 @@ + .BR init (8). + .TP + .BI "\-q " "add hostname if DNS fails during ACL processing" +-During ACL processing, hostnames are resolved to IP addreses for ++During ACL processing, hostnames are resolved to IP addresses for + performance reasons. If DNS fails during that process, the hostname + is added as wildcard text, which results in proper, but somewhat + slower operation once DNS is up again. +@@ -190,7 +190,7 @@ + Print version and exit. + .TP + .B "\-w" +-Supress warnings issued when messages are received from non-authorized ++Suppress warnings issued when messages are received from non-authorized + machines (those, that are in no AllowedSender list). + .TP + .B "\-x" +@@ -336,7 +336,7 @@ + + .TP + .B RSYSLOG_DEBUGLOG +-If set, writes (allmost) all debug message to the specified log file ++If set, writes (almost) all debug message to the specified log file + in addition to stdout. + .TP + .B RSYSLOG_MODDIR +@@ -344,7 +344,7 @@ + .PD + .SH BUGS + Please review the file BUGS for up-to-date information on known +-bugs and annouyances. ++bugs and annoyances. + .SH Further Information + Please visit + .BR http://www.rsyslog.com/doc --- rsyslog-3.18.6.orig/debian/patches/no_create_db.patch +++ rsyslog-3.18.6/debian/patches/no_create_db.patch @@ -0,0 +1,31 @@ +Index: rsyslog/plugins/ommysql/createDB.sql +=================================================================== +--- rsyslog.orig/plugins/ommysql/createDB.sql 2007-12-12 18:18:29.000000000 +0100 ++++ rsyslog/plugins/ommysql/createDB.sql 2008-02-12 16:03:04.000000000 +0100 +@@ -1,6 +1,4 @@ +-CREATE DATABASE Syslog; +-USE Syslog; +-CREATE TABLE SystemEvents ++CREATE TABLE IF NOT EXISTS SystemEvents + ( + ID int unsigned not null auto_increment primary key, + CustomerID bigint, +@@ -28,7 +26,7 @@ + SystemID int NULL + ); + +-CREATE TABLE SystemEventsProperties ++CREATE TABLE IF NOT EXISTS SystemEventsProperties + ( + ID int unsigned not null auto_increment primary key, + SystemEventID int NULL , +Index: rsyslog/plugins/ompgsql/createDB.sql +=================================================================== +--- rsyslog.orig/plugins/ompgsql/createDB.sql 2007-12-12 18:18:29.000000000 +0100 ++++ rsyslog/plugins/ompgsql/createDB.sql 2008-02-12 16:03:04.000000000 +0100 +@@ -1,5 +1,3 @@ +-CREATE DATABASE "Syslog"; +-\c Syslog; + CREATE TABLE SystemEvents + ( + ID serial not null primary key, --- rsyslog-3.18.6.orig/debian/patches/message_locking_fix.patch +++ rsyslog-3.18.6/debian/patches/message_locking_fix.patch @@ -0,0 +1,63 @@ +commit bc93c0fe5482be70411d72955d57e86b82b3ec27 +Author: Rainer Gerhards +Date: Tue Jan 27 22:41:14 2009 +0100 + + bugfix: proper message locking on message destruct + + It looks like a race was introduced by not locking the message mutex + in msgDestruct(). In theory, I thought, the decrement should be atomic, + but the whole operation may be reordered. Also it has potential for task + switches. If so, that would lead to a too-early destruction and thus + a potential double free - exactly what we have seen from time to time. + So I think this fix addresses the issue. + + I have also removed anything that looks like atomic operations are supported + in this version - they are not. This was very late added, found to be + non-portable and pulled from that release. + +diff --git a/msg.c b/msg.c +index bd1e425..2261593 100644 +--- a/msg.c ++++ b/msg.c +@@ -272,11 +272,8 @@ BEGINobjDestruct(msg) /* be sure to specify the object type also in END and CODE + int currRefCount; + CODESTARTobjDestruct(msg) + /* DEV Debugging only ! dbgprintf("msgDestruct\t0x%lx, Ref now: %d\n", (unsigned long)pM, pM->iRefCount - 1); */ +-# ifdef DO_HAVE_ATOMICS +- currRefCount = ATOMIC_DEC_AND_FETCH(pThis->iRefCount); +-# else +- currRefCount = --pThis->iRefCount; +-# endif ++ MsgLock(pThis); ++ currRefCount = --pThis->iRefCount; + if(currRefCount == 0) + { + /* DEV Debugging Only! dbgprintf("msgDestruct\t0x%lx, RefCount now 0, doing DESTROY\n", (unsigned long)pThis); */ +@@ -328,8 +325,10 @@ CODESTARTobjDestruct(msg) + rsCStrDestruct(&pThis->pCSPROCID); + if(pThis->pCSMSGID != NULL) + rsCStrDestruct(&pThis->pCSMSGID); ++ MsgUnlock(pThis); + funcDeleteMutex(pThis); + } else { ++ MsgUnlock(pThis); + pThis = NULL; /* tell framework not to destructing the object! */ + } + ENDobjDestruct(msg) +@@ -472,13 +471,9 @@ finalize_it: + msg_t *MsgAddRef(msg_t *pM) + { + assert(pM != NULL); +-# ifdef DO_HAVE_ATOMICS +- ATOMIC_INC(pM->iRefCount); +-# else +- MsgLock(pM); +- pM->iRefCount++; +- MsgUnlock(pM); +-# endif ++ MsgLock(pM); ++ pM->iRefCount++; ++ MsgUnlock(pM); + /* DEV debugging only! dbgprintf("MsgAddRef\t0x%x done, Ref now: %d\n", (int)pM, pM->iRefCount);*/ + return(pM); + }