Accepting request 644714 from Base:System

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/644714
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rsyslog?expand=0&rev=141
This commit is contained in:
Dominique Leuenberger 2018-11-01 13:34:35 +00:00 committed by Git OBS Bridge
commit 15fe4aa81f
6 changed files with 50 additions and 35 deletions

9
NetworkManager.frule Normal file
View File

@ -0,0 +1,9 @@
#
# NetworkManager into separate file and stop their further processing
#
if ($programname == 'NetworkManager') or \
($programname startswith 'nm-') \
then {
-/var/log/NetworkManager
stop
}

14
acpid.frule Normal file
View File

@ -0,0 +1,14 @@
#
# acpid messages into separate file and stop their further processing
#
# => all acpid messages for debuging (uncomment if needed):
#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
# -/var/log/acpid
#
# => up to notice (skip info and debug)
if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \
($syslogseverity <= 5 /* notice */) \
then {
-/var/log/acpid
stop
}

9
firewall.frule Normal file
View File

@ -0,0 +1,9 @@
#
# firewall messages into separate file and stop their further processing
#
if ($syslogfacility-text == 'kern') and \
($msg contains 'IN=' and $msg contains 'OUT=') \
then {
-/var/log/firewall
stop
}

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Oct 16 14:07:14 UTC 2018 - Thomas.Blume@suse.com
- rsyslog configuration cleanup by filter rules in separate files (bug#1102720)
* add parsing of additional filter rules in /etc/rsyslog.d/*.frule
* add acpid.frule, firewall.frule, NetworkManager.frule
-------------------------------------------------------------------
Wed Oct 10 16:16:55 CEST 2018 - kukuk@suse.de

View File

@ -96,41 +96,9 @@ then {
#
# firewall messages into separate file and stop their further processing
# Additional filter rules
#
if ($syslogfacility-text == 'kern') and \
($msg contains 'IN=' and $msg contains 'OUT=') \
then {
-/var/log/firewall
stop
}
#
# acpid messages into separate file and stop their further processing
#
# => all acpid messages for debuging (uncomment if needed):
#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
# -/var/log/acpid
#
# => up to notice (skip info and debug)
if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \
($syslogseverity <= 5 /* notice */) \
then {
-/var/log/acpid
stop
}
#
# NetworkManager into separate file and stop their further processing
#
if ($programname == 'NetworkManager') or \
($programname startswith 'nm-') \
then {
-/var/log/NetworkManager
stop
}
$IncludeConfig /etc/rsyslog.d/*.frule
#

View File

@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
@ -232,6 +232,9 @@ Source9: module-udpspoof
Source14: http://www.rsyslog.com/files/download/rsyslog/rsyslog-doc-%{version}.tar.gz
Source15: rsyslog.firewall
Source16: journald-rsyslog.conf
Source17: acpid.frule
Source18: firewall.frule
Source19: NetworkManager.frule
# PATCH-FIX-OPENSUSE rsyslog-unit.patch crrodriguez@opensuse.org Customize upstream systemd unit for openSUSE needs.
Patch0: rsyslog-unit.patch
@ -823,6 +826,10 @@ touch %{buildroot}%{rsyslog_sockets_cfg}
chmod 644 %{buildroot}%{rsyslog_sockets_cfg}
mkdir -p %{buildroot}%{APPARMOR_PROFILE_PATH}/rsyslog.d/
install -m0640 %{SOURCE6} %{buildroot}%{APPARMOR_PROFILE_PATH}/
install -m0600 %{SOURCE17} %{buildroot}%{_sysconfdir}/rsyslog.d/
install -m0600 %{SOURCE18} %{buildroot}%{_sysconfdir}/rsyslog.d/
install -m0600 %{SOURCE19} %{buildroot}%{_sysconfdir}/rsyslog.d/
%if %{with mysql}
install -m0640 %{SOURCE7} %{buildroot}%{APPARMOR_PROFILE_PATH}/rsyslog.d/
%endif
@ -969,6 +976,7 @@ fi
%dir %{_sysconfdir}/rsyslog.d
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.conf
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/*.frule
%{_sbindir}/rsyslogd
%if "%{_sbindir}" != "/sbin"
/sbin/rsyslogd