%bcond_without redis # support for Redis destination
%bcond_without smtp # support for logging into SMTP
%bcond_without geoip # support for GeoIP
+%bcond_without systemd # support for systemd
%bcond_without system_libivykis # use system libivykis
%bcond_with system_rabbitmq # use system librabbitmq [not supported yet]
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.5.6
+Version: 3.6.2
Release: 1
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
-# Source0-md5: eee31ddb012b1fcf2b6a6a99f073a9a6
+# Source0-md5: 6928e9be3499a2e9ae52ea8aa204b165
Source1: %{name}.init
Source2: %{name}.conf
Source3: %{name}.logrotate
-Source4: http://www.balabit.com/support/documentation/syslog-ng-ose-3.5-guides/en/syslog-ng-ose-v3.5-guide-admin/pdf/%{name}-ose-v3.5-guide-admin.pdf
-# Source4-md5: 87f801be5c9208e43edc081ce957499b
+Source4: http://www.balabit.com/support/documentation/syslog-ng-ose-3.6-guides/en/syslog-ng-ose-v3.6-guide-admin/pdf/%{name}-ose-v3.6-guide-admin.pdf
+# Source4-md5: bb12c18aef655096987911c4a9fe3ffa
Source5: %{name}-simple.conf
-Source6: %{name}.upstart
Patch0: %{name}-datadir.patch
Patch1: cap_syslog-vserver-workaround.patch
Patch2: %{name}-nolibs.patch
%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}
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
--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} \
%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
%{__rm} $RPM_BUILD_ROOT%{_libdir}/syslog-ng/*.la
-%if "%{pld_release}" == "th"
-%{__sed} -e 's|@@SBINDIR@@|%{_sbindir}|g' %{SOURCE6} > $RPM_BUILD_ROOT/etc/init/%{name}.conf
-%endif
-
%clean
rm -rf $RPM_BUILD_ROOT
/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
%service -q syslog-ng restart
exit 0
-%post upstart
-%upstart_post %{name}
-
-%postun upstart
-%upstart_postun %{name}
-
-%triggerun upstart -- syslog-ng-upstart < 3.2.4-3
-# use SERVICE_syslog=y in upstart job environment instead of SERVICE=syslog
-%{__sed} -i -e 's,SERVICE=syslog,SERVICE_syslog=y,' /etc/init/*.conf || :
-
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
-%doc AUTHORS NEWS debian/syslog-ng.conf* contrib/relogger.pl
+%doc AUTHORS NEWS.md debian/syslog-ng.conf* contrib/relogger.pl
%doc contrib/syslog-ng.conf.{doc,simple,RedHat}
-%doc contrib/{apparmor,selinux,syslog2ng} doc/syslog-ng-ose-v3.5-guide-admin.pdf
+%doc contrib/{apparmor,selinux,syslog2ng} doc/syslog-ng-ose-v3.6-guide-admin.pdf
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
%attr(750,root,root) %dir %{_sysconfdir}/syslog-ng
%attr(750,root,root) %dir %{_sysconfdir}/syslog-ng/patterndb.d
%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
%attr(755,root,root) %{_libdir}/syslog-ng/libcryptofuncs.so
%attr(755,root,root) %{_libdir}/syslog-ng/libcsvparser.so
%attr(755,root,root) %{_libdir}/syslog-ng/libdbparser.so
+%attr(755,root,root) %{_libdir}/syslog-ng/libgraphite.so
%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
%dir %{_datadir}/syslog-ng/include
%dir %{_datadir}/syslog-ng/include/scl
+%dir %{_datadir}/syslog-ng/include/scl/graphite
+%{_datadir}/syslog-ng/include/scl/graphite/README
+%{_datadir}/syslog-ng/include/scl/graphite/plugin.conf
+%dir %{_datadir}/syslog-ng/include/scl/nodejs
+%{_datadir}/syslog-ng/include/scl/nodejs/plugin.conf
%dir %{_datadir}/syslog-ng/include/scl/pacct
%{_datadir}/syslog-ng/include/scl/pacct/plugin.conf
%dir %{_datadir}/syslog-ng/include/scl/rewrite
%attr(640,root,root) %ghost /var/log/user
%attr(640,root,root) %ghost /var/log/xferlog
-%if "%{pld_release}" == "th"
-%files upstart
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
-%endif
-
%if %{with mongodb}
%files module-afmongodb
%defattr(644,root,root,755)
%files libs
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libsyslog-ng-%{version}.so
+%attr(755,root,root) %{_libdir}/libsyslog-ng-*.so.*
%dir %{_datadir}/syslog-ng
%files devel