Accepting request 346126 from home:mnhauke:security

- update to version 1.5.2
- add patch: pmacct-fix-implicit-pointer-decl.diff

- do not build with ULOG on newer versions > 13.2 since it got removed
  from mainstream linux kernel >= 3.17
  http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7200135bc1e61f1437dc326ae2ef2f310c50b4eb

- update to version 1.5.1
 + BMP daemon: BMP, BGP Monitoring Protocol, can be used to monitor BGP
   sessions. The current implementation is base on the draft-ietf-grow-bmp-07
   IETF draft. The daemon currently supports BMP events and stats only, ie.
   initiation, termination, peer up, peer down and stats reports messages.
   Route Monitoring is future (upcoming) work but routes can be currently
   sourced via the BGP daemon thread (best path only or ADD-PATH), making
   the two daemons complementary. The daemon enables to write BMP messages
   to files or AMQP queues, real-time (msglog) or at regular time intervals
   (dump) and is a separate thread in the NetFlow (nfacctd) or sFlow (sfacctd)
   collectors.
 + tmp_net_own_field directive is introduced to record both individual source
   and destination IP addresses and their IP prefix (nets) as part of the same
   aggregation method. While this should become default behaviour, a knob for
   backward-compatibility is made available for all 1.5 until the next major
   release.
 + Introduced nfacctd_stitching and equivalents (ie. sfacctd_stitching):
   when set to true, given an aggregation method, two new non-key fields are
   added to the aggregate upon purging data to the backend: timestamp_min is
   the timestamp of the first element contributing to a certain aggregate
   and timestamp_max is the timestamp of the last element. In case the export
   protocol provides time references, ie. NetFlow/IPFIX, these are used; if not
   the current time (hence time of arrival to the collector) is used instead.

OBS-URL: https://build.opensuse.org/request/show/346126
OBS-URL: https://build.opensuse.org/package/show/server:monitoring/pmacct?expand=0&rev=79
This commit is contained in:
2015-11-27 11:45:10 +00:00
committed by Git OBS Bridge
parent 722680bb97
commit c357eb7742
7 changed files with 478 additions and 62 deletions

View File

@@ -1,20 +1,44 @@
Summary: Promiscuous mode IP Accounting package
Name: pmacct
Version: 0.12.3
Release: 0
License: GPL
Group: Productivity/Networking/Diagnostic
# http://www.pmacct.net/pmacct-%{version}.tar.gz
Source: %{name}-%{version}.tar.bz2
Source1: nfacctd.init
Source2: pmacctd.init
Source3: sfacctd.init
Patch1: pmacct-fix_realloc.patch
URL: http://www.pmacct.net/
BuildRoot: %{_tmppath}/%{name}-root
BuildRequires: mysql-devel postgresql-devel
BuildRequires: sqlite-devel >= 3.0.0
BuildRequires: libpcap-devel
#
# spec file for package pmacct
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: pmacct
Version: 1.5.2
Release: 0
Summary: Accounting and aggregation toolsuite for IPv4 and IPv6
License: GPL-2.0
Group: Productivity/Networking/Diagnostic
Url: http://www.pmacct.net/
Source: http://www.pmacct.net/pmacct-%{version}.tar.gz
Source1: nfacctd.init
Source2: pmacctd.init
Source3: sfacctd.init
Source4: uacctd.init
# PATCH-FIX-UPSTREAM pmacct-fix-implicit-pointer-decl.diff
Patch1: pmacct-fix-implicit-pointer-decl.diff
BuildRequires: libmysqlclient-devel
BuildRequires: libpcap-devel
BuildRequires: libstdc++-devel
BuildRequires: pkg-config
BuildRequires: postgresql-devel
BuildRequires: sqlite-devel >= 3.0.0
BuildRequires: pkgconfig(geoip)
BuildRequires: pkgconfig(jansson)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
pmacct is a small set of passive network monitoring tools to measure, account,
@@ -28,52 +52,75 @@ export data to tools like RRDtool, GNUPlot, Net-SNMP, MRTG, and Cacti.
%prep
%setup -q
%patch1
chmod a+rx docs examples sql
find docs examples sql -type f -print0 | xargs -r0 chmod -x
%patch1 -p1
# fix permissions
chmod -x sql/pmacct-*
%build
export CFLAGS="%{optflags} -Wno-return-type"
%configure \
--sysconfdir=%{_sysconfdir}/%{name} \
--enable-threads \
--enable-64bit \
--enable-mysql \
--enable-pgsql \
--enable-sqlite3 \
--enable-ulog \
--enable-l2 \
--enable-ipv6 \
--enable-v4-mapped \
--with-pgsql-includes=/usr/include/pgsql/
--enable-mysql \
--enable-pgsql \
--with-pgsql-includes=%{_includedir}/pgsql/ \
--enable-sqlite3 \
--enable-geoip \
--enable-jansson \
--enable-64bit \
%if 0%{?suse_version} <= 1320 != (0%{?suse_version} == 1315 && 0%{?is_opensuse})
--enable-ulog \
%endif
--enable-threads
make %{?_smp_mflags}
%__make %{?jobs:-j%{jobs}}
%install
%makeinstall
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%{__install} -Dp %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd
%{__install} -Dp %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd
%{__install} -Dp %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd
ln -sf ../../etc/init.d/nfacctd $RPM_BUILD_ROOT/usr/sbin/rcnfacctd
ln -sf ../../etc/init.d/pmacctd $RPM_BUILD_ROOT/usr/sbin/rcpmacctd
ln -sf ../../etc/init.d/sfacctd $RPM_BUILD_ROOT/usr/sbin/rcsfacctd
install -Dp %{SOURCE1} %{buildroot}/%{_sysconfdir}/init.d/nfacctd
install -Dp %{SOURCE2} %{buildroot}/%{_sysconfdir}/init.d/pmacctd
install -Dp %{SOURCE3} %{buildroot}/%{_sysconfdir}/init.d/sfacctd
install -Dp %{SOURCE4} %{buildroot}/%{_sysconfdir}/init.d/uacctd
ln -sf ../..%{_initddir}/nfacctd %{buildroot}%{_sbindir}/rcnfacctd
ln -sf ../..%{_initddir}/pmacctd %{buildroot}%{_sbindir}/rcpmacctd
ln -sf ../..%{_initddir}/sfacctd %{buildroot}%{_sbindir}/rcsfacctd
ln -sf ../..%{_initddir}/sfacctd %{buildroot}%{_sbindir}/rcuacctd
%{__install} -Dp examples/nfacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/nfacctd.conf
%{__install} -Dp examples/pmacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf
touch %{buildroot}/%{_sysconfdir}/pmacct/sfacctd.conf
%clean
%{__rm} -rf %{buildroot}
install -Dp examples/nfacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/nfacctd.conf
install -Dp examples/pmacctd-sql_v2.conf.example %{buildroot}/%{_sysconfdir}/pmacct/pmacctd.conf
#touch %{buildroot}/%{_sysconfdir}/pmacct/sfacctd.conf
%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog CONFIG-KEYS COPYING EXAMPLES FAQS INSTALL KNOWN-BUGS NEWS README TODO TOOLS UPGRADE
%defattr(-,root,root)
%doc AUTHORS ChangeLog CONFIG-KEYS COPYING FAQS KNOWN-BUGS NEWS README TODO TOOLS UPGRADE
%doc docs examples sql
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sbindir}/*
%{_sysconfdir}/init.d/*
%dir /etc/pmacct
%{_bindir}/pmacct
%{_bindir}/pmmyplay
%{_bindir}/pmpgplay
#
%{_sbindir}/nfacctd
%{_sbindir}/pmacctd
%{_sbindir}/sfacctd
%{_sbindir}/uacctd
#
%{_sysconfdir}/init.d/nfacctd
%{_sysconfdir}/init.d/pmacctd
%{_sysconfdir}/init.d/sfacctd
%{_sysconfdir}/init.d/uacctd
#
%{_sbindir}/rcnfacctd
%{_sbindir}/rcpmacctd
%{_sbindir}/rcsfacctd
%{_sbindir}/rcuacctd
#
%dir %{_sysconfdir}/pmacct
%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/nfacctd.conf
%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/pmacctd.conf
%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/sfacctd.conf
#%attr(600,root,root) %config(noreplace) %{_sysconfdir}/pmacct/sfacctd.conf
%changelog