%define _with_systemd 1 %define _libdir /%{_lib} %define journalcfgdir %{_sysconfdir}/systemd Summary: Enhanced system logging and kernel message trapping daemons Name: rsyslog Version: 8.16.0 %define subrel 1 Release: %mkrel 1 License: GPLv3 Group: System/Kernel and hardware URL: http://www.rsyslog.com/ Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{version}.tar.gz Source2: rsyslog.sysconfig Source3: rsyslog.conf Source4: 00_common.conf Source5: 01_mysql.conf Source6: 02_pgsql.conf Source7: 03_gssapi.conf Source8: 04_relp.conf Source9: 05_dbi.conf Source10: 06_snmp.conf Source11: sysklogd.conf Source12: 07_rsyslog.log Source13: 08_gnutls.conf Source14: 09_journald.conf # (eatdirt) bash script to switch on and off ForwardToSyslog in systemd journal #configuration file Source15: rsyslog_switchfwd # Merged old service file patch with debian's Patch0: rsyslog-8.4.1-systemd.patch Patch1: rsyslog-8.16.0-buffer-overflow-fix.patch BuildRequires: autoconf BuildRequires: automake %ifnarch %arm %mips %endif BuildRequires: krb5-devel BuildRequires: libdbi-devel BuildRequires: libtool BuildRequires: mysql-devel >= 4.0 BuildRequires: net-snmp-devel BuildRequires: pkgconfig BuildRequires: postgresql-devel BuildRequires: relp-devel BuildRequires: zlib-devel BuildRequires: gnutls-devel BuildRequires: libgcrypt-devel BuildRequires: pkgconfig(libestr) BuildRequires: pkgconfig(liblogging-stdlog) BuildRequires: pkgconfig(json-c) BuildRequires: pkgconfig(uuid) BuildRequires: curl-devel BuildRequires: python-docutils Requires: logrotate Provides: syslog-daemon Requires(post): rpm-helper >= 0.24.8-1 Requires(preun): rpm-helper >= 0.24.8-1 Requires(post): chkconfig Requires(post): coreutils Conflicts: syslog-ng Obsoletes: rsyslog-docs < 8.2.2 %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, MySQL, PostgreSQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any message part, and fine grain output format control. It is quite compatible to stock sysklogd and can be used as a drop-in replacement. Its advanced features make it suitable for enterprise-class, encryption protected syslog relay chains while at the same time being very easy to setup for the novice user. o lmnet.so - Implementation of network related stuff. o lmregexp.so - Implementation of regexp related stuff. o lmtcpclt.so - This is the implementation of TCP-based syslog clients. o lmtcpsrv.so - Common code for plain TCP based servers. o imtcp.so - This is the implementation of the TCP input module. o imudp.so - This is the implementation of the UDP input module. o imuxsock.so - This is the implementation of the Unix sockets input module. o imklog.so - The kernel log input module for Linux. o immark.so - This is the implementation of the build-in mark message input module. o imfile.so - This is the input module for reading text file data. o imjournal.so - An input module to import systemd journal logs %package mysql Summary: MySQL support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description mysql The rsyslog-mysql package contains a dynamic shared object that will add MySQL database support to rsyslog. o ommysql.so - This is the implementation of the build-in output module for MySQL. %package pgsql Summary: PostgreSQL support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description pgsql The rsyslog-pgsql package contains a dynamic shared object that will add PostgreSQL database support to rsyslog. o ompgsql.so - This is the implementation of the build-in output module for PgSQL. %package gssapi Summary: GSS-API support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description gssapi The rsyslog-gssapi package contains dynamic shared objects that will add GSS-API support to rsyslog. o lmgssutil.so - This is a miscellaneous helper class for gss-api features. o imgssapi.so - This is the implementation of the GSSAPI input module. o omgssapi.so - This is the implementation of the build-in forwarding output module. %package relp Summary: RELP support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description relp The rsyslog-relp package contains a dynamic shared object that will add RELP support to rsyslog. o imrelp.so - This is the implementation of the RELP input module. o omrelp.so - This is the implementation of the RELP output module. %package dbi Summary: Dbi support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description dbi The rsyslog-dbi package contains a dynamic shared object that will add dbi driver support to rsyslog. o omlibdbi.so - This is the implementation of the dbi output module. %package snmp Summary: SNMP support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description snmp The rsyslog-snmp package contains a dynamic shared object that will add SNMP support to rsyslog. o omsnmp.so - This module sends an snmp trap. %package gnutls Summary: GnuTLS support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description gnutls The rsyslog-gnutls package contains a dynamic shared object that will add GnuTLS support to rsyslog. o lmnsd_gtls.so - This is the implementation of the GnuTLS module. %package crypto Summary: Encryption support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description crypto This package contains a module providing log file encryption and a command line tool to process encrypted logs. %package elasticsearch Summary: ElasticSearch output module for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description elasticsearch This module provides the capability for rsyslog to feed logs directly into Elasticsearch. %package journald Summary: Systemd journal support for rsyslog Group: System/Kernel and hardware Requires: %{name} = %{version}-%{release} %description journald Provides the ability to import structured log messages from systemd journal to rsyslog (and conversely). Note that this module reads the journal database, what is considered a relativly performance-intense operation. As such, the performance of a configuration utilizing this module may be notably slower. Some versions of systemd journal have problems with database corruption, which leads to the journal to return the same data endlessly in a thight loop. It is strongly recommended to use this plugin only if there is hard need to do so. %prep %setup -q %autopatch -p1 mkdir -p Mageia cp %{SOURCE4} Mageia/00_common.conf cp %{SOURCE5} Mageia/01_mysql.conf cp %{SOURCE6} Mageia/02_pgsql.conf cp %{SOURCE7} Mageia/03_gssapi.conf cp %{SOURCE8} Mageia/04_relp.conf cp %{SOURCE9} Mageia/05_dbi.conf cp %{SOURCE10} Mageia/06_snmp.conf cp %{SOURCE13} Mageia/08_gnutls.conf cp %{SOURCE14} Mageia/09_journald.conf %build %serverbuild %configure2_5x \ %if %{_with_systemd} --with-systemdsystemunitdir=%{_unitdir} \ %endif --disable-static \ --sbindir=/sbin \ --enable-largefile \ --enable-regexp \ --enable-gssapi-krb5 \ --enable-klog \ --enable-inet \ --enable-mysql \ --enable-pgsql \ --enable-libdbi \ --enable-snmp \ --enable-rsyslogd \ --enable-mail \ --enable-relp \ --enable-imfile \ --enable-gnutls \ --enable-elasticsearch \ --enable-generate-man-pages \ --enable-usertools \ --enable-libgcrypt \ --enable-imjournal \ --enable-omjournal %make_build %install %make_install install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d install -d -m 755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m 755 %{buildroot}%{_sysconfdir}/pki install -d -m 755 %{buildroot}%{_sysconfdir}/pki/tls install -d -m 755 %{buildroot}%{_sysconfdir}/pki/tls/certs install -d -m 755 %{buildroot}%{_sysconfdir}/pki/tls/private install -p -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/rsyslog install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rsyslog.conf install -p -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/syslog.conf install -p -m 644 %{SOURCE12} %{buildroot}%{_sysconfdir}/logrotate.d/rsyslog install -p -m 644 Mageia/*_*.conf %{buildroot}%{_sysconfdir}/rsyslog.d/ install -p -m 644 contrib/gnutls/ca.pem \ %{buildroot}%{_sysconfdir}/pki/tls/certs/rsyslog-ca.crt install -p -m 644 contrib/gnutls/cert.pem \ %{buildroot}%{_sysconfdir}/pki/tls/certs/rsyslog.crt install -p -m 600 contrib/gnutls/key.pem \ %{buildroot}%{_sysconfdir}/pki/tls/private/rsyslog.key # (eatdirt) %__install -D -p -m 755 %{SOURCE15} %{buildroot}%{_sbindir}/rsyslog_switchfwd #get rid of *.la rm %{buildroot}/%{_libdir}/rsyslog/*.la # cleanup rm -f %{buildroot}%{_libdir}/rsyslog/imtemplate.so %post # (eatdirt) # switch ForwardToSyslog=yes in /etc/systemd/journald.conf + backup %{_sbindir}/rsyslog_switchfwd %{journalcfgdir} on # restart systemd-journal /bin/systemctl try-restart systemd-journald || : %_post_service rsyslog # (cg) Handle a quirk of syslog service installations if [ -f %{_sysconfdir}/systemd/system/multi-user.target.wants/%{name}.service -a ! -f %{_sysconfdir}/systemd/system/syslog.service ]; then %__cp -a %{_sysconfdir}/systemd/system/multi-user.target.wants/%{name}.service %{_sysconfdir}/systemd/system/syslog.service fi for n in /var/log/{messages,secure,maillog,spooler}; do [ -f $n ] && continue umask 066 && touch $n done %preun %_preun_service rsyslog #(eatdirt) #restore the previously saved /etc/systemd/journald.conf file if [ "$1" -eq "0" ]; then %{_sbindir}/rsyslog_switchfwd %{journalcfgdir} off # restart systemd-journal /bin/systemctl try-restart systemd-journald || : fi %postun if [ "$1" -ge "1" ]; then /bin/systemctl try-restart rsyslog.service || : fi %post mysql /bin/systemctl try-restart rsyslog.service || : %preun mysql if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post pgsql /bin/systemctl try-restart rsyslog.service || : %preun pgsql if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post gssapi /bin/systemctl try-restart rsyslog.service || : %preun gssapi if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post relp /bin/systemctl try-restart rsyslog.service || : %preun relp if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post dbi /bin/systemctl try-restart rsyslog.service || : %preun dbi if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post snmp /bin/systemctl try-restart rsyslog.service || : %preun snmp if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post gnutls /bin/systemctl try-restart rsyslog.service || : %preun gnutls if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %post journald /bin/systemctl try-restart rsyslog.service || : %preun journald if [ "$1" = 0 ]; then /bin/systemctl try-restart rsyslog.service || : fi %files %doc AUTHORS ChangeLog README %config(noreplace) %{_sysconfdir}/rsyslog.conf %config(noreplace) %{_sysconfdir}/syslog.conf %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog %config(noreplace) %{_sysconfdir}/logrotate.d/rsyslog %dir %{_sysconfdir}/rsyslog.d %config(noreplace) %{_sysconfdir}/rsyslog.d/*_common.conf %if %{_with_systemd} %{_unitdir}/rsyslog.service %endif /sbin/rsyslogd %{_sbindir}/rsyslog_switchfwd %dir %{_libdir}/rsyslog %{_libdir}/rsyslog/imfile.so %{_libdir}/rsyslog/imklog.so %{_libdir}/rsyslog/immark.so %{_libdir}/rsyslog/imtcp.so %{_libdir}/rsyslog/imudp.so %{_libdir}/rsyslog/imuxsock.so %{_libdir}/rsyslog/lmnet.so %{_libdir}/rsyslog/lmnetstrms.so %{_libdir}/rsyslog/lmnsd_ptcp.so %{_libdir}/rsyslog/lmregexp.so %{_libdir}/rsyslog/lmstrmsrv.so %{_libdir}/rsyslog/lmtcpclt.so %{_libdir}/rsyslog/lmzlibw.so %{_libdir}/rsyslog/lmtcpsrv.so %{_libdir}/rsyslog/mmexternal.so %{_libdir}/rsyslog/omtesting.so %{_libdir}/rsyslog/ommail.so %{_mandir}/*/* %files mysql %doc plugins/ommysql/createDB.sql %config(noreplace) %{_sysconfdir}/rsyslog.d/*_mysql.conf %{_libdir}/rsyslog/ommysql.so %files pgsql %doc plugins/ompgsql/createDB.sql %config(noreplace) %{_sysconfdir}/rsyslog.d/*_pgsql.conf %{_libdir}/rsyslog/ompgsql.so %files gssapi %config(noreplace) %{_sysconfdir}/rsyslog.d/*_gssapi.conf %{_libdir}/rsyslog/omgssapi.so %{_libdir}/rsyslog/imgssapi.so %{_libdir}/rsyslog/lmgssutil.so %files relp %config(noreplace) %{_sysconfdir}/rsyslog.d/*_relp.conf %{_libdir}/rsyslog/imrelp.so %{_libdir}/rsyslog/omrelp.so %files dbi %config(noreplace) %{_sysconfdir}/rsyslog.d/*_dbi.conf %{_libdir}/rsyslog/omlibdbi.so %files snmp %config(noreplace) %{_sysconfdir}/rsyslog.d/*_snmp.conf %{_libdir}/rsyslog/omsnmp.so %files gnutls %config(noreplace) %{_sysconfdir}/rsyslog.d/*_gnutls.conf %config(noreplace) %{_sysconfdir}/pki/tls/certs/rsyslog-ca.crt %config(noreplace) %{_sysconfdir}/pki/tls/certs/rsyslog.crt %config(noreplace) %{_sysconfdir}/pki/tls/private/rsyslog.key %{_libdir}/rsyslog/lmnsd_gtls.so %files crypto %{_bindir}/rscryutil %{_mandir}/man1/rscryutil.1.* %{_libdir}/rsyslog/lmcry_gcry.so %files elasticsearch %{_libdir}/rsyslog/omelasticsearch.so %files journald %config(noreplace) %{_sysconfdir}/rsyslog.d/*_journald.conf %{_libdir}/rsyslog/omjournal.so %{_libdir}/rsyslog/imjournal.so %changelog * Fri Sep 21 2018 mrambo3501 <mrambo3501> 8.16.0-1.1.mga6 (not released yet) + Revision: 1294923 - add upstream patch which fixes a buffer overflow (mga#23439) * Sun Feb 28 2016 oden <oden> 8.16.0-1.mga6 + Revision: 980326 - 8.16.0 + luigiwalser <luigiwalser> - revert using systemctl to HUP rsyslog daemon * Mon Jan 11 2016 luigiwalser <luigiwalser> 8.15.0-2.mga6 + Revision: 921836 - rebuild for gnutls * Sat Dec 26 2015 luigiwalser <luigiwalser> 8.15.0-1.mga6 + Revision: 915220 - 8.15.0 - sync fixes for rsyslog logrotate config from fedora - remove patch 1 (fixed upstream) - remove invalid configure options - enable man pages * Tue Nov 25 2014 cjw <cjw> 8.4.2-6.mga6 + Revision: 799071 - rebuild against postgresql9.4 * Fri Oct 31 2014 pterjan <pterjan> 8.4.2-5.mga5 + Revision: 794914 - Drop no longer needed BuildRequires on java-rpmbuild * Fri Oct 17 2014 cjw <cjw> 8.4.2-4.mga5 + Revision: 778325 - fix preun script for upgrades so syslog forwarding doesn't get disabled * Wed Oct 15 2014 umeabot <umeabot> 8.4.2-3.mga5 + Revision: 748777 - Second Mageia 5 Mass Rebuild * Tue Oct 07 2014 eatdirt <eatdirt> 8.4.2-2.mga5 + Revision: 737438 - Added imjournal module and scriptlet to switch on/off forwarding from systemd-journald * Fri Oct 03 2014 oden <oden> 8.4.2-1.mga5 + Revision: 736401 - 8.4.2 (fixes CVE-2014-3683) * Wed Oct 01 2014 luigiwalser <luigiwalser> 8.4.1-1.mga5 + Revision: 733915 - 8.4.1 (fixes CVE-2014-3634) - rediff patch 0 (systemd patch) - remove upstreamed patches 1 and 3 * Tue Sep 16 2014 umeabot <umeabot> 8.4.0-2.mga5 + Revision: 688729 - Mageia 5 Mass Rebuild * Fri Sep 05 2014 diogenese <diogenese> 8.4.0-1.mga5 + Revision: 672347 - Updated source to 8.4.0 - Updated conf files to use RainerScript - Added upstream patch for json tokener error * Wed Jul 02 2014 pterjan <pterjan> 8.2.2-1.mga5 + Revision: 642076 - 8.2.2 * Fri Oct 18 2013 umeabot <umeabot> 5.10.1-3.mga4 + Revision: 518139 - Mageia 4 Mass Rebuild * Mon Jan 14 2013 umeabot <umeabot> 5.10.1-2.mga3 + Revision: 380542 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Tue Oct 30 2012 luigiwalser <luigiwalser> 5.10.1-1.mga3 + Revision: 311659 - 5.10.1 + guillomovitch <guillomovitch> - use canonical macro for systemd path * Thu Aug 09 2012 guillomovitch <guillomovitch> 5.8.12-2.mga3 + Revision: 280140 - drop sysinit support * Sat Jul 14 2012 luigiwalser <luigiwalser> 5.8.12-1.mga3 + Revision: 270794 - 5.8.12 * Thu Jul 05 2012 colin <colin> 5.8.11-2.mga3 + Revision: 267901 - Drop an unneeded ExecStartPre= in .service file (since systemd v38) * Mon Jun 11 2012 luigiwalser <luigiwalser> 5.8.11-1.mga3 + Revision: 259584 - 5.8.11 * Sat Apr 28 2012 tmb <tmb> 5.8.10-4.mga2 + Revision: 233853 - Require rpm-helper >= 0.24.8-1 for systemd support * Sat Apr 21 2012 colin <colin> 5.8.10-3.mga2 + Revision: 232369 - Use macros in post script. * Sat Apr 21 2012 colin <colin> 5.8.10-2.mga2 + Revision: 232364 - Handle a the special case of syslog.service during systemd migration * Sun Apr 15 2012 luigiwalser <luigiwalser> 5.8.10-1.mga2 + Revision: 230824 - 5.8.10 - add missing BuildRequires libgcrypt-devel + mcb30 <mcb30> - Enable GnuTLS support (lmnsd_gtls.so) * Sun Apr 01 2012 colin <colin> 5.8.9-2.mga2 + Revision: 227728 - Let rsyslog read kernel messages again (journald doesn't really do the job well) mga#4131 * Mon Mar 26 2012 colin <colin> 5.8.9-1.mga2 + Revision: 226506 - New version: 5.8.9 * Sun Mar 11 2012 colin <colin> 5.8.8-1.mga2 + Revision: 222793 - New version: 5.8.8 (better systemd integration) * Sun Feb 19 2012 luigiwalser <luigiwalser> 5.8.7-1.mga2 + Revision: 210573 - 5.8.7 * Thu Feb 16 2012 colin <colin> 5.8.6-2.mga2 + Revision: 209728 - Do not enable kernel logging by default. Systemd's journal does that now. * Tue Nov 01 2011 dmorgan <dmorgan> 5.8.6-1.mga2 + Revision: 161139 - New version 5.8.6 - modify logrotate configuration to omit boot.log Resolves: RHBZ #745093 * Sun Oct 30 2011 blino <blino> 5.8.5-6.mga2 + Revision: 159899 - require sysvinit for scriptlets * Fri Oct 28 2011 dmorgan <dmorgan> 5.8.5-5.mga2 + Revision: 158900 - Fix service start during update * Thu Oct 27 2011 dmorgan <dmorgan> 5.8.5-4.mga2 + Revision: 158862 - Allow to be installable w/o systemd * Thu Oct 27 2011 dmorgan <dmorgan> 5.8.5-3.mga2 + Revision: 158781 - Rebuild now that the chroot is fixed * Thu Oct 27 2011 dmorgan <dmorgan> 5.8.5-2.mga2 + Revision: 158756 - Enable systemd support - Apply P0 Fix buildrequires * Fri Sep 02 2011 misc <misc> 5.8.5-1.mga2 + Revision: 137956 - remove old trigger, not needed in cauldron since we no longer support upgrading from very old mandriva - prune old conflicts - new version 5.8.5 ( security fix ) * Wed Aug 31 2011 colin <colin> 5.8.4-1.mga2 + Revision: 137149 - New version: 5.8.4 - Add support for systemd + guillomovitch <guillomovitch> - rebuild for latest net-snmp + rapsys <rapsys> - Remove mdv ref * Fri Mar 25 2011 dmorgan <dmorgan> 5.6.2-4.mga1 + Revision: 77246 - Rebuild against new mysql * Fri Jan 28 2011 rtp <rtp> 5.6.2-3.mga1 + Revision: 42986 - fix typo - disable java on arm/mips + dmorgan <dmorgan> - Bump release - Update patches from mdv - Sync with mdv changes for systemd ( not yet activated) * Fri Jan 14 2011 ahmad <ahmad> 5.6.2-2.mga1 + Revision: 17844 - imported package rsyslog