Compare commits

..

3 commits

Author SHA1 Message Date
Fedora Release Engineering
6ba5b3966a dist-git conversion 2010-07-29 14:41:20 +00:00
Bill Nottingham
e90c8d6afb Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:14:12 +00:00
Jeremy Katz
c4be9fd267 Initialize branch FC-6 for ulogd 2006-10-23 19:22:19 +00:00
11 changed files with 465 additions and 1 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
ulogd-1.24.tar.bz2

View file

@ -1 +0,0 @@
Retire packages without systemd support, See FESCo ticket 1605

1
sources Normal file
View file

@ -0,0 +1 @@
05b4ed2926b9a22aaeaf642917bbf8ff ulogd-1.24.tar.bz2

56
ulogd-1.02-init.patch Normal file
View file

@ -0,0 +1,56 @@
--- ./ulogd.init.fedora 2004-03-23 23:36:12.000000000 +0100
+++ ./ulogd.init 2005-11-13 18:52:09.000000000 +0100
@@ -1,16 +1,23 @@
#!/bin/sh
#
-# chkconfig: 345 81 19
+# chkconfig: - 81 19
# description: ulogd is the userspace logging daemon for netfilter/iptables
#
. /etc/rc.d/init.d/functions
+prog="ulogd"
+
+# Source networking configuration.
+. /etc/sysconfig/network
+
+# Check that networking is up.
+[ "$NETWORKING" = "no" ] && exit 0
function start()
{
- printf "Starting %s: " "ulogd"
+ echo -n $"Starting $prog: "
daemon /usr/sbin/ulogd -d
echo
touch /var/lock/subsys/ulogd
@@ -19,7 +26,7 @@
function stop()
{
- printf "Stopping %s: " "ulogd"
+ echo -n $"Stopping $prog: "
killproc ulogd
echo
rm -f /var/lock/subsys/ulogd
@@ -28,6 +35,7 @@
function reload()
{
+ echo -n $"Reloading $prog: "
pid=`pidof ulogd`
if [ "x$pid" != "x" ]; then
kill -HUP $pid 2>/dev/null
@@ -54,8 +62,8 @@
status ulogd
;;
*)
- printf "Usage: %s {start|stop|status|restart|reload}\n" "ulogd"
- exit 1
+ echo $"Usage: $0 {start|stop|status|restart|reload}"
+ exit 2
esac
exit 0

24
ulogd-1.02-pgsql.patch Normal file
View file

@ -0,0 +1,24 @@
diff -Nur ulogd-1.02-orig/doc/pgsql.table ulogd-1.02/doc/pgsql.table
--- ulogd-1.02-orig/doc/pgsql.table 2002-08-28 11:42:50.000000000 +0200
+++ ulogd-1.02/doc/pgsql.table 2004-10-31 02:27:49.652607440 +0100
@@ -33,16 +33,16 @@
"ip_csum" integer,
/* log IPs as unsigned int32 (default) */
--- "ip_saddr" bigint,
--- "ip_daddr" bigint,
+ "ip_saddr" bigint,
+ "ip_daddr" bigint,
/* log IPs as string (--with-pgsql-log-ip-as-string) */
-- "ip_saddr" character varying(40),
-- "ip_daddr" character varying(40),
/* log IPs as inet (--with-pgsql-log-ip-as-string) */
- "ip_saddr" inet,
- "ip_daddr" inet,
+-- "ip_saddr" inet,
+-- "ip_daddr" inet,
"tcp_sport" integer,

33
ulogd-1.21-logdir.patch Normal file
View file

@ -0,0 +1,33 @@
--- ulogd-1.21/ulogd.conf.in.logdir 2005-02-20 16:32:16.281426904 +0100
+++ ulogd-1.21/ulogd.conf.in 2005-02-20 16:33:42.677292736 +0100
@@ -11,7 +11,7 @@
nlgroup=1
# logfile for status messages
-logfile="/var/log/ulogd.log"
+logfile="/var/log/ulogd/ulogd.log"
# loglevel: debug(1), info(3), notice(5), error(7) or fatal(8)
loglevel=5
@@ -50,11 +50,11 @@
[LOGEMU]
-file="/var/log/ulogd.syslogemu"
+file="/var/log/ulogd/ulogd.syslogemu"
sync=1
[OPRINT]
-file="/var/log/ulogd.pktlog"
+file="/var/log/ulogd/ulogd.pktlog"
[MYSQL]
table="ulog"
@@ -76,6 +76,6 @@
buffer=200
[PCAP]
-file="/var/log/ulogd.pcap"
+file="/var/log/ulogd/ulogd.pcap"
sync=1

89
ulogd-1.21-x86_64.patch Normal file
View file

@ -0,0 +1,89 @@
--- ulogd-1.21/configure.x86_64 2005-02-16 12:26:32.000000000 +0100
+++ ulogd-1.21/configure 2005-02-20 16:44:13.389409920 +0100
@@ -1709,22 +1709,22 @@
mysqldir=""
echo $ac_n "checking for MySQL files""... $ac_c" 1>&6
echo "configure:1712: checking for MySQL files" >&5
-for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
-do
- if test -f $d/lib/mysql/libmysqlclient.so
+#for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql
+#do
+ if test -f ${libdir}/mysql/libmysqlclient.so
then
- echo "$ac_t""found mysql in $d" 1>&6
- mysqldir=$d
+ echo "$ac_t""found mysql in ${exec_prefix}" 1>&6
+ mysqldir=${exec_prefix}
mysqldir_suffix=/mysql
- break
- elif test -f $d/lib/libmysqlclient.so
- then
- echo "$ac_t""found mysql in $d" 1>&6
- mysqldir=$d
- mysqldir_suffix=
- break
+# break
+# elif test -f $d/lib/libmysqlclient.so
+# then
+# echo "$ac_t""found mysql in $d" 1>&6
+# mysqldir=$d
+# mysqldir_suffix=
+# break
fi
-done
+#done
if test x$mysqldir = x
then
@@ -1735,7 +1735,7 @@
EOF
MYSQLINCLUDES=${mysqldir}/include${mysqldir_suffix}
- MYSQLLIBS=${mysqldir}/lib${mysqldir_suffix}
+ MYSQLLIBS=${libdir}${mysqldir_suffix}
DATABASE_DIR="${DATABASE_DIR} mysql"
@@ -1802,20 +1802,20 @@
pgsqldir=""
echo $ac_n "checking for PGSQL files""... $ac_c" 1>&6
echo "configure:1805: checking for PGSQL files" >&5
-for d in $dir /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql
-do
- if test -f $d/lib/pgsql/libpq.so
- then
- echo "$ac_t""found pgsql in $d" 1>&6
- pgsqldir=$d
- break
- elif test -f $d/lib/libpq.so
+#for d in $dir /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql
+#do
+ if test -f ${libdir}/libpq.so
then
- echo "$ac_t""found pgsql in $d" 1>&6
- pgsqldir=$d
- break
+ echo "$ac_t""found pgsql in ${exec_prefix}" 1>&6
+ pgsqldir=${exec_prefix}
+# break
+# elif test -f $d/lib/libpq.so
+# then
+# echo "$ac_t""found pgsql in $d" 1>&6
+# pgsqldir=$d
+# break
fi
-done
+#done
if test x$pgsqldir = x
then
@@ -1833,7 +1833,7 @@
break
fi
done
- PGSQLLIBS=${pgsqldir}/lib
+ PGSQLLIBS=${libdir}
DATABASE_DIR="${DATABASE_DIR} pgsql"

22
ulogd-1.23-gcc4.patch Normal file
View file

@ -0,0 +1,22 @@
--- ulogd-1.23/extensions/ulogd_SYSLOG.c.gcc4 2005-02-12 22:17:41.000000000 +0100
+++ ulogd-1.23/extensions/ulogd_SYSLOG.c 2005-04-19 14:03:48.000000000 +0200
@@ -136,7 +136,7 @@
.name = "syslog",
.init = &syslog_init,
.fini = &syslog_fini,
- .output &_output_syslog
+ .output = &_output_syslog
};
--- ulogd-1.23/include/ulogd/ulogd.h.gcc4 2005-04-19 14:06:36.000000000 +0200
+++ ulogd-1.23/include/ulogd/ulogd.h 2005-04-19 14:06:49.000000000 +0200
@@ -56,7 +56,7 @@
#define ULOGD_ERROR 7 /* error condition, requires user action */
#define ULOGD_FATAL 8 /* fatal, program aborted */
-extern FILE *logfile;
+//extern FILE *logfile;
typedef struct ulog_iret {
/* next interpreter return (key) in the global list */

57
ulogd.8 Normal file
View file

@ -0,0 +1,57 @@
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH ULOGD 8 "November 05, 2002" "Linux Netfilter"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
ulogd \- netfilter/iptables ULOG daemon
.SH SYNOPSIS
.B ulogd [options]
.SH DESCRIPTION
.B ulogd
connects to the netlink device of the Linux kernel and reads messages
from the netfilter that get queued with the iptables ULOG target. For
this to work you have to compile the ULOG target into your kernel or
load the respective module.
.PP
The received messages can be logged into files or into a mySQL or
PostgreSQL database.
.SH OPTIONS
.TP
.B -d, --daemon
fork ulogd into background (start as daemon)
.TP
.B -c <filename>, --config-file <filename>
use <filename> as configuration file instead of
.I /etc/ulogd.conf
.TP
.B -h, --help
show usage information
.TP
.B -V, --version
show version information and copyright
.SH FILES
.I /etc/ulogd.conf
.br
.I /var/log/ulogd.log
.SH SEE ALSO
There is more documentation about the daemon and the database plugins
(including examples) in the directory
.nf
.br
.I /usr/share/doc/ulogd-@VERSION@
.SH AUTHOR
This manual page was written by Joerg Wendland <joergland@debian.org>,
for the Debian GNU/Linux system (but may be used by others).

10
ulogd.logrotate Normal file
View file

@ -0,0 +1,10 @@
/var/log/ulogd/ulogd.log /var/log/ulogd/ulogd.syslogemu {
missingok
notifempty
weekly
compress
sharedscripts
postrotate
/etc/init.d/ulogd reload > /dev/null 2>&1
endscript
}

172
ulogd.spec Normal file
View file

@ -0,0 +1,172 @@
Name: ulogd
Version: 1.24
Release: 2%{?dist}
Summary: The userspace logging daemon for netfilter
License: GPL
Group: System Environment/Daemons
URL: http://gnumonks.org/projects/ulogd
Source0: http://ftp.netfilter.org/pub/ulogd/ulogd-%{version}.tar.bz2
Source1: ulogd.logrotate
Source2: ulogd.8
Patch1: ulogd-1.21-logdir.patch
Patch2: ulogd-1.02-init.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires(post): initscripts, chkconfig
Requires(postun): initscripts, chkconfig
BuildRequires: mysql-devel
BuildRequires: postgresql-devel
#BuildRequires: libpcap-devel
%description
Ulogd is an universal logging daemon for the ULOG target of netfilter, the
Linux 2.4+ firewalling subsystem. Ulogd is able to log packets in various
formats to different targets (text files, databases, etc..). It has an
easy-to-use plugin interface to add new protocols and new output targets.
%package mysql
Summary: MySQL output plugin for ulogd
Group: System Environment/Daemons
Requires: %{name} = %{version}
%description mysql
Ulogd-mysql is a MySQL output plugin for ulogd. It enables logging of
firewall information into a MySQL database.
%package pgsql
Summary: PostgreSQL output plugin for ulogd
Group: System Environment/Daemons
Requires: %{name} = %{version}
%description pgsql
Ulogd-pgsql is a PostgreSQL output plugin for ulogd. It enables logging of
firewall information into a PostgreSQL database.
%prep
%setup -q
%patch1 -p1 -b .logdir
%patch2 -p1 -b .fedora
%build
%configure --with-mysql --with-pgsql
# Does not support parallel builds
make
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
mkdir -p $RPM_BUILD_ROOT%{_libdir}/ulogd
mkdir -p $RPM_BUILD_ROOT%{_sbindir}/sbin
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -m755 ulogd.init $RPM_BUILD_ROOT%{_initrddir}/ulogd
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ulogd
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ulogd
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
sed -e 's/@VERSION@/%{version}/g' %{SOURCE2} > $RPM_BUILD_ROOT%{_mandir}/man8/ulogd.8
gzip $RPM_BUILD_ROOT%{_mandir}/man8/ulogd.8
%post
/sbin/chkconfig --add ulogd
%preun
if [ "$1" = 0 ]; then
/sbin/service ulogd stop > /dev/null 2>&1 ||:
/sbin/chkconfig --del ulogd
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service ulogd reload > /dev/null 2>&1 ||:
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,)
%doc COPYING AUTHORS README
%doc doc/ulogd.txt doc/ulogd.a4.ps doc/ulogd.html
%doc doc/mysql.table* doc/pgsql.table
%{_sbindir}/ulogd
%config(noreplace) %{_sysconfdir}/ulogd.conf
%config(noreplace) %{_sysconfdir}/rc.d/init.d/ulogd
%{_libdir}/ulogd
%dir %{_localstatedir}/log/ulogd
%config(noreplace) %{_sysconfdir}/logrotate.d/ulogd
%{_mandir}/man8/ulogd.8.gz
%exclude %{_libdir}/ulogd/ulogd_MYSQL.so
%exclude %{_libdir}/ulogd/ulogd_PGSQL.so
%files mysql
%defattr(0644,root,root,0755)
%{_libdir}/ulogd/ulogd_MYSQL.so
%files pgsql
%defattr(0644,root,root,0755)
%{_libdir}/ulogd/ulogd_PGSQL.so
%changelog
* Thu Aug 31 2006 Aurelien Bompard <abompard@fedoraproject.org> 1.24-2
- rebuild
* Wed Feb 22 2006 Aurelien Bompard <gauret[AT]free.fr> 1.24-1
- version 1.24
- drop patch3 (applied upstream)
- drop patch4 (upstream uses mysql-config to detect libdir now)
- drop patch5 (applied upstream)
* Tue Feb 21 2006 Aurelien Bompard <gauret[AT]free.fr> 1.23-3
- rebuild for FC5
* Sun Jul 24 2005 Aurelien Bompard <gauret[AT]free.fr> 1.23-2
- compress rotated logs
- start after mysql in the init process
- use dist tag
* Tue Apr 19 2005 Aurelien Bompard <gauret[AT]free.fr> 1.23-1.fc4
- version 1.23
- change release tag for FC4
- add patch for GCC4 (upstream bug #323)
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
* Wed Mar 09 2005 Aurelien Bompard <gauret[AT]free.fr> 1.22-1
- version 1.22
- add gpg signature to sources
* Sun Feb 20 2005 Aurelien Bompard <gauret[AT]free.fr> 1.21-1
- version 1.21
* Fri Dec 17 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 1.02-8
- revise x86_64 patch to remove more hardcoded /lib badness
* Fri Dec 17 2004 Michael Schwendt <mschwendt[AT]users.sf.net> 1.02-7
- x86_64, patch configure to look for mysql/pgsql below %%_libdir.
- delete undefined %%epoch in mysql/pgsql sub package dep.
* Sun Oct 31 2004 Aurelien Bompard <gauret[AT]free.fr> 1.02-6
- apply Michael Schwendt's suggestions in bug 1598
* Wed Oct 20 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.5
- enable MySQL and PostgreSQL in subpackages
- add man page from Debian
* Wed Oct 06 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.4
- apply QA suggestions (bug 1598)
* Sat Jul 10 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.3
- disable parallel builds
- add chkconfig to Requires(pre,post)
- set the right mode for /etc/logrotate.d/ulogd
- rotate weekly
* Sun May 16 2004 Aurelien Bompard <gauret[AT]free.fr> 0:1.02-0.fdr.2
- Add Epoch: 0