update to -6 (chain-hostnames() processing)

- patch from upstream
This commit is contained in:
Matthias Runge 2011-06-30 12:36:02 +02:00
parent 84b6bebe22
commit 805c059774
4 changed files with 72 additions and 10 deletions

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

@ -1,6 +1,6 @@
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-12 03:23:48.276226460 +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
@ -8,12 +8,11 @@ diff -ruN syslog-ng-3.2.4/tests/functional/func_test.py syslog-ng-3.2.4-modified
-import test_input_drivers
+#import test_input_drivers
import test_performance
-import test_sql
+#import test_sql
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_file_source, test_filters, test_performance)
+tests = (test_sql, test_file_source, test_filters, test_performance)
init_env()
seed_rnd()

View File

@ -5,7 +5,7 @@
Name: syslog-ng
Version: 3.2.4
Release: 3%{?dist}
Release: 6%{?dist}
Summary: Next-generation syslog server
Group: System Environment/Daemons
@ -17,7 +17,8 @@ Source2: syslog-ng.service
Source3: syslog-ng.sysconfig
Source4: syslog-ng.logrotate
Patch0: syslog-ng-3.2.4-disable-sql-and-ssl-tests.patch
Patch0: syslog-ng-3.2.4-disable-ssl-tests.patch
Patch1: syslog-ng-3.2.4-chain-hostnames-processing.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -26,12 +27,18 @@ BuildRequires: pkgconfig
BuildRequires: libtool
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: glib2-devel >= 2.10.1
#BuildRequires: libdbi-devel
BuildRequires: libcap-devel
BuildRequires: libdbi-devel
BuildRequires: libnet-devel
#BuildRequires: openssl-devel
BuildRequires: pcre-devel >= 6.1
BuildRequires: tcp_wrappers-devel
# Test suite
BuildRequires: python
# For the SQL tests
BuildRequires: libdbi-dbd-sqlite
Requires: logrotate
Requires(post): systemd-units
Requires(preun): systemd-units
@ -52,6 +59,16 @@ 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
@ -65,6 +82,7 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
# fix perl path
%{__sed} -i 's|^#!/usr/local/bin/perl|#!%{__perl}|' contrib/relogger.pl
@ -90,7 +108,8 @@ developing applications that use %{name}.
--enable-tcp-wrapper \
--enable-pcre \
--enable-spoof-source \
--disable-sql \
--enable-linux-caps \
--enable-sql \
--disable-ssl \
--enable-shared \
--disable-static \
@ -139,8 +158,6 @@ for vimver in 72 73 ; do
cd -
done
ldconfig -N -n %{buildroot}/%{_lib}
find %{buildroot} -name "*.la" -exec rm -f {} \;
@ -225,6 +242,7 @@ fi
%{_bindir}/update-patterndb
%{_libdir}/lib%{name}.so.*
%{_libdir}/%{name}/*.so
%exclude %{_libdir}/%{name}/libafsql.so
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/syslog-ng.vim
@ -239,6 +257,9 @@ fi
%{_mandir}/man5/syslog-ng.conf.5*
%{_mandir}/man8/syslog-ng.8*
%files libdbi
%{_libdir}/%{name}/libafsql.so
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsyslog-ng.so
@ -248,6 +269,15 @@ fi
%changelog
* Mon Jun 27 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-6
- Patch syslog-ng-3.2.4-chain-hostnames-processing.patch (#713965)
* Mon Jun 20 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-5
- Enabled support for capability management (--enable-linux-caps)
* Tue May 17 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-4
- Enabled SQL support (subpackage syslog-ng-libdbi)
* Mon May 16 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-3
- Updated the homepage URL
- Syslog-ng data directory in %%{_datadir}/%%{name}

View File

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