--- /dev/null
+Description: Tweak log destination and loglevel in ulogd.conf.in
+ Send logging for ulogd itself to syslog rather than to file (not for iptables
+ logging), and explicitly set loglevel to info.
+Forwarded: not-needed
+Author: Chris Boot <bootc@debian.org>
+Last-Update: 2013-04-27
+
+--- ulogd2-2.0.2.orig/ulogd.conf.in
++++ ulogd2-2.0.2/ulogd.conf.in
+@@ -8,10 +8,10 @@
+
+
+ # logfile for status messages
+-logfile="/var/log/ulogd.log"
++logfile="syslog"
+
+ # loglevel: debug(1), info(3), notice(5), error(7) or fatal(8) (default 5)
+-# loglevel=1
++loglevel=3
+
+ ######################################################################
+ # PLUGIN OPTIONS
--- /dev/null
+Description: Enable NFLOG => LOGEMU stack by default
+ The simplest and likely most common usage scenario is to log packets to a
+ logfile using NFLOG, bypassing the kernel ringbuffer. Enable this by default.
+Forwarded: not-needed
+Author: Chris Boot <bootc@debian.org>
+Last-Update: 2013-04-27
+
+--- a/ulogd.conf.in
++++ b/ulogd.conf.in
+@@ -52,7 +52,7 @@
+ #plugin="@pkglibdir@/ulogd_output_JSON.so"
+
+ # this is a stack for logging packet send by system via LOGEMU
+-#stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
++stack=log1:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
+
+ # this is a stack for packet-based logging via LOGEMU
+ #stack=log2:NFLOG,base1:BASE,ifi1:IFINDEX,ip2str1:IP2STR,print1:PRINTPKT,emu1:LOGEMU
--- /dev/null
+Description: Update logfile paths to log to /var/log/ulog/*
+ The standard configuration file sends logs to a number of files under
+ /var/log/. To keep things tidy, including the logrotate script, move all the
+ logs into a common parent directory.
+Forwarded: not-needed
+Author: Chris Boot <bootc@debian.org>
+Last-Update: 2013-04-27
+
+--- a/ulogd.conf.in
++++ b/ulogd.conf.in
+@@ -184,25 +184,25 @@
+ socket_path="/tmp/nuauth_ulogd2.sock"
+
+ [emu1]
+-file="/var/log/ulogd_syslogemu.log"
++file="/var/log/ulog/syslogemu.log"
+ sync=1
+
+ [op1]
+-file="/var/log/ulogd_oprint.log"
++file="/var/log/ulog/oprint.log"
+ sync=1
+
+ [gp1]
+-file="/var/log/ulogd_gprint.log"
++file="/var/log/ulog/gprint.log"
+ sync=1
+ timestamp=1
+
+ [xml1]
+-directory="/var/log/"
++directory="/var/log/ulog/"
+ sync=1
+
+ [json1]
+ sync=1
+-#file="/var/log/ulogd.json"
++#file="/var/log/ulog/ulogd.json"
+ #timestamp=0
+ # device name to be used in JSON message
+ #device="My awesome Netfilter firewall"
+@@ -216,7 +216,7 @@
+
+ [pcap1]
+ #default file is /var/log/ulogd.pcap
+-#file="/var/log/ulogd.pcap"
++#file="/var/log/ulog/ulogd.pcap"
+ sync=1
+
+ [mysql1]
+@@ -301,18 +301,18 @@
+
+ [sqlite3_ct]
+ table="ulog_ct"
+-db="/var/log/ulogd.sqlite3db"
++db="/var/log/ulog/ulogd.sqlite3db"
+
+ [sqlite3_pkt]
+ table="ulog_pkt"
+-db="/var/log/ulogd.sqlite3db"
++db="/var/log/ulog/ulogd.sqlite3db"
+
+ [sys2]
+ facility=LOG_LOCAL2
+
+ [nacct1]
+ sync = 1
+-#file = /var/log/ulogd_nacct.log
++#file = /var/log/ulog/nacct.log
+
+ [mark1]
+ mark = 1
-/var/log/ulogd* {
+/var/log/ulog/*.* {
+ olddir /var/log/archive/ulog
+ sharedscripts
postrotate
/etc/rc.d/init.d/ulogd reload >/dev/null 2>&1
endscript
Summary(pl.UTF-8): Demon logujący w trybie użytkownika dla iptables
Name: ulogd
Version: 2.0.7
-Release: 1
+Release: 2
License: GPL v2+
Group: Networking/Daemons
Source0: https://netfilter.org/projects/ulogd/files/%{name}-%{version}.tar.bz2
Source3: %{name}.logrotate
Patch0: %{name}-includes.patch
Patch1: %{name}-ac.patch
+Patch2: configure-logging.patch
+Patch3: enable-nflog-by-default.patch
+Patch4: put-logfiles-in-var-log-ulog.patch
URL: https://netfilter.org/projects/ulogd/
BuildRequires: autoconf >= 2.50
BuildRequires: automake >= 1:1.11
%setup -q
%patch0 -p1
%patch1 -p0
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%build
%{__libtoolize}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/{sysconfig,logrotate.d,rc.d/init.d,ulogd}} \
- $RPM_BUILD_ROOT/var/log
+ $RPM_BUILD_ROOT/var/log/ulog
%{__make} install -j1 \
DESTDIR=$RPM_BUILD_ROOT
%{__rm} $RPM_BUILD_ROOT%{_libdir}/ulogd/*.la
-touch $RPM_BUILD_ROOT/var/log/ulogd{,.pktlog}
+touch $RPM_BUILD_ROOT/var/log/ulog/ulogd{,.pktlog}
%clean
rm -rf $RPM_BUILD_ROOT
%post
-if [ ! -f /var/log/ulogd ]; then
- touch /var/log/ulogd{,.pktlog}
- chmod 640 /var/log/ulogd{,.pktlog}
-fi
-
/sbin/chkconfig --add ulogd
%service ulogd restart "ulogd daemon"
%attr(755,root,root) %{_libdir}/ulogd/ulogd_output_XML.so
%attr(755,root,root) %{_libdir}/ulogd/ulogd_raw2packet_BASE.so
-%attr(640,root,root) %ghost /var/log/ulogd
-%attr(640,root,root) %ghost /var/log/ulogd.pktlog
+%attr(640,root,root) %dir /var/log/ulog
+%attr(640,root,root) %ghost /var/log/ulog/ulogd
+%attr(640,root,root) %ghost /var/log/ulog/ulogd.pktlog
%{_mandir}/man8/ulogd.8*
%files dbi