[ulogd] Updated to 2.0.0-beta4 (patch by Stephen Beahm)

Martin Preisler mpreisle at fedoraproject.org
Wed Nov 23 11:33:30 UTC 2011


commit 935784d9a9a67d7803a5707d590d04991c32f7de
Author: Martin Preisler <mpreisle at redhat.com>
Date:   Wed Nov 23 10:00:55 2011 +0100

    Updated to 2.0.0-beta4 (patch by Stephen Beahm)

 .gitignore                      |    1 +
 sources                         |    2 +-
 ulogd-1.02-init.patch           |  109 -----------------
 ulogd-1.02-pgsql.patch          |   24 ----
 ulogd-1.21-logdir.patch         |   33 -----
 ulogd-1.21-x86_64.patch         |   89 --------------
 ulogd-1.23-gcc4.patch           |   22 ----
 ulogd-1.24-fortify-source.patch |   22 ----
 ulogd-1.24-initializers.patch   |  129 --------------------
 ulogd.8                         |   57 ---------
 ulogd.logrotate                 |   10 --
 ulogd.spec                      |  257 +++++++++++++++++++++++----------------
 12 files changed, 156 insertions(+), 599 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 66fd2b3..962f5c2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 ulogd-1.24.tar.bz2
+/ulogd-2.0.0beta4.tar.bz2
diff --git a/sources b/sources
index 877e10d..07cdc2f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-05b4ed2926b9a22aaeaf642917bbf8ff  ulogd-1.24.tar.bz2
+21143aecf8e39008d143a0fb0f742b0c  ulogd-2.0.0beta4.tar.bz2
diff --git a/ulogd.spec b/ulogd.spec
index e55217e..2758430 100644
--- a/ulogd.spec
+++ b/ulogd.spec
@@ -1,146 +1,197 @@
-Name:           ulogd
-Version:        1.24
-Release:        15%{?dist}
-Summary:        The userspace logging daemon for netfilter
-License:        GPLv2
-Group:          System Environment/Daemons
-URL:            http://gnumonks.org/projects
-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
-# Bug 247345
-Patch3:         ulogd-1.24-fortify-source.patch
-# The code uses a deprecated way of getting its DSO initializers run,
-# build fails with rpm-build > 4.4.2.1-3 (new find-debuginfo.sh script)
-Patch4:         ulogd-1.24-initializers.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
-BuildRequires:	openssl-devel
+%define prerel beta4
+
+# numbers from 'git describe'
+%define git_patchlevel 18
+%define git_abbrev g7209778
+%define snapshot %{git_patchlevel}.%{git_abbrev}
+%undefine snapshot
+
+Summary: Userspace logging daemon for netfilter
+Name: ulogd
+Version: 2.0.0
+Release: 1%{?prerel:.%{prerel}}%{?snapshot:.%{snapshot}}%{?dist}
+License: GPLv2+
+Group: System Environment/Daemons
+URL: http://www.netfilter.org/projects/%{name}/
+Source0: http://ftp.netfilter.org/pub/%{name}/%{name}-%{version}%{prerel}.tar.bz2
+Source1: %{name}.init
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: libnetfilter_conntrack-devel >= 0.0.95
+BuildRequires: libnetfilter_log-devel >= 1.0.0
+BuildRequires: libnfnetlink-devel >= 0.0.39
+BuildRequires: sgml-tools
+
+Requires(post): /sbin/service
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+Requires(postun): /sbin/service
 
 %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.
+%{name} is a logging daemon that reads event messages coming from the Netfilter
+connection tracking and the Netfilter packet logging subsystem. You have to
+enable support for connection tracking event delivery; ctnetlink and the NFLOG
+target in your Linux kernel 2.6.x or load their respective modules. The
+deprecated ULOG target (which has been superseded by NFLOG) is also supported.
+
+%package libdbi
+Summary: Libdbi framework output plugin for %{name}
+Group: System Environment/Daemons
+BuildRequires: libdbi-devel
+Requires: %{name} = %{version}
+%description libdbi
+%{name}-libdbi is a libdbi output plugin for %{name}. It enables logging of
+firewall information through a libdbi interface.
 
 %package mysql
-Summary:        MySQL output plugin for ulogd
-Group:          System Environment/Daemons
-Requires:       %{name} = %{version}
-
+Summary: MySQL output plugin for %{name}
+Group: System Environment/Daemons
+BuildRequires: mysql-devel
+#BuildRequires: openssl-devel
+Requires: %{name} = %{version}
 %description mysql
-Ulogd-mysql is a MySQL output plugin for ulogd. It enables logging of
+%{name}-mysql is a MySQL output plugin for %{name}. 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}
 
+%package pgsql
+Summary: PostgreSQL output plugin for %{name}
+Group: System Environment/Daemons
+BuildRequires: postgresql-devel
+Requires: %{name} = %{version}
 %description pgsql
-Ulogd-pgsql is a PostgreSQL output plugin for ulogd. It enables logging of
+%{name}-pgsql is a PostgreSQL output plugin for %{name}. It enables logging of
 firewall information into a PostgreSQL database.
 
 %package pcap
-Summary:        PCAP output plugin for ulogd
-Group:          System Environment/Daemons
-Requires:       %{name} = %{version}
-
+Summary: PCAP output plugin for %{name}
+Group: System Environment/Daemons
+BuildRequires: libpcap-devel
+Requires: %{name} = %{version}
 %description pcap
-ulogd-pcap is a output plugin for ulogd that saves packet logs as PCAP file.
-PCAP is a standard format that can be later analyzed by a lot of tools such as
-tcpdump and wireshark.
-
+%{name}-pcap is a output plugin for %{name} that saves packet logs as PCAP
+file. PCAP is a standard format that can be later analyzed by a lot of tools
+such as tcpdump and wireshark.
+
+%package sqlite
+Summary: SQLITE output plugin for %{name}
+Group: System Environment/Daemons
+BuildRequires: sqlite-devel
+Requires: %{name} = %{version}
+%description sqlite
+%{name}-sqlite is a SQLITE output plugin for %{name}. It enables logging of
+firewall information into an SQLITE database.
 
 %prep
-%setup -q
-%patch1 -p1 -b .logdir
-%patch2 -p1 -b .lsbinit
-%patch3 -p0 -b .fortify-source
-# Enable BuildID :
-# https://www.redhat.com/archives/fedora-devel-announce/2007-August/msg00007.html
-perl -pi -e 's/\(LD\) -shared/(CC) \$(CFLAGS) \$(LDFLAGS) -shared/g' */Makefile.in
-%patch4 -p1 -b .initializers
+%setup -q -n %{name}-%{version}%{prerel}
 
+%{__sed} -i -e 's|/var/log/|%{_localstatedir}/log/%{name}/|g' %{name}.conf.in
 
 %build
-%configure --with-mysql --with-pgsql
-# Does not support parallel builds
-make 
+%configure \
+   --disable-static \
+   --enable-shared \
+   --with-dbi-lib=%{_libdir} \
+   --with-pcap-lib=%{_libdir} \
+   --with-sqlite3-lib=%{_libdir}
 
-%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
+%{__make} %{?_smp_mflags}
+%{__make} %{?_smp_mflags} -C doc
 
-mkdir -p $RPM_BUILD_ROOT%{_initrddir}
-install -m755 ulogd.init $RPM_BUILD_ROOT%{_initrddir}/ulogd
+%install
+%{__rm} -rf %{buildroot}
+%{__make} DESTDIR=%{buildroot} install
 
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ulogd
+%{__mkdir_p} -m 0755 %{buildroot}%{_localstatedir}/log/%{name}/
 
-mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
-install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/ulogd
+%{__mkdir_p} -m 0755 %{buildroot}%{_sysconfdir}/
+%{__install} -m 0644 %{name}.conf %{buildroot}%{_sysconfdir}/
 
-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
+%{__mkdir_p} -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d/
+%{__install} -m 0644 %{name}.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
 
+%{__mkdir_p} -m 0755 %{buildroot}%{_initrddir}/
+%{__install} -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
 
 %post
-/sbin/chkconfig --add ulogd
-
-%preun 
-if [ "$1" = 0 ]; then 
-  /sbin/service ulogd stop > /dev/null 2>&1 ||:
-  /sbin/chkconfig --del ulogd 
+/sbin/chkconfig --add %{name}
+/sbin/service %{name} condrestart >/dev/null 2>&1 || :
+
+%preun
+# if we are uninstalling...
+if [ "$1" = 0 ]; then
+   /sbin/service %{name} stop > /dev/null 2>&1 ||:
+   /sbin/chkconfig --del %{name}
 fi
 
-%postun 
-if [ "$1" -ge "1" ]; then 
-  /sbin/service ulogd reload > /dev/null 2>&1 ||:
+%postun
+# if we are upgrading...
+if [ "$1" -ge "1" ]; then
+   /sbin/service %{name} condrestart >/dev/null 2>&1 || :
 fi
 
+%check
+%{__make} %{?_smp_mflags} check
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
 
 %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
-%{_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
-%exclude %{_libdir}/ulogd/ulogd_PCAP.so
+%defattr(0755,root,root,0755)
+%{_sbindir}/%{name}
+%{_initrddir}/%{name}
+%{_libdir}/%{name}
+%defattr(0644,root,root,0755)
+%doc COPYING
+%doc AUTHORS README
+%doc doc/%{name}.txt doc/%{name}.ps doc/%{name}.html
+%doc %{_mandir}/man?/*
+%config(noreplace) %{_sysconfdir}/%{name}.conf
+%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
+%dir %{_localstatedir}/log/%{name}
+%exclude %{_libdir}/%{name}/*.la
+%exclude %{_libdir}/%{name}/%{name}_output_DBI.so
+%exclude %{_libdir}/%{name}/%{name}_output_MYSQL.so
+%exclude %{_libdir}/%{name}/%{name}_output_PGSQL.so
+%exclude %{_libdir}/%{name}/%{name}_output_PCAP.so
+%exclude %{_libdir}/%{name}/%{name}_output_SQLITE3.so
+
+%files libdbi
+%defattr(0755,root,root,0755)
+%{_libdir}/%{name}/%{name}_output_DBI.so
+%defattr(0644,root,root,0755)
+%doc COPYING
 
 %files mysql
-%defattr(0755,root,root)
-%{_libdir}/ulogd/ulogd_MYSQL.so
+%defattr(0755,root,root,0755)
+%{_libdir}/%{name}/%{name}_output_MYSQL.so
+%defattr(0644,root,root,0755)
+%doc COPYING
 
 %files pgsql
-%defattr(0755,root,root)
-%{_libdir}/ulogd/ulogd_PGSQL.so
+%defattr(0755,root,root,0755)
+%{_libdir}/%{name}/%{name}_output_PGSQL.so
+%defattr(0644,root,root,0755)
+%doc COPYING
 
 %files pcap
-%defattr(0755,root,root)
-%{_libdir}/ulogd/ulogd_PCAP.so
+%defattr(0755,root,root,0755)
+%{_libdir}/%{name}/%{name}_output_PCAP.so
+%defattr(0644,root,root,0755)
+%doc COPYING
+
+%files sqlite
+%defattr(0755,root,root,0755)
+%{_libdir}/%{name}/%{name}_output_SQLITE3.so
+%defattr(0644,root,root,0755)
+%doc COPYING
 
 %changelog
+* Tue Nov 16 2010 Stephen Beahm <stephenbeahm at comcast.net> - 2.0.0-1.beta4
+- update version.
+- spec review.
+- (rebased on top of the remaining 1.24 changes)
+
 * Wed Mar 23 2011 Dan HorĂ¡k <dan at danny.cz> - 1.24-15
 - rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
 
@@ -203,7 +254,7 @@ rm -rf $RPM_BUILD_ROOT
 - change release tag for FC4
 - add patch for GCC4 (upstream bug #323)
 
-* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
+* Fri Apr 07 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
 - rebuilt
 
 * Wed Mar 09 2005 Aurelien Bompard <gauret[AT]free.fr> 1.22-1


More information about the scm-commits mailing list