[Lunar-commits] <moonbase-other> Merge branch 'rsyslog'

Stefan Wold ratler at lunar-linux.org
Sun Dec 8 12:40:23 CET 2013


commit 2e90f58fc0da76955bebd870d949d45147ce6a30
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sun, 08 Dec 2013 03:40:03 -0800
URL: https://github.com/lunar-linux/moonbase-other/commit/2e90f58fc0da76955bebd870d949d45147ce6a30

Merge branch 'rsyslog'
---
  utils/rsyslog/20-default.conf           | +55/-0    
  utils/rsyslog/BUILD                     | +6/-14    
  utils/rsyslog/DEPENDS                   | +4/-2     
  utils/rsyslog/DETAILS                   | +3/-9     
  utils/rsyslog/logrotate.d/rsyslog       | +3/-2     
  utils/rsyslog/rsyslog.conf              | +18/-0    
  utils/rsyslog/systemd.d/rsyslog.service | +7/-4     
  7 files changed, 96 insertions(+), 31 deletions(-)

--- /dev/null
+++ b/utils/rsyslog/20-default.conf
@@ -0,0 +1,55 @@
+# Default rules for rsyslog
+
+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
+
+#
+# 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                                :omusrmsg:*
+
+
+# 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
--- a/utils/rsyslog/BUILD
+++ b/utils/rsyslog/BUILD
@@ -3,39 +3,31 @@
   #It seems like someone missed -lz here...
   sedit "s:\(librsyslog_la_LIBADD = \$(DL_LIBS) \$(RT_LIBS)\):\1 \$(ZLIB_LIBS):" runtime/Makefile.in
 
-  OPTS+=" --enable-pthreads    \
-          --enable-regexp      \
+  OPTS+=" --enable-regexp      \
           --enable-largefile   \
           --enable-klog        \
           --enable-inet        \
           --enable-imfile      \
-          --enable-imtemplate  \
           --enable-mail        \
           --enable-fsstnd      \
           --enable-rsyslogd    \
-          --enable-unix        \
           --enable-rsyslogrt   \
           --enable-rsyslogd    \
-          --disable-rfc3195"  &&
+          --disable-rfc3195    \
+          --enable-cached-man-pages"  &&
 
   default_build  &&
 
   if [ ! -f /etc/rsyslog.conf ]; then
-     install -m 644 $SOURCE_CACHE/$SOURCE2 /etc/rsyslog.conf
+     install -m 644 $SCRIPT_DIRECTORY/rsyslog.conf /etc/rsyslog.conf
   fi &&
-  if [ ! -f /etc/config.d/rsyslog ]; then
-     install -m 644 $SOURCE_CACHE/$SOURCE3 /etc/config.d/rsyslog
+  if [ ! -d /etc/rsyslog.d/20-default.conf ]; then
+    install -Dm0644 $SCRIPT_DIRECTORY/20-default.conf /etc/rsyslog.d/20-default.conf
   fi &&
-
   mkdir -p /usr/share/doc/rsyslog/scripts/{mysql,pqsql} &&
   install -m 644 plugins/ommysql/createDB.sql /usr/share/doc/rsyslog/scripts/mysql/ &&
   install -m 644 plugins/ompgsql/createDB.sql /usr/share/doc/rsyslog/scripts/pqsql/ &&
 
-  if [[ -d /usr/lib/systemd/system ]]; then
-     rm -f /usr/lib/systemd/system/syslog.service &&
-     ln -sf /usr/lib/systemd/system/rsyslog.service /usr/lib/systemd/system/syslog.service
-  fi &&
-
   gather_docs doc/rsyslog-example.conf
 
 ) > $C_FIFO 2>&1
--- a/utils/rsyslog/DEPENDS
+++ b/utils/rsyslog/DEPENDS
@@ -1,9 +1,12 @@
+depends libee
+depends libestr
+
 optional_depends zlib              \
                  "--enable-zlib"   \
                  "--disable-zlib"  \
                  "for zlib compression support"
 
-optional_depends mysql              \
+optional_depends %MYSQL             \
                  "--enable-mysql"   \
                  "--disable-mysql"  \
                  "for MySQL support"
@@ -39,4 +42,3 @@ optional_depends gnutls             \
                  "for GnuTLS support"
 
 optional_depends logrotate "" "" "for log rotation support"
-optional_depends systemd   "" "" "for systemd support"
--- a/utils/rsyslog/DETAILS
+++ b/utils/rsyslog/DETAILS
@@ -1,18 +1,12 @@
           MODULE=rsyslog
-         VERSION=5.10.0
+         VERSION=7.4.6
           SOURCE=$MODULE-$VERSION.tar.gz
-         SOURCE2=$MODULE.conf-0.2
-         SOURCE3=$MODULE.config.d-0.2
       SOURCE_URL=http://www.rsyslog.com/files/download/$MODULE
-     SOURCE2_URL=$PATCH_URL
-     SOURCE3_URL=$PATCH_URL
-      SOURCE_VFY=sha1:8cc93749654faec36b245fa1ec9625d8ad7610d7
-     SOURCE2_VFY=sha1:340f692141df8915eccd6a47b13554a845690f9b
-     SOURCE3_VFY=sha1:219b5ceb8661534dd8064296852df6bd933f2233
+      SOURCE_VFY=sha1:22c87393bccee280efc73c1de5c50593b9ad8fbb
         WEB_SITE=http://www.rsyslog.com
       MAINTAINER=ratler at lunar-linux.org
          ENTERED=20080731
-         UPDATED=20121011
+         UPDATED=20131110
            SHORT="An enhanced multi-threaded syslogd"
 
 cat <<EOF
--- a/utils/rsyslog/logrotate.d/rsyslog
+++ b/utils/rsyslog/logrotate.d/rsyslog
@@ -1,6 +1,7 @@
-/var/log/messages /var/log/auth /var/log/mail /var/log/spooler /var/log/boot.log /var/log/cron /var/log/kernel /var/log/lpr {
+/var/log/messages /var/log/syslog /var/log/auth.log /var/log/mail.log /var/log/mail.err /var/log/cron.log /var/log/kern.log /var/log/debug /var/log/news {
+    missingok
     sharedscripts
     postrotate
-        /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
+        /usr/bin/killall -HUP /usr/sbin/rsyslogd
     endscript
 }
--- /dev/null
+++ b/utils/rsyslog/rsyslog.conf
@@ -0,0 +1,18 @@
+# Basic config
+
+$ModLoad imuxsock # provides support for local system logging
+$ModLoad imklog   # provides kernel logging support
+
+$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
+
+$RepeatedMsgReduction on
+
+$FileOwner root
+$FileGroup root
+$FileCreateMode 0640
+$DirCreateMode 0755
+$Umask 0022
+
+$WorkDirectory /var/spool/rsyslog
+
+$IncludeConfig /etc/rsyslog.d/*.conf
--- a/utils/rsyslog/systemd.d/rsyslog.service
+++ b/utils/rsyslog/systemd.d/rsyslog.service
@@ -1,9 +1,12 @@
 [Unit]
-Description=Syslog daemon
+Description=System Logging Service
+Requires=syslog.socket
 
 [Service]
-ExecStart=/usr/sbin/rsyslogd -c4 -n
-Restart=always
+Type=notify
+ExecStart=/usr/sbin/rsyslogd -n
+StandardOutput=null
 
 [Install]
-WantedBy=syslog.target
+WantedBy=multi-user.target
+Alias=syslog.service




More information about the Lunar-commits mailing list