Compare commits

...

15 Commits
rawhide ... f15

Author SHA1 Message Date
Jose Pedro Oliveira 0dfeb86693 * Sync with rawhide 2011-12-14 19:42:51 +00:00
Matthias Runge b88b459d48 - disable caps support until bug 718439 is fixed. 2011-09-14 08:56:32 +02:00
Matthias Runge 257faa8158 fix typo Sept -> Sep 2011-08-31 10:09:32 +02:00
Matthias Runge feb25e980f Fixed the syslog-ng.service configuration file:
* Sockets setting (#734569)
* StandardOutput setting (#734591)
2011-08-31 10:07:27 +02:00
Matthias Runge 805c059774 update to -6 (chain-hostnames() processing)
- patch from upstream
2011-06-30 12:36:02 +02:00
Matthias Runge 84b6bebe22 + add missing patc+ add missing patch 2011-05-17 12:48:02 +02:00
Matthias Runge 72885c2888 new source 2011-05-17 12:42:52 +02:00
Matthias Runge 65b133d016 update to 3.2.4, fixes pcre security flaw 2011-05-17 12:35:43 +02:00
Matthias Runge 4cad221c05 mrunge: systemd fixes (by Bill Nottingham) merged from master to f15 branch 2011-05-06 19:42:12 +02:00
Matthias Runge e8cb598998 update package according to rawhide branch:
- update to syslog-ng 3.2.3 (after pre-release)
- spec cleanup
2011-05-02 21:05:56 +02:00
Matthias Runge 49d3f9e91c - disable ssl, sql
- honor pidfile to support reload configuration
2011-04-28 10:13:27 +02:00
Matthias Runge bf4824a345 uploaded new source file 2011-04-27 08:33:00 +02:00
Matthias Runge 8add2e99db delete doubled requires(preun)-line 2011-04-27 08:20:59 +02:00
Matthias Runge fa7c4abc95 - drop support for fedora versions without systemd
- incorporate all changes made in rawhide branch
- rename files, delete unnecessary files
- provide native systemd service file
2011-04-26 22:37:48 +02:00
Matthias Runge 1c7c836525 update to syslog-ng version 3.2.2 2011-04-23 15:21:03 +02:00
18 changed files with 434 additions and 353 deletions

5
.gitignore vendored
View File

@ -1 +1,6 @@
syslog-ng_3.1.1.tar.gz
/syslog-ng-3.2.2.tar.bz2
/syslog-ng-3.2.3-20110424.tar.bz2
/syslog-ng_3.2.3.tar.gz
/syslog-ng_3.2.4.tar.gz
/syslog-ng_3.2.5.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/syslogd.pid"

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 @@
4fdc64ff0ad964dc811a746228609412 syslog-ng_3.1.1.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,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

@ -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,14 @@
diff -ruN syslog-ng-3.2.5/contrib/systemd/syslog-ng.service syslog-ng-3.2.5-modified/contrib/systemd/syslog-ng.service
--- syslog-ng-3.2.5/contrib/systemd/syslog-ng.service 2011-10-23 07:48:18.000000000 +0100
+++ syslog-ng-3.2.5-modified/contrib/systemd/syslog-ng.service 2011-11-01 19:30:09.446750825 +0000
@@ -3,8 +3,9 @@
[Service]
Sockets=syslog.socket
+EnvironmentFile=-/etc/sysconfig/syslog-ng
ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
-ExecStart=/usr/sbin/syslog-ng -F
+ExecStart=/sbin/syslog-ng $SYSLOGNG_OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
StandardOutput=null

View File

@ -0,0 +1,88 @@
From: Balazs Scheidler <bazsi@balabit.hu>
Date: Wed, 14 Dec 2011 14:21:05 +0000 (+0100)
Subject: afunix: clarified error messages in case of a failure
X-Git-Url: http://git.balabit.hu/?p=bazsi%2Fsyslog-ng-3.3.git;a=commitdiff_plain;h=606c8cc0b10aa4e877f70726b707402d100bb0f9
afunix: clarified error messages in case of a failure
On Fedora systems, syslog-ng was configured to use unix-stream() /dev/log
whereas systemd supplied a unix-dgram() one, which caused difficult to
diagnose problems.
This patch adds further logging to this case and causes syslog-ng to fail
with an error message if it finds that /dev/log is using an incorrect
socket type.
Reported-By: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
---
diff --git a/modules/afsocket/afunix.c b/modules/afsocket/afunix.c
index cd86798..8145f1a 100644
--- a/modules/afsocket/afunix.c
+++ b/modules/afsocket/afunix.c
@@ -75,7 +75,7 @@ static gboolean
afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
{
AFUnixSourceDriver *self = (AFUnixSourceDriver *) s;
- gint fd, fds, t, r;
+ gint fd, fds;
*result_fd = -1;
fd = -1;
@@ -100,13 +100,40 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
{
for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + fds; fd++)
{
- t = (self->super.flags & AFSOCKET_STREAM) ? SOCK_STREAM : SOCK_DGRAM;
- r = sd_is_socket_unix(fd, t, -1, self->filename, 0);
- if (r == 1)
+ /* check if any type is available */
+ if (sd_is_socket_unix(fd, 0, -1, self->filename, 0))
{
- *result_fd = fd;
- break;
- }
+ int type = (self->super.flags & AFSOCKET_STREAM) ? SOCK_STREAM : SOCK_DGRAM;
+
+ /* check if it matches our idea of the socket type */
+ if (sd_is_socket_unix(fd, type, -1, self->filename, 0))
+ {
+ *result_fd = fd;
+ break;
+ }
+ else
+ {
+ msg_error("The systemd supplied UNIX domain socket is of a different type, check the configured driver and the matching systemd unit file",
+ evt_tag_str("filename", self->filename),
+ evt_tag_int("systemd-sock-fd", fd),
+ evt_tag_str("expecting", type == SOCK_STREAM ? "unix-stream()" : "unix-dgram()"),
+ NULL);
+ return FALSE;
+ }
+ }
+ else
+ {
+
+ /* systemd passed an fd we didn't really care about. This is
+ * not an error, but might be worth mentioning it at the debug
+ * level.
+ */
+
+ msg_debug("Ignoring systemd supplied fd as it is not a UNIX domain socket",
+ evt_tag_str("filename", self->filename),
+ evt_tag_int("systemd-sock-fd", fd),
+ NULL);
+ }
}
}
else
@@ -123,7 +150,7 @@ afunix_sd_acquire_socket(AFSocketSourceDriver *s, gint *result_fd)
}
else
{
- msg_debug("Failed to acquire systemd socket, opening nevertheless",
+ msg_debug("Failed to acquire systemd socket, trying to open ourselves",
evt_tag_str("filename", self->filename),
NULL);
}

View File

@ -1,4 +1,4 @@
@version:3.0
@version:3.2
# syslog-ng configuration file.
#
@ -21,7 +21,7 @@ options {
source s_sys {
file ("/proc/kmsg" program_override("kernel: "));
unix-stream ("/dev/log");
unix-dgram ("/dev/log");
internal();
# udp(ip(0.0.0.0) port(514));
};

View File

@ -1,123 +0,0 @@
#!/bin/sh
#
# syslog-ng starts/stops syslog-ng service
#
# chkconfig: - 12 88
# description: Syslog is the facility by which many daemons use to log \
# messages to various system log files.
#
### BEGIN INIT INFO
# Provides: $syslog
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Short-Description: Next-generation syslog server
# 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.
### END INIT INFO
# Source function library.
. /etc/init.d/functions
[ -e /etc/sysconfig/syslog-ng ] && . /etc/sysconfig/syslog-ng
RETVAL=0
check_syntax()
{
[ -x /sbin/syslog-ng ] || exit 5
syslog-ng -s $SYSLOGNG_OPTIONS
RETVAL=$?
return $RETVAL
}
verify_config()
{
check_syntax
RETVAL=$?
[ $RETVAL -eq 0 ] || exit $retval
}
checkconfig()
{
action $"Checking Configuration: " check_syntax
}
start()
{
verify_config
echo -n $"Starting syslog-ng: "
if [ -e $SYSLOGNG_COMPAT_PID ]; then
failure "PID file for existing syslog daemon exists"
fi
daemon syslog-ng $SYSLOGNG_OPTIONS
ln -sf $SYSLOGNG_PID $SYSLOGNG_COMPAT_PID
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/syslog-ng
return $RETVAL
}
stop()
{
echo -n $"Stopping syslog-ng: "
REMOVE_COMPAT_PID=0
if [ -e $SYSLOGNG_PID ]; then
if [ -e $SYSLOGNG_COMPAT_PID -a $(<$SYSLOGNG_PID) == $(<$SYSLOGNG_COMPAT_PID) ]; then
REMOVE_COMPAT_PID=1
fi
fi
killproc syslog-ng
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog-ng
[ $RETVAL -eq 0 -a $REMOVE_COMPAT_PID -eq 1 ] && rm -f $SYSLOGNG_COMPAT_PID
return $RETVAL
}
reload()
{
verify_config
echo -n $"Reloading syslog-ng: "
killproc syslog-ng -HUP
RETVAL=$?
echo
return $RETVAL
}
restart()
{
stop
start
}
case "$1" in
start|stop|reload)
$1
;;
restart|force_reload)
restart
;;
status)
status syslog-ng
;;
checkconfig|configtest|check|test)
checkconfig
;;
condrestart|try-restart)
[ -f /var/lock/subsys/syslog-ng ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|checkconfig}"
exit 1
esac
exit $?
# vim: ft=sh:ts=4:ai:si:

View File

@ -1,123 +1,127 @@
%{?_with_spoofsource:%define spoofsource 1}
%define evtlog_ver 0.2.7-2
%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: 3.1.1
Version: 3.2.5
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/3.1.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
#Source2: syslog-ng.service
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-syslog-ng.service.patch
Patch2: syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: systemd-units
BuildRequires: pkgconfig
BuildRequires: glib2-devel
BuildRequires: pcre-devel
%if 0%{?fedora}
BuildRequires: glib2-static
%endif
%if 0%{?rhel}
BuildRequires: tcp_wrappers
BuildRequires: eventlog-static >= %{evtlog_ver}
BuildRequires: automake
%else
BuildRequires: tcp_wrappers-devel
%endif
BuildRequires: libtool
BuildRequires: eventlog-devel >= %{evtlog_ver}
BuildRequires: glib2-devel >= 2.10.1
#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): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
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
%if 0%{?rhel}
%patch0 -p1 -b .libnet
%endif
%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
%patch0 -p1
%patch1 -p1
%patch2 -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 \
--enable-pcre \
%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} \
--with-systemdsystemunitdir=%{_unitdir} \
--enable-ipv6 \
--enable-tcp-wrapper \
--enable-pcre \
--enable-spoof-source \
--disable-linux-caps \
--enable-sql \
--disable-ssl \
--enable-shared \
--disable-static \
--enable-dynamic-linking \
--enable-systemd
# 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}
@ -126,70 +130,77 @@ 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 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/chkconfig --add %{name}
/sbin/ldconfig
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%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
/bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || :
/bin/systemctl stop %{name}.service >/dev/null 2>&1 || :
fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl condrestart %{name}.service >/dev/null 2>&1 || :
fi
%postun
if [ "$1" -ge 1 ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1
%triggerun -- syslog-ng < 3.2.3
if /sbin/chkconfig --level 3 %{name} ; then
/bin/systemctl enable %{name}.service >/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/\.//'`
@ -199,40 +210,194 @@ 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/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}
%{_sysconfdir}/init.d/%{name}
%dir %{_localstatedir}
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
%{_unitdir}/%{name}.service
%dir %{_sharedstatedir}/%{name}
%{_sbindir}/%{name}
%{_sbindir}/syslog-ng-ctl
%{_bindir}/loggen
%{_bindir}/pdbtool
%{_datadir}/%{name}
%{_mandir}/man1/*
%{_mandir}/man5/*
%{_mandir}/man8/*
%{_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
%{_libdir}/%{name}/libafsql.so
%files devel
%defattr(-,root,root,-)
%{_libdir}/libsyslog-ng.so
%{_includedir}/%{name}/
%changelog
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 14 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.5-2
- Fix the freeze problems caused by the /dev/log unix socket type mismatch (#742624)
+ syslog-ng.conf: change /dev/log from unix-stream to unix-dgram
+ upstream patch syslog-ng-3.3.4-afunix.c-diagnostic-messages.patch
- 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
* Tue Oct 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-11
- New 3.2.5 pre-release tarball
https://lists.balabit.hu/pipermail/syslog-ng/2011-October/017491.html
- Updated patch syslog-ng-3.2.5-syslog-ng.service.patch
* Sat Oct 22 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-10
- 3.2.5 pre-release: changelog and tarball from
https://lists.balabit.hu/pipermail/syslog-ng/2011-October/017462.html
Patches dropped:
syslog-ng-3.2.4-systemd-acquired-fd.patch
syslog-ng-3.2.4-chain-hostnames-processing.patch
- New configure option: --with-systemdsystemunitdir
- Patched the included syslog-ng.service file
syslog-ng-3.2.5-syslog-ng.service.patch
* Mon Oct 10 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-9
- Patch syslog-ng-3.2.4-systemd-acquired-fd.patch (see bug #742624)
* Mon Oct 10 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-8
- disable linux-caps support for the time being (see bug #718439)
* Wed Aug 31 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-7
- Fixed the syslog-ng.service configuration file:
* Sockets setting (#734569)
* StandardOutput setting (#734591)
* 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}
- Include the main library header files in the devel subpackage
* Thu May 12 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-2
- No need to create the directory /etc/syslog-ng in the install section
- Enable the test suite (but excluding the SQL and SSL tests)
* Wed May 11 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.4-1
- Update to 3.2.4
* Mon May 9 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-5
- 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)
- Dropped support for Vim 7.0 and 7.1
* Mon May 9 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-4
- Dropped the bison and flex build requirements
- Corrected a couple of macro references in changelog entries (rpmlint)
* Mon May 9 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-3
- Added the build requirement systemd-units (macro %%_unitdir)
https://fedoraproject.org/wiki/Packaging:Guidelines:Systemd
- Dropped the redefinition of the %%_localstatedir macro
- Use %%global instead of %%define
- Minor modifications of the %%post, %%preun and %%postun scripts
https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
- Expanded tabs to spaces (also added a vim modeline)
* Fri May 6 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-2
- Fix systemd-related scriptlets (Bill Nottingham)
- Explicitly add --enable-systemd to configure's command line
* Mon May 2 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-1
- updated to 3.2.3 final
- cleaned the sysconfig file
* Thu Apr 28 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-0.20110424.4
- downgrade the pcre minimal required version from 7.3 to 6.1 (#651823#c26)
- better compliance with the package guidelines
(https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd)
* Thu Apr 28 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.3-0.20110424.3
- honor pidfile
- disable ssl
- disable sql
* Tue Apr 26 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.3-0.20110424.2
- drop support for fedora without systemd
* Mon Apr 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.3-0.20110424.1
- change NVR to alert users that we have been using a syslog-ng v3.2 git snapshot
(for systemd support)
* Mon Apr 25 2011 Jose Pedro Oliveira <jpo at di.uminho.pt> - 3.2.2-4
- re-introduces the "Provides: syslog" (#651823 comments 13, 15 and 21)
- rename the logrotate.d file back to syslog (#651823 comments 12, 15, 16 and 21)
- cleans the sysconfig and logrotate file mess (#651823 comments 17, 20 and 21)
- spec code cleanup (#651823 comments 10 and 11)
- dropped duplicated eventlog-devel BR
* Thu Apr 21 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.2-3
- systemd fixup
- more spec file cleanup,
- incorporate fixes from Jose Pedro Oliveira (#651823 comments 7 and 8)
* Wed Apr 20 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.2-2
- spec cleanup
* Wed Apr 13 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.2-1
- update to 3.2.2
- built from git snapshot
* Wed Apr 06 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.1-3
- install to /sbin
- native systemd start script
* Thu Mar 17 2011 Matthias Runge <mrunge@matthias-runge.de> - 3.2.1-2
- finally move libs to correct place
- split out -devel subpackage
* Fri Mar 04 2011 Matthias Runge <mrunge@fedoraproject.org> - 3.2.1-1
- update to syslog-ng 3.2.1
* Sat Jul 24 2010 Doug Warner <silfreed@fedoraproject.org> - 3.1.1-1
- update for syslog-ng 3.1.1
@ -295,7 +460,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
@ -472,7 +637,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
@ -513,7 +678,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
@ -532,3 +697,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:

5
syslog-ng.sysconfig Normal file
View File

@ -0,0 +1,5 @@
#---
# Syslog-ng command line options
# See syslog-ng(8) for more details
#---
SYSLOGNG_OPTIONS="-F -p /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"