Compare commits

...

14 Commits
rawhide ... el6

Author SHA1 Message Date
Peter Czanik a1f0450de5 - add syslog-ng-3.2.5-nilvalue-patch.diff to fix
a bug reported on the syslog-ng mailinglist

Signed-off-by: Peter Czanik <pczanik@fang.fa.gau.hu>
2014-07-23 11:45:23 +02:00
Jose Pedro Oliveira 260e957a40 Enabled SQL support (subpackage syslog-ng-libdbi) and the SQL test. 2012-01-15 19:34:12 +00:00
Jose Pedro Oliveira 955914b666 Ship the same logrotate file as the one shipped in RHEL 6.2 rsyslog package
(see #767761 and #683537)
Move the SCL files to the main RPM (#742624 comments >= 28)
2011-12-14 22:28:20 +00:00
Jose Pedro Oliveira 53c1bf04eb Update to 3.2.5 2011-11-01 20:33:12 +00:00
Jose Pedro Oliveira 150f3cd2d9 Patch syslog-ng-3.2.4-chain-hostnames-processing.patch (#713965) 2011-06-27 18:51:47 +01:00
Jose Pedro Oliveira 41807f2be0 * Update to 3.2.4 2011-05-25 22:25:26 +01:00
Jose Pedro Oliveira e49337beff * Updated the latest changelog entry 2011-05-09 20:47:00 +01:00
Jose Pedro Oliveira d6d96ce5ce * Override the default _localstatedir value (configure --localstatedir) 2011-05-09 19:37:16 +01:00
Jose Pedro Oliveira f62ec241d7 * Bumped the eventlog version to match the latest upstream version (0.2.12)
* Create the patterndb.d configuration directory
 * Minor modifications of the %%post, %%preun and %%postun scripts
 * Corrected a couple of macro references in changelog entries (rpmlint)
 * Expanded tabs to spaces (also added a vim modeline)
2011-05-09 19:12:43 +01:00
Jose Pedro Oliveira b1fa2e71c2 * changelog entries tweaking 2011-04-26 03:02:37 +01:00
Jose Pedro Oliveira daa5c7ff44 * Update to 3.1.4. 2011-04-25 22:29:30 +01:00
Fedora Release Engineering a3d8430fcf dist-git conversion 2010-07-29 13:34:06 +00:00
Dennis Gilmore ee7eae643a Initialize branch EL-6 for syslog-ng 2010-05-08 02:24:50 +00:00
Bill Nottingham a88cb04499 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:47:05 +00:00
20 changed files with 363 additions and 236 deletions

View File

@ -1,2 +0,0 @@
syslog-ng-2.1.4.tar.gz
syslog-ng-2.1.4-libnet.patch

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
syslog-ng-2.1.4.tar.gz
syslog-ng-2.1.4-libnet.patch
/syslog-ng_3.1.4.tar.gz
/syslog-ng_3.2.4.tar.gz
/syslog-ng_3.2.5.tar.gz

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: syslog-ng
# $Id$
NAME := syslog-ng
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

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,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/rsyslogd.pid"

View File

@ -1 +1 @@
17c4c7725d2eab62b588395f1ed93f32 syslog-ng-2.1.4.tar.gz
60737452ce898f9dc7170dfdc9bfd732 syslog-ng_3.2.5.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,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

@ -0,0 +1,29 @@
From: Balazs Scheidler <bazsi@balabit.hu>
Date: Mon, 27 Jun 2011 07:47:51 +0000 (+0200)
Subject: fixed chain-hostnames() processing
X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.2.git;a=commitdiff_plain;h=2db971fc37471e39f6a8b34595ca23833166831e
fixed chain-hostnames() processing
The marking of local messages was broken, and as a result hostnames generated
by chain-hostnames(yes) got also broken: instead of <source>@<hostname>
<hostname>/<hostname> got generated.
Reported-By: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
---
diff --git a/lib/logreader.c b/lib/logreader.c
index 7508abf..400668a 100644
--- a/lib/logreader.c
+++ b/lib/logreader.c
@@ -280,6 +280,9 @@ log_reader_handle_line(LogReader *self, const guchar *line, gint length, GSockAd
m = log_msg_new((gchar *) line, length,
saddr,
&self->options->parse_options);
+
+ if (self->options->flags & LR_LOCAL)
+ m->flags |= LF_LOCAL;
if (!m->saddr && self->peer_addr)
{

View File

@ -0,0 +1,18 @@
diff -ruN syslog-ng-3.2.4/tests/functional/func_test.py syslog-ng-3.2.4-modified/tests/functional/func_test.py
--- syslog-ng-3.2.4/tests/functional/func_test.py 2010-07-09 11:19:27.000000000 +0100
+++ syslog-ng-3.2.4-modified/tests/functional/func_test.py 2011-05-16 20:47:48.586752031 +0100
@@ -60,11 +60,12 @@
# import test modules
import test_file_source
import test_filters
-import test_input_drivers
+#import test_input_drivers
import test_performance
import test_sql
-tests = (test_input_drivers, test_sql, test_file_source, test_filters, test_performance)
+#tests = (test_input_drivers, test_sql, test_file_source, test_filters, test_performance)
+tests = (test_sql, test_file_source, test_filters, test_performance)
init_env()
seed_rnd()

View File

@ -0,0 +1,22 @@
diff --git a/modules/syslogformat/syslog-format.c b/modules/syslogformat/syslog-format.c
index 6f53020..fc2dd17 100644
--- a/modules/syslogformat/syslog-format.c
+++ b/modules/syslogformat/syslog-format.c
@@ -421,7 +421,16 @@ log_msg_parse_date(LogMessage *self, const guchar **data, gint *length, guchar *
}
else
{
- return FALSE;
+ if (left >= 1 && src[0] == '-')
+ {
+ /* NILVALUE */
+ self->timestamps[LM_TS_STAMP] = self->timestamps[LM_TS_RECVD];
+ *length = --left;
+ *data = ++src;
+ return TRUE;
+ }
+ else
+ return FALSE;
}
/* NOTE: mktime() returns the time assuming that the timestamp we

View File

@ -0,0 +1,12 @@
diff -ruN syslog-ng-3.2.5/tests/functional/control.py syslog-ng-3.2.5-modified/tests/functional/control.py
--- syslog-ng-3.2.5/tests/functional/control.py 2010-11-20 08:47:33.000000000 +0000
+++ syslog-ng-3.2.5-modified/tests/functional/control.py 2012-01-15 04:56:14.948239475 +0000
@@ -35,7 +35,7 @@
for (root, dirs, files) in os.walk(os.path.abspath(os.path.join(os.environ['top_builddir'], 'modules'))):
module_path = ':'.join(map(lambda x: root + '/' + x, dirs))
break
- rc = os.execl('../../syslog-ng/syslog-ng', '../../syslog-ng/syslog-ng', '-f', 'test.conf', '--fd-limit', '1024', '-F', verbose_opt, '-p', 'syslog-ng.pid', '-R', 'syslog-ng.persist', '--no-caps', '--enable-core', '--seed', '--module-path', module_path)
+ rc = os.execl('../../syslog-ng/syslog-ng', '../../syslog-ng/syslog-ng', '-f', 'test.conf', '--fd-limit', '1024', '-F', verbose_opt, '-p', '/var/tmp/syslog-ng.pid', '-c', '/var/tmp/syslog-ng.ctl', '-R', '/var/tmp/syslog-ng.persist', '--no-caps', '--enable-core', '--seed', '--module-path', module_path)
sys.exit(rc)
time.sleep(5)
print_user("Syslog-ng started")

View File

@ -0,0 +1,33 @@
diff -ruN syslog-ng-3.2.5/tests/functional/globals.py syslog-ng-3.2.5-modified/tests/functional/globals.py
--- syslog-ng-3.2.5/tests/functional/globals.py 2011-10-08 11:34:21.000000000 +0100
+++ syslog-ng-3.2.5-modified/tests/functional/globals.py 2012-01-15 05:34:12.641744234 +0000
@@ -7,7 +7,7 @@
return False
def has_module(module):
- avail_mods = os.popen('../../syslog-ng/syslog-ng -V | grep ^Available-Modules: ', 'r').read()
+ avail_mods = os.popen('../../syslog-ng/syslog-ng -V | grep ^Enable-', 'r').read()
if avail_mods.find(module) != -1:
return True
return False
diff -ruN syslog-ng-3.2.5/tests/functional/test_sql.py syslog-ng-3.2.5-modified/tests/functional/test_sql.py
--- syslog-ng-3.2.5/tests/functional/test_sql.py 2011-10-08 11:34:21.000000000 +0100
+++ syslog-ng-3.2.5-modified/tests/functional/test_sql.py 2012-01-15 05:37:56.699303941 +0000
@@ -28,7 +28,7 @@
def check_env():
- if not has_module('afsql'):
+ if not has_module('SQL'):
print 'afsql module is not available, skipping SQL test'
return False
paths=('/opt/syslog-ng/bin', '/usr/bin', '/usr/local/bin')
@@ -45,7 +45,7 @@
soext='.sl'
found = False
- paths = (os.environ.get('dbd_dir', None), '/usr/local/lib/dbd', '/usr/lib/dbd', '/opt/syslog-ng/lib/dbd')
+ paths = (os.environ.get('dbd_dir', None), '/usr/local/lib/dbd', '/usr/lib/dbd', '/usr/lib64/dbd', '/opt/syslog-ng/lib/dbd')
for pth in paths:
if pth and os.path.isfile('%s/libdbdsqlite3%s' % (pth, soext)):
found = True

View File

@ -1,3 +1,5 @@
@version:3.2
# 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,4 +1,9 @@
/var/log/messages /var/log/secure /var/log/maillog /var/log/spooler /var/log/boot.log /var/log/cron {
/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true

View File

@ -1,120 +1,125 @@
%{?_with_spoofsource:%define spoofsource 1}
%define evtlog_ver 0.2.7-1
%global evtlog_ver 0.2.12
%define _sbindir /sbin
%define _localstatedir /var/lib/syslog-ng
%global _sbindir /sbin
%global _libdir /%{_lib}
Name: syslog-ng
Version: 2.1.4
Release: 8%{?dist}
Version: 3.2.5
Release: 4%{?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
Url: http://www.balabit.com/network-security/syslog-ng
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
Source3: syslog-ng.sysconfig
Source4: syslog-ng.logrotate
Patch0: syslog-ng-2.1.4-libnet.patch
Patch0: syslog-ng-3.2.4-disable-ssl-tests.patch
Patch1: syslog-ng-3.2.5-tests-functional-control.py.patch
Patch2: syslog-ng-3.2.5-tests-functional-sql-test.patch
Patch3: syslog-ng-3.2.5-nilvalue-patch.diff
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: libtool
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: glib2-devel >= 2.10.1
BuildRequires: libdbi-devel
BuildRequires: libnet-devel >= 1.1.4-3
#BuildRequires: openssl-devel
BuildRequires: pcre-devel >= 6.1
BuildRequires: tcp_wrappers-devel
%endif
BuildRequires: libnet-devel
# For the test suite
BuildRequires: python
# For the SQL tests
BuildRequires: libdbi-dbd-sqlite
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.
%package libdbi
Summary: libdbi support for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description libdbi
This module supports a large number of database systems via libdbi.
%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
%setup -q
%if 0%{?rhel}
%patch0 -p1 -b .libnet
%endif
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
# 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
# fix executable perms on contrib files
%{__chmod} -c a-x contrib/syslog2ng
%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 authors file
/usr/bin/iconv -f iso8859-1 -t utf-8 AUTHORS > AUTHORS.conv && \
%{__mv} -f AUTHORS.conv AUTHORS
%build
%configure \
--enable-ipv6 \
--sysconfdir=%{_sysconfdir}/%{name} \
--enable-tcp-wrapper \
%if 0%{?spoofsource}
--enable-spoof-source \
%endif
%if 0%{?rhel}
--enable-mixed-linking
%else
--enable-dynamic-linking
%endif
--prefix=/ \
--libdir=/%{_lib} \
--includedir=%{_includedir} \
--sysconfdir=%{_sysconfdir}/%{name} \
--localstatedir=%{_sharedstatedir}/%{name} \
--datadir=%{_datadir}/%{name} \
--with-module-dir=/%{_lib}/%{name} \
--enable-ipv6 \
--enable-tcp-wrapper \
--enable-pcre \
--enable-spoof-source \
--enable-sql \
--disable-ssl \
--enable-shared \
--disable-static \
--enable-dynamic-linking
# remove rpath
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{_smp_mflags}
@ -123,70 +128,73 @@ make %{_smp_mflags}
%{__rm} -rf %{buildroot}
make DESTDIR=%{buildroot} install
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
#%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
%{__install} -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/syslog-ng.conf
%{__install} -d -m 755 %{buildroot}%{_sysconfdir}/init.d
%{__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}
# create the local state dir
%{__install} -d -m 755 %{buildroot}/%{_sharedstatedir}/%{name}
# fix authors file
/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 the main library header files
%{__install} -d -m 755 %{buildroot}%{_includedir}/%{name}
%{__install} -p -m 644 config.h %{buildroot}%{_includedir}/%{name}
%{__install} -p -m 644 lib/*.h %{buildroot}%{_includedir}/%{name}
# 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
%{__install} -d -m 755 %{buildroot}%{_datadir}/vim/vim$vimver/syntax
cd %{buildroot}%{_datadir}/vim/vim$vimver/syntax
ln -s ../../../%{name}/syslog-ng.vim .
cd -
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 .
cd -
done
find %{buildroot} -name "*.la" -exec rm -f {} \;
%check
LD_LIBRARY_PATH=%{buildroot}/%{_lib}:%{buildroot}/%{_lib}/%{name} make check
%clean
rm -rf %{buildroot}
%post
/sbin/ldconfig
/sbin/chkconfig --add %{name}
%preun
if [ "$1" = 0 ]; then
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/sbin/service %{name} stop > /dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
if [ "$1" -ge 1 ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1
/sbin/ldconfig
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/sbin/service %{name} condrestart >/dev/null 2>&1
fi
%triggerin -- vim-common
VIMVERNEW=`rpm -q --qf='%%{epoch}:%%{version}\n' vim-common | sort | tail -n 1 | sed -e 's/[0-9]*://' | sed -e 's/\.[0-9]*$//' | sed -e 's/\.//'`
[ -d %{_datadir}/vim/vim${VIMVERNEW}/syntax ] && \
cd %{_datadir}/vim/vim${VIMVERNEW}/syntax && \
ln -sf ../../../%{name}/syslog-ng.vim . || :
cd %{_datadir}/vim/vim${VIMVERNEW}/syntax && \
ln -sf ../../../%{name}/syslog-ng.vim . || :
%triggerun -- vim-common
VIMVEROLD=`rpm -q --qf='%%{epoch}:%%{version}\n' vim-common | sort | head -n 1 | sed -e 's/[0-9]*://' | sed -e 's/\.[0-9]*$//' | sed -e 's/\.//'`
@ -196,36 +204,136 @@ VIMVEROLD=`rpm -q --qf='%%{epoch}:%%{version}\n' vim-common | sort | head -n 1 |
VIMVEROLD=`rpm -q --qf='%%{epoch}:%%{version}\n' vim-common | sort | head -n 1 | sed -e 's/[0-9]*://' | sed -e 's/\.[0-9]*$//' | sed -e 's/\.//'`
VIMVERNEW=`rpm -q --qf='%%{epoch}:%%{version}\n' vim-common | sort | tail -n 1 | sed -e 's/[0-9]*://' | sed -e 's/\.[0-9]*$//' | sed -e 's/\.//'`
if [ $1 = 1 ]; then
rm -f %{_datadir}/vim/vim${VIMVEROLD}/syntax/syslog-ng.vim || :
[ -d %{_datadir}/vim/vim${VIMVERNEW}/syntax ] && \
cd %{_datadir}/vim/vim${VIMVERNEW}/syntax && \
ln -sf ../../../%{name}/syslog-ng.vim . || :
rm -f %{_datadir}/vim/vim${VIMVEROLD}/syntax/syslog-ng.vim || :
[ -d %{_datadir}/vim/vim${VIMVERNEW}/syntax ] && \
cd %{_datadir}/vim/vim${VIMVERNEW}/syntax && \
ln -sf ../../../%{name}/syslog-ng.vim . || :
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}
%dir %{_sysconfdir}/%{name}/patterndb.d
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/modules.conf
%config(noreplace) %{_sysconfdir}/%{name}/scl.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}
%dir %{_sharedstatedir}/%{name}
%{_sbindir}/%{name}
%{_sbindir}/syslog-ng-ctl
%{_bindir}/loggen
%{_datadir}/%{name}
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_bindir}/pdbtool
%{_bindir}/update-patterndb
%{_libdir}/lib%{name}.so.*
%{_libdir}/%{name}/*.so
%exclude %{_libdir}/%{name}/libafsql.so
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/syslog-ng.vim
%ghost %{_datadir}/vim/
# scl files
%{_datadir}/%{name}/include/
# uhm, some better places for those?
%{_datadir}/%{name}/xsd/
%{_mandir}/man1/loggen.1*
%{_mandir}/man1/pdbtool.1*
%{_mandir}/man1/syslog-ng-ctl.1*
%{_mandir}/man5/syslog-ng.conf.5*
%{_mandir}/man8/syslog-ng.8*
%files libdbi
%defattr(-,root,root,-)
%{_libdir}/%{name}/libafsql.so
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsyslog-ng.so
%{_includedir}/%{name}/
%changelog
* Wed Jul 23 2014 Peter Czanik <czanik@balabit.hu> - 3.2.5-4
- Patch syslog-ng-3.2.5-nilvalue-patch.diff as discussed
on the syslog-ng mailing list
* Sun Jan 15 2012 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-3
- Enabled SQL support (subpackage syslog-ng-libdbi) and the SQL test.
* Wed Dec 14 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-2
- Ship the same logrotate file as the one shipped in RHEL 6.2 rsyslog package
(see #767761 and #683537)
- Move the SCL files to the main RPM (#742624 comments >= 28)
* Tue Nov 1 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-1
- Update to 3.2.5
* Mon Jun 27 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-2
- Patch syslog-ng-3.2.4-chain-hostnames-processing.patch (#713965)
* Tue May 17 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-1
- Updated the homepage URL
- Syslog-ng data directory in %%{_datadir}/%%{name}
- Include the main library header files in the devel subpackage
* Fri May 13 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-0
- Update to 3.2.4
- No need to create the directory /etc/syslog-ng in the install section
- Enable the test suite (but excluding the SQL and SSL tests)
* Mon May 9 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.1.4-3
- Bumped the eventlog version to match the latest upstream version (0.2.12)
- Overrided the default _localstatedir value (configure --localstatedir)
(value hardcoded in update-patterndb)
- Manually created the patterndb.d configuration directory (update-patterndb)
(see also https://bugzilla.balabit.com/show_bug.cgi?id=119 comments >= 4)
- Minor modifications of the %%post, %%preun and %%postun scripts
- Corrected a couple of macro references in changelog entries (rpmlint)
- Expanded tabs to spaces (also added a vim modeline)
* 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
@ -269,7 +377,7 @@ fi
- fix for CVE-2008-5110
* Mon Sep 15 2008 Peter Vrabec <pvrabec@redhat.com> 2.0.8-3
- do not conflicts with rsyslog, both rsyslog and syslog-ng use
- do not conflicts with rsyslog, both rsyslog and syslog-ng use
same pidfile and logrotate file (#441664)
* Sat Sep 6 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.0.8-2
@ -446,7 +554,7 @@ fi
* Wed Apr 21 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> 0:1.6.2-0.fdr.3
- removed Conflits:
- changed the %post and %preun scripts
- changed the %%post and %%preun scripts
- splitted Requires( ... , ... ) into Requires( ... )
* Fri Mar 5 2004 Jose Pedro Oliveira <jpo at di.uminho.pt> 0:1.6.2-0.fdr.2
@ -487,7 +595,7 @@ fi
* Sat Apr 12 2003 Jose Pedro Oliveira <jpo at di.uminho.pt> 1.6.0rc2 snapshot
- Reorganized specfile
- Corrected the scripts (%post, %postun, and %preun)
- Corrected the scripts (%%post, %%postun, and %%preun)
- Commented the mysql related lines; create an option for future inclusion
* Thu Feb 27 2003 Richard E. Perlotto II <richard@perlotto.com> 1.6.0rc1-1
@ -506,3 +614,4 @@ fi
* Sun Dec 08 2002 Richard E. Perlotto II <richard@perlotto.com> 1.5.23-1
- Updated file with notes and PGP signatures
# vim:set ai ts=4 sw=4 sts=4 et:

View File

@ -1,3 +1,7 @@
#---
# Syslog-ng command line options
# See syslog-ng(8) for more details
#---
SYSLOGNG_PID="/var/run/syslog-ng.pid"
SYSLOGNG_OPTIONS="-p $SYSLOGNG_PID"
SYSLOGNG_COMPAT_PID="/var/run/syslogd.pid"

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"