Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
netflow
>
flowd
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 5
[-]
[+]
Added
flowd-suse-init.spec
@@ -0,0 +1,23 @@ +--- flowd.init.suse.orig 2009-05-02 15:07:29.000000000 +0200 ++++ flowd.init.suse 2009-05-02 15:08:38.000000000 +0200 +@@ -3,8 +3,9 @@ + ### BEGIN INIT INFO + # Provides: flowd + # Required-Start: $network $local_fs +-# Should-Start: $named +-# Required-Stop: ++# Should-Start: $named ++# Required-Stop: $null ++# Should-Stop: $null + # Default-Start: 3 5 + # Default-Stop: + # Description: Start flowd +@@ -12,7 +13,7 @@ + + DAEMON="Flowd daemon" + DAEMON_BIN="/usr/sbin/flowd" +-DAEMON_CONF="/usr/etc/flowd.conf" ++DAEMON_CONF="/etc/flowd.conf" + DAEMON_PIDFILE="/var/run/flowd.pid" + DAEMON_OPT="" + #DAEMON_USER="root"
[-]
[+]
Changed
flowd.spec
^
@@ -1,33 +1,38 @@ -Summary: The flowd NetFlow collector daemon -Name: flowd -Version: 0.9 -Release: 1 -URL: http://www.mindrot.org/flowd.html -Source0: flowd-%{version}.tar.bz2 -License: BSD -Group: Productivity/Networking/Diagnostic -BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot +Summary: The flowd NetFlow collector daemon +Name: flowd +Version: 0.9 +Release: 10 +URL: http://www.mindrot.org/flowd.html +Source0: flowd-%{version}.tar.bz2 +Patch0: flowd-suse-init.spec +License: BSD +Group: Productivity/Networking/Diagnostic +BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot %if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} -PreReq: initscripts +PreReq: initscripts %endif -BuildPreReq: byacc -BuildPreReq: glibc-devel -BuildRequires: python >= 2.3 byacc python-devel +BuildRequires: byacc +BuildRequires: glibc-devel +BuildRequires: python >= 2.3 byacc python-devel %if 0%{?fedora_version} >= 7 -BuildRequires: perl-ExtUtils-MakeMaker +BuildRequires: perl-ExtUtils-MakeMaker %endif -%package perl +%package -n perl-Flowd Summary: Perl API to access flowd logfiles Group: Productivity/Networking/Diagnostic -Requires: perl +Requires: perl +Obsoletes: flowd-perl +Provides: flowd-perl -%package python +%package -n python-Flowd Summary: Python API to access flowd logfiles Group: Productivity/Networking/Diagnostic -Requires: python +Requires: python +Obsoletes: flowd-python +Provides: flowd-python %package tools Summary: Collection of example flowd tools @@ -44,11 +49,11 @@ and is privilege separated, to limit security exposure from bugs in flowd itself. -%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 python +%description -n python-Flowd This is a Python API to the binary flowd network flow log format and an example reader application @@ -61,14 +66,15 @@ %prep %setup +%patch0 %build [ -f configure -a -f flowd-config.h.in ] || autoreconf %configure --enable-gcc-warnings -make +%__make -./setup.py build +./setup.py build (cd Flowd-perl ; CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL \ PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor; make ) @@ -79,9 +85,13 @@ %makeinstall # Misc stuff -install -d $RPM_BUILD_ROOT/var/empty -install -d $RPM_BUILD_ROOT/etc/rc.d/init.d -install -m755 flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd +install -d -m755 %{buildroot}/var/lib/flowd +%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} +install -D -m755 flowd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/flowd +%endif +%if 0%{?suse_version} +install -D -m755 flowd.init.suse $RPM_BUILD_ROOT/etc/init.d/flowd +%endif # Perl module (cd Flowd-perl; make install) @@ -100,49 +110,66 @@ fi # Python module -./setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES +./setup.py install --prefix=%{_prefix} --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES sed -e 's|/[^/]*$||' INSTALLED_FILES | grep "site-packages/" | \ sort -u | awk '{ print "%attr(755,root,root) %dir " $1}' > INSTALLED_DIRS cat INSTALLED_FILES INSTALLED_DIRS > INSTALLED_OBJECTS +# fix doc permissions +chmod 0644 tools/* reader.py reader.pl + %clean rm -rf $RPM_BUILD_ROOT %pre %{_sbindir}/groupadd -r _flowd 2>/dev/null || : -%{_sbindir}/useradd -d /var/empty -s /bin/false -g _flowd -M -r _flowd \ +%{_sbindir}/useradd -d /var/lib/flowd -s /bin/false -g _flowd -M -r _flowd \ 2>/dev/null || : %post -/sbin/chkconfig --add flowd +%{fillup_and_insserv} %postun +%if 0%{?suse_version} +%insserv_cleanup +%else /sbin/service flowd condrestart > /dev/null 2>&1 || : +%endif %preun +%if 0%{?suse_version} +%stop_on_removal +%else if [ "$1" = 0 ] then /sbin/service flowd stop > /dev/null 2>&1 || : /sbin/chkconfig --del flowd fi +%endif %files %defattr(-,root,root) %doc ChangeLog LICENSE README TODO -%dir %attr(0111,root,root) %{_var}/empty +%dir /var/lib/flowd %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/flowd.conf %attr(0644,root,root) %{_mandir}/man5/flowd.conf.5* %attr(0644,root,root) %{_mandir}/man8/flowd.8* %attr(0644,root,root) %{_mandir}/man8/flowd-reader.8* %attr(0755,root,root) %{_bindir}/flowd-reader +%if 0%{?centos_version} || 0%{?fedora_version} || 0%{?rhel_version} %attr(0755,root,root) %config /etc/rc.d/init.d/flowd +%endif +%if 0%{?suse_version} +%attr(0755,root,root) %config /etc/init.d/flowd +%endif %attr(0755,root,root) %{_sbindir}/flowd -%files perl -f flowd-perl-filelist +%files -n perl-Flowd -f flowd-perl-filelist %defattr(-,root,root) %doc reader.pl +%dir %{perl_vendorarch}/auto/Flowd -%files python -f INSTALLED_OBJECTS +%files -n python-Flowd -f INSTALLED_OBJECTS %defattr(-,root,root) %doc reader.py @@ -157,6 +184,13 @@ %attr(0644,root,root) %{_libdir}/libflowd.a %changelog +* Sat May 02 2009 Carsten Schoene <cs@linux-administrator.com> - 0.9-10 +- changed python & perl subpackage names +- fix pre/post scripts +- add suse init patch +- use suse init script on suse platforms +- fix permissions + * Wed Nov 03 2004 Damien Miller <djm@mindrot.org> - Add devel subpackage