[arch-commits] Commit in syslog-ng/repos (14 files)

Dave Reisner dreisner at archlinux.org
Thu Sep 6 03:21:27 UTC 2012


    Date: Wednesday, September 5, 2012 @ 23:21:26
  Author: dreisner
Revision: 166319

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  syslog-ng/repos/testing-i686/
  syslog-ng/repos/testing-i686/0001-afsocket-Fix-compilation-without-spoof-source.patch
    (from rev 166318, syslog-ng/trunk/0001-afsocket-Fix-compilation-without-spoof-source.patch)
  syslog-ng/repos/testing-i686/PKGBUILD
    (from rev 166318, syslog-ng/trunk/PKGBUILD)
  syslog-ng/repos/testing-i686/syslog-ng.conf
    (from rev 166318, syslog-ng/trunk/syslog-ng.conf)
  syslog-ng/repos/testing-i686/syslog-ng.conf.d
    (from rev 166318, syslog-ng/trunk/syslog-ng.conf.d)
  syslog-ng/repos/testing-i686/syslog-ng.logrotate
    (from rev 166318, syslog-ng/trunk/syslog-ng.logrotate)
  syslog-ng/repos/testing-i686/syslog-ng.rc
    (from rev 166318, syslog-ng/trunk/syslog-ng.rc)
  syslog-ng/repos/testing-x86_64/
  syslog-ng/repos/testing-x86_64/0001-afsocket-Fix-compilation-without-spoof-source.patch
    (from rev 166318, syslog-ng/trunk/0001-afsocket-Fix-compilation-without-spoof-source.patch)
  syslog-ng/repos/testing-x86_64/PKGBUILD
    (from rev 166318, syslog-ng/trunk/PKGBUILD)
  syslog-ng/repos/testing-x86_64/syslog-ng.conf
    (from rev 166318, syslog-ng/trunk/syslog-ng.conf)
  syslog-ng/repos/testing-x86_64/syslog-ng.conf.d
    (from rev 166318, syslog-ng/trunk/syslog-ng.conf.d)
  syslog-ng/repos/testing-x86_64/syslog-ng.logrotate
    (from rev 166318, syslog-ng/trunk/syslog-ng.logrotate)
  syslog-ng/repos/testing-x86_64/syslog-ng.rc
    (from rev 166318, syslog-ng/trunk/syslog-ng.rc)

-------------------------------------------------------------------------+
 testing-i686/0001-afsocket-Fix-compilation-without-spoof-source.patch   |   37 ++++
 testing-i686/PKGBUILD                                                   |   65 +++++++
 testing-i686/syslog-ng.conf                                             |   92 ++++++++++
 testing-i686/syslog-ng.conf.d                                           |   10 +
 testing-i686/syslog-ng.logrotate                                        |    7 
 testing-i686/syslog-ng.rc                                               |   67 +++++++
 testing-x86_64/0001-afsocket-Fix-compilation-without-spoof-source.patch |   37 ++++
 testing-x86_64/PKGBUILD                                                 |   65 +++++++
 testing-x86_64/syslog-ng.conf                                           |   92 ++++++++++
 testing-x86_64/syslog-ng.conf.d                                         |   10 +
 testing-x86_64/syslog-ng.logrotate                                      |    7 
 testing-x86_64/syslog-ng.rc                                             |   67 +++++++
 12 files changed, 556 insertions(+)

Copied: syslog-ng/repos/testing-i686/0001-afsocket-Fix-compilation-without-spoof-source.patch (from rev 166318, syslog-ng/trunk/0001-afsocket-Fix-compilation-without-spoof-source.patch)
===================================================================
--- testing-i686/0001-afsocket-Fix-compilation-without-spoof-source.patch	                        (rev 0)
+++ testing-i686/0001-afsocket-Fix-compilation-without-spoof-source.patch	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,37 @@
+From 21a9ac3a7e2554f94b8ff8788bc4e82ec3fb58d3 Mon Sep 17 00:00:00 2001
+From: Gergely Nagy <algernon at balabit.hu>
+Date: Mon, 3 Sep 2012 11:41:36 +0200
+Subject: [PATCH] afsocket: Fix compilation without spoof-source
+
+AFInetDestDriver->spoof_source is only available when compiling with
+spoof-source enabled, so guard it with an #if.
+
+Reported and patched by Dave Reisner <dreisner at archlinux.org>.
+
+Signed-off-by: Gergely Nagy <algernon at balabit.hu>
+---
+ modules/afsocket/afinet.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/modules/afsocket/afinet.c b/modules/afsocket/afinet.c
+index 5ca9172..98ff8d8 100644
+--- a/modules/afsocket/afinet.c
++++ b/modules/afsocket/afinet.c
+@@ -539,11 +539,13 @@ afinet_dd_setup_socket(AFSocketDestDriver *s, gint fd)
+ static gboolean
+ afinet_dd_init(LogPipe *s)
+ {
+-  AFInetDestDriver *self = (AFInetDestDriver *) s;
++  AFInetDestDriver *self G_GNUC_UNUSED = (AFInetDestDriver *) s;
+   gboolean success;
+ 
++#if ENABLE_SPOOF_SOURCE
+   if (self->spoof_source)
+     self->super.flags &= ~AFSOCKET_KEEP_ALIVE;
++#endif
+ 
+   success = afsocket_dd_init(s);
+ #if ENABLE_SPOOF_SOURCE
+-- 
+1.7.12
+

Copied: syslog-ng/repos/testing-i686/PKGBUILD (from rev 166318, syslog-ng/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Contributor: Eric Bélanger <eric at archlinux.org>
+# Contributor: Aaron Griffin <aaron at archlinux.org>
+
+pkgname=syslog-ng
+pkgver=3.3.6
+pkgrel=1
+pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
+arch=('i686' 'x86_64')
+license=('GPL2')
+groups=('base')
+url="http://www.balabit.com/network-security/syslog-ng/"
+depends=('glib2' 'eventlog' 'openssl' 'libcap' 'awk')
+makedepends=('flex' 'pkg-config')
+optdepends=('logrotate: for rotating log files')
+provides=('logger')
+options=('!libtool')
+backup=('etc/syslog-ng/modules.conf'
+        'etc/syslog-ng/scl.conf'
+        'etc/syslog-ng/syslog-ng.conf'
+        'etc/conf.d/syslog-ng'
+        'etc/logrotate.d/syslog-ng')
+source=("http://www.balabit.com/downloads/files/syslog-ng/sources/$pkgver/source/${pkgname}_$pkgver.tar.gz"
+        syslog-ng.conf
+        syslog-ng.conf.d
+        syslog-ng.logrotate
+        syslog-ng.rc
+        0001-afsocket-Fix-compilation-without-spoof-source.patch)
+sha1sums=('c2ee74180d640b235665115c5a4b2c61a71a9576'
+          '98074e0facfc6ef036202662cc86d04b38a2c142'
+          '9b2eb6ea9e27c9f1b6c1c855be211ec3da51d3c8'
+          '949128fe3d7f77a7aab99048061f885bc758000c'
+          '94af81a84e3add6653755122cdd5080694de059d'
+          '5f0e6a4b01ba59724bba8932c41ac8f70386659e')
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  # upstream commit 21a9ac3a7e2554f94b8ff8788bc4e82ec3fb58d3
+  patch -Np1 <"$srcdir"/0001-afsocket-Fix-compilation-without-spoof-source.patch
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc/syslog-ng \
+    --libexecdir=/usr/lib \
+    --localstatedir=/var/lib/syslog-ng \
+    --datadir=/usr/share/syslog-ng \
+    --with-pidfile-dir=/run \
+    --disable-spoof-source \
+    --enable-systemd \
+    --with-systemdsystemunitdir=/usr/lib/systemd/system
+
+  make
+}
+
+package() {
+  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+  install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
+  install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
+  install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
+  install -Dm755 "$srcdir/syslog-ng.rc" "$pkgdir/etc/rc.d/syslog-ng"
+  install -Dm644 "$srcdir/syslog-ng.conf.d" "$pkgdir/etc/conf.d/syslog-ng"
+}

Copied: syslog-ng/repos/testing-i686/syslog-ng.conf (from rev 166318, syslog-ng/trunk/syslog-ng.conf)
===================================================================
--- testing-i686/syslog-ng.conf	                        (rev 0)
+++ testing-i686/syslog-ng.conf	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,92 @@
+ at version: 3.3
+#
+# /etc/syslog-ng/syslog-ng.conf
+#
+
+options {
+  stats_freq (0);
+  flush_lines (0);
+  time_reopen (10);
+  log_fifo_size (10000);
+  chain_hostnames (off);
+  use_dns (no);
+  use_fqdn (no);
+  create_dirs (no);
+  keep_hostname (yes);
+  perm(0640);
+  group("log");
+};
+
+source src {
+  unix-dgram("/dev/log");
+  internal();
+  file("/proc/kmsg");
+};
+
+destination d_authlog { file("/var/log/auth.log"); };
+destination d_syslog { file("/var/log/syslog.log"); };
+destination d_cron { file("/var/log/crond.log"); };
+destination d_daemon { file("/var/log/daemon.log"); };
+destination d_kernel { file("/var/log/kernel.log"); };
+destination d_lpr { file("/var/log/lpr.log"); };
+destination d_user { file("/var/log/user.log"); };
+destination d_uucp { file("/var/log/uucp.log"); };
+destination d_mail { file("/var/log/mail.log"); };
+destination d_news { file("/var/log/news.log"); };
+destination d_ppp { file("/var/log/ppp.log"); };
+destination d_debug { file("/var/log/debug.log"); };
+destination d_messages { file("/var/log/messages.log"); };
+destination d_errors { file("/var/log/errors.log"); };
+destination d_everything { file("/var/log/everything.log"); };
+destination d_iptables { file("/var/log/iptables.log"); };
+destination d_acpid { file("/var/log/acpid.log"); };
+destination d_console { usertty("root"); };
+
+# Log everything to tty12
+destination console_all { file("/dev/tty12"); };
+
+filter f_auth { facility(auth); };
+filter f_authpriv { facility(auth, authpriv); };
+filter f_syslog { program(syslog-ng); };
+filter f_cron { facility(cron); };
+filter f_daemon { facility(daemon); };
+filter f_kernel { facility(kern) and not filter(f_iptables); };
+filter f_lpr { facility(lpr); };
+filter f_mail { facility(mail); };
+filter f_news { facility(news); };
+filter f_user { facility(user); };
+filter f_uucp { facility(uucp); };
+filter f_ppp { facility(local2); };
+filter f_debug { not facility(auth, authpriv, news, mail); };
+filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news, cron) and not program(syslog-ng) and not filter(f_iptables); };
+filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };
+filter f_emergency { level(emerg); };
+filter f_info { level(info); };
+filter f_notice { level(notice); };
+filter f_warn { level(warn); };
+filter f_crit { level(crit); };
+filter f_err { level(err); };
+filter f_iptables { match("IN=" value("MESSAGE")) and match("OUT=" value("MESSAGE")); };
+filter f_acpid { program("acpid"); };
+
+log { source(src); filter(f_acpid); destination(d_acpid); };
+log { source(src); filter(f_authpriv); destination(d_authlog); };
+log { source(src); filter(f_syslog); destination(d_syslog); };
+log { source(src); filter(f_cron); destination(d_cron); };
+log { source(src); filter(f_daemon); destination(d_daemon); };
+log { source(src); filter(f_kernel); destination(d_kernel); };
+log { source(src); filter(f_lpr); destination(d_lpr); };
+log { source(src); filter(f_mail); destination(d_mail); };
+log { source(src); filter(f_news); destination(d_news); };
+log { source(src); filter(f_ppp); destination(d_ppp); };
+log { source(src); filter(f_user); destination(d_user); };
+log { source(src); filter(f_uucp); destination(d_uucp); };
+#log { source(src); filter(f_debug); destination(d_debug); };
+log { source(src); filter(f_messages); destination(d_messages); };
+log { source(src); filter(f_err); destination(d_errors); };
+log { source(src); filter(f_emergency); destination(d_console); };
+log { source(src); filter(f_everything); destination(d_everything); };
+log { source(src); filter(f_iptables); destination(d_iptables); };
+
+# Log everything to tty12
+#log { source(src); destination(console_all); };

Copied: syslog-ng/repos/testing-i686/syslog-ng.conf.d (from rev 166318, syslog-ng/trunk/syslog-ng.conf.d)
===================================================================
--- testing-i686/syslog-ng.conf.d	                        (rev 0)
+++ testing-i686/syslog-ng.conf.d	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,10 @@
+#
+# /etc/conf.d/syslog-ng
+#
+
+# passed to syslog-ng on config check
+SYSLOG_NG_CHECKOPTS=()
+
+# passed to syslog-ng at startup
+SYSLOG_NG_OPTS=()
+

Copied: syslog-ng/repos/testing-i686/syslog-ng.logrotate (from rev 166318, syslog-ng/trunk/syslog-ng.logrotate)
===================================================================
--- testing-i686/syslog-ng.logrotate	                        (rev 0)
+++ testing-i686/syslog-ng.logrotate	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,7 @@
+/var/log/messages.log /var/log/auth.log /var/log/mail.log /var/log/kernel.log /var/log/errors.log /var/log/daemon.log /var/log/user.log /var/log/iptables.log /var/log/everything.log /var/log/syslog.log /var/log/acpid.log /var/log/crond.log /var/log/lpr.log /var/log/uucp.log /var/log/news.log /var/log/ppp.log /var/log/debug.log {
+	missingok
+	sharedscripts
+	postrotate
+		/bin/kill -HUP $(cat /run/syslog-ng.pid 2>/dev/null) 2>/dev/null || true
+	endscript
+}

Copied: syslog-ng/repos/testing-i686/syslog-ng.rc (from rev 166318, syslog-ng/trunk/syslog-ng.rc)
===================================================================
--- testing-i686/syslog-ng.rc	                        (rev 0)
+++ testing-i686/syslog-ng.rc	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/syslog-ng
+
+checkconfig() {
+  if ! syslog-ng -s "${SYSLOG_NG_CHECKOPTS[@]}"; then
+    stat_fail
+    exit 1
+  fi
+}
+
+pidfile=/run/syslog-ng.pid
+if [[ -r $pidfile ]]; then
+  read -r PID < "$pidfile"
+  if [[ $PID && ! -d /proc/$PID ]]; then
+    # stale pidfile
+    unset PID
+    rm -f "$pidfile"
+  fi
+fi
+
+case $1 in
+  start)
+    stat_busy "Starting Syslog-NG"
+    checkconfig
+    if [[ -z $PID ]] && /usr/sbin/syslog-ng "${SYSLOG_NG_OPTS[@]}"; then
+      add_daemon syslog-ng
+      stat_done
+    else
+      stat_fail
+      exit 1
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping Syslog-NG"
+    if [[ $PID ]] && kill $PID &>/dev/null; then
+      rm_daemon syslog-ng
+      stat_done
+    else
+      stat_fail
+      exit 1
+    fi
+    ;;
+  reload)
+    stat_busy "Reloading Syslog-NG configuration and re-opening log files"
+    if [[ -z $PID ]]; then
+      stat_fail
+    else
+      checkconfig
+      if kill -HUP $PID &>/dev/null; then
+        stat_done
+      else
+        stat_fail
+        exit 1
+      fi
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart|reload}"
+esac

Copied: syslog-ng/repos/testing-x86_64/0001-afsocket-Fix-compilation-without-spoof-source.patch (from rev 166318, syslog-ng/trunk/0001-afsocket-Fix-compilation-without-spoof-source.patch)
===================================================================
--- testing-x86_64/0001-afsocket-Fix-compilation-without-spoof-source.patch	                        (rev 0)
+++ testing-x86_64/0001-afsocket-Fix-compilation-without-spoof-source.patch	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,37 @@
+From 21a9ac3a7e2554f94b8ff8788bc4e82ec3fb58d3 Mon Sep 17 00:00:00 2001
+From: Gergely Nagy <algernon at balabit.hu>
+Date: Mon, 3 Sep 2012 11:41:36 +0200
+Subject: [PATCH] afsocket: Fix compilation without spoof-source
+
+AFInetDestDriver->spoof_source is only available when compiling with
+spoof-source enabled, so guard it with an #if.
+
+Reported and patched by Dave Reisner <dreisner at archlinux.org>.
+
+Signed-off-by: Gergely Nagy <algernon at balabit.hu>
+---
+ modules/afsocket/afinet.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/modules/afsocket/afinet.c b/modules/afsocket/afinet.c
+index 5ca9172..98ff8d8 100644
+--- a/modules/afsocket/afinet.c
++++ b/modules/afsocket/afinet.c
+@@ -539,11 +539,13 @@ afinet_dd_setup_socket(AFSocketDestDriver *s, gint fd)
+ static gboolean
+ afinet_dd_init(LogPipe *s)
+ {
+-  AFInetDestDriver *self = (AFInetDestDriver *) s;
++  AFInetDestDriver *self G_GNUC_UNUSED = (AFInetDestDriver *) s;
+   gboolean success;
+ 
++#if ENABLE_SPOOF_SOURCE
+   if (self->spoof_source)
+     self->super.flags &= ~AFSOCKET_KEEP_ALIVE;
++#endif
+ 
+   success = afsocket_dd_init(s);
+ #if ENABLE_SPOOF_SOURCE
+-- 
+1.7.12
+

Copied: syslog-ng/repos/testing-x86_64/PKGBUILD (from rev 166318, syslog-ng/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Contributor: Eric Bélanger <eric at archlinux.org>
+# Contributor: Aaron Griffin <aaron at archlinux.org>
+
+pkgname=syslog-ng
+pkgver=3.3.6
+pkgrel=1
+pkgdesc="Next-generation syslogd with advanced networking and filtering capabilities"
+arch=('i686' 'x86_64')
+license=('GPL2')
+groups=('base')
+url="http://www.balabit.com/network-security/syslog-ng/"
+depends=('glib2' 'eventlog' 'openssl' 'libcap' 'awk')
+makedepends=('flex' 'pkg-config')
+optdepends=('logrotate: for rotating log files')
+provides=('logger')
+options=('!libtool')
+backup=('etc/syslog-ng/modules.conf'
+        'etc/syslog-ng/scl.conf'
+        'etc/syslog-ng/syslog-ng.conf'
+        'etc/conf.d/syslog-ng'
+        'etc/logrotate.d/syslog-ng')
+source=("http://www.balabit.com/downloads/files/syslog-ng/sources/$pkgver/source/${pkgname}_$pkgver.tar.gz"
+        syslog-ng.conf
+        syslog-ng.conf.d
+        syslog-ng.logrotate
+        syslog-ng.rc
+        0001-afsocket-Fix-compilation-without-spoof-source.patch)
+sha1sums=('c2ee74180d640b235665115c5a4b2c61a71a9576'
+          '98074e0facfc6ef036202662cc86d04b38a2c142'
+          '9b2eb6ea9e27c9f1b6c1c855be211ec3da51d3c8'
+          '949128fe3d7f77a7aab99048061f885bc758000c'
+          '94af81a84e3add6653755122cdd5080694de059d'
+          '5f0e6a4b01ba59724bba8932c41ac8f70386659e')
+
+build() {
+  cd "$pkgname-$pkgver"
+
+  # upstream commit 21a9ac3a7e2554f94b8ff8788bc4e82ec3fb58d3
+  patch -Np1 <"$srcdir"/0001-afsocket-Fix-compilation-without-spoof-source.patch
+
+  ./configure \
+    --prefix=/usr \
+    --sysconfdir=/etc/syslog-ng \
+    --libexecdir=/usr/lib \
+    --localstatedir=/var/lib/syslog-ng \
+    --datadir=/usr/share/syslog-ng \
+    --with-pidfile-dir=/run \
+    --disable-spoof-source \
+    --enable-systemd \
+    --with-systemdsystemunitdir=/usr/lib/systemd/system
+
+  make
+}
+
+package() {
+  make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
+
+  install -dm755 "$pkgdir/var/lib/syslog-ng" "$pkgdir/etc/syslog-ng/patterndb.d"
+  install -Dm644 "$srcdir/syslog-ng.conf" "$pkgdir/etc/syslog-ng/syslog-ng.conf"
+  install -Dm644 "$srcdir/syslog-ng.logrotate" "$pkgdir/etc/logrotate.d/syslog-ng"
+  install -Dm755 "$srcdir/syslog-ng.rc" "$pkgdir/etc/rc.d/syslog-ng"
+  install -Dm644 "$srcdir/syslog-ng.conf.d" "$pkgdir/etc/conf.d/syslog-ng"
+}

Copied: syslog-ng/repos/testing-x86_64/syslog-ng.conf (from rev 166318, syslog-ng/trunk/syslog-ng.conf)
===================================================================
--- testing-x86_64/syslog-ng.conf	                        (rev 0)
+++ testing-x86_64/syslog-ng.conf	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,92 @@
+ at version: 3.3
+#
+# /etc/syslog-ng/syslog-ng.conf
+#
+
+options {
+  stats_freq (0);
+  flush_lines (0);
+  time_reopen (10);
+  log_fifo_size (10000);
+  chain_hostnames (off);
+  use_dns (no);
+  use_fqdn (no);
+  create_dirs (no);
+  keep_hostname (yes);
+  perm(0640);
+  group("log");
+};
+
+source src {
+  unix-dgram("/dev/log");
+  internal();
+  file("/proc/kmsg");
+};
+
+destination d_authlog { file("/var/log/auth.log"); };
+destination d_syslog { file("/var/log/syslog.log"); };
+destination d_cron { file("/var/log/crond.log"); };
+destination d_daemon { file("/var/log/daemon.log"); };
+destination d_kernel { file("/var/log/kernel.log"); };
+destination d_lpr { file("/var/log/lpr.log"); };
+destination d_user { file("/var/log/user.log"); };
+destination d_uucp { file("/var/log/uucp.log"); };
+destination d_mail { file("/var/log/mail.log"); };
+destination d_news { file("/var/log/news.log"); };
+destination d_ppp { file("/var/log/ppp.log"); };
+destination d_debug { file("/var/log/debug.log"); };
+destination d_messages { file("/var/log/messages.log"); };
+destination d_errors { file("/var/log/errors.log"); };
+destination d_everything { file("/var/log/everything.log"); };
+destination d_iptables { file("/var/log/iptables.log"); };
+destination d_acpid { file("/var/log/acpid.log"); };
+destination d_console { usertty("root"); };
+
+# Log everything to tty12
+destination console_all { file("/dev/tty12"); };
+
+filter f_auth { facility(auth); };
+filter f_authpriv { facility(auth, authpriv); };
+filter f_syslog { program(syslog-ng); };
+filter f_cron { facility(cron); };
+filter f_daemon { facility(daemon); };
+filter f_kernel { facility(kern) and not filter(f_iptables); };
+filter f_lpr { facility(lpr); };
+filter f_mail { facility(mail); };
+filter f_news { facility(news); };
+filter f_user { facility(user); };
+filter f_uucp { facility(uucp); };
+filter f_ppp { facility(local2); };
+filter f_debug { not facility(auth, authpriv, news, mail); };
+filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news, cron) and not program(syslog-ng) and not filter(f_iptables); };
+filter f_everything { level(debug..emerg) and not facility(auth, authpriv); };
+filter f_emergency { level(emerg); };
+filter f_info { level(info); };
+filter f_notice { level(notice); };
+filter f_warn { level(warn); };
+filter f_crit { level(crit); };
+filter f_err { level(err); };
+filter f_iptables { match("IN=" value("MESSAGE")) and match("OUT=" value("MESSAGE")); };
+filter f_acpid { program("acpid"); };
+
+log { source(src); filter(f_acpid); destination(d_acpid); };
+log { source(src); filter(f_authpriv); destination(d_authlog); };
+log { source(src); filter(f_syslog); destination(d_syslog); };
+log { source(src); filter(f_cron); destination(d_cron); };
+log { source(src); filter(f_daemon); destination(d_daemon); };
+log { source(src); filter(f_kernel); destination(d_kernel); };
+log { source(src); filter(f_lpr); destination(d_lpr); };
+log { source(src); filter(f_mail); destination(d_mail); };
+log { source(src); filter(f_news); destination(d_news); };
+log { source(src); filter(f_ppp); destination(d_ppp); };
+log { source(src); filter(f_user); destination(d_user); };
+log { source(src); filter(f_uucp); destination(d_uucp); };
+#log { source(src); filter(f_debug); destination(d_debug); };
+log { source(src); filter(f_messages); destination(d_messages); };
+log { source(src); filter(f_err); destination(d_errors); };
+log { source(src); filter(f_emergency); destination(d_console); };
+log { source(src); filter(f_everything); destination(d_everything); };
+log { source(src); filter(f_iptables); destination(d_iptables); };
+
+# Log everything to tty12
+#log { source(src); destination(console_all); };

Copied: syslog-ng/repos/testing-x86_64/syslog-ng.conf.d (from rev 166318, syslog-ng/trunk/syslog-ng.conf.d)
===================================================================
--- testing-x86_64/syslog-ng.conf.d	                        (rev 0)
+++ testing-x86_64/syslog-ng.conf.d	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,10 @@
+#
+# /etc/conf.d/syslog-ng
+#
+
+# passed to syslog-ng on config check
+SYSLOG_NG_CHECKOPTS=()
+
+# passed to syslog-ng at startup
+SYSLOG_NG_OPTS=()
+

Copied: syslog-ng/repos/testing-x86_64/syslog-ng.logrotate (from rev 166318, syslog-ng/trunk/syslog-ng.logrotate)
===================================================================
--- testing-x86_64/syslog-ng.logrotate	                        (rev 0)
+++ testing-x86_64/syslog-ng.logrotate	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,7 @@
+/var/log/messages.log /var/log/auth.log /var/log/mail.log /var/log/kernel.log /var/log/errors.log /var/log/daemon.log /var/log/user.log /var/log/iptables.log /var/log/everything.log /var/log/syslog.log /var/log/acpid.log /var/log/crond.log /var/log/lpr.log /var/log/uucp.log /var/log/news.log /var/log/ppp.log /var/log/debug.log {
+	missingok
+	sharedscripts
+	postrotate
+		/bin/kill -HUP $(cat /run/syslog-ng.pid 2>/dev/null) 2>/dev/null || true
+	endscript
+}

Copied: syslog-ng/repos/testing-x86_64/syslog-ng.rc (from rev 166318, syslog-ng/trunk/syslog-ng.rc)
===================================================================
--- testing-x86_64/syslog-ng.rc	                        (rev 0)
+++ testing-x86_64/syslog-ng.rc	2012-09-06 03:21:26 UTC (rev 166319)
@@ -0,0 +1,67 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/syslog-ng
+
+checkconfig() {
+  if ! syslog-ng -s "${SYSLOG_NG_CHECKOPTS[@]}"; then
+    stat_fail
+    exit 1
+  fi
+}
+
+pidfile=/run/syslog-ng.pid
+if [[ -r $pidfile ]]; then
+  read -r PID < "$pidfile"
+  if [[ $PID && ! -d /proc/$PID ]]; then
+    # stale pidfile
+    unset PID
+    rm -f "$pidfile"
+  fi
+fi
+
+case $1 in
+  start)
+    stat_busy "Starting Syslog-NG"
+    checkconfig
+    if [[ -z $PID ]] && /usr/sbin/syslog-ng "${SYSLOG_NG_OPTS[@]}"; then
+      add_daemon syslog-ng
+      stat_done
+    else
+      stat_fail
+      exit 1
+    fi
+    ;;
+  stop)
+    stat_busy "Stopping Syslog-NG"
+    if [[ $PID ]] && kill $PID &>/dev/null; then
+      rm_daemon syslog-ng
+      stat_done
+    else
+      stat_fail
+      exit 1
+    fi
+    ;;
+  reload)
+    stat_busy "Reloading Syslog-NG configuration and re-opening log files"
+    if [[ -z $PID ]]; then
+      stat_fail
+    else
+      checkconfig
+      if kill -HUP $PID &>/dev/null; then
+        stat_done
+      else
+        stat_fail
+        exit 1
+      fi
+    fi
+    ;;
+  restart)
+    $0 stop
+    sleep 1
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start|stop|restart|reload}"
+esac




More information about the arch-commits mailing list