From 61396614dab7a65241b1828868e6a7c7a75ab056b08b20d744bfcab0496710f6 Mon Sep 17 00:00:00 2001 From: Andreas Stieger Date: Sun, 14 Apr 2013 16:56:48 +0000 Subject: [PATCH 1/2] Accepting request 163983 from home:elvigia:branches:Base:System - Fix systemd units to do exactly what is documented as required --> http://www.freedesktop.org/wiki/Software/systemd/syslog In particular, it must not mess with the ordering of syslog.target this is done by removing the custom unit and adapting the upstream one with openSUSE additions (rsyslog-unit.patch) OBS-URL: https://build.opensuse.org/request/show/163983 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=132 --- rsyslog-unit.patch | 22 ++++++++++++++++++++++ rsyslog.changes | 9 +++++++++ rsyslog.service.in.in | 19 ------------------- rsyslog.spec | 6 ++++-- 4 files changed, 35 insertions(+), 21 deletions(-) create mode 100644 rsyslog-unit.patch delete mode 100644 rsyslog.service.in.in diff --git a/rsyslog-unit.patch b/rsyslog-unit.patch new file mode 100644 index 0000000..a0d2a72 --- /dev/null +++ b/rsyslog-unit.patch @@ -0,0 +1,22 @@ +Index: rsyslog-7.2.5/rsyslog.service.in +=================================================================== +--- rsyslog-7.2.5.orig/rsyslog.service.in ++++ rsyslog-7.2.5/rsyslog.service.in +@@ -1,9 +1,16 @@ + [Unit] + Description=System Logging Service ++Requires=var-run.mount ++Requires=syslog.socket ++After=var-run.mount ++Conflicts=syslog-ng.service syslogd.service + + [Service] ++Environment=RSYSLOGD_PARAMS= ++ExecStartPre=@sbindir@/rsyslog-service-prepare ++EnvironmentFile=-/etc/sysconfig/syslog + ExecStart=@sbindir@/rsyslogd -n +-Sockets=syslog.socket ++ExecReload=/bin/kill -HUP $MAINPID + StandardOutput=null + + [Install] diff --git a/rsyslog.changes b/rsyslog.changes index e4f1cf6..c942fd6 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Apr 14 06:35:09 UTC 2013 - crrodriguez@opensuse.org + +- Fix systemd units to do exactly what is documented as + required --> http://www.freedesktop.org/wiki/Software/systemd/syslog + In particular, it must not mess with the ordering of syslog.target + this is done by removing the custom unit and adapting the upstream + one with openSUSE additions (rsyslog-unit.patch) + ------------------------------------------------------------------- Fri Mar 29 11:53:49 UTC 2013 - vcizek@suse.com diff --git a/rsyslog.service.in.in b/rsyslog.service.in.in deleted file mode 100644 index e3f6dae..0000000 --- a/rsyslog.service.in.in +++ /dev/null @@ -1,19 +0,0 @@ -[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] -Environment=RSYSLOGD_PARAMS= -ExecStartPre=@sbindir@/rsyslog-service-prepare -EnvironmentFile=-/etc/sysconfig/syslog -ExecStart=@sbindir@/rsyslogd -n $RSYSLOGD_PARAMS -ExecReload=/bin/kill -HUP $MAINPID -Sockets=syslog.socket -StandardOutput=null - -[Install] -WantedBy=multi-user.target -Alias=syslog.service diff --git a/rsyslog.spec b/rsyslog.spec index 366945b..15c00d0 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -153,7 +153,8 @@ Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source4: rsyslog.d.remote.conf.in Source5: rsyslog-service-prepare.in -Source6: rsyslog.service.in.in +# PATCH-FIX-OPENSUSE rsyslog-unit.patch crrodriguez@opensuse.org Customize upstream systemd unit for openSUSE needs. +Patch0: rsyslog-unit.patch %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, @@ -407,9 +408,10 @@ This module provides support for ZeroMQ. %prep %setup -q -n %{name}-%{upstream_version} +%patch0 -p1 # %if %{with systemd} -for file in rsyslog-service-prepare rsyslog.service.in ; do +for file in rsyslog-service-prepare; do sed \ -e 's;RUN_DIR;%{rsyslog_rundir};g' \ -e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \ From 221a70455a8a998e35b2da62fef084485bb4c5afe1228959a8b420e0d5ea9621 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 16 Apr 2013 08:58:53 +0000 Subject: [PATCH 2/2] - Fixed service file to pass $RSYSLOGD_PARAMS to rsyslogd again. OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=133 --- rsyslog-unit.patch | 11 +++++------ rsyslog.changes | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/rsyslog-unit.patch b/rsyslog-unit.patch index a0d2a72..a1ccffc 100644 --- a/rsyslog-unit.patch +++ b/rsyslog-unit.patch @@ -1,7 +1,5 @@ -Index: rsyslog-7.2.5/rsyslog.service.in -=================================================================== ---- rsyslog-7.2.5.orig/rsyslog.service.in -+++ rsyslog-7.2.5/rsyslog.service.in +--- rsyslog-7.2.5/rsyslog.service.in ++++ rsyslog-7.2.5/rsyslog.service.in 2013/04/16 08:48:30 @@ -1,9 +1,16 @@ [Unit] Description=System Logging Service @@ -11,11 +9,12 @@ Index: rsyslog-7.2.5/rsyslog.service.in +Conflicts=syslog-ng.service syslogd.service [Service] +-ExecStart=@sbindir@/rsyslogd -n +-Sockets=syslog.socket +Environment=RSYSLOGD_PARAMS= +ExecStartPre=@sbindir@/rsyslog-service-prepare +EnvironmentFile=-/etc/sysconfig/syslog - ExecStart=@sbindir@/rsyslogd -n --Sockets=syslog.socket ++ExecStart=@sbindir@/rsyslogd -n $RSYSLOGD_PARAMS +ExecReload=/bin/kill -HUP $MAINPID StandardOutput=null diff --git a/rsyslog.changes b/rsyslog.changes index c942fd6..447a8b9 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 16 08:49:49 UTC 2013 - mt@suse.de + +- Fixed service file to pass $RSYSLOGD_PARAMS to rsyslogd again. + ------------------------------------------------------------------- Sun Apr 14 06:35:09 UTC 2013 - crrodriguez@opensuse.org