From: Marcin Krol Date: Thu, 29 Jan 2015 08:20:57 +0000 (+0000) Subject: - updated to 3.6.2 X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=6ca388ef8ddc2786cafdf109c86cc0e6245fa4b0;p=packages%2Fsyslog-ng.git - updated to 3.6.2 - added systemd bcond - dropped upstart subpackage, no point in keeping in TLD --- diff --git a/syslog-ng.spec b/syslog-ng.spec index 8731fd8..636de6d 100644 --- a/syslog-ng.spec +++ b/syslog-ng.spec @@ -12,6 +12,7 @@ %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] @@ -20,19 +21,18 @@ Summary: Syslog-ng - new generation of the system logger 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 @@ -80,7 +80,9 @@ 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} @@ -88,7 +90,9 @@ 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 @@ -320,7 +324,11 @@ 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} \ @@ -375,10 +383,6 @@ touch $RPM_BUILD_ROOT/etc/sysconfig/%{name} %{__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 @@ -403,20 +407,28 @@ 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 @@ -431,24 +443,14 @@ rm -f %{_var}/lib/%{name}/syslog-ng.persist %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 @@ -456,7 +458,9 @@ 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 @@ -471,8 +475,13 @@ exit 0 %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 @@ -484,6 +493,11 @@ exit 0 %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 @@ -518,12 +532,6 @@ exit 0 %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) @@ -562,7 +570,7 @@ exit 0 %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