Hello community,

here is the log from the commit of package syslogd for 
openSUSE:12.1:Update:Test checked in at 2012-02-21 13:57:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update:Test/syslogd (Old)
 and      /work/SRC/openSUSE:12.1:Update:Test/.syslogd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "syslogd", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:12.1:Update:Test/syslogd/syslogd.changes 2012-02-21 
13:57:53.000000000 +0100
+++ /work/SRC/openSUSE:12.1:Update:Test/.syslogd.new/syslogd.changes    
2012-02-21 13:57:54.000000000 +0100
@@ -1,0 +2,10 @@
+Mon Feb 20 12:25:12 UTC 2012 - [email protected]
+
+- syslog-service: Added SYSLOG_REQUIRES_NETWORK variable allowing
+  the user to configure (override) whether the syslog daemon config
+  requires network or can be started early. Default is to detect
+  it for syslogd and syslog-ng and to just start rsyslogd early
+  with its normal config. Removed the rsyslog.early.conf use as it
+  is usually not needed [enable on-disk queues] (bnc#728565).
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ syslogd.spec ++++++
--- /var/tmp/diff_new_pack.HShED9/_old  2012-02-21 13:57:55.000000000 +0100
+++ /var/tmp/diff_new_pack.HShED9/_new  2012-02-21 13:57:55.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package syslogd
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed

++++++ rc.earlysyslog ++++++
--- /var/tmp/diff_new_pack.HShED9/_old  2012-02-21 13:57:55.000000000 +0100
+++ /var/tmp/diff_new_pack.HShED9/_new  2012-02-21 13:57:55.000000000 +0100
@@ -41,7 +41,7 @@
 case "$SYSLOG_DAEMON" in
     rsyslogd)
        syslog=rsyslogd
-       config=/etc/rsyslog.early.conf
+       config=/etc/rsyslog.conf
        ;;
     syslog-ng)
        syslog=syslog-ng
@@ -71,22 +71,41 @@
 
 case "$SYSLOG_DAEMON" in
     syslog-ng)
-       while read line ; do
-           case "$line" in
-               \#*|"") continue ;;
-               *udp\ *|*udp\(*) exit 0 ;;
-               *tcp\ *|*tcp\(*) exit 0 ;;
-           esac
-       done < ${config}
+       case ${SYSLOG_REQUIRES_NETWORK} in
+       yes)    exit 0 ;;
+       no)            ;;
+       "")
+           while read line ; do
+               case "$line" in
+                   \#*|"")     continue ;;
+                   *udp\ *|*udp\(*) exit 0 ;;
+                   *tcp\ *|*tcp\(*) exit 0 ;;
+               esac
+           done < ${config}
+           ;;
+       esac
+       ;;
+    rsyslogd)
+       # Network is usually not required for properly configured
+       # rsyslogd with enabled on-disk queues for remote logging,
+       # so we just start it with its normal configuration.
+       # "yes" allows the user to disable the early start.
+       case ${SYSLOG_REQUIRES_NETWORK} in
+       yes)    exit 0 ;;
+       no|"")         ;;
+       esac
        ;;
     *)
-       # in hope this works with the rsyslog.early.conf file
-       # (hard to implement for rsyslog with its includes/if
-       # statements)...
-       while read select action ; do
-           case "$select" in \#*|"") continue ;; esac
-           case "$action" in *@*)    exit 0   ;; esac
-       done < ${config}
+       case ${SYSLOG_REQUIRES_NETWORK} in
+       yes)    exit 0 ;;
+       no)            ;;
+       "")
+           while read select action ; do
+               case "$select" in \#*|"") continue ;; esac
+               case "$action" in *@*)    exit 0   ;; esac
+           done < ${config}
+           ;;
+       esac
        ;;
 esac
 

++++++ rc.syslog ++++++
--- /var/tmp/diff_new_pack.HShED9/_old  2012-02-21 13:57:55.000000000 +0100
+++ /var/tmp/diff_new_pack.HShED9/_new  2012-02-21 13:57:55.000000000 +0100
@@ -40,15 +40,11 @@
 case "$SYSLOG_DAEMON" in
     rsyslogd)
        syslog=rsyslogd
-       mkdir -p -m 0755 /var/run/rsyslog
-       if test "$2" = "early" ; then
-           config=/etc/rsyslog.early.conf
-       else
-           config=/etc/rsyslog.conf
-       fi
+       config=/etc/rsyslog.conf
        compat=${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}}
        params="-c ${compat:-3} -f $config $RSYSLOGD_PARAMS"
        rsocks="/var/run/rsyslog/additional-log-sockets.conf"
+       mkdir -p -m 0755 /var/run/rsyslog
        test -r "$config" && \
        while read one two rest ; do
            test "x$one" = 'x$ModLoad'  && \

++++++ sysconfig.syslog ++++++
--- /var/tmp/diff_new_pack.HShED9/_old  2012-02-21 13:57:55.000000000 +0100
+++ /var/tmp/diff_new_pack.HShED9/_new  2012-02-21 13:57:55.000000000 +0100
@@ -10,3 +10,21 @@
 # "syslogd", "syslog-ng", "rsyslogd" or "" for autodetect.
 #
 SYSLOG_DAEMON=""
+
+## Type:                list(yes,no,"")
+## Default:             ""
+## Config:              ""
+## ServiceRestart:      syslog
+#
+# Specify whether the syslog configuration requires network.
+# Set to "yes" to delay the syslog daemon start until network
+# is already started, set to "no" to start it earlier.
+#
+# The behavior of the default setting "" depends on the daemon
+# specified in the SYSLOG_DAEMON variable and on the current
+# implementation of the init / systemd scripts. It may cause
+# a try to detect whether network is required for the config
+# or choose one of the above modi.
+#
+SYSLOG_REQUIRES_NETWORK=""
+

++++++ syslog-service-generator ++++++
--- /var/tmp/diff_new_pack.HShED9/_old  2012-02-21 13:57:55.000000000 +0100
+++ /var/tmp/diff_new_pack.HShED9/_new  2012-02-21 13:57:55.000000000 +0100
@@ -86,15 +86,22 @@
     config=/etc/syslog-ng/syslog-ng.conf
     socksdir=/var/run/syslog-ng
     socks=$socksdir/additional-log-sockets.conf
-    if test -s "$config" ; then
-       while read line ; do
-           case "$line" in
-           \#*|"") continue ;;
-           *udp\ *|*udp\(*) network=network.target ;;
-           *tcp\ *|*tcp\(*) network=network.target ;;
-           esac
-       done < ${config}
-    fi
+    case ${SYSLOG_REQUIRES_NETWORK} in
+       yes) network=network.target ;;
+       no)                         ;;
+       "") # OK, try to detect it; does not
+           # work with include files ...
+           if test -s "$config" ; then
+               while read line ; do
+                   case "$line" in
+                   \#*|"") continue ;;
+                   *udp\ *|*udp\(*) network=network.target ;;
+                   *tcp\ *|*tcp\(*) network=network.target ;;
+                   esac
+               done < ${config}
+           fi
+       ;;
+    esac
     if test -r "$config" ; then
        while read line; do
            case $line in
@@ -110,30 +117,16 @@
     ;;
 rsyslogd)
     syslog=rsyslogd
-    config=/etc/rsyslog.early.conf
+    config=/etc/rsyslog.conf
     socksdir=/var/run/rsyslog
     socks=$socksdir/additional-log-sockets.conf
-    #
-    # In hope this works with the rsyslog.early.conf file
-    # (hard to implement for rsyslog with its includes/if
-    # statements)...
-    #
-    if test -s "$config" ; then
-       while read select action ; do
-           case "$select" in
-           \#*|"")
-               continue
-           esac
-           case "$action" in
-           *@*)
-               network=network.target
-               break
-           esac
-       done < ${config}
-       test -n "$network" && config=/etc/rsyslog.conf
-    else
-       config=/etc/rsyslog.conf
-    fi
+    # Network is usually not required for properly configured
+    # rsyslogd with enabled on-disk queues for remote logging,
+    # so we just start it with its normal configuration.
+    # "yes" allows the user to disable the early start.
+    case ${SYSLOG_REQUIRES_NETWORK} in
+       yes) network=network.target ;;
+    esac
     if test -r "$config" ; then
        while read one two rest ; do
            if test "$one" = '$ModLoad' -a "$two" = 'imklog.so' ; then
@@ -152,12 +145,19 @@
     config=/etc/syslog.conf
     socksdir=/var/run/syslog
     socks=$socksdir/additional-log-sockets.env
-    if test -s "$config" ; then
-       while read select action ; do
-           case "$select" in \#*|"") continue ;; esac
-           case "$action" in *@*)    network=network.target ;; esac
-       done < ${config}
-    fi
+    network=
+    case ${SYSLOG_REQUIRES_NETWORK} in
+       yes) network=network.target ;;
+       no)                         ;;
+       "") # Try to detect it
+           if test -s "$config" ; then
+               while read select action ; do
+                   case "$select" in \#*|"") continue ;; esac
+                   case "$action" in *@*)    network=network.target ;; esac
+               done < ${config}
+           fi
+       ;;
+    esac
     /bin/mkdir -p -m 0755 ${socksdir#/var}
     touch ${socks#/var}
     params="$SYSLOGD_PARAMS"


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to