]> git.pld-linux.org Git - packages/ulogd.git/commitdiff
- rel 2; don't pollute /var/log directly; enable some default logging settings (debia... auto/th/ulogd-2.0.7-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 3 Dec 2019 10:20:00 +0000 (11:20 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 3 Dec 2019 10:20:04 +0000 (11:20 +0100)
configure-logging.patch [new file with mode: 0644]
enable-nflog-by-default.patch [new file with mode: 0644]
put-logfiles-in-var-log-ulog.patch [new file with mode: 0644]
ulogd.logrotate
ulogd.spec

diff --git a/configure-logging.patch b/configure-logging.patch
new file mode 100644 (file)
index 0000000..5d74ae1
--- /dev/null
@@ -0,0 +1,22 @@
+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
diff --git a/enable-nflog-by-default.patch b/enable-nflog-by-default.patch
new file mode 100644 (file)
index 0000000..1b54509
--- /dev/null
@@ -0,0 +1,18 @@
+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
diff --git a/put-logfiles-in-var-log-ulog.patch b/put-logfiles-in-var-log-ulog.patch
new file mode 100644 (file)
index 0000000..f040e70
--- /dev/null
@@ -0,0 +1,72 @@
+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
index 99840c6b8cb4ec82add4541cb12ecb8baa03c6ec..384dceab89d4f9953d0617485e3452db99964b4f 100644 (file)
@@ -1,4 +1,6 @@
-/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
index 7f7a4bafa9e77c7d65c41c2deeb1ccd4dce6e10d..f90cc3de7d85ae9fbfbc14912a00be50bd67d50a 100644 (file)
@@ -2,7 +2,7 @@ Summary:        ULOGD - the Userspace Logging Daemon for iptables
 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
@@ -12,6 +12,9 @@ Source2:      %{name}.sysconfig
 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
@@ -133,6 +136,9 @@ Wtyczka SQLite dla ulogd.
 %setup -q
 %patch0 -p1
 %patch1 -p0
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 %build
 %{__libtoolize}
@@ -154,7 +160,7 @@ sgml2html -s 0 ulogd.sgml
 %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
@@ -166,17 +172,12 @@ install %{name}.conf $RPM_BUILD_ROOT/etc/%{name}.conf
 
 %{__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"
 
@@ -220,8 +221,9 @@ fi
 %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
This page took 0.121289 seconds and 4 git commands to generate.