From 4674d1ce995d59030e50ed4011e8831fca06e443 Mon Sep 17 00:00:00 2001 From: Jiri Vymazal Date: Fri, 17 Feb 2017 09:35:40 +0100 Subject: [PATCH] * Fri Feb 17 2017 Jiri Vymazal - 8.24.0-5 - new default config, using RainerScript wherever possible resolves: rhbz#1419625 - updated testbench guard as testbench now needs explicit configuration see: rhbz#1211194 - added patch to make chdir call after chroot resolves: rhbz#1422542 --- rsyslog-8.24.0-missing-chdir-w-chroot.patch | 15 +++++ rsyslog.conf | 64 +++++++++------------ rsyslog.spec | 29 +++++++--- 3 files changed, 61 insertions(+), 47 deletions(-) create mode 100644 rsyslog-8.24.0-missing-chdir-w-chroot.patch diff --git a/rsyslog-8.24.0-missing-chdir-w-chroot.patch b/rsyslog-8.24.0-missing-chdir-w-chroot.patch new file mode 100644 index 0000000..fbed5f2 --- /dev/null +++ b/rsyslog-8.24.0-missing-chdir-w-chroot.patch @@ -0,0 +1,15 @@ +diff --git a/tools/rsyslogd.c b/tools/rsyslogd.c +index c099705..12b037f 100644 +--- a/tools/rsyslogd.c ++++ b/tools/rsyslogd.c +@@ -1350,6 +1350,10 @@ initAll(int argc, char **argv) + perror("chroot"); + exit(1); + } ++ if(chdir("\\") != 0) { ++ perror("chdir"); ++ exit(1); ++ } + break; + case 'u': /* misc user settings */ + iHelperUOpt = (arg == NULL) ? 0 : atoi(arg); diff --git a/rsyslog.conf b/rsyslog.conf index 735472d..0df42af 100644 --- a/rsyslog.conf +++ b/rsyslog.conf @@ -1,48 +1,40 @@ # rsyslog configuration file # For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html +# or latest version online at http://www.rsyslog.com/doc/rsyslog_conf.html # If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html #### MODULES #### -# The imjournal module bellow is now used as a message source instead of imuxsock. -$ModLoad imuxsock # provides support for local system logging (e.g. via logger command) -$ModLoad imjournal # provides access to the systemd journal -#$ModLoad imklog # reads kernel messages (the same are read from journald) -#$ModLoad immark # provides --MARK-- message capability +module(load="imuxsock" # provides support for local system logging (e.g. via logger command) + SysSock.Use="off") # Turn off message reception via local log socket; + # local messages are retrieved through imjournal now. +module(load="imjournal" # provides access to the systemd journal + StateFile="imjournal.state") # File to store the position in the journal +#module(load="imklog") # reads kernel messages (the same are read from journald) +#module(load"immark") # provides --MARK-- message capability # Provides UDP syslog reception -#$ModLoad imudp -#$UDPServerRun 514 +# for parameters see http://www.rsyslog.com/doc/imudp.html +#module(load="imudp") # needs to be done just once +#input(type="imudp" port="514") # Provides TCP syslog reception -#$ModLoad imtcp -#$InputTCPServerRun 514 - +# for parameters see http://www.rsyslog.com/doc/imtcp.html +#module(load="imtcp") # needs to be done just once +#input(type="imtcp" port="514") #### GLOBAL DIRECTIVES #### # Where to place auxiliary files -$WorkDirectory /var/lib/rsyslog +$WorkDirectory /var/lib/rsyslog # Use default timestamp format -$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat - -# File syncing capability is disabled by default. This feature is usually not required, -# not useful and an extreme performance hit -#$ActionFileEnableSync on +module(load="builtin:omfile" Template="RSYSLOG_TraditionalFileFormat") # Include all config files in /etc/rsyslog.d/ $IncludeConfig /etc/rsyslog.d/*.conf -# Turn off message reception via local log socket; -# local messages are retrieved through imjournal now. -$OmitLocalLogging on - -# File to store the position in the journal -$IMJournalStateFile imjournal.state - - #### RULES #### # Log all kernel messages to the console. @@ -73,19 +65,15 @@ uucp,news.crit /var/log/spooler local7.* /var/log/boot.log -# ### begin forwarding rule ### -# The statement between the begin ... end define a SINGLE forwarding -# rule. They belong together, do NOT split them. If you create multiple -# forwarding rules, duplicate the whole block! -# Remote Logging (we use TCP for reliable delivery) -# +# ### sample forwarding rule ### +#action(type="omfwd" # An on-disk queue is created for this action. If the remote host is # down, messages are spooled to disk and sent when it is up again. -#$ActionQueueFileName fwdRule1 # unique name prefix for spool files -#$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible) -#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown -#$ActionQueueType LinkedList # run asynchronously -#$ActionResumeRetryCount -1 # infinite retries if host is down -# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional -#*.* @@remote-host:514 -# ### end of the forwarding rule ### +#queue.filename="fwdRule1" # unique name prefix for spool files +#queue.maxdiskspace="1g" # 1gb space limit (use as much as possible) +#queue.saveonshutdown="on" # save messages to disk on shutdown +#queue.type="LinkedList" # run asynchronously +#action.resumeRetryCount="-1" # infinite retries if host is down +# Remote Logging (we use TCP for reliable delivery) +# remote_host is: name/ip, e.g. 192.168.0.1, port optional e.g. 10514 +#Target="remote_host" Port="XXX" Protocol="tcp") diff --git a/rsyslog.spec b/rsyslog.spec index 7a48722..d26ee9f 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -8,11 +8,15 @@ %global want_hiredis 1 %global want_mongodb 1 %endif +#due to multiple failures of extensive testbench on various archs +#and module requirements of certain tests need to have it disabled, +#tests execution possible locally on properly set up workstation +%global want_testbench 0 Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog Version: 8.24.0 -Release: 4%{?dist} +Release: 5%{?dist} License: (GPLv3+ and ASL 2.0) Group: System Environment/Daemons URL: http://www.rsyslog.com/ @@ -52,6 +56,7 @@ Obsoletes: sysklogd < 1.5-11 Patch0: rsyslog-8.8.0-sd-service.patch Patch1: rsyslog-8.23.0-msg_c_nonoverwrite_merge.patch Patch2: rsyslog-8.24.0-recover_qi-doc.patch +Patch3: rsyslog-8.24.0-missing-chdir-w-chroot.patch %package crypto Summary: Encryption support @@ -274,6 +279,7 @@ mv build doc %setup -q -D %patch0 -p1 %patch1 -p1 +%patch3 -p1 autoreconf -iv @@ -295,6 +301,9 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" %configure \ --prefix=/usr \ --disable-static \ +%if %{want_testbench} + --enable-testbench \ +%endif --enable-elasticsearch \ --enable-generate-man-pages \ --enable-gnutls \ @@ -330,24 +339,17 @@ export HIREDIS_LIBS="-L%{_libdir} -lhiredis" --enable-pmaixforwardedfrom \ --enable-pmcisconames \ --enable-pmlastmsg \ - --enable-pmrfc3164sd \ --enable-pmsnare \ --enable-relp \ --enable-snmp \ - --disable-testbench \ --enable-unlimited-select \ --enable-usertools \ --enable-omkafka \ make V=1 -# small portion of the test suite seems to be consistently failing (this is more severe on arm*) -# there are also some random failures (~1 test out of the whole batch) on i686 and x86_64 -# thus the test suite is disabled for now until these issues are sorted out %check -%if 0 make V=1 check -%endif %install make V=1 DESTDIR=%{buildroot} install @@ -372,8 +374,9 @@ cp -r doc/* %{buildroot}%{rsyslog_docdir}/html rm -f %{buildroot}%{_libdir}/rsyslog/*.la # get rid of socket activation by default sed -i '/^Alias/s/^/;/;/^Requires=syslog.socket/s/^/;/' %{buildroot}%{_unitdir}/rsyslog.service -# imdiag is only used for testing +# imdiag and liboverride is only used for testing rm -f %{buildroot}%{_libdir}/rsyslog/imdiag.so +rm -f %{buildroot}%{_libdir}/rsyslog/liboverride_gethostname.so %post for n in /var/log/{messages,secure,maillog,spooler} @@ -534,6 +537,14 @@ done %{_libdir}/rsyslog/omkafka.so %changelog +* Fri Feb 17 2017 Jiri Vymazal - 8.24.0-5 +- new default config, using RainerScript wherever possible + resolves: rhbz#1419625 +- updated testbench guard as testbench now needs explicit configuration + see: rhbz#1211194 +- added patch to make chdir call after chroot + resolves: rhbz#1422542 + * Sat Feb 11 2017 Fedora Release Engineering - 8.24.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild