Summary: The flowd NetFlow collector daemon
Summary(pl.UTF-8): flowd - demon zbierania danych NetFlow
Name: flowd
-Version: 0.9
-Release: 1
+Version: 0.9.1
+Release: 12
License: BSD
Group: Applications/Networking
Source0: http://www.mindrot.org/files/flowd/%{name}-%{version}.tar.gz
-# Source0-md5: 442917bb3c66a81786e9ab1d40006122
+# Source0-md5: a3d0512b5e6d9c7d9e749d9894376ea4
+Patch0: %{name}-username.patch
+Patch1: format-error.patch
URL: http://www.mindrot.org/flowd.html
BuildRequires: byacc
-BuildRequires: python-devel
BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: python-devel
+BuildRequires: python-modules
BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.710
+Requires(post,preun): /sbin/chkconfig
+Requires(postun): /usr/sbin/groupdel
+Requires(postun): /usr/sbin/userdel
Requires(pre): /bin/id
Requires(pre): /usr/bin/getgid
Requires(pre): /usr/sbin/groupadd
Requires(pre): /usr/sbin/useradd
-Requires(post,preun): /sbin/chkconfig
-Requires(postun): /usr/sbin/groupdel
-Requires(postun): /usr/sbin/userdel
Requires: rc-scripts
-Provides: group(_flowd)
-Provides: user(_flowd)
+Provides: group(flowd)
+Provides: user(flowd)
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
zapisywanych przepływów, ma rozdzielenie uprawnień w celu ograniczenia
wpływu własnych błedów na bezpieczeństwo.
-%package perl
+%package -n perl-Flowd
Summary: Perl API to access flowd logfiles
Summary(pl.UTF-8): Perlowe API do dostępu do plików logów flowd
Group: Development/Languages/Perl
+Obsoletes: flowd-perl
-%description perl
+%description -n perl-Flowd
This is a Perl API to the binary flowd network flow log format and an
example reader application.
-%description perl -l pl.UTF-8
+%description -n perl-Flowd -l pl.UTF-8
Ten pakiet zawiera API Perla dla binarnego formatu plików logów
przepływów sieciowych flowd oraz przykładowy program czytający.
-%package python
+%package -n python-flowd
Summary: Python API to access flowd logfiles
Summary(pl.UTF-8): Pythonowe API do dostępu do plików logów flowd
Group: Applications/Networking
-Requires: python
+Obsoletes: flowd-python
-%description python
+%description -n python-flowd
This is a Python API to the binary flowd network flow log format and
an example reader application.
-%description python -l pl.UTF-8
+%description -n python-flowd -l pl.UTF-8
Ten pakiet zawiera API Pythona dla binarnego formatu plików logów
przepływów sieciowych flowd oraz przykładowy program czytający.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%build
%configure
-# --enable-gcc-warnings \
-
%{__make}
-cd Flowd-perl
+%py_build
+
+cd Flowd-perl
%{__perl} Makefile.PL \
INSTALLDIRS=vendor
-%{__make}
+%{__make}
%{?with_tests:%{__make} test}
-#python setup.py install --root=$RPM_BUILD_ROOT --optimize=2
-
%install
rm -rf $RPM_BUILD_ROOT
# Misc stuff
install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
-install flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
+install -p flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd
# Perl module
%{__make} -C Flowd-perl pure_install \
DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{perl_vendorarch}/auto/Flowd/.packlist
+
# Python module
-./setup.py install --optimize 1 --root=$RPM_BUILD_ROOT
+%py_install
%clean
rm -rf $RPM_BUILD_ROOT
%pre
-%groupadd -g XXX _flowd
-%useradd -u XXX -d /usr/share/empty -s /bin/false -c "flowd user" -g _flowd _flowd
+%groupadd -g 198 flowd
+%useradd -u 198 -d /usr/share/empty -s /bin/false -c "flowd user" -g flowd flowd
%post
/sbin/chkconfig --add flowd
%postun
if [ "$1" = "0" ]; then
- %userremove _flowd
- %groupremove _flowd
+ %userremove flowd
+ %groupremove flowd
fi
%files
%defattr(644,root,root,755)
%doc ChangeLog LICENSE README TODO
-#%%dir %%attr(111,root,root) %{_var}/empty
%attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/flowd.conf
%attr(754,root,root) /etc/rc.d/init.d/flowd
%attr(755,root,root) %{_bindir}/flowd-reader
%{_mandir}/man8/flowd.8*
%{_mandir}/man8/flowd-reader.8*
-%files perl
+%files -n perl-Flowd
%defattr(644,root,root,755)
-#%%doc reader.pl
+%doc reader.pl
%{perl_vendorarch}/Flowd.pm
%dir %{perl_vendorarch}/auto/Flowd
-%{perl_vendorarch}/auto/Flowd/Flowd.bs
%attr(755,root,root) %{perl_vendorarch}/auto/Flowd/Flowd.so
-%{_mandir}/man3/*
+%{_mandir}/man3/Flowd.3pm*
-%files python
+%files -n python-flowd
%defattr(644,root,root,755)
%doc reader.py
+%attr(755,root,root) %{py_sitedir}/flowd.so
+%if "%{py_ver}" > "2.4"
+%{py_sitedir}/flowd-*.egg-info
+%endif
%files tools
%defattr(644,root,root,755)