* Update to 3.1.4.

This commit is contained in:
Jose Pedro Oliveira 2011-04-25 22:29:30 +01:00
parent a3d8430fcf
commit daa5c7ff44
13 changed files with 70 additions and 177 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
syslog-ng-2.1.4.tar.gz
syslog-ng-2.1.4-libnet.patch
/syslog-ng_3.1.4.tar.gz

View File

@ -1,6 +0,0 @@
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,3 +0,0 @@
SYSLOGNG_PID="/var/run/syslog-ng.pid"
SYSLOGNG_OPTIONS="-p $SYSLOGNG_PID"
SYSLOGNG_COMPAT_PID="/var/run/rsyslogd.pid"

View File

@ -1 +1 @@
17c4c7725d2eab62b588395f1ed93f32 syslog-ng-2.1.4.tar.gz
48e6646d12d30c655f4391b970d61f56 syslog-ng_3.1.4.tar.gz

View File

@ -1,7 +0,0 @@
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,6 +0,0 @@
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -1,3 +0,0 @@
SYSLOGNG_PID="/var/run/syslog-ng.pid"
SYSLOGNG_OPTIONS="-p $SYSLOGNG_PID"
SYSLOGNG_COMPAT_PID="/var/run/syslogd.pid"

View File

@ -1,12 +0,0 @@
diff -uNr syslog-ng-2.1.4.orig/configure.in syslog-ng-2.1.4/configure.in
--- syslog-ng-2.1.4.orig/configure.in 2008-11-19 05:00:11.000000000 -0800
+++ syslog-ng-2.1.4/configure.in 2009-08-20 19:27:52.000000000 -0700
@@ -466,7 +466,7 @@
elif test "x$enable_static_linking" = "xyes"; then
DEPS_LIBS="-static $LIBS $LEXLIB $GLIB_LIBS $EVTLOG_LIBS $LIBNET_LIBS $LIBWRAP_LIBS $LIBDBI_LIBS"
else
- DEPS_LIBS="$LIBS $LD_START_STATIC $LEXLIB $GLIB_LIBS $EVTLOG_LIBS $LIBNET_LIBS $LIBWRAP_LIBS $LD_END_STATIC $LIBDBI_LIBS $DL_LIBS"
+ DEPS_LIBS="$LIBS $LD_START_STATIC $LEXLIB $GLIB_LIBS $EVTLOG_LIBS $LIBWRAP_LIBS $LD_END_STATIC $LIBNET_LIBS $LIBDBI_LIBS $DL_LIBS"
fi
LIBS="$DEPS_LIBS"
YFLAGS="-d"

View File

@ -1,3 +1,5 @@
@version:3.0
# syslog-ng configuration file.
#
# This should behave pretty much like the original syslog on RedHat. But
@ -7,7 +9,7 @@
#
options {
sync (0);
flush_lines (0);
time_reopen (10);
log_fifo_size (1000);
long_hostnames (off);
@ -18,7 +20,7 @@ options {
};
source s_sys {
file ("/proc/kmsg" log_prefix("kernel: "));
file ("/proc/kmsg" program_override("kernel: "));
unix-stream ("/dev/log");
internal();
# udp(ip(0.0.0.0) port(514));
@ -27,7 +29,7 @@ source s_sys {
destination d_cons { file("/dev/console"); };
destination d_mesg { file("/var/log/messages"); };
destination d_auth { file("/var/log/secure"); };
destination d_mail { file("/var/log/maillog" sync(10)); };
destination d_mail { file("/var/log/maillog" flush_lines(10)); };
destination d_spol { file("/var/log/spooler"); };
destination d_boot { file("/var/log/boot.log"); };
destination d_cron { file("/var/log/cron"); };

View File

@ -1,104 +1,62 @@
%{?_with_spoofsource:%define spoofsource 1}
%define evtlog_ver 0.2.7-1
%define evtlog_ver 0.2.7
%define _sbindir /sbin
%define _localstatedir /var/lib/syslog-ng
Name: syslog-ng
Version: 2.1.4
Release: 8%{?dist}
Version: 3.1.4
Release: 2%{?dist}
Summary: Next-generation syslog server
Group: System Environment/Daemons
License: GPLv2+
Url: http://www.balabit.com/products/syslog_ng/
Source0: http://www.balabit.com/downloads/files/syslog-ng/sources/2.1/src/%{name}-%{version}.tar.gz
Source0: http://www.balabit.com/downloads/files?path=/syslog-ng/sources/%{version}/source/%{name}_%{version}.tar.gz
Source1: syslog-ng.conf
Source2: syslog-ng.init.d
Source10: sysklogd-syslog-ng.sysconfig
Source11: sysklogd-1.4.1-logrotate.d-syslog.log
Source12: sysklogd-1.4.1-44-logrotate.d-syslog.log
Source20: rsyslog-syslog-ng.sysconfig
Source21: rsyslog-3.14.1-logrotate.d-rsyslog.log
Source30: rsyslog-syslog-ng-fc10.sysconfig
Source31: rsyslog-3.21.9-logrotate.d-rsyslog.log
Patch0: syslog-ng-2.1.4-libnet.patch
Source3: syslog-ng.sysconfig
Source4: syslog-ng.logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: pkgconfig
BuildRequires: glib2-devel
%if 0%{?fedora}
BuildRequires: glib2-static
%endif
%if 0%{?rhel}
BuildRequires: tcp_wrappers
BuildRequires: eventlog-static >= %{evtlog_ver}
BuildRequires: automake
%else
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: glib2-devel >= 2.10.1
BuildRequires: libnet-devel >= 1.1.4-3
BuildRequires: pcre-devel >= 7.3
BuildRequires: tcp_wrappers-devel
%endif
BuildRequires: libnet-devel
Requires: logrotate
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
Provides: syslog
%if 0%{?rhel} == 4
# makes vixie-cron and initscripts happy
Provides: sysklogd = 1.3.33-6
%endif
# merge separate syslog-vim package into one
Provides: syslog-ng-vim = %{version}-%{release}
Obsoletes: syslog-ng-vim < 2.0.8-1
%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
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.
%prep
%setup -q
%if 0%{?rhel}
%patch0 -p1 -b .libnet
%endif
# fix perl path
%{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
# force regeneration to avoid broken paths from upstream (#265221)
touch src/cfg-grammar.c src/cfg-lex.c
%define logrotated_dst syslog
%if 0%{?rhel}
%if 0%{?rhel} <= 4
%define sysconfig_src %{SOURCE10}
%define logrotated_src %{SOURCE11}
%endif
%if 0%{?rhel} >= 5
%define sysconfig_src %{SOURCE10}
%define logrotated_src %{SOURCE12}
%endif
%endif
%if 0%{?fedora}
%if 0%{?fedora} <= 9
%define sysconfig_src %{SOURCE20}
%define logrotated_src %{SOURCE21}
%endif
%if 0%{?fedora} >= 10
%define sysconfig_src %{SOURCE30}
%define logrotated_src %{SOURCE31}
%endif
%endif
# fix executable perms on contrib files
%{__chmod} -c a-x contrib/syslog2ng
%build
@ -106,15 +64,9 @@ touch src/cfg-grammar.c src/cfg-lex.c
--enable-ipv6 \
--sysconfdir=%{_sysconfdir}/%{name} \
--enable-tcp-wrapper \
%if 0%{?spoofsource}
--enable-pcre \
--enable-spoof-source \
%endif
%if 0%{?rhel}
--enable-mixed-linking
%else
--enable-dynamic-linking
%endif
make %{_smp_mflags}
@ -130,11 +82,10 @@ make DESTDIR=%{buildroot} install
%{__install} -p -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/init.d/%{name}
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
%{__install} -p -m 644 %{sysconfig_src} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
%{__install} -p -m 644 %{logrotated_src} \
%{buildroot}%{_sysconfdir}/logrotate.d/%{logrotated_dst}
%{__install} -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog
# make local state dir
%{__install} -d -m 755 %{buildroot}/%{_localstatedir}
@ -143,17 +94,11 @@ make DESTDIR=%{buildroot} install
/usr/bin/iconv -f iso8859-1 -t utf-8 AUTHORS > AUTHORS.conv && \
%{__mv} -f AUTHORS.conv AUTHORS
# fix executable perms on contrib files
%{__chmod} -x contrib/relogger.pl
%{__chmod} -x contrib/syslog2ng
# fix script interpreter
sed -i 's/\/usr\/local\/bin\/perl/\/usr\/bin\/perl/' contrib/relogger.pl
# install vim files
%{__install} -d -m 755 %{buildroot}%{_datadir}/%{name}
%{__install} -p -m 644 contrib/syslog-ng.vim %{buildroot}%{_datadir}/%{name}
for vimver in 63 64 70 71 ; do
for vimver in 70 71 72 73 ; do
%{__install} -d -m 755 %{buildroot}%{_datadir}/vim/vim$vimver/syntax
cd %{buildroot}%{_datadir}/vim/vim$vimver/syntax
ln -s ../../../%{name}/syslog-ng.vim .
@ -203,29 +148,63 @@ if [ $1 = 1 ]; then
fi
%files
%defattr(-,root,root)
%defattr(-,root,root,-)
%doc AUTHORS COPYING README ChangeLog NEWS
%doc doc/reference/syslog-ng.txt
%doc doc/security/*.txt
%doc doc/examples/syslog-ng.conf.sample
%doc contrib/{relogger.pl,syslog2ng,syslog-ng.conf.doc}
%dir %{_sysconfdir}/%{name}
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/logrotate.d/%{logrotated_dst}
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
%{_sysconfdir}/init.d/%{name}
%dir %{_localstatedir}
%{_sbindir}/%{name}
%{_sbindir}/syslog-ng-ctl
%{_bindir}/loggen
%{_bindir}/pdbtool
%{_bindir}/update-patterndb
%{_datadir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%ghost %{_datadir}/vim/
%changelog
* Mon Apr 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.1.4-2
- cleans the sysconfig and logrotate file mess (#651823 comments 17, 20 and 21)
- add support for vim versions 72 and 73; drop support for 6x
- clean the spoofsource conditional logical: libnet resides in /lib{,64} since
since 2009
* Wed Apr 13 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.1.4-1
- update for syslog-ng 3.1.4
- updated the source URL
- versioned some of the build requirements
- dropped the libnet patch (syslog-ng-2.1.4-libnet.patch)
- dropped support for EPEL-4 and EPEL-5 (syslog-ng 4.x requires pcre >= 7.3)
- new file: update-patterndb
* Sat Jul 24 2010 Doug Warner <silfreed@fedoraproject.org> - 3.1.1-1
- update for syslog-ng 3.1.1
- supports the new syslog protocol standards
- log statements can be embedded into each other
- the encoding of source files can be set for proper character conversion
- can read, process, and rewrite structured messages (e.g., Apache webserver
logs) using templates and regular expressions
- support for patterndb v2 and v3 format, along with a bunch of new
parsers: ANYSTRING, IPv6, IPvANY and FLOAT.
- added a new "pdbtool" utility to manage patterndb files: convert them
from v1 or v2 format, merge mulitple patterndb files into one and look
up matching patterns given a specific message.
- support for message tags: tags can be assigned to log messages as they
enter syslog-ng: either by the source driver or via patterndb.
Later it these tags can be used for efficient filtering.
- added support for rewriting structured data
- added pcre support in the binary packages of syslog-ng
* Tue Sep 15 2009 Ray Van Dolson <rayvd@fedoraproject.org> - 2.1.4-8
- Adjust eventlog build requirement

View File

@ -1,52 +0,0 @@
" Vim syntax file
" Language: syslog-ng: syslog-ng main configuration file (1.5.5a)
" Maintainer: --
" Last change: 2001 Apr 13
" URL: --
" syslog-ng's home: http://www.balabit.hu
" Something like this in filetype.vim would be helpful
" au BufNewFile,BufRead syslog-ng.conf setf syslog-ng
" Remove any old syntax stuff hanging around
syn clear
syn case match
set iskeyword=a-z,A-Z,48-57,_,-,.
syn keyword sysngStatement source destination filter log options
syn match sysngComment "#.*$"
syn match sysngString +"[^"]*"+
syn match sysngOctNumber "\<0\o\+\>"
syn match sysngDecNumber "\<\d\+\>"
syn match sysngHexNumber "\<0x\x\+\>"
syn keyword sysngBool yes no on off
syn match sysngIdentifier "\<[sdf]_\+\>"
syn keyword sysngDriver internal remote_control
syn keyword sysngDriver file fifo pipe door
syn keyword sysngDriver udp tcp udp6 tcp6
syn keyword sysngDriver sun_stream sun_streams sun-stream sun-streams
syn keyword sysngDriver unix_dgram unix_stream unix-dgram unix-stream
syn keyword sysngDriver usertty program
syn keyword sysngFilter not and or .. level priority facility
syn keyword sysngFilter program host match DEFAULT
if !exists("did_sysng_syntax_inits")
let did_sysng_syntax_inits = 1
hi link sysngStatement Statement
hi link sysngComment Comment
hi link sysngString String
hi link sysngOctNumber Number
hi link sysngDecNumber Number
hi link sysngHexNumber Number
hi link sysngBool Constant
hi link sysngIdentifier Identifier
hi link sysngDriver Type
hi link sysngFilter Operator
endif
let b:current_syntax = "syslog-ng"