From c0e8ee8f64ba53862360f58ea22a33d2d1d903be Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 3 Feb 2015 08:51:53 +0000 Subject: [PATCH] - kill systemd infestation --- syslog-ng-systemd.patch | 14 -------------- syslog-ng.spec | 40 ++-------------------------------------- syslog-ng.upstart | 15 --------------- 3 files changed, 2 insertions(+), 67 deletions(-) delete mode 100644 syslog-ng-systemd.patch delete mode 100644 syslog-ng.upstart diff --git a/syslog-ng-systemd.patch b/syslog-ng-systemd.patch deleted file mode 100644 index 2d0a3ca..0000000 --- a/syslog-ng-systemd.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- syslog-ng-3.6.2/contrib/systemd/syslog-ng.service 2015-01-28 21:29:05.450000000 +0000 -+++ syslog-ng-3.6.2/contrib/systemd/syslog-ng.service 2015-01-28 21:30:25.166000000 +0000 -@@ -3,8 +3,10 @@ - Documentation=man:syslog-ng(8) - - [Service] -+EnvironmentFile=-/etc/sysconfig/syslog-ng - Type=notify --ExecStart=/usr/sbin/syslog-ng -F -+ExecStartPre=-/bin/systemctl stop systemd-kmsg-syslogd.service -+ExecStart=/sbin/syslog-ng -F -f /etc/syslog-ng/syslog-ng.conf --worker-threads=102 - ExecReload=/bin/kill -HUP $MAINPID - StandardOutput=journal - StandardError=journal diff --git a/syslog-ng.spec b/syslog-ng.spec index f561a90..341d55e 100644 --- a/syslog-ng.spec +++ b/syslog-ng.spec @@ -22,7 +22,7 @@ Summary(pl.UTF-8): Syslog-ng - systemowy demon logujący nowej generacji Summary(pt_BR.UTF-8): Daemon de log nova geração Name: syslog-ng Version: 3.6.2 -Release: 2 +Release: 3 License: GPL v2+ with OpenSSL exception Group: Daemons Source0: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/%{name}_%{version}.tar.gz @@ -36,8 +36,7 @@ Source5: %{name}-simple.conf Patch0: %{name}-datadir.patch Patch1: cap_syslog-vserver-workaround.patch Patch2: %{name}-nolibs.patch -Patch3: %{name}-systemd.patch -Patch4: man-paths.patch +Patch3: man-paths.patch URL: http://www.balabit.com/products/syslog_ng/ %{?with_geoip:BuildRequires: GeoIP-devel >= 1.5.1} BuildRequires: autoconf >= 2.53 @@ -80,9 +79,6 @@ BuildRequires: zlib-static %endif Requires(post): fileutils Requires(post,preun): /sbin/chkconfig -%if %{with systemd} -Requires(post,preun,postun): systemd-units >= 38 -%endif Requires: %{name}-libs = %{version}-%{release} Requires: eventlog >= 0.2.12 Requires: glib2 >= %{glib2_ver} @@ -90,9 +86,6 @@ Requires: pcre >= 6.1 Requires: psmisc >= 20.1 %{?with_system_rabbitmq:Requires: rabbitmq-c >= 0.0.1} Requires: rc-scripts >= 0.4.3.0 -%if %{with systemd} -Requires: systemd-units >= 38 -%endif # for afsocket Requires: libnet >= 1:1.1.2.1-7 # for afsocket and dbparser @@ -288,7 +281,6 @@ Pliki nagłówkowe do tworzenia modułów dla sysloga-ng. %patch1 -p1 %patch2 -p1 %patch3 -p1 -%patch4 -p1 cp -p %{SOURCE4} doc cp -p %{SOURCE5} contrib/syslog-ng.conf.simple @@ -324,12 +316,7 @@ done --with-module-dir=%{_libdir}/syslog-ng \ --with-pidfile-dir=/var/run \ --with-timezone-dir=%{_datadir}/zoneinfo \ -%if %{with systemd} - --enable-systemd \ -%else --disable-systemd \ -%endif - --with-systemdsystemunitdir=%{systemdunitdir} \ --enable-amqp \ --enable-geoip%{!?with_geoip:=no} \ --enable-ipv6 \ @@ -407,28 +394,11 @@ fi /sbin/chkconfig --add syslog-ng %service syslog-ng restart "syslog-ng daemon" -%if %{with systemd} -%systemd_post syslog-ng.service -%endif - %preun if [ "$1" = "0" ]; then %service syslog-ng stop /sbin/chkconfig --del syslog-ng fi -%if %{with systemd} -%systemd_preun syslog-ng.service -%endif - -%postun -%if %{with systemd} -%systemd_reload -%endif - -%triggerpostun -- syslog-ng < 3.3.4-3 -%if %{with systemd} -%systemd_trigger syslog-ng.service -%endif %triggerun -- syslog-ng < 3.0 sed -i -e 's#sync(\(.*\))#flush_lines(\1)#g' /etc/syslog-ng/syslog-ng.conf @@ -458,9 +428,6 @@ exit 0 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/syslog-ng/syslog-ng.conf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/syslog-ng %attr(754,root,root) /etc/rc.d/init.d/syslog-ng -%if %{with systemd} -%{systemdunitdir}/syslog-ng.service -%endif %dir %{_libdir}/syslog-ng %attr(755,root,root) %{_libdir}/syslog-ng/libafamqp.so %attr(755,root,root) %{_libdir}/syslog-ng/libaffile.so @@ -479,9 +446,6 @@ exit 0 %attr(755,root,root) %{_libdir}/syslog-ng/liblinux-kmsg-format.so %attr(755,root,root) %{_libdir}/syslog-ng/libpacctformat.so %attr(755,root,root) %{_libdir}/syslog-ng/libpseudofile.so -%if %{with systemd} -%attr(755,root,root) %{_libdir}/syslog-ng/libsdjournal.so -%endif %attr(755,root,root) %{_libdir}/syslog-ng/libsyslog-ng-crypto.so %attr(755,root,root) %{_libdir}/syslog-ng/libsyslogformat.so %attr(755,root,root) %{_libdir}/syslog-ng/libsystem-source.so diff --git a/syslog-ng.upstart b/syslog-ng.upstart deleted file mode 100644 index ed5edf3..0000000 --- a/syslog-ng.upstart +++ /dev/null @@ -1,15 +0,0 @@ - -start on pld.sysinit-done -stop on pld.shutdown-started - -env SERVICE_syslog=y -export SERVICE_syslog - -respawn - -console output - -exec @@SBINDIR@@/syslog-ng --process-mode=background -f /etc/syslog-ng/syslog-ng.conf -expect fork - -# vi: ft=upstart -- 2.46.0