automatic version update by autodist [release 3.5.3-1mamba;Tue Jan 21 2014]
This commit is contained in:
parent
7315bf1587
commit
7ee88e3f8c
@ -1,2 +1,7 @@
|
|||||||
# syslog-ng
|
# syslog-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.
|
||||||
|
|
||||||
|
@ -0,0 +1,128 @@
|
|||||||
|
diff -Nru syslog-ng-3.2.4.orig/lib/gprocess.c syslog-ng-3.2.4/lib/gprocess.c
|
||||||
|
--- syslog-ng-3.2.4.orig/lib/gprocess.c 2011-05-04 13:57:48.000000000 +0200
|
||||||
|
+++ syslog-ng-3.2.4/lib/gprocess.c 2011-08-23 17:47:48.378752176 +0200
|
||||||
|
@@ -98,6 +98,7 @@
|
||||||
|
static gint init_result_pipe[2] = { -1, -1 };
|
||||||
|
static GProcessKind process_kind = G_PK_STARTUP;
|
||||||
|
static gboolean stderr_present = TRUE;
|
||||||
|
+static int have_capsyslog = FALSE;
|
||||||
|
|
||||||
|
/* global variables */
|
||||||
|
static struct
|
||||||
|
@@ -216,6 +217,14 @@
|
||||||
|
if (!process_opts.caps)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
+#ifdef CAP_SYSLOG
|
||||||
|
+ /*
|
||||||
|
+ * if libcap or kernel doesn't support cap_syslog, then resort to
|
||||||
|
+ * cap_sys_admin
|
||||||
|
+ */
|
||||||
|
+ if (capability == CAP_SYSLOG && !have_capsyslog)
|
||||||
|
+ capability = CAP_SYS_ADMIN;
|
||||||
|
+#endif
|
||||||
|
caps = cap_get_proc();
|
||||||
|
if (!caps)
|
||||||
|
return FALSE;
|
||||||
|
@@ -422,7 +431,7 @@
|
||||||
|
* capability set. The process will change its capabilities to this value
|
||||||
|
* during startup, provided it has enough permissions to do so.
|
||||||
|
**/
|
||||||
|
-void
|
||||||
|
+static void
|
||||||
|
g_process_set_caps(const gchar *caps)
|
||||||
|
{
|
||||||
|
if (!process_opts.caps)
|
||||||
|
@@ -430,6 +439,43 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
+ * g_process_setup_caps(void)
|
||||||
|
+ *
|
||||||
|
+ * NOTE: polling /proc/kmsg requires cap_sys_admin, otherwise it'll always
|
||||||
|
+ * indicate readability. Enabling/disabling cap_sys_admin on every poll
|
||||||
|
+ * invocation seems to be too expensive. So I enable it for now.
|
||||||
|
+ */
|
||||||
|
+void
|
||||||
|
+g_process_setup_caps(void)
|
||||||
|
+{
|
||||||
|
+ int ret;
|
||||||
|
+ gchar * capsstr = "cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
|
||||||
|
+ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner=p "
|
||||||
|
+ "cap_sys_admin=ep";
|
||||||
|
+#ifdef CAP_SYSLOG
|
||||||
|
+ cap_t caps;
|
||||||
|
+
|
||||||
|
+ /* Check whether cap_syslog exists. If not, get cap_sys_admin, else get
|
||||||
|
+ * cap_syslog */
|
||||||
|
+ caps = cap_from_text("cap_syslog=p");
|
||||||
|
+ if (caps) {
|
||||||
|
+ cap_free(caps);
|
||||||
|
+ /* libcap knows it, does the kernel? */
|
||||||
|
+ ret = prctl(PR_CAPBSET_READ, CAP_SYSLOG);
|
||||||
|
+ if (ret != -1) {
|
||||||
|
+ /* kernel knows cap_syslog! Use it */
|
||||||
|
+ capsstr = "cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
|
||||||
|
+ "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner=p "
|
||||||
|
+ "cap_syslog=ep";
|
||||||
|
+ have_capsyslog = TRUE;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ g_process_set_caps(capsstr);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/**
|
||||||
|
* g_process_set_argv_space:
|
||||||
|
* @argc: Original argc, as received by the main function in it's first parameter
|
||||||
|
* @argv: Original argv, as received by the main function in it's second parameter
|
||||||
|
diff -Nru syslog-ng-3.2.4.orig/lib/gprocess.h syslog-ng-3.2.4/lib/gprocess.h
|
||||||
|
--- syslog-ng-3.2.4.orig/lib/gprocess.h 2011-05-04 13:57:48.000000000 +0200
|
||||||
|
+++ syslog-ng-3.2.4/lib/gprocess.h 2011-08-23 17:48:47.057167382 +0200
|
||||||
|
@@ -66,7 +66,7 @@
|
||||||
|
void g_process_set_pidfile(const gchar *pidfile);
|
||||||
|
void g_process_set_pidfile_dir(const gchar *pidfile_dir);
|
||||||
|
void g_process_set_working_dir(const gchar *cwd);
|
||||||
|
-void g_process_set_caps(const gchar *caps);
|
||||||
|
+void g_process_setup_caps(void);
|
||||||
|
void g_process_set_argv_space(gint argc, gchar **argv);
|
||||||
|
void g_process_set_use_fdlimit(gboolean use);
|
||||||
|
void g_process_set_check(gint check_period, gboolean (*check_fn)(void));
|
||||||
|
diff -Nru syslog-ng-3.2.4.orig/modules/affile/affile.c syslog-ng-3.2.4/modules/affile/affile.c
|
||||||
|
--- syslog-ng-3.2.4.orig/modules/affile/affile.c 2011-05-01 18:59:14.000000000 +0200
|
||||||
|
+++ syslog-ng-3.2.4/modules/affile/affile.c 2011-08-23 17:49:24.880790428 +0200
|
||||||
|
@@ -59,7 +59,11 @@
|
||||||
|
if (privileged)
|
||||||
|
{
|
||||||
|
g_process_cap_modify(CAP_DAC_READ_SEARCH, TRUE);
|
||||||
|
+#ifdef CAP_SYSLOG
|
||||||
|
+ g_process_cap_modify(CAP_SYSLOG, TRUE);
|
||||||
|
+#else
|
||||||
|
g_process_cap_modify(CAP_SYS_ADMIN, TRUE);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
diff -Nru syslog-ng-3.2.4.orig/syslog-ng/main.c syslog-ng-3.2.4/syslog-ng/main.c
|
||||||
|
--- syslog-ng-3.2.4.orig/syslog-ng/main.c 2010-11-20 09:47:33.000000000 +0100
|
||||||
|
+++ syslog-ng-3.2.4/syslog-ng/main.c 2011-08-23 17:50:19.263248447 +0200
|
||||||
|
@@ -374,14 +374,10 @@
|
||||||
|
z_mem_trace_init("syslog-ng.trace");
|
||||||
|
|
||||||
|
g_process_set_argv_space(argc, (gchar **) argv);
|
||||||
|
-
|
||||||
|
- /* NOTE: polling /proc/kmsg requires cap_sys_admin, otherwise it'll always
|
||||||
|
- * indicate readability. Enabling/disabling cap_sys_admin on every poll
|
||||||
|
- * invocation seems to be too expensive. So I enable it for now. */
|
||||||
|
-
|
||||||
|
- g_process_set_caps("cap_net_bind_service,cap_net_broadcast,cap_net_raw,"
|
||||||
|
- "cap_dac_read_search,cap_dac_override,cap_chown,cap_fowner=p "
|
||||||
|
- "cap_sys_admin=ep");
|
||||||
|
+
|
||||||
|
+ /* Set up the minimal privilege we'll need */
|
||||||
|
+ g_process_setup_caps();
|
||||||
|
+
|
||||||
|
ctx = g_option_context_new("syslog-ng");
|
||||||
|
g_process_add_option_group(ctx);
|
||||||
|
msg_add_option_group(ctx);
|
12
syslog-ng-3.4.1-systemd-service-fix-path.patch
Normal file
12
syslog-ng-3.4.1-systemd-service-fix-path.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -Nru syslog-ng-3.4.1.orig/contrib/systemd/syslog-ng.service syslog-ng-3.4.1/contrib/systemd/syslog-ng.service
|
||||||
|
--- syslog-ng-3.4.1.orig/contrib/systemd/syslog-ng.service 2013-01-06 21:38:58.000000000 +0100
|
||||||
|
+++ syslog-ng-3.4.1/contrib/systemd/syslog-ng.service 2013-03-27 00:59:08.195343368 +0100
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Sockets=syslog.socket
|
||||||
|
-ExecStart=/usr/sbin/syslog-ng -F
|
||||||
|
+ExecStart=/sbin/syslog-ng -F
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
StandardOutput=null
|
||||||
|
|
87
syslog-ng.conf
Normal file
87
syslog-ng.conf
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
@version: 3.4
|
||||||
|
# syslog-ng configuration file.
|
||||||
|
#
|
||||||
|
# This should behave pretty much like the original syslog on RedHat. But
|
||||||
|
# it could be configured a lot smarter.
|
||||||
|
#
|
||||||
|
# See syslog-ng(8) and syslog-ng.conf(5) for more information.
|
||||||
|
#
|
||||||
|
# 20000925 gb@sysfive.com
|
||||||
|
#
|
||||||
|
# Updated by Frank Crawford (<Frank.Crawford@ac3.com.au>) - 10 Aug 2002
|
||||||
|
# - for Red Hat 7.3
|
||||||
|
# - totally do away with klogd
|
||||||
|
# - add message "kernel:" as is done with klogd.
|
||||||
|
#
|
||||||
|
# Updated by Frank Crawford (<Frank.Crawford@ac3.com.au>) - 22 Aug 2002
|
||||||
|
# - use the log_prefix option as per Balazs Scheidler's email
|
||||||
|
#
|
||||||
|
# Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 05 Apr 2003
|
||||||
|
# - corrected filters 'f_filter2' and 'f_filter6'
|
||||||
|
# these filters were only allowing messages of one specific
|
||||||
|
# priority level; they should be allowing messages from that
|
||||||
|
# priority and upper levels.
|
||||||
|
#
|
||||||
|
# Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 25 Jan 2005
|
||||||
|
# - Don't sync the d_mail destination
|
||||||
|
#
|
||||||
|
# Updated by Jose Pedro Oliveira (<jpo at di.uminho.pt>) - 01 Feb 2005
|
||||||
|
# - /proc/kmsg is a file not a pipe.
|
||||||
|
# (https://lists.balabit.hu/pipermail/syslog-ng/2005-February/006963.html)
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
options {
|
||||||
|
flush_lines (0);
|
||||||
|
time_reopen (10);
|
||||||
|
chain_hostnames (off);
|
||||||
|
use_dns (no);
|
||||||
|
use_fqdn (no);
|
||||||
|
create_dirs (no);
|
||||||
|
keep_hostname (yes);
|
||||||
|
perm(0644);
|
||||||
|
stats_freq(86400);
|
||||||
|
};
|
||||||
|
|
||||||
|
source s_sys {
|
||||||
|
file ("/proc/kmsg" program_override("kernel: "));
|
||||||
|
unix-dgram ("/dev/log");
|
||||||
|
internal();
|
||||||
|
# udp(ip(0.0.0.0) port(514));
|
||||||
|
};
|
||||||
|
|
||||||
|
destination d_cons { file("/dev/console"); };
|
||||||
|
destination d_boot { file("/var/log/boot.log"); };
|
||||||
|
destination d_fwll { file("/var/log/firewall"); };
|
||||||
|
destination d_kern { file("/var/log/kernel"); };
|
||||||
|
destination d_ldap { file("/var/log/ldap.log"); };
|
||||||
|
destination d_mail { file("/var/log/maillog" flush_lines(10)); };
|
||||||
|
destination d_mesg { file("/var/log/messages"); };
|
||||||
|
destination d_auth { file("/var/log/secure"); };
|
||||||
|
destination d_spol { file("/var/log/spooler"); };
|
||||||
|
destination d_mlal { usertty("*"); };
|
||||||
|
|
||||||
|
filter f_filter1 { facility(kern); };
|
||||||
|
filter f_filter2 { level(info..emerg) and
|
||||||
|
not facility(mail,authpriv,cron); };
|
||||||
|
filter f_filter3 { facility(authpriv); };
|
||||||
|
filter f_filter4 { facility(mail); };
|
||||||
|
filter f_filter5 { level(emerg); };
|
||||||
|
filter f_filter6 { facility(uucp) or
|
||||||
|
(facility(news) and level(crit..emerg)); };
|
||||||
|
filter f_filter7 { facility(local7); };
|
||||||
|
filter f_fwll { facility(kern) and
|
||||||
|
(match(" DROPPED " value("MESSAGE")) or match(" ABORTED " value("MESSAGE"))
|
||||||
|
or match("UFW BLOCK" value("MESSAGE")) or match("Shorewall:" value("MESSAGE"))); };
|
||||||
|
filter f_ldap { program("slapd"); };
|
||||||
|
|
||||||
|
#log { source(s_sys); filter(f_filter1); destination(d_cons); };
|
||||||
|
log { source(s_sys); filter(f_fwll); destination(d_fwll); flags(final); };
|
||||||
|
log { source(s_sys); filter(f_filter1); destination(d_kern); };
|
||||||
|
log { source(s_sys); filter(f_ldap); destination(d_ldap); flags(final); };
|
||||||
|
log { source(s_sys); filter(f_filter3); destination(d_auth); };
|
||||||
|
log { source(s_sys); filter(f_filter4); destination(d_mail); };
|
||||||
|
log { source(s_sys); filter(f_filter5); destination(d_mlal); };
|
||||||
|
log { source(s_sys); filter(f_filter6); destination(d_spol); };
|
||||||
|
log { source(s_sys); filter(f_filter7); destination(d_boot); };
|
||||||
|
log { source(s_sys); filter(f_filter2); destination(d_mesg); };
|
88
syslog-ng.init
Normal file
88
syslog-ng.init
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# syslog-ng This starts and stops syslog-ng
|
||||||
|
#
|
||||||
|
# chkconfig: 2345 14 88
|
||||||
|
# description: reads and logs messages to the system console, log \
|
||||||
|
# files, other machines and/or users as specified by \
|
||||||
|
# its configuration file.
|
||||||
|
# processname: /sbin/syslog-ng
|
||||||
|
# config: /etc/syslog-ng/syslog-ng.conf
|
||||||
|
# config: /etc/sysconfig/syslog-ng
|
||||||
|
# pidfile: /var/run/syslog-ng.pid
|
||||||
|
#
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: $syslog
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
exec="/sbin/syslog-ng"
|
||||||
|
prog=$(basename $exec)
|
||||||
|
|
||||||
|
[ -f $exec ] || exit 0
|
||||||
|
|
||||||
|
# Source config
|
||||||
|
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
|
||||||
|
|
||||||
|
lockfile=/var/lock/subsys/$prog
|
||||||
|
|
||||||
|
umask 077
|
||||||
|
|
||||||
|
start() {
|
||||||
|
echo -n $"Starting $prog: "
|
||||||
|
daemon $exec $SYSLOGNG_OPTIONS
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && touch $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
echo -n $"Stopping $prog: "
|
||||||
|
killproc $prog
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
[ $retval -eq 0 ] && rm -f $lockfile
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
restart() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
echo -n $"Reloading syslog-ng.conf file: "
|
||||||
|
killproc $prog -HUP
|
||||||
|
retval=$?
|
||||||
|
echo
|
||||||
|
return $retval
|
||||||
|
}
|
||||||
|
|
||||||
|
force_reload() {
|
||||||
|
restart
|
||||||
|
}
|
||||||
|
|
||||||
|
fdr_status() {
|
||||||
|
status $prog
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start|stop|restart|reload)
|
||||||
|
$1
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
force_reload
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
fdr_status
|
||||||
|
;;
|
||||||
|
condrestart|try-restart)
|
||||||
|
[ ! -f $lockfile ] || restart
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
|
||||||
|
exit 2
|
||||||
|
esac
|
18
syslog-ng.logrotate
Normal file
18
syslog-ng.logrotate
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
compress
|
||||||
|
notifempty
|
||||||
|
missingok
|
||||||
|
|
||||||
|
/var/log/boot.log
|
||||||
|
/var/log/firewall
|
||||||
|
/var/log/kernel
|
||||||
|
/var/log/maillog
|
||||||
|
/var/log/messages
|
||||||
|
/var/log/secure
|
||||||
|
/var/log/spooler {
|
||||||
|
sharedscripts
|
||||||
|
rotate 5
|
||||||
|
weekly
|
||||||
|
postrotate
|
||||||
|
/etc/init.d/syslog-ng reload >/dev/null
|
||||||
|
endscript
|
||||||
|
}
|
317
syslog-ng.spec
Normal file
317
syslog-ng.spec
Normal file
@ -0,0 +1,317 @@
|
|||||||
|
%define majorminor %(echo %version | cut -d. -f 1-2)
|
||||||
|
|
||||||
|
Name: syslog-ng
|
||||||
|
Version: 3.5.3
|
||||||
|
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
|
||||||
|
License: GPL
|
||||||
|
## AUTOBUILDREQ-BEGIN
|
||||||
|
BuildRequires: glibc-devel
|
||||||
|
BuildRequires: libcap-devel
|
||||||
|
BuildRequires: libdbi-devel
|
||||||
|
BuildRequires: libesmtp-devel
|
||||||
|
BuildRequires: libeventlog-devel
|
||||||
|
BuildRequires: libGeoIP-devel
|
||||||
|
BuildRequires: libglib-devel
|
||||||
|
BuildRequires: libjson-c-devel
|
||||||
|
BuildRequires: libnet-devel
|
||||||
|
BuildRequires: libopenssl-devel
|
||||||
|
BuildRequires: libpcre-devel
|
||||||
|
BuildRequires: libuuid-devel
|
||||||
|
BuildRequires: libwrap-devel
|
||||||
|
BuildRequires: systemd-devel
|
||||||
|
## AUTOBUILDREQ-END
|
||||||
|
BuildRequires: libol-devel >= 0.3.17
|
||||||
|
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
|
||||||
|
|
||||||
|
%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
|
||||||
|
%{_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-%{version}.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/*.h
|
||||||
|
%dir %{_includedir}/syslog-ng/filter
|
||||||
|
%{_includedir}/syslog-ng/filter/*.h
|
||||||
|
%dir %{_includedir}/syslog-ng/logproto
|
||||||
|
%{_includedir}/syslog-ng/logproto/*.h
|
||||||
|
%dir %{_includedir}/syslog-ng/parser
|
||||||
|
%{_includedir}/syslog-ng/parser/*.h
|
||||||
|
%dir %{_includedir}/syslog-ng/rewrite
|
||||||
|
%{_includedir}/syslog-ng/rewrite/*.h
|
||||||
|
%dir %{_includedir}/syslog-ng/template
|
||||||
|
%{_includedir}/syslog-ng/template/*.h
|
||||||
|
%{_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
|
||||||
|
%doc NEWS
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* 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
|
5
syslog-ng.sysconfig
Normal file
5
syslog-ng.sysconfig
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#---
|
||||||
|
# Syslog-ng command line options
|
||||||
|
# See syslog-ng(8) for more details
|
||||||
|
#---
|
||||||
|
SYSLOGNG_OPTIONS=""
|
Loading…
Reference in New Issue
Block a user