syslog-ng/syslog-ng.spec

330 lines
11 KiB
RPMSpec
Raw Normal View History

%define majorminor %(echo %version | cut -d. -f 1-2)
Name: syslog-ng
Version: 3.6.1
Release: 1mamba
Summary: A syslogd replacement with new functionality
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://freshmeat.net/projects/syslog-ng/
Source: http://www.balabit.com/downloads/files/syslog-ng/open-source-edition/%{version}/source/syslog-ng_%{version}.tar.gz
Source1: syslog-ng.init
Source2: syslog-ng.conf
Source3: syslog-ng.logrotate
Source4: syslog-ng.sysconfig
Patch0: %{name}-3.2.4-Use_CAP_SYSLOG_instead_of_CAP_SYS_ADMIN_if_available.patch
Patch1: syslog-ng-3.4.1-systemd-service-fix-path.patch
Patch2: syslog-ng-3.5.4.1-libjson-c-0.12.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libGeoIP-devel
BuildRequires: libcap-devel
BuildRequires: libdbi-devel
BuildRequires: libesmtp-devel
BuildRequires: libeventlog-devel
BuildRequires: libgcrypt-devel
BuildRequires: libglib-devel
BuildRequires: libgpg-error-devel
BuildRequires: libjson-c-devel
BuildRequires: liblzma-devel
BuildRequires: libnet-devel
BuildRequires: libopenssl-devel
BuildRequires: libpcre-devel
BuildRequires: libsystemd-devel
BuildRequires: libuuid-devel
BuildRequires: libwrap-devel
BuildRequires: perl-devel
## AUTOBUILDREQ-END
BuildRequires: libol-devel >= 0.3.17
BuildRequires: libjson-c-devel >= 0.12
Obsoletes: sysklogd
Provides: sysklogd = %{version}
Requires: libsyslog-ng = %{?epoch:%epoch:}%{version}-%{release}
Requires: libcap >= 2.22
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
syslog-ng, as the name shows, is a syslogd replacement, but with new functionality for the new generation.
The original syslogd allows messages only to be sorted based on priority/facility pairs; syslog-ng adds the possibility to filter based on message contents using regular expressions.
The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it ideal for firewalled environments.
%package -n libsyslog-ng
Summary: Library provided by syslog-ng, a syslogd replacement with new functionality
Group: System/Libraries
%description -n libsyslog-ng
syslog-ng, as the name shows, is a syslogd replacement, but with new functionality for the new generation.
The original syslogd allows messages only to be sorted based on priority/facility pairs; syslog-ng adds the possibility to filter based on message contents using regular expressions.
The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it ideal for firewalled environments.
This package contains static libraries and header files need for development.
%package -n libsyslog-ng-devel
Summary: Devel package for libsyslog-ng
Group: Development/Libraries
Requires: libsyslog-ng = %{?epoch:%epoch:}%{version}-%{release}
%description -n libsyslog-ng-devel
syslog-ng, as the name shows, is a syslogd replacement, but with new functionality for the new generation.
The original syslogd allows messages only to be sorted based on priority/facility pairs; syslog-ng adds the possibility to filter based on message contents using regular expressions.
The new configuration scheme is intuitive and powerful.
Forwarding logs over TCP and remembering all forwarding hops makes it ideal for firewalled environments.
This package contains static libraries and header files need for development.
%prep
%setup -q
#%patch0 -p1
#%patch1 -p1
#%patch2 -p1
%build
%configure \
--sysconfdir=%{_sysconfdir}/syslog-ng \
--sbindir=/sbin \
--with-module-dir=%{_libdir}/syslog-ng \
--enable-ipv6 \
--enable-tcp-wrapper \
--disable-dependency-tracking \
--enable-dynamic-linking \
--enable-systemd
%make
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall
install -D -m0750 %{S:1} %{buildroot}%{_initrddir}/syslog-ng
install -D -m0644 %{S:2} \
%{buildroot}%{_sysconfdir}/syslog-ng/syslog-ng.conf
install -D -m0644 %{S:3} \
%{buildroot}%{_sysconfdir}/logrotate.d/syslog-ng
install -D -m0644 %{S:4} \
%{buildroot}%{_sysconfdir}/sysconfig/syslog-ng
install -d %{buildroot}/var/log
> %{buildroot}/var/log/cron
> %{buildroot}/var/log/daemons
> %{buildroot}/var/log/kernel
> %{buildroot}/var/log/lpr
> %{buildroot}/var/log/mail
> %{buildroot}/var/log/news
install -D -m0644 contrib/systemd/syslog-ng.service %{buildroot}/lib/systemd/system/syslog-ng.service
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%pre
# remove logging directory not used anymore
for i in /var/log/{kernel,cron,lpr,news,daemons,mail}; do
[ -d $i ] && mv $i $i.old
done
exit 0
%post
if [ $1 -eq 1 ]; then
# new install
chkconfig --add syslog-ng
service syslog-ng start
systemctl daemon-reload -q
systemctl enable syslog-ng.service -q
fi
if [ $1 -gt 1 ]; then
# replace unix-stream ("/dev/log") with unix-dgram for systemd
sed -i "s|long_hostnames|chain_hostnames|" %{_sysconfdir}/syslog-ng/syslog-ng.conf
sed -i "s|Version: .*|Version: 3.4|" %{_sysconfdir}/syslog-ng/syslog-ng.conf
sed -i "s|unix-stream|unix-dgram|" %{_sysconfdir}/syslog-ng/syslog-ng.conf
fi
exit 0
%preun
if [ $1 -eq 0 ]; then
# erase
service syslog-ng stop
chkconfig --del syslog-ng
systemctl disable syslog-ng.service -q
fi
exit 0
%postun
if [ $1 -eq 1 ]; then
# upgrade
systemctl daemon-reload -q
service syslog-ng restart
fi
if [ $1 -eq 0 ]; then
systemctl daemon-reload -q
fi
exit 0
%post -n libsyslog-ng -p /sbin/ldconfig
%postun -n libsyslog-ng -p /sbin/ldconfig
%files
%defattr(-,root,root)
%{_initrddir}/syslog-ng
%dir %{_sysconfdir}/syslog-ng
%{_sysconfdir}/logrotate.d/syslog-ng
#%{_sysconfdir}/syslog-ng/modules.conf
%{_sysconfdir}/syslog-ng/scl.conf
%config %{_sysconfdir}/syslog-ng/syslog-ng.conf
%config(noreplace) %{_sysconfdir}/sysconfig/syslog-ng
/sbin/syslog-ng
/sbin/syslog-ng-ctl
%{_bindir}/loggen
%{_bindir}/pdbtool
%{_bindir}/update-patterndb
/lib/systemd/system/syslog-ng.service
%ghost /var/log/cron
%ghost /var/log/daemons
%ghost /var/log/kernel
%ghost /var/log/lpr
%ghost /var/log/mail
%ghost /var/log/news
%{_datadir}/include/scl
%{_datadir}/xsd/patterndb-?.xsd
%{_datadir}/tools/system-expand
%{_mandir}/man1/loggen.1.*
%{_mandir}/man1/pdbtool.*
%{_mandir}/man1/syslog-ng-ctl.*
%{_mandir}/man5/syslog-ng.conf.*
%{_mandir}/man8/syslog-ng.*
%files -n libsyslog-ng
%defattr(-,root,root)
%{_libdir}/libsyslog-ng-*.so.*
%dir %{_libdir}/syslog-ng
%{_libdir}/syslog-ng/*
%doc AUTHORS COPYING
%files -n libsyslog-ng-devel
%defattr(-,root,root)
%dir %{_includedir}/syslog-ng
%{_includedir}/syslog-ng/*
%{_libdir}/libsyslog-ng.la
%{_libdir}/libsyslog-ng.so
%{_datadir}/tools/cfg-grammar.y
%{_datadir}/tools/lex-rules.am
%{_datadir}/tools/merge-grammar.pl
%{_libdir}/pkgconfig/syslog-ng.pc
%{_libdir}/pkgconfig/syslog-ng-test.pc
#%doc NEWS
%changelog
* Sun Dec 28 2014 Automatic Build System <autodist@mambasoft.it> 3.6.1-1mamba
- automatic version update by autodist
* Sun Aug 24 2014 Automatic Build System <autodist@mambasoft.it> 3.5.6-1mamba
- automatic version update by autodist
* Mon Aug 18 2014 Automatic Build System <autodist@mambasoft.it> 3.5.5-1mamba
- automatic version update by autodist
* Sat Jun 28 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.5.4.1-1mamba
- update to 3.5.4.1
- rebuilt with libjson-c-devel 0.12
* Tue Jan 21 2014 Automatic Build System <autodist@mambasoft.it> 3.5.3-1mamba
- automatic version update by autodist
* Fri Nov 08 2013 Automatic Build System <autodist@mambasoft.it> 3.5.1-1mamba
- automatic version update by autodist
* Sun Aug 18 2013 Automatic Build System <autodist@mambasoft.it> 3.4.3-1mamba
- automatic version update by autodist
* Tue Jun 11 2013 Automatic Build System <autodist@mambasoft.it> 3.4.2-1mamba
- automatic version update by autodist
* Sun May 26 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.1-4mamba
- fix startup with systemd: configure /var/log as unix-dgram() instead of unix-stream()
* Tue Mar 26 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.1-3mamba
- rebuilt with systemd support
* Mon Mar 25 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.1-2mamba
- fix linking to libesmtp
* Thu Feb 14 2013 Automatic Build System <autodist@mambasoft.it> 3.4.1-1mamba
- automatic version update by autodist
* Wed Dec 12 2012 Automatic Build System <autodist@mambasoft.it> 3.3.7-1mamba
- automatic version update by autodist
* Wed Oct 17 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.6-2mamba
- syslog-ng.conf: log Shorewall to firewall file
* Sun Sep 02 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.6-1mamba
- update to 3.3.6
- updated configuration; added UFW firewall support
* Thu Aug 09 2012 Automatic Build System <autodist@mambasoft.it> 3.3.2-1mamba
- automatic version update by autodist
* Tue Aug 23 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-2mamba
- move default configuration from /etc/syslog-ng.conf to /etc/syslog-ng/syslong-ng.conf
* Tue Aug 23 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-1mamba
- update to 3.2.4
* Fri Dec 31 2010 Automatic Build System <autodist@mambasoft.it> 3.2.1-1mamba
- automatic update by autodist
* Wed Oct 27 2010 Automatic Build System <autodist@mambasoft.it> 3.1.2-1mamba
- automatic update by autodist
* Tue May 25 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.1-1mamba
- update to 3.1.1
* Sun Dec 27 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.0.5-1mamba
- update to 3.0.5
* Thu Jan 08 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.10-1mamba
- automatic update by autodist
* Sun Jun 29 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.9-2mamba
- raise stats generation frequency to 86400 (1 day)
* Sun Jun 01 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.9-1mamba
- update to 2.0.9
* Sun Mar 18 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.0.2-1qilnx
- update to version 2.0.2 by autospec
* Tue Oct 05 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.6.11-4qilnx
- removed syslog configurations for cron (conflicts with vixie-cron settings)
* Fri Jul 14 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.6.11-3qilnx
- updated configuration file for logrotate
* Thu Jul 13 2006 Davide Madrisan <davide.madrisan@qilinux.it> 1.6.11-2qilnx
- added support for openldap in the configuration file
- own %{_sysconfdir}/syslog-ng
- logging files provided by this package marked as %%ghost
- fixed permissions of configuration files
* Fri May 05 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.11-1qilnx
- update to version 1.6.11 by autospec
- set 644 permissions to log files
- obsolete sysklogd
* Thu Mar 09 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.9-4qilnx
- don't put firewall log in /var/log/kernel
* Wed Jan 25 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.9-3qilnx
- fixed pre script (add exit 0 at the end)
* Tue Dec 06 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.9-2qilnx
- added /var/log/firewall support
- remove old logging directories (use single file instead)
* Thu Dec 01 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 1.6.9-1qilnx
- package created by autospec