From 2a68653f124185d43cdf0a1be86723f58cd79264a7be45a9f8b65a6e6b83005a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= Date: Tue, 6 Nov 2012 18:32:45 +0000 Subject: [PATCH 1/9] Accepting request 140363 from home:tittiatcoke:branches:Base:System Updated spec-file based on comments on irc. OBS-URL: https://build.opensuse.org/request/show/140363 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=108 --- rsyslog-5.8.11-systemd.patch | 12 ++++++++++ rsyslog.changes | 7 ++++++ rsyslog.spec | 46 ++++++++++++++++-------------------- 3 files changed, 39 insertions(+), 26 deletions(-) create mode 100644 rsyslog-5.8.11-systemd.patch diff --git a/rsyslog-5.8.11-systemd.patch b/rsyslog-5.8.11-systemd.patch new file mode 100644 index 0000000..38a48d1 --- /dev/null +++ b/rsyslog-5.8.11-systemd.patch @@ -0,0 +1,12 @@ +--- rsyslog-7.2.1/rsyslog.service.in 2012-10-22 12:44:43.000000000 +0200 ++++ new/rsyslog.service.in 2012-11-06 13:59:17.065706770 +0100 +@@ -2,7 +2,8 @@ + Description=System Logging Service + + [Service] +-ExecStart=@sbindir@/rsyslogd -n ++EnvironmentFile=-/etc/sysconfig/rsyslog ++ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS + Sockets=syslog.socket + StandardOutput=null + diff --git a/rsyslog.changes b/rsyslog.changes index 40f8317..52746bb 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 6 12:36:54 UTC 2012 - tittiatcoke@gmail.com + +- Enabled rsyslog own systemd service file. This to resolve the + current issue with a non starting system logger with systemd 185. + (see also bnc#788330) + ------------------------------------------------------------------- Mon Oct 29 15:39:26 UTC 2012 - mt@suse.com diff --git a/rsyslog.spec b/rsyslog.spec index d3eb9b6..a439fea 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -64,13 +64,6 @@ Release: 0 Url: http://www.rsyslog.com/ Provides: syslog Conflicts: otherproviders(syslog) -%if %{with syslogservice} -Requires(pre): %insserv_prereq %fillup_prereq syslog-service /sbin/checkproc -BuildRequires: syslog-service -%else -Requires(pre): %insserv_prereq %fillup_prereq /sbin/klogd /etc/init.d/syslog /sbin/checkproc -BuildRequires: klogd -%endif BuildRequires: dos2unix BuildRequires: openssl-devel BuildRequires: pcre-devel @@ -129,6 +122,14 @@ Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{upstream Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source4: rsyslog.d.remote.conf.in +# FIX-OPENSUSE Adjust service file to work correctly. Based on a fedora patch - tittiatcoke@gmail.com +Patch1: rsyslog-5.8.11-systemd.patch +%if 0%{?suse_version} >= 1220 +# This provide is purely to be used for the 12.3 Milestones. +Obsoletes: syslog-service +Provides: sysvinit(syslog) +%endif +%{?systemd_requires} %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, @@ -294,6 +295,7 @@ This module provides a UDP forwarder that allows changing the sender address. %prep %setup -q -n %{name}-%{upstream_version} +%patch1 -p1 %if %{with systemd} %if 0%{?suse_version} <= 1140 # Bug: https://bugzilla.novell.com/show_bug.cgi?id=656259 @@ -450,37 +452,24 @@ install -m644 plugins/ommysql/createDB.sql \ install -m644 plugins/ompgsql/createDB.sql \ %{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql %endif -# -# Note: On 11.4 we do not ship any systemd service file. -# On 12.x, the syslog.service file is provided by -# the syslog-service package. -# -%if %{with systemd} -if test -e %{buildroot}%{_unitdir}/rsyslog.service ; then - rm -f %{buildroot}%{_unitdir}/rsyslog.service -fi -%endif %clean if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then rm -rf "%{buildroot}" fi +%pre +%service_add_pre rsyslog.service + %post # # update linker caches # /sbin/ldconfig -# -# add syslog variables provided by klogd/syslog-service -# %{remove_and_set -n syslog RSYSLOGD_NATIVE_VERSION} -%{fillup_and_insserv -ny syslog syslog} -# -# add RSYSLOGD_* variables if needed -# %{fillup_only -ns syslog rsyslog} # +# # check if daemon configured in SYSLOG_DAEMON is installed # and switch to ourself if it's missed # @@ -536,12 +525,16 @@ additional_sockets="%{additional_sockets}" mkdir -p -m750 ${additional_sockets%/*} touch "${additional_sockets#/}" chmod 640 "${additional_sockets#/}" +# +# Enable the rsyslogservice to be started by systemd +# +%service_add_post rsyslog.service %preun # # stop the rsyslogd daemon when it is running # -%{stop_on_removal syslog} +%service_del_preun rsyslog.service %postun # @@ -565,7 +558,7 @@ fi # # cleanup init scripts # -%{insserv_cleanup} +%service_del_postun rsyslog.service %files %defattr(-,root,root) @@ -617,6 +610,7 @@ fi %doc %{rsyslogdocdir}/COPYING.LESSER %dir %{_localstatedir}/spool/rsyslog /var/adm/fillup-templates/sysconfig.syslog-rsyslog +%{_unitdir}/rsyslog.service %files doc %defattr(-,root,root) From 1bc12963fac59d137bd6698e418dd841932f26e6c90cea049c2bb7d6ec9382af Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Fri, 9 Nov 2012 13:40:18 +0000 Subject: [PATCH 2/9] Accepting request 140744 from home:mtomaschewski:branches:Base:System fixes / cleanups OBS-URL: https://build.opensuse.org/request/show/140744 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=109 --- rsyslog-5.8.11-systemd.patch | 12 -- rsyslog-service-prepare.in | 46 ++++++ rsyslog.changes | 11 ++ rsyslog.service.in.in | 17 +++ rsyslog.spec | 265 ++++++++++++++++------------------- 5 files changed, 195 insertions(+), 156 deletions(-) delete mode 100644 rsyslog-5.8.11-systemd.patch create mode 100644 rsyslog-service-prepare.in create mode 100644 rsyslog.service.in.in diff --git a/rsyslog-5.8.11-systemd.patch b/rsyslog-5.8.11-systemd.patch deleted file mode 100644 index 38a48d1..0000000 --- a/rsyslog-5.8.11-systemd.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- rsyslog-7.2.1/rsyslog.service.in 2012-10-22 12:44:43.000000000 +0200 -+++ new/rsyslog.service.in 2012-11-06 13:59:17.065706770 +0100 -@@ -2,7 +2,8 @@ - Description=System Logging Service - - [Service] --ExecStart=@sbindir@/rsyslogd -n -+EnvironmentFile=-/etc/sysconfig/rsyslog -+ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS - Sockets=syslog.socket - StandardOutput=null - diff --git a/rsyslog-service-prepare.in b/rsyslog-service-prepare.in new file mode 100644 index 0000000..99f7999 --- /dev/null +++ b/rsyslog-service-prepare.in @@ -0,0 +1,46 @@ +#!/bin/sh + +test -s "/etc/sysconfig/syslog" && \ + . "/etc/sysconfig/syslog" + +run_dir="RUN_DIR" +cfg_file="ADDITIONAL_SOCKETS" +env_file="SERVICE_ENV_PARAMS" + +umask 0022 +/bin/mkdir -p -m 0755 "${run_dir}" + +# +# Prepare include with sockets in chroot's +# +> "${cfg_file}" +for variable in ${!SYSLOGD_ADDITIONAL_SOCKET*}; do + eval value=\$$variable + test -z "$value" && continue + test -d "${value%/*}" || continue + echo "\$AddUnixListenSocket $value" +done >> "${cfg_file}" + +# +# make sure xconsole exists and is a pipe +# +if test -e /dev/xconsole -a ! -p /dev/xconsole ; then + /bin/rm -f /dev/xconsole +fi +if test ! -e /dev/xconsole ; then + /bin/mknod -m 0600 /dev/xconsole p + /bin/chown root:tty /dev/xconsole +fi + +# +# Construct rsyslog.service start parameters +# +compat="${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}}" +params="${compat:+-c ${compat}}${RSYSLOGD_PARAMS:+ ${RSYSLOGD_PARAMS}}" +{ + echo "RSYSLOGD_PARAMS=\"${params}\"" + echo "SYSLOG_DAEMON=\"rsyslogd\"" +} > "${env_file}" + +exit 0 + diff --git a/rsyslog.changes b/rsyslog.changes index 52746bb..d790ea6 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Nov 9 13:38:35 UTC 2012 - mt@suse.com + +- Readded things removed in previous change, that is compat version + and params variable use, generation of additional (chroot) log + sockets include file, xconsole handling in rsyslog.service. +- Fixed liblognorm conditional build flag dependencies, removed all + suse version dependencies. +- Changed to install in /usr/sbin, compatibility link in /sbin. +- Added klogd to build conflicts to resolve build service deps + ------------------------------------------------------------------- Tue Nov 6 12:36:54 UTC 2012 - tittiatcoke@gmail.com diff --git a/rsyslog.service.in.in b/rsyslog.service.in.in new file mode 100644 index 0000000..c1350bb --- /dev/null +++ b/rsyslog.service.in.in @@ -0,0 +1,17 @@ +[Unit] +Description=System Logging Service +Requires=var-run.mount syslog.target +After=var-run.mount +Before=syslog.target +Conflicts=syslog-ng.service syslogd.service + +[Service] +ExecStartPre=@sbindir@/rsyslog-service-prepare +EnvironmentFile=-SERVICE_ENV_PARAMS +ExecStart=@sbindir@/rsyslogd -n ${RSYSLOGD_PARAMS} +Sockets=syslog.socket +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=syslog.service diff --git a/rsyslog.spec b/rsyslog.spec index a439fea..00c5c19 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -22,57 +22,45 @@ License: (GPL-3.0+ and Apache-2.0) Group: System/Daemons Version: 7.2.1 Release: 0 -# for setting those bcond_with* configs see -# http://lizards.opensuse.org/2008/09/12/conditional-features-aka-use-flags/ -%if 0%{?suse_version} >= 1140 -%bcond_without dbi -%else -%bcond_with dbi -%endif -%if 0%{?suse_version} >= 1140 -%bcond_without systemd -%else -%bcond_with systemd -%endif -%if 0%{?suse_version} >= 1210 -%bcond_without syslogservice -%else -%bcond_with syslogservice -%endif -%if 0%{?suse_version} >= 1130 -%bcond_without relp -%else -%bcond_with relp -%endif -%if 0%{?suse_version} >= 1130 -%bcond_without mmnormalize -%else -%bcond_with mmnormalize -%endif %bcond_without gssapi %bcond_without gnutls +%bcond_without dbi %bcond_without mysql %bcond_without pgsql +%bcond_without relp %bcond_without snmp +%bcond_without udpspoof +%bcond_without diagtools +%bcond_without mmnormalize %define upstream_version %{version} -%define _sbindir /sbin %define rsyslogdocdir %{_docdir}/%{name} -%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf -%define _libdir /%_lib +%define rsyslog_rundir %{_localstatedir}/run/rsyslog +%define rsyslog_service_env %{rsyslog_rundir}/rsyslogd.env +%define rsyslog_sockets_cfg %{rsyslog_rundir}/additional-log-sockets.conf %define rsyslog_module_dir_nodeps %{_libdir}/rsyslog/ -%define rsyslog_module_dir_withdeps %{_prefix}/%{_lib}/rsyslog/ +%define rsyslog_module_dir_withdeps %{_libdir}/rsyslog/ Url: http://www.rsyslog.com/ Provides: syslog +Provides: sysvinit(syslog) Conflicts: otherproviders(syslog) +BuildConflicts: klogd BuildRequires: dos2unix BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig +BuildRequires: syslog-service BuildRequires: zlib-devel -# +%{?systemd_requires} %if %{with gssapi} BuildRequires: krb5-devel %endif +%if %{with gnutls} +BuildRequires: libgcrypt-devel +BuildRequires: libgnutls-devel +%endif +%if %{with dbi} +BuildRequires: libdbi-devel +%endif %if %{with mysql} BuildRequires: mysql-devel %endif @@ -82,54 +70,32 @@ BuildRequires: net-snmp-devel %if %{with pgsql} BuildRequires: postgresql-devel %endif -%if %{with gnutls} -BuildRequires: libgcrypt-devel -BuildRequires: libgnutls-devel -%endif -%if %{with dbi} -BuildRequires: libdbi-devel -%endif %if %{with relp} # RELP support BuildRequires: librelp-devel %endif +%if %{with udpspoof} +# UDP spoof support +BuildRequires: libnet-devel +%endif %if %{with mmnormalize} # mmnormalize support BuildRequires: liblognorm-devel %endif -# UDP spoof support -%if 0%{?suse_version} >= 1140 -BuildRequires: libnet-devel -%else -BuildRequires: libnet -%endif -%if %{with systemd} -# The systemd package provides -# /usr/share/doc/packages/systemd/sd-daemon.[ch] -# files instead of a lib ... See also bug 656259. -%if 0%{?suse_version} > 1140 -BuildRequires: systemd-devel -%else -BuildRequires: systemd -%endif -%endif +# mmjsonparse needs liblognorm, +# but json check is unconditional BuildRequires: pkgconfig(json) >= 0.9 BuildRequires: pkgconfig(libee) >= 0.4.0 BuildRequires: pkgconfig(libestr) >= 0.1.2 +BuildRequires: pkgconfig(systemd) BuildRequires: pkgconfig(uuid) >= 2.21.0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{upstream_version}.tar.gz Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source4: rsyslog.d.remote.conf.in -# FIX-OPENSUSE Adjust service file to work correctly. Based on a fedora patch - tittiatcoke@gmail.com -Patch1: rsyslog-5.8.11-systemd.patch -%if 0%{?suse_version} >= 1220 -# This provide is purely to be used for the 12.3 Milestones. -Obsoletes: syslog-service -Provides: sysvinit(syslog) -%endif -%{?systemd_requires} +Source5: rsyslog-service-prepare.in +Source6: rsyslog.service.in.in %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, @@ -151,6 +117,8 @@ package. This package provides additional documentation for rsyslog. +%if %{with diagtools} + %package diag-tools Requires: %{name} = %{version} Summary: Diagnostic tools @@ -163,6 +131,8 @@ package. This package provides additional diagnostic tools (small helpers, usually not needed). +%endif + %if %{with gssapi} %package module-gssapi @@ -176,6 +146,7 @@ package. This module provides the support to receive syslog messages from the network protected via Kerberos 5 encryption and authentication. + %endif %if %{with mysql} @@ -191,6 +162,7 @@ package. This package provides a module with the support for logging into MySQL databases. + %endif %if %{with pgsql} @@ -205,6 +177,7 @@ Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog package. This module provides the support for logging into PostgreSQL databases. + %endif %if %{with dbi} @@ -220,6 +193,7 @@ package. This package provides a module with the support for logging into DBI supported databases. + %endif %if %{with snmp} @@ -235,6 +209,7 @@ package. This module provides the ability to send syslog messages as an SNMPv1 & v2c traps. + %endif %if %{with gnutls} @@ -282,6 +257,8 @@ This module provides log normalizing support. %endif +%if %{with udpspoof} + %package module-udpspoof Requires: %{name} = %{version} Summary: UDP spoof support module for syslog @@ -293,24 +270,21 @@ package. This module provides a UDP forwarder that allows changing the sender address. +%endif + %prep %setup -q -n %{name}-%{upstream_version} -%patch1 -p1 -%if %{with systemd} -%if 0%{?suse_version} <= 1140 -# Bug: https://bugzilla.novell.com/show_bug.cgi?id=656259 -# install the files systemd provides rather than what we provide. -# On newer systems, systemd-devel provides them. -cp -a /usr/share/doc/packages/systemd/sd-daemon.[ch] runtime/ -%endif -%endif +for file in rsyslog-service-prepare rsyslog.service.in ; do + sed \ + -e 's;RUN_DIR;%{rsyslog_rundir};g' \ + -e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \ + -e 's;SERVICE_ENV_PARAMS;%{rsyslog_service_env};g' \ + "%{_sourcedir}/${file}.in" > "${file}" +done dos2unix doc/*.html %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../../grammar" -%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030 - export CFLAGS="$CFLAGS -fstack-protector" -%endif # needs liblogging # --enable-rfc3195 \ # needs java @@ -325,30 +299,28 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../.. --enable-klog \ --enable-kmsg \ --enable-inet \ + --enable-rsyslogd \ %if %{with gnutls} --enable-gnutls \ %endif - --enable-rsyslogd \ %if %{with gssapi} --enable-gssapi-krb5 \ %endif +%if %{with dbi} + --enable-libdbi \ +%endif %if %{with mysql} --enable-mysql \ %endif %if %{with pgsql} --enable-pgsql \ %endif -%if %{with dbi} - --enable-libdbi \ -%endif %if %{with relp} --enable-relp \ %endif -%if %{with mmnormalize} - --enable-mmnormalize \ -%endif %if %{with snmp} --enable-snmp \ + --enable-mmsnmptrapd \ %endif --enable-mail \ --enable-imfile \ @@ -356,18 +328,24 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../.. --enable-impstats \ --enable-omprog \ --enable-omuxsock \ +%if %{with udpspoof} --enable-omudpspoof \ +%endif --enable-omstdout \ --enable-pmlastmsg \ - --enable-diagtools \ --enable-pmcisconames \ --enable-pmaixforwardedfrom \ --enable-pmsnare \ --enable-pmrfc3164sd \ --enable-omruleset \ - --enable-mmsnmptrapd \ +%if %{with mmnormalize} + --enable-mmnormalize \ --enable-mmjsonparse \ --enable-mmaudit \ +%endif +%if %{with diagtools} + --enable-diagtools \ +%endif --disable-static make %{?_smp_mflags:%{_smp_mflags}} V=1 @@ -380,35 +358,45 @@ rm -f %{buildroot}%{rsyslog_module_dir_nodeps}/*.la # move all modules linking libraries in /usr to /usr/lib[64] # the user has to specify them with full path then... install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps} -for mod in \ +if test "%{rsyslog_module_dir_nodeps}" != "%{rsyslog_module_dir_withdeps}" ; then + for mod in \ +%if %{with gnutls} + lmnsd_gtls.so \ +%endif %if %{with gssapi} - omgssapi.so imgssapi.so lmgssutil.so \ -%endif -%if %{with mysql} - ommysql.so \ -%endif -%if %{with pgsql} - ompgsql.so \ -%endif -%if %{with snmp} - omsnmp.so \ + omgssapi.so imgssapi.so lmgssutil.so \ %endif %if %{with dbi} - omlibdbi.so \ + omlibdbi.so \ +%endif +%if %{with mysql} + ommysql.so \ +%endif +%if %{with pgsql} + ompgsql.so \ %endif %if %{with relp} - imrelp.so omrelp.so \ + imrelp.so omrelp.so \ +%endif +%if %{with snmp} + omsnmp.so \ %endif %if %{with mmnormalize} - mmnormalize.so \ + mmnormalize.so \ + mmjsonparse.so \ + mmaudit.so \ %endif -%if %{with gnutls} - lmnsd_gtls.so \ -%endif -; do - mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \ - %{buildroot}%{rsyslog_module_dir_withdeps} -done + ; do + mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \ + %{buildroot}%{rsyslog_module_dir_withdeps} + done +fi +if test "%{_sbindir}" != "/sbin" ; then + install -d -m0755 %{buildroot}/sbin + ln -sf %{_sbindir}/rsyslogd $RPM_BUILD_ROOT/sbin/rsyslogd +fi +# +install -m755 rsyslog-service-prepare %{buildroot}%{_sbindir}/ # install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog @@ -418,7 +406,7 @@ for file in rsyslog.conf rsyslog.d.remote.conf ; do %ifarch s390 s390x -e 's;tty10;console;g' \ %endif - -e 's;ADDITIONAL_SOCKETS;%{additional_sockets};g' \ + -e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \ -e 's;ETC_RSYSLOG_CONF;%{_sysconfdir}/rsyslog.conf;g' \ -e 's;ETC_RSYSLOG_D_DIR;%{_sysconfdir}/rsyslog.d;g' \ -e 's;ETC_RSYSLOG_D_GLOB;%{_sysconfdir}/rsyslog.d/*.conf;g' \ @@ -444,6 +432,7 @@ install -d -m0755 %{buildroot}%{rsyslogdocdir}/ find ChangeLog README AUTHORS COPYING COPYING.LESSER rsyslog.conf doc \ \( -type d -exec install -m755 -d %{buildroot}%{rsyslogdocdir}/\{\} \; \) \ -o \( -type f -exec install -m644 \{\} %{buildroot}%{rsyslogdocdir}/\{\} \; \) +# %if %{with mysql} install -m644 plugins/ommysql/createDB.sql \ %{buildroot}%{rsyslogdocdir}/mysql-createDB.sql @@ -466,26 +455,17 @@ fi # update linker caches # /sbin/ldconfig +# +# remove obsolete variables +# +%{remove_and_set -n syslog SYSLOG_DAEMON} +%{remove_and_set -n syslog SYSLOG_REQUIRES_NETWORK} %{remove_and_set -n syslog RSYSLOGD_NATIVE_VERSION} +# +# add RSYSLOGD_* variables +# %{fillup_only -ns syslog rsyslog} # -# -# check if daemon configured in SYSLOG_DAEMON is installed -# and switch to ourself if it's missed -# -source etc/sysconfig/syslog -replace_syslog=no -if test "$SYSLOG_DAEMON" != "rsyslogd" ; then - if test -z "$SYSLOG_DAEMON" || \ - test ! -x sbin/${SYSLOG_DAEMON} ; then - replace_syslog=yes - fi -fi -if test "$replace_syslog" = "yes" ; then - sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="rsyslogd"/g' \ - etc/sysconfig/syslog -fi -# # Do not use multiple facilities with the same priority pattern. # It causes start failure since rsyslog-6.4.x (bnc#780607). # @@ -521,10 +501,11 @@ touch var/log/NetworkManager; chmod 640 var/log/NetworkManager # # touch the additional log sockets config file # -additional_sockets="%{additional_sockets}" -mkdir -p -m750 ${additional_sockets%/*} -touch "${additional_sockets#/}" -chmod 640 "${additional_sockets#/}" +mkdir -p -m750 ".%{rsyslog_rundir}" +touch ".%{rsyslog_sockets_cfg}" +chmod 640 ".%{rsyslog_sockets_cfg}" +touch ".%{rsyslog_service_env}" +chmod 640 ".%{rsyslog_service_env}" # # Enable the rsyslogservice to be started by systemd # @@ -542,20 +523,6 @@ chmod 640 "${additional_sockets#/}" # /sbin/ldconfig # -# reset SYSLOG_DAEMON variable -# -if test -f etc/sysconfig/syslog ; then - source etc/sysconfig/syslog - if test "$SYSLOG_DAEMON" == "rsyslogd" ; then - sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \ - etc/sysconfig/syslog - fi -fi -# -# stop the rsyslogd daemon when it is running -# -%{restart_on_update syslog} -# # cleanup init scripts # %service_del_postun rsyslog.service @@ -566,6 +533,9 @@ fi %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.conf %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf %{_sbindir}/rsyslogd +%if "%{_sbindir}" != "/sbin" +/sbin/rsyslogd +%endif %dir %{rsyslog_module_dir_nodeps} %{rsyslog_module_dir_nodeps}/imfile.so %{rsyslog_module_dir_nodeps}/imklog.so @@ -591,9 +561,6 @@ fi %{rsyslog_module_dir_nodeps}/omuxsock.so %{rsyslog_module_dir_nodeps}/pmlastmsg.so %{rsyslog_module_dir_nodeps}/impstats.so -%{rsyslog_module_dir_nodeps}/mmaudit.so -%{rsyslog_module_dir_nodeps}/mmjsonparse.so -%{rsyslog_module_dir_nodeps}/mmsnmptrapd.so %{rsyslog_module_dir_nodeps}/pmaixforwardedfrom.so %{rsyslog_module_dir_nodeps}/pmcisconames.so %{rsyslog_module_dir_nodeps}/pmrfc3164sd.so @@ -610,6 +577,7 @@ fi %doc %{rsyslogdocdir}/COPYING.LESSER %dir %{_localstatedir}/spool/rsyslog /var/adm/fillup-templates/sysconfig.syslog-rsyslog +%{_sbindir}/rsyslog-service-prepare %{_unitdir}/rsyslog.service %files doc @@ -617,11 +585,14 @@ fi %dir %{rsyslogdocdir} %doc %{rsyslogdocdir}/doc +%if %{with diagtools} + %files diag-tools %defattr(-,root,root) %{_sbindir}/msggen %{_sbindir}/rsyslog_diag_hostname %{_sbindir}/zpipe +%endif %if %{with gssapi} @@ -660,6 +631,7 @@ fi %files module-snmp %defattr(-,root,root) %{rsyslog_module_dir_withdeps}/omsnmp.so +%{rsyslog_module_dir_nodeps}/mmsnmptrapd.so %endif %if %{with gnutls} @@ -682,10 +654,15 @@ fi %files module-mmnormalize %defattr(-,root,root) %{rsyslog_module_dir_withdeps}/mmnormalize.so +%{rsyslog_module_dir_withdeps}/mmjsonparse.so +%{rsyslog_module_dir_withdeps}/mmaudit.so %endif +%if %{with udpspoof} + %files module-udpspoof %defattr(-,root,root) %{rsyslog_module_dir_nodeps}/omudpspoof.so +%endif %changelog From 91184410a6e6974e421a6abc420d2728ae6f627374a5624bc9be99498290dc4f Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Fri, 9 Nov 2012 15:09:21 +0000 Subject: [PATCH 3/9] cleaned up some test stuff OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=110 --- rsyslog-service-prepare.in | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rsyslog-service-prepare.in b/rsyslog-service-prepare.in index 99f7999..ba04941 100644 --- a/rsyslog-service-prepare.in +++ b/rsyslog-service-prepare.in @@ -37,10 +37,7 @@ fi # compat="${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}}" params="${compat:+-c ${compat}}${RSYSLOGD_PARAMS:+ ${RSYSLOGD_PARAMS}}" -{ - echo "RSYSLOGD_PARAMS=\"${params}\"" - echo "SYSLOG_DAEMON=\"rsyslogd\"" -} > "${env_file}" +echo "RSYSLOGD_PARAMS=\"${params}\"" > "${env_file}" exit 0 From 3cff378c594915d9bf9303b524c0c9c76336f49a0d8e214923213210e3a9f1e8 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Fri, 9 Nov 2012 15:22:10 +0000 Subject: [PATCH 4/9] Fixed to prerequire syslog-service(-base) OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=111 --- rsyslog.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rsyslog.spec b/rsyslog.spec index 00c5c19..597e82d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -43,6 +43,7 @@ Url: http://www.rsyslog.com/ Provides: syslog Provides: sysvinit(syslog) Conflicts: otherproviders(syslog) +Requires(prereq): syslog-service BuildConflicts: klogd BuildRequires: dos2unix BuildRequires: openssl-devel From b8fcf9826cdc14ca314aa05287819c6fc6697a24aa3d48fd7994a9d22d891280 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 13 Nov 2012 08:13:03 +0000 Subject: [PATCH 5/9] Accepting request 141068 from home:mtomaschewski:syslog - Removed handling of the -c option which is obsolete in rsyslog-7.x. - Fixed build requires / deps to work on 12.x and SLE-11-SP2. - Initialized RSYSLOG_PARAMS env variable in service file. - Marked additional log socket config as ghost. OBS-URL: https://build.opensuse.org/request/show/141068 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=112 --- rsyslog-service-prepare.in | 8 --- rsyslog.changes | 9 +++ rsyslog.service.in.in | 3 +- rsyslog.spec | 129 ++++++++++++++++++++++++++++++------- rsyslog.sysconfig | 32 --------- 5 files changed, 116 insertions(+), 65 deletions(-) diff --git a/rsyslog-service-prepare.in b/rsyslog-service-prepare.in index ba04941..4577f9f 100644 --- a/rsyslog-service-prepare.in +++ b/rsyslog-service-prepare.in @@ -5,7 +5,6 @@ test -s "/etc/sysconfig/syslog" && \ run_dir="RUN_DIR" cfg_file="ADDITIONAL_SOCKETS" -env_file="SERVICE_ENV_PARAMS" umask 0022 /bin/mkdir -p -m 0755 "${run_dir}" @@ -32,12 +31,5 @@ if test ! -e /dev/xconsole ; then /bin/chown root:tty /dev/xconsole fi -# -# Construct rsyslog.service start parameters -# -compat="${RSYSLOGD_COMPAT_VERSION:-${RSYSLOGD_NATIVE_VERSION}}" -params="${compat:+-c ${compat}}${RSYSLOGD_PARAMS:+ ${RSYSLOGD_PARAMS}}" -echo "RSYSLOGD_PARAMS=\"${params}\"" > "${env_file}" - exit 0 diff --git a/rsyslog.changes b/rsyslog.changes index d790ea6..938f666 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Nov 12 17:21:43 UTC 2012 - mt@suse.com + +- Removed handling of the -c option which is + obsolete in rsyslog-7.x. +- Fixed build requires / deps to work on 12.x and SLE-11-SP2. +- Initialized RSYSLOG_PARAMS env variable in service file. +- Marked additional log socket config as ghost. + ------------------------------------------------------------------- Fri Nov 9 13:38:35 UTC 2012 - mt@suse.com diff --git a/rsyslog.service.in.in b/rsyslog.service.in.in index c1350bb..1e6e3c0 100644 --- a/rsyslog.service.in.in +++ b/rsyslog.service.in.in @@ -6,8 +6,9 @@ Before=syslog.target Conflicts=syslog-ng.service syslogd.service [Service] +Environment=RSYSLOGD_PARAMS= ExecStartPre=@sbindir@/rsyslog-service-prepare -EnvironmentFile=-SERVICE_ENV_PARAMS +EnvironmentFile=-/etc/sysconfig/syslog ExecStart=@sbindir@/rsyslogd -n ${RSYSLOGD_PARAMS} Sockets=syslog.socket StandardOutput=null diff --git a/rsyslog.spec b/rsyslog.spec index 597e82d..9b87888 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -22,36 +22,55 @@ License: (GPL-3.0+ and Apache-2.0) Group: System/Daemons Version: 7.2.1 Release: 0 +%if 0%{?suse_version} >= 1210 +%bcond_without systemd +%bcond_without udpspoof +%bcond_without dbi +%else +%bcond_with systemd +%bcond_with udpspoof +%bcond_with dbi +%endif +%if 0%{?suse_version} >= 1230 +%bcond_with systemv +%else +%bcond_without systemv +%endif %bcond_without gssapi %bcond_without gnutls -%bcond_without dbi %bcond_without mysql %bcond_without pgsql %bcond_without relp %bcond_without snmp -%bcond_without udpspoof %bcond_without diagtools %bcond_without mmnormalize %define upstream_version %{version} %define rsyslogdocdir %{_docdir}/%{name} %define rsyslog_rundir %{_localstatedir}/run/rsyslog -%define rsyslog_service_env %{rsyslog_rundir}/rsyslogd.env %define rsyslog_sockets_cfg %{rsyslog_rundir}/additional-log-sockets.conf %define rsyslog_module_dir_nodeps %{_libdir}/rsyslog/ %define rsyslog_module_dir_withdeps %{_libdir}/rsyslog/ Url: http://www.rsyslog.com/ +%if %{with systemd} Provides: syslog Provides: sysvinit(syslog) Conflicts: otherproviders(syslog) -Requires(prereq): syslog-service -BuildConflicts: klogd +Requires(pre): syslog-service +Requires(pre): %fillup_prereq +%if %{with systemv} +Requires(pre): %insserv_prereq +%endif +%{?systemd_requires} +BuildRequires: pkgconfig(systemd) +%else +Requires(pre): %insserv_prereq %fillup_prereq /etc/init.d/syslog +BuildRequires: klogd +%endif BuildRequires: dos2unix BuildRequires: openssl-devel BuildRequires: pcre-devel BuildRequires: pkgconfig -BuildRequires: syslog-service BuildRequires: zlib-devel -%{?systemd_requires} %if %{with gssapi} BuildRequires: krb5-devel %endif @@ -85,11 +104,24 @@ BuildRequires: liblognorm-devel %endif # mmjsonparse needs liblognorm, # but json check is unconditional +%if 0%{?suse_version} >= 1210 BuildRequires: pkgconfig(json) >= 0.9 BuildRequires: pkgconfig(libee) >= 0.4.0 BuildRequires: pkgconfig(libestr) >= 0.1.2 -BuildRequires: pkgconfig(systemd) +%else +BuildRequires: libee-devel +BuildRequires: libestr-devel +BuildRequires: libjson-devel +%endif +%if 0%{?suse_version} >= 1220 BuildRequires: pkgconfig(uuid) >= 2.21.0 +%else +BuildRequires: libuuid-devel +%endif +%if %{with systemd} +%{?systemd_requires} +BuildRequires: pkgconfig(systemd) +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{upstream_version}.tar.gz Source1: rsyslog.sysconfig @@ -275,13 +307,14 @@ This module provides a UDP forwarder that allows changing the sender address. %prep %setup -q -n %{name}-%{upstream_version} +%if %{with systemd} for file in rsyslog-service-prepare rsyslog.service.in ; do sed \ -e 's;RUN_DIR;%{rsyslog_rundir};g' \ -e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \ - -e 's;SERVICE_ENV_PARAMS;%{rsyslog_service_env};g' \ "%{_sourcedir}/${file}.in" > "${file}" done +%endif dos2unix doc/*.html %build @@ -397,7 +430,13 @@ if test "%{_sbindir}" != "/sbin" ; then ln -sf %{_sbindir}/rsyslogd $RPM_BUILD_ROOT/sbin/rsyslogd fi # +%if %{with systemd} && ! %{with systemv} install -m755 rsyslog-service-prepare %{buildroot}%{_sbindir}/ +%else +if test -e %{buildroot}%{_unitdir}/rsyslog.service ; then + rm -f %{buildroot}%{_unitdir}/rsyslog.service +fi +%endif # install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog @@ -420,12 +459,7 @@ install -m0600 rsyslog.d.remote.conf.$$ \ %{buildroot}%{_sysconfdir}/rsyslog.d/remote.conf # install -d -m0755 %{buildroot}/var/adm/fillup-templates -# native version for the '-c ' parameter -rsyslogd_version=%{version} -rsyslogd_version=${rsyslogd_version//.*/} -sed -e "s/@RSYSLOGD_VERSION@/${rsyslogd_version}/g" \ - < %{_sourcedir}/rsyslog.sysconfig > rsyslog.sysconfig -install -m0600 rsyslog.sysconfig \ +install -m0600 %{_sourcedir}/rsyslog.sysconfig \ %{buildroot}/var/adm/fillup-templates/sysconfig.syslog-rsyslog # rm -f doc/Makefile* @@ -442,14 +476,22 @@ install -m644 plugins/ommysql/createDB.sql \ install -m644 plugins/ompgsql/createDB.sql \ %{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql %endif +# create ghosts +install -d -m0755 %{buildroot}%{rsyslog_rundir} +touch %{buildroot}%{rsyslog_sockets_cfg} +chmod 644 %{buildroot}%{rsyslog_sockets_cfg} %clean if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then rm -rf "%{buildroot}" fi +%if %{with systemd} && ! %{with systemv} + %pre -%service_add_pre rsyslog.service +%{service_add_pre rsyslog.service} + +%endif %post # @@ -459,13 +501,25 @@ fi # # remove obsolete variables # -%{remove_and_set -n syslog SYSLOG_DAEMON} -%{remove_and_set -n syslog SYSLOG_REQUIRES_NETWORK} -%{remove_and_set -n syslog RSYSLOGD_NATIVE_VERSION} +%{remove_and_set -n syslog SYSLOG_DAEMON SYSLOG_REQUIRES_NETWORK} +%{remove_and_set -n syslog RSYSLOGD_COMPAT_VERSION RSYSLOGD_NATIVE_VERSION} +%if %{with systemv} +%{fillup_and_insserv -ny syslog syslog} +%endif # # add RSYSLOGD_* variables # %{fillup_only -ns syslog rsyslog} +%if %{with systemv} +# +# switch SYSLOG_DAEMON to outself +# +if test -f etc/sysconfig/syslog ; then + sed -i \ + -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="rsyslogd"/g' \ + etc/sysconfig/syslog +fi +%endif # # Do not use multiple facilities with the same priority pattern. # It causes start failure since rsyslog-6.4.x (bnc#780607). @@ -505,28 +559,51 @@ touch var/log/NetworkManager; chmod 640 var/log/NetworkManager mkdir -p -m750 ".%{rsyslog_rundir}" touch ".%{rsyslog_sockets_cfg}" chmod 640 ".%{rsyslog_sockets_cfg}" -touch ".%{rsyslog_service_env}" -chmod 640 ".%{rsyslog_service_env}" # # Enable the rsyslogservice to be started by systemd # -%service_add_post rsyslog.service +%if %{with systemd} && ! %{with systemv} +%{service_add_post rsyslog.service} +%endif %preun # # stop the rsyslogd daemon when it is running # -%service_del_preun rsyslog.service +%if %{with systemd} && ! %{with systemv} +%{service_del_preun rsyslog.service} +%else +%{stop_on_removal syslog} +# +# reset SYSLOG_DAEMON variable on removal +# +if test "$1" = "0" -a -f etc/sysconfig/syslog ; then + sed -i \ + -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \ + etc/sysconfig/syslog +fi +%endif %postun # # update linker caches # /sbin/ldconfig +%if %{with systemd} && ! %{with systemv} # # cleanup init scripts # -%service_del_postun rsyslog.service +%{service_del_postun rsyslog.service} +%else +# +# stop the rsyslogd daemon when it is running +# +%{restart_on_update syslog} +# +# cleanup init scripts +# +%{insserv_cleanup} +%endif %files %defattr(-,root,root) @@ -578,8 +655,12 @@ chmod 640 ".%{rsyslog_service_env}" %doc %{rsyslogdocdir}/COPYING.LESSER %dir %{_localstatedir}/spool/rsyslog /var/adm/fillup-templates/sysconfig.syslog-rsyslog +%attr(0755,root,root) %dir %ghost %{rsyslog_rundir} +%attr(0644,root,root) %ghost %{rsyslog_sockets_cfg} +%if %{with systemd} && ! %{with systemv} %{_sbindir}/rsyslog-service-prepare %{_unitdir}/rsyslog.service +%endif %files doc %defattr(-,root,root) diff --git a/rsyslog.sysconfig b/rsyslog.sysconfig index bec2e45..b41a28b 100644 --- a/rsyslog.sysconfig +++ b/rsyslog.sysconfig @@ -1,35 +1,3 @@ - -## Type: list(@RSYSLOGD_VERSION@) -## Default: "@RSYSLOGD_VERSION@" -## Config: "" -## ServiceRestart: syslog -# -# The native version compatibility level of the current rsyslogd. -# -# Note, that this variable is read-only -- please do not change it! -# Instead, please adopt the RSYSLOGD_COMPAT_VERSION variable. -# -# This variable will be updated while every installation/upgrade of -# the rsyslog daemon package. -# -RSYSLOGD_NATIVE_VERSION="@RSYSLOGD_VERSION@" - -## Type: integer(0:@RSYSLOGD_VERSION@) -## Default: "" -## Config: "" -## ServiceRestart: syslog -# -# Version compatibility level to run rsyslogd with (-c parameter). -# Set to the desired version number rsyslogd shall be compatible with. -# -# Default is to run in native mode if the currently installed rsyslog -# daemon version. -# -# Note: Changes to this variable may need adoption of the config file -# or break features used in the /etc/init.d/syslog script by default. -# -RSYSLOGD_COMPAT_VERSION="" - ## Type: string ## Default: "" ## Config: "" From 2d59f0a5c2f2c146525fc5e2ab1f093c71c2382a7d333e589e74d202934b77ac Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 13 Nov 2012 11:51:39 +0000 Subject: [PATCH 6/9] - imuxsock: do not log EAGAIN in nonblocking recvfrom (bnc#734672) OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=113 --- ...t-log-EAGAIN-in-nonblocking-recvfrom.patch | 25 +++++++++++++++++++ rsyslog.changes | 5 ++++ rsyslog.spec | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch diff --git a/0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch b/0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch new file mode 100644 index 0000000..8f2ae3e --- /dev/null +++ b/0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch @@ -0,0 +1,25 @@ +From 5dc3ad821532ad5132c151c4737a27a6e6c7aea1 Mon Sep 17 00:00:00 2001 +From: Marius Tomaschewski +Date: Tue, 13 Nov 2012 11:26:39 +0100 +Subject: [PATCH] imuxsock: do not log EAGAIN in nonblocking recvfrom + +--- + plugins/imuxsock/imuxsock.c | 2 +- + 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) + +diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c +index d5e4bb3..e0ba7dd 100644 +--- a/plugins/imuxsock/imuxsock.c ++++ b/plugins/imuxsock/imuxsock.c +@@ -1059,7 +1059,7 @@ static rsRetVal readSocket(lstn_t *pLstn) + } + } + CHKiRet(SubmitMsg(pRcv, iRcvd, pLstn, cred, ts)); +- } else if(iRcvd < 0 && errno != EINTR) { ++ } else if(iRcvd < 0 && errno != EINTR && errno != EAGAIN) { + char errStr[1024]; + rs_strerror_r(errno, errStr, sizeof(errStr)); + DBGPRINTF("UNIX socket error: %d = %s.\n", errno, errStr); +-- +1.7.10.4 + diff --git a/rsyslog.changes b/rsyslog.changes index 938f666..a3275f6 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Nov 13 10:31:24 UTC 2012 - mt@suse.com + +- imuxsock: do not log EAGAIN in nonblocking recvfrom (bnc#734672) + ------------------------------------------------------------------- Mon Nov 12 17:21:43 UTC 2012 - mt@suse.com diff --git a/rsyslog.spec b/rsyslog.spec index 9b87888..ac487db 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -129,6 +129,7 @@ Source2: rsyslog.conf.in Source4: rsyslog.d.remote.conf.in Source5: rsyslog-service-prepare.in Source6: rsyslog.service.in.in +Patch1: 0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, @@ -307,6 +308,8 @@ This module provides a UDP forwarder that allows changing the sender address. %prep %setup -q -n %{name}-%{upstream_version} +%patch1 -p1 +# %if %{with systemd} for file in rsyslog-service-prepare rsyslog.service.in ; do sed \ From ea7279ef7f2f38d815af6e3ca63fc95b2becab2b20f015b218a3dfabbc0fc006 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 20 Nov 2012 12:23:33 +0000 Subject: [PATCH 7/9] Accepting request 142066 from home:mtomaschewski:syslog - Require syslog-service >= 2.0 on 12.3, otherwise < 2.0, which contain the /etc/init.d/syslog init script. OBS-URL: https://build.opensuse.org/request/show/142066 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=114 --- rsyslog.changes | 6 ++++++ rsyslog.spec | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rsyslog.changes b/rsyslog.changes index a3275f6..fa54b9d 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 20 11:44:16 UTC 2012 - mt@suse.com + +- Require syslog-service >= 2.0 on 12.3, otherwise < 2.0, which + contain the /etc/init.d/syslog init script. + ------------------------------------------------------------------- Tue Nov 13 10:31:24 UTC 2012 - mt@suse.com diff --git a/rsyslog.spec b/rsyslog.spec index ac487db..d2da09a 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -55,10 +55,13 @@ Url: http://www.rsyslog.com/ Provides: syslog Provides: sysvinit(syslog) Conflicts: otherproviders(syslog) -Requires(pre): syslog-service Requires(pre): %fillup_prereq %if %{with systemv} Requires(pre): %insserv_prereq +Requires(pre): syslog-service < 2.0 +Requires(pre): /etc/init.d/syslog +%else +Requires(pre): syslog-service >= 2.0 %endif %{?systemd_requires} BuildRequires: pkgconfig(systemd) From 86d58ec676b0234a56a494cbd0f79e38ab4bda2bed765d3b7e0085ab6d0b7a18 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Thu, 22 Nov 2012 14:30:54 +0000 Subject: [PATCH 8/9] - Update to 7.2.3 (v7-stable) a release providing important fixes - Merged also fixes for unreliable kernel timestamp regression (bnc#783967), which will be picked up in a later v7-stable OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=115 --- ...g-kernel-timestamp-parsing.bnc783967.patch | 392 ++++++++++++++++++ ...t-log-EAGAIN-in-nonblocking-recvfrom.patch | 25 -- rsyslog-7.2.1.tar.gz | 3 - rsyslog-7.2.3.tar.gz | 3 + rsyslog.changes | 75 ++++ rsyslog.spec | 4 +- 6 files changed, 472 insertions(+), 30 deletions(-) create mode 100644 0001-imklog-kernel-timestamp-parsing.bnc783967.patch delete mode 100644 0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch delete mode 100644 rsyslog-7.2.1.tar.gz create mode 100644 rsyslog-7.2.3.tar.gz diff --git a/0001-imklog-kernel-timestamp-parsing.bnc783967.patch b/0001-imklog-kernel-timestamp-parsing.bnc783967.patch new file mode 100644 index 0000000..30fb775 --- /dev/null +++ b/0001-imklog-kernel-timestamp-parsing.bnc783967.patch @@ -0,0 +1,392 @@ +From 4983890fa26a6c6443a1fec591c47956be8a5567 Mon Sep 17 00:00:00 2001 +From: Rainer Gerhards +Date: Wed, 17 Oct 2012 17:17:43 +0200 +Subject: [PATCH 1/5] imklog: add paramter "keepkerneltimestamp" + +Thanks to Marius Tomaschweski for the suggestion and a patch (for v5) +that this commit bases on. +--- + doc/imklog.html | 6 +++--- + plugins/imklog/bsd.c | 25 ++++++++++++------------- + plugins/imklog/imklog.c | 5 +++++ + plugins/imklog/imklog.h | 1 + + 4 Dateien geändert, 21 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-) + +diff --git a/doc/imklog.html b/doc/imklog.html +index 2e3b3bc..6ccdb5b 100644 +--- a/doc/imklog.html ++++ b/doc/imklog.html +@@ -1,8 +1,8 @@ + + +-Kernel Log Input Module (imklog) +- ++Kernel Log Input Module (imklog) + ++ + + back + +@@ -85,7 +85,7 @@ is needed to start pulling kernel messages.
+

This documentation is part of the + rsyslog + project.
+-Copyright © 2008-2009 by Rainer ++Copyright © 2008-2012 by Rainer + Gerhards and + Adiscon. + Released under the GNU GPL version 3 or higher.

+diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c +index d4f9f77..ad194b5 100644 +--- a/plugins/imklog/bsd.c ++++ b/plugins/imklog/bsd.c +@@ -58,9 +58,6 @@ static int fklog = -1; /* kernel log fd */ + #ifdef OS_LINUX + /* submit a message to imklog Syslog() API. In this function, we check if + * a kernel timestamp is present and, if so, extract and strip it. +- * Note: this is an extra processing step. We should revisit the whole +- * idea in v6 and remove all that old stuff that we do not longer need +- * (like symbol resolution). <-- TODO + * Note that this is heavily Linux specific and thus is not compiled or + * used for BSD. + * Special thanks to Lennart Poettering for suggesting on how to convert +@@ -73,7 +70,7 @@ static int fklog = -1; /* kernel log fd */ + * rgerhards, 2011-06-24 + */ + static void +-submitSyslog(int pri, uchar *buf) ++submitSyslog(modConfData_t *pModConf, int pri, uchar *buf) + { + long secs; + long nsecs; +@@ -119,8 +116,10 @@ submitSyslog(int pri, uchar *buf) + + /* we have a timestamp */ + DBGPRINTF("kernel timestamp is %ld %ld\n", secs, nsecs); +- bufsize= strlen((char*)buf); +- memmove(buf+3, buf+i, bufsize - i + 1); ++ if(!pModConf->bKeepKernelStamp) { ++ bufsize= strlen((char*)buf); ++ memmove(buf+3, buf+i, bufsize - i + 1); ++ } + + clock_gettime(CLOCK_MONOTONIC, &monotonic); + clock_gettime(CLOCK_REALTIME, &realtime); +@@ -146,7 +145,7 @@ done: + } + #else /* now comes the BSD "code" (just a shim) */ + static void +-submitSyslog(int pri, uchar *buf) ++submitSyslog(modConfData_t *pModConf, int pri, uchar *buf) + { + Syslog(pri, buf, NULL); + } +@@ -196,7 +195,7 @@ finalize_it: + /* Read kernel log while data are available, split into lines. + */ + static void +-readklog(void) ++readklog(modConfData_t *pModConf) + { + char *p, *q; + int len, i; +@@ -238,18 +237,18 @@ readklog(void) + + for (p = (char*)pRcv; (q = strchr(p, '\n')) != NULL; p = q + 1) { + *q = '\0'; +- submitSyslog(LOG_INFO, (uchar*) p); ++ submitSyslog(pModConf, LOG_INFO, (uchar*) p); + } + len = strlen(p); + if (len >= iMaxLine - 1) { +- submitSyslog(LOG_INFO, (uchar*)p); ++ submitSyslog(pModConf, LOG_INFO, (uchar*)p); + len = 0; + } + if(len > 0) + memmove(pRcv, p, len + 1); + } + if (len > 0) +- submitSyslog(LOG_INFO, pRcv); ++ submitSyslog(pModConf, LOG_INFO, pRcv); + + if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1) + free(pRcv); +@@ -278,10 +277,10 @@ rsRetVal klogAfterRun(modConfData_t *pModConf) + * "message pull" mechanism. + * rgerhards, 2008-04-09 + */ +-rsRetVal klogLogKMsg(modConfData_t __attribute__((unused)) *pModConf) ++rsRetVal klogLogKMsg(modConfData_t *pModConf) + { + DEFiRet; +- readklog(); ++ readklog(pModConf); + RETiRet; + } + +diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c +index 9332370..2897d76 100644 +--- a/plugins/imklog/imklog.c ++++ b/plugins/imklog/imklog.c +@@ -91,6 +91,7 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para + static struct cnfparamdescr modpdescr[] = { + { "logpath", eCmdHdlrGetWord, 0 }, + { "permitnonkernelfacility", eCmdHdlrBinary, 0 }, ++ { "keepkerneltimestamp", eCmdHdlrBinary, 0 }, + { "consoleloglevel", eCmdHdlrInt, 0 }, + { "internalmsgfacility", eCmdHdlrFacility, 0 } + }; +@@ -289,6 +290,7 @@ CODESTARTbeginCnfLoad + pModConf->pszPath = NULL; + pModConf->bPermitNonKernel = 0; + pModConf->console_log_level = -1; ++ pModConf->bKeepKernelStamp = 0; + pModConf->iFacilIntMsg = klogFacilIntMsg(); + loadModConf->configSetViaV2Method = 0; + bLegacyCnfModGlobalsPermitted = 1; +@@ -322,6 +324,8 @@ CODESTARTsetModCnf + loadModConf->bPermitNonKernel = (int) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "consoleloglevel")) { + loadModConf->console_log_level= (int) pvals[i].val.d.n; ++ } else if(!strcmp(modpblk.descr[i].name, "keepkerneltimestamp")) { ++ loadModConf->bKeepKernelStamp = (int) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "internalmsgfacility")) { + loadModConf->iFacilIntMsg = (int) pvals[i].val.d.n; + } else { +@@ -347,6 +351,7 @@ CODESTARTendCnfLoad + loadModConf->bPermitNonKernel = cs.bPermitNonKernel; + loadModConf->iFacilIntMsg = cs.iFacilIntMsg; + loadModConf->console_log_level = cs.console_log_level; ++ loadModConf->bKeepKernelStamp = 0; + if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) { + loadModConf->pszPath = NULL; + if(cs.pszPath != NULL) +diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h +index acfb50a..6cd97c3 100644 +--- a/plugins/imklog/imklog.h ++++ b/plugins/imklog/imklog.h +@@ -36,6 +36,7 @@ struct modConfData_s { + uchar *pszPath; + int console_log_level; + sbool bPermitNonKernel; ++ sbool bKeepKernelStamp; /* keep kernel timestamp instead of interpreting it */ + sbool configSetViaV2Method; + }; + +-- +1.7.10.4 + + +From 24e74d95c03bdf44f40ad41a4f6d4fabef0bca2c Mon Sep 17 00:00:00 2001 +From: Marius Tomaschewski +Date: Wed, 21 Nov 2012 13:47:19 +0100 +Subject: [PATCH 2/5] imklog: added paramter "parseKernelTimestamp" + +When enabled, kernel message [timestamp] is converted for message time. +Default is to use receive time as in 5.8.x and before, because the clock +used to create the timestamp is not supposed to be as accurate as the +monotonic clock (depends on hardware and kernel) resulting in differences +between kernel and system messages which occurred at same time. +--- + plugins/imklog/bsd.c | 3 +++ + plugins/imklog/imklog.c | 5 +++++ + plugins/imklog/imklog.h | 3 ++- + 3 Dateien geändert, 10 Zeilen hinzugefügt(+), 1 Zeile entfernt(-) + +diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c +index ad194b5..0930d61 100644 +--- a/plugins/imklog/bsd.c ++++ b/plugins/imklog/bsd.c +@@ -82,6 +82,9 @@ submitSyslog(modConfData_t *pModConf, int pri, uchar *buf) + struct timeval tv; + struct timeval *tp = NULL; + ++ if(!pModConf->bParseKernelStamp) ++ goto done; ++ + if(buf[3] != '[') + goto done; + DBGPRINTF("imklog: kernel timestamp detected, extracting it\n"); +diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c +index 2897d76..8471daa 100644 +--- a/plugins/imklog/imklog.c ++++ b/plugins/imklog/imklog.c +@@ -91,6 +91,7 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para + static struct cnfparamdescr modpdescr[] = { + { "logpath", eCmdHdlrGetWord, 0 }, + { "permitnonkernelfacility", eCmdHdlrBinary, 0 }, ++ { "parsekerneltimestamp", eCmdHdlrBinary, 0 }, + { "keepkerneltimestamp", eCmdHdlrBinary, 0 }, + { "consoleloglevel", eCmdHdlrInt, 0 }, + { "internalmsgfacility", eCmdHdlrFacility, 0 } +@@ -290,6 +291,7 @@ CODESTARTbeginCnfLoad + pModConf->pszPath = NULL; + pModConf->bPermitNonKernel = 0; + pModConf->console_log_level = -1; ++ pModConf->bParseKernelStamp = 0; + pModConf->bKeepKernelStamp = 0; + pModConf->iFacilIntMsg = klogFacilIntMsg(); + loadModConf->configSetViaV2Method = 0; +@@ -324,6 +326,8 @@ CODESTARTsetModCnf + loadModConf->bPermitNonKernel = (int) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "consoleloglevel")) { + loadModConf->console_log_level= (int) pvals[i].val.d.n; ++ } else if(!strcmp(modpblk.descr[i].name, "parsekerneltimestamp")) { ++ loadModConf->bParseKernelStamp = (int) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "keepkerneltimestamp")) { + loadModConf->bKeepKernelStamp = (int) pvals[i].val.d.n; + } else if(!strcmp(modpblk.descr[i].name, "internalmsgfacility")) { +@@ -351,6 +355,7 @@ CODESTARTendCnfLoad + loadModConf->bPermitNonKernel = cs.bPermitNonKernel; + loadModConf->iFacilIntMsg = cs.iFacilIntMsg; + loadModConf->console_log_level = cs.console_log_level; ++ loadModConf->bParseKernelStamp = 0; + loadModConf->bKeepKernelStamp = 0; + if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) { + loadModConf->pszPath = NULL; +diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h +index 6cd97c3..6022f5e 100644 +--- a/plugins/imklog/imklog.h ++++ b/plugins/imklog/imklog.h +@@ -36,7 +36,8 @@ struct modConfData_s { + uchar *pszPath; + int console_log_level; + sbool bPermitNonKernel; +- sbool bKeepKernelStamp; /* keep kernel timestamp instead of interpreting it */ ++ sbool bParseKernelStamp; /* if try to parse kernel timestamps for message time */ ++ sbool bKeepKernelStamp; /* keep the kernel timestamp in the message */ + sbool configSetViaV2Method; + }; + +-- +1.7.10.4 + + +From 64bab984a1f7deece7c7b32b056c68b56b71ee77 Mon Sep 17 00:00:00 2001 +From: Marius Tomaschewski +Date: Wed, 21 Nov 2012 15:41:12 +0100 +Subject: [PATCH 3/5] imklog: allow $klogParse- and KeepKernelTimestamp + +--- + plugins/imklog/imklog.c | 14 ++++++++++++-- + 1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) + +diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c +index 8471daa..0aec108 100644 +--- a/plugins/imklog/imklog.c ++++ b/plugins/imklog/imklog.c +@@ -80,6 +80,8 @@ typedef struct configSettings_s { + int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */ + uchar *pszPath; + int console_log_level; /* still used for BSD */ ++ int bParseKernelStamp; ++ int bKeepKernelStamp; + } configSettings_t; + static configSettings_t cs; + +@@ -112,6 +114,8 @@ static inline void + initConfigSettings(void) + { + cs.bPermitNonKernel = 0; ++ cs.bParseKernelStamp = 0; ++ cs.bKeepKernelStamp = 0; + cs.console_log_level = -1; + cs.pszPath = NULL; + cs.iFacilIntMsg = klogFacilIntMsg(); +@@ -355,8 +359,8 @@ CODESTARTendCnfLoad + loadModConf->bPermitNonKernel = cs.bPermitNonKernel; + loadModConf->iFacilIntMsg = cs.iFacilIntMsg; + loadModConf->console_log_level = cs.console_log_level; +- loadModConf->bParseKernelStamp = 0; +- loadModConf->bKeepKernelStamp = 0; ++ loadModConf->bParseKernelStamp = cs.bParseKernelStamp;; ++ loadModConf->bKeepKernelStamp = cs.bKeepKernelStamp; + if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) { + loadModConf->pszPath = NULL; + if(cs.pszPath != NULL) +@@ -431,6 +435,8 @@ ENDqueryEtryPt + static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal) + { + cs.bPermitNonKernel = 0; ++ cs.bParseKernelStamp = 0; ++ cs.bKeepKernelStamp = 0; + if(cs.pszPath != NULL) { + free(cs.pszPath); + cs.pszPath = NULL; +@@ -468,6 +474,10 @@ CODEmodInit_QueryRegCFSLineHdlr + NULL, NULL, STD_LOADABLE_MODULE_ID)); + CHKiRet(regCfSysLineHdlr2((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary, + NULL, &cs.bPermitNonKernel, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted)); ++ CHKiRet(regCfSysLineHdlr2((uchar *)"klogparsekerneltimestamp", 0, eCmdHdlrBinary, ++ NULL, &cs.bParseKernelStamp, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted)); ++ CHKiRet(regCfSysLineHdlr2((uchar *)"klogkeepkerneltimestamp", 0, eCmdHdlrBinary, ++ NULL, &cs.bKeepKernelStamp, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted)); + CHKiRet(regCfSysLineHdlr2((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt, + NULL, &cs.console_log_level, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted)); + CHKiRet(regCfSysLineHdlr2((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility, +-- +1.7.10.4 + + +From 3ce3f458f4ac088d3e650ad939500e72b35d1758 Mon Sep 17 00:00:00 2001 +From: Marius Tomaschewski +Date: Wed, 21 Nov 2012 13:47:44 +0100 +Subject: [PATCH 4/5] imklog: convert to kmsg timestamp's us to ns first + +--- + plugins/imklog/bsd.c | 1 + + 1 Datei geändert, 1 Zeile hinzugefügt(+) + +diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c +index 0930d61..2dc7527 100644 +--- a/plugins/imklog/bsd.c ++++ b/plugins/imklog/bsd.c +@@ -111,6 +111,7 @@ submitSyslog(modConfData_t *pModConf, int pri, uchar *buf) + nsecs = nsecs * 10 + buf[i] - '0'; + ++i; + } ++ nsecs *= 1000; /* convert to ns first */ + if(buf[i] != ']') { + DBGPRINTF("no trailing ']' --> no kernel timestamp\n"); + goto done; /* no TS! */ +-- +1.7.10.4 + + +From f8565e506fe01839035d40e12c2d13c1d15da45f Mon Sep 17 00:00:00 2001 +From: Marius Tomaschewski +Date: Thu, 22 Nov 2012 15:05:52 +0100 +Subject: [PATCH 5/5] imklog: added $klogParse/KeepKernelTimestamp docs + +--- + doc/imklog.html | 13 +++++++++++++ + 1 Datei geändert, 13 Zeilen hinzugefügt(+) + +diff --git a/doc/imklog.html b/doc/imklog.html +index 6ccdb5b..294e2b7 100644 +--- a/doc/imklog.html ++++ b/doc/imklog.html +@@ -65,6 +65,19 @@ Linux only, ignored on other platforms (but may be specified) + former klogd -2 option
+ Linux only, ignored on other platforms (but may be specified)
+ ++
  • $klogParseKernelTimestamp [on/off]
    ++If enabled and the kernel creates a timestamp for its log messages, this timestamp will be ++parsed and converted into regular message time instead to use the receive time of the kernel ++message (as in 5.8.x and before). Default is to not parse the kernel timestamp, because the ++clock used by the kernel to create the timestamps is not supposed to be as accurate as the ++monotonic clock required to convert it. Depending on the hardware and kernel, it can result ++in message time differences between kernel and system messages which occurred at same time. ++
  • ++
  • $klogKeepKernelTimestamp [on/off]
    ++If enabled, this option causes to keep the [timestamp] provided by the kernel at the begin ++of in each message rather than to remove it, when it could be parsed and converted into ++local time for use as regular message time. Only used, when $klogParseKernelTimestamp is on. ++
  • + + Caveats/Known Bugs: +

    This is obviously platform specific and requires platform +-- +1.7.10.4 + diff --git a/0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch b/0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch deleted file mode 100644 index 8f2ae3e..0000000 --- a/0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 5dc3ad821532ad5132c151c4737a27a6e6c7aea1 Mon Sep 17 00:00:00 2001 -From: Marius Tomaschewski -Date: Tue, 13 Nov 2012 11:26:39 +0100 -Subject: [PATCH] imuxsock: do not log EAGAIN in nonblocking recvfrom - ---- - plugins/imuxsock/imuxsock.c | 2 +- - 1 Datei geändert, 1 Zeile hinzugefügt(+), 1 Zeile entfernt(-) - -diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c -index d5e4bb3..e0ba7dd 100644 ---- a/plugins/imuxsock/imuxsock.c -+++ b/plugins/imuxsock/imuxsock.c -@@ -1059,7 +1059,7 @@ static rsRetVal readSocket(lstn_t *pLstn) - } - } - CHKiRet(SubmitMsg(pRcv, iRcvd, pLstn, cred, ts)); -- } else if(iRcvd < 0 && errno != EINTR) { -+ } else if(iRcvd < 0 && errno != EINTR && errno != EAGAIN) { - char errStr[1024]; - rs_strerror_r(errno, errStr, sizeof(errStr)); - DBGPRINTF("UNIX socket error: %d = %s.\n", errno, errStr); --- -1.7.10.4 - diff --git a/rsyslog-7.2.1.tar.gz b/rsyslog-7.2.1.tar.gz deleted file mode 100644 index 59578ed..0000000 --- a/rsyslog-7.2.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba0aee5cd2c60192ca1f026817767aa66056c7f0fa78eb5b15b9394734e68e3f -size 2696341 diff --git a/rsyslog-7.2.3.tar.gz b/rsyslog-7.2.3.tar.gz new file mode 100644 index 0000000..2107bcb --- /dev/null +++ b/rsyslog-7.2.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9190acdf902a22338b4b0bc43e37cd863881068486f071cba907446c3e35b97 +size 2701840 diff --git a/rsyslog.changes b/rsyslog.changes index fa54b9d..7aacb40 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,78 @@ +------------------------------------------------------------------- +Thu Nov 22 14:12:36 UTC 2012 - mt@suse.com + +- Update to 7.2.3 (v7-stable) a release providing following fixes: + - regression fix: rsyslogd terminated when wild-card $IncludeConfig did not + find actual include files. For example, if this directive is present: + $IncludeConfig /etc/rsyslog.d/*.conf + and there are no *.conf files in /etc/rsyslog.d (but rsyslog.d exists), + rsyslogd will emit an error message and terminate. Previous (and expected) + behaviour is that an empty file set is no problem. HOWEVER, if the + directory itself does not exist, this is flagged as an error and will + load to termination (no startup). + Unfortunately, this is often the case by default in many distros, so this + actually prevents rsyslog startup. + - doc improvements + - enabled to build without libuuid, at loss of uuid functionality + this enables smoother builds on older systems that do not support + libuuid. Loss of functionality should usually not matter too much as + uuid support has only recently been added and is very seldom used. + - bugfix: omfwd did not properly support "template" parameter + - bugfix: potential segfault when re_match() function was used + Thanks to oxpa for the patch. + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=371 + - bugfix: potential abort of imtcp on rsyslogd shutdown + - bugfix: imzmq3 segfault with PULL subscription + Thanks to Martin Nilsson for the patch. + - bugfix: improper handling of backslash in string-type template()s + - bugfix: leading quote (") in string-type template() lead to thight loop + on startup + - bugfix: no error msg on invalid field option in legacy/string template + - bugfix: potential segfault due to invalid param handling in comparisons + This could happen in RainerScript comparisons (like contains); in some + cases an unitialized variable was accessed, which could lead to an + invalid free and in turn to a segfault. + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=372 + Thanks to Georgi Georgiev for reporting this bug and his great help + in solving it. + - bugfix: no error msg on unreadable $IncludeConfig path + - bugfix: $IncludeConfig did not correctly process directories + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=376 + The testbench was also enhanced to check for these cases. + Thanks to Georgi Georgiev for the bug report. + - bugfix: make rsyslog compile on kfreebsd again + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=380 + Thanks to Guillem Jover for the patch. + - bugfix: garbled message if field name was used with jsonf property option + The length for the field name was invalidly computed, resulting in either + truncated field names or including extra random data. If the random data + contained NULs, the rest of the message became unreadable. + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=374 + - bugfix: potential segfault at startup with property-based filter + If the property name was followed by a space before the comma, rsyslogd + aborted on startup. Note that no segfault could happen if the initial + startup went well (this was a problem with the config parser). + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=381 + - bugfix: imfile discarded some file parts + File lines that were incomplete (LF missing) *at the time imfile polled + the file* were partially discarded. That part of the line that was read + without the LF was discarded, and the rest of the line was submitted in + the next polling cycle. This is now changed so that the partial content + is saved until the complete line is read. Note that the patch affects + only read mode 0. + Thanks to Milan Bartos for providing the base idea for the solution. +- Merged also fixes for unreliable kernel timestamp regression (bnc#783967), + which will be picked up in a later v7-stable release: + - imklog: added $klogParseKernelTimestamp option (default off), + wich reverts to the 5.8.x behavior to use receive time for the + kernel messages instead to try parse and convert the kernel + timestamp, what is not reliable on some hardware (intel i7/Xeon). + - imklog: added $klogKeepKernelTimestamp option (default off), + causing to not remove the kernel timestamp from the message + after a successful conversion. + - imklog: fixed a conversion bug causing a <1sec incorrectness + of the message time when the kernel timestamp is parsed. + ------------------------------------------------------------------- Tue Nov 20 11:44:16 UTC 2012 - mt@suse.com diff --git a/rsyslog.spec b/rsyslog.spec index d2da09a..6c606e9 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -20,7 +20,7 @@ Name: rsyslog Summary: The enhanced syslogd for Linux and Unix License: (GPL-3.0+ and Apache-2.0) Group: System/Daemons -Version: 7.2.1 +Version: 7.2.3 Release: 0 %if 0%{?suse_version} >= 1210 %bcond_without systemd @@ -132,7 +132,7 @@ Source2: rsyslog.conf.in Source4: rsyslog.d.remote.conf.in Source5: rsyslog-service-prepare.in Source6: rsyslog.service.in.in -Patch1: 0001-imuxsock-do-not-log-EAGAIN-in-nonblocking-recvfrom.patch +Patch1: 0001-imklog-kernel-timestamp-parsing.bnc783967.patch %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, From b7ebaf8cc5c7c3a776526c8a6f89600ec9ee25bf6f1330c474c0be2d6f3ed9b3 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Thu, 22 Nov 2012 16:56:05 +0000 Subject: [PATCH 9/9] - Removed {} arround RSYSLOG_PARAMS variable in service file. systemd seems sometimes to not like it any more (bnc#788330). OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=116 --- rsyslog.changes | 2 ++ rsyslog.service.in.in | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/rsyslog.changes b/rsyslog.changes index 7aacb40..e730ca9 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -72,6 +72,8 @@ Thu Nov 22 14:12:36 UTC 2012 - mt@suse.com after a successful conversion. - imklog: fixed a conversion bug causing a <1sec incorrectness of the message time when the kernel timestamp is parsed. +- Removed {} arround RSYSLOG_PARAMS variable in service file. systemd + seems sometimes to not like it any more (bnc#788330). ------------------------------------------------------------------- Tue Nov 20 11:44:16 UTC 2012 - mt@suse.com diff --git a/rsyslog.service.in.in b/rsyslog.service.in.in index 1e6e3c0..8b0f333 100644 --- a/rsyslog.service.in.in +++ b/rsyslog.service.in.in @@ -9,7 +9,7 @@ Conflicts=syslog-ng.service syslogd.service Environment=RSYSLOGD_PARAMS= ExecStartPre=@sbindir@/rsyslog-service-prepare EnvironmentFile=-/etc/sysconfig/syslog -ExecStart=@sbindir@/rsyslogd -n ${RSYSLOGD_PARAMS} +ExecStart=@sbindir@/rsyslogd -n $RSYSLOGD_PARAMS Sockets=syslog.socket StandardOutput=null