Участник:RafaelMalikov/ntop

Материал из ALT Linux Wiki

Перейти к: навигация, поиск

ntop supported MySQL

%%# TODO from PLD:

  1. - service ntop init steals terminal (it doesnt finish nor background)
  2. - paths wrong somewhere /var/lib/ntop/ntop is expected (should be without last path component)
  3. - ntop apperars to be daemon, so it should be in _sbindir not in _bindir

%define oversion 3.3

Name: ntop Version: 3.3 Release: alt3

Summary: A network traffic probe similar to the UNIX top command

License: GPL Group: Monitoring

Packager: Rafa aka Chuma <chuma777@yahoo.com>

Url: http://www.ntop.org/

  1. FIXME: libntop needs linking with ntop binary??

%set_verify_elf_method unresolved=relaxed

Source: http://dl.sf.net/%name/%name-%oversion.tar.bz2 Source1: %name.init Source2: %name.conf Patch1: %name-free.patch

  1. TODO

Patch2: %name-plugins.patch

%define _localstatedir /var %define ntopdir %_localstatedir/lib/ntop

Requires: MySQL-server

  1. manually removed: lsb
  2. Automatically added by buildreq on Sun Oct 21 2007

BuildRequires: gcc-c++ libgdbm-devel libnet-snmp-devel libpam-devel libpcap-devel libpcre-devel librrd-devel zlib-devel libMySQL-devel libmysql++-devel

BuildRequires: rpm-build-compat

%description ntop is a network traffic probe that shows the network usage, similar to what the popular top Unix command does. ntop is based on libpcap and it has been written in a portable way in order to virtually run on every Unix platform and on Win32 as well.

ntop users can use a a web browser (e.g. netscape) to navigate through ntop (that acts as a web server) traffic information and get a dump of the network status. In the latter case, ntop can be seen as a simple RMON-like agent with an embedded web interface. The use of:

   * a web interface
   * limited configuration and administration via the web interface
   * reduced CPU and memory usage (they vary according to network size and
     traffic)

make ntop easy to use and suitable for monitoring various kind of networks.

ntop should be manually started the first time so that the administrator password can be selected.

%prep %setup -q -n %name-%oversion %patch1 %__subst "s|<pcre.h>|<pcre/pcre.h>|g" ntop.h

  1. kill libtool.m4 copy

cp -f acinclude.m4.ntop acinclude.m4

%build %__autoreconf

  1. "verified.awk -u" calls require gawk

%configure \ AWK=gawk \ --disable-static \ --enable-i18n \ --enable-sslv3 \ --enable-optimize \ --enable-snmp \ --enable-jumbo-frames \ --with-gnu-ld \ --with-ossl-root=%prefix \ --with-tcpwrap \ --enable-mysql

%make_build

%install install -d %buildroot{%ntopdir,%_initrddir,%_sysconfdir}

%make_install install DESTDIR=%buildroot

install %SOURCE1 %buildroot%_initdir/ntop

  1. install %SOURCE2 %buildroot%_sysconfdir/sysconfig/ntop

install %SOURCE2 %buildroot%_sysconfdir/ntop/ntop.conf

  1. we need devel package?

rm -f %buildroot%_libdir/lib*[a-z].so rm -f %buildroot%_libdir/lib*Plugin*.so

  1. mv %buildroot%_libdir/lib*Plugin*.so %buildroot%_libdir/%name/plugins
  1. Create files to be %%ghost'ed - %%ghost'ed files must exist in the buildroot

install -d %buildroot%ntopdir/rrd/{flows,graphics} install -d %buildroot%ntopdir/rrd/interfaces touch %buildroot%ntopdir/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db

%pre %groupadd -r -f ntop || : %useradd -M -r -d %ntopdir -s /bin/false -c "ntop User" -g ntop ntop || :

%post %post_service %name %post_ldconfig

  1. if test "$1" = "0"; then

echo "***********************************************************************" echo "* YOU MUST SETUP A PASSWORD BEFORE RUNNING NTOP *" echo "* *" echo "* (as root run) $ %_bindir/ntop -A *" echo "* *" echo "* see 1STRUN.txt in %_docdir/ntop-%version *" echo "* You can configure %_sysconfdir/ntop/ntop.conf *" echo "* *" echo "***********************************************************************"

  1. fi

%preun %preun_service %name %postun %postun_ldconfig %files %doc AUTHORS ChangeLog NEWS README THANKS %doc www docs NetFlow utils %_bindir/* %_libdir/lib*-3.3.so %_datadir/%name/ %dir %_libdir/%name/ %_libdir/%name/plugins/ %_man8dir/* %_initdir/ntop

  1. %attr(640,root,root) %_sysconfdir/sysconfig/ntop

%dir %_sysconfdir/ntop/ %config(noreplace) %_sysconfdir/ntop/ntop.conf %_sysconfdir/ntop/*.gz %config(noreplace) %_sysconfdir/ntop/*.pem

  1. %attr(644,root,ntop) %config(noreplace) %verify(not md5 mtime size) %_sysconfdir/ntop.conf

%attr (0770,root,ntop) %dir %ntopdir/ %defattr(0640,root,ntop,-) %ghost %ntopdir/addressQueue.db %ghost %ntopdir/dnsCache.db %ghost %ntopdir/fingerprint.db %ghost %ntopdir/LsWatch.db %ghost %ntopdir/macPrefix.db %ghost %ntopdir/ntop_pw.db %ghost %ntopdir/prefsCache.db

  1. This will catch all the directories in rrd. If %ghost'ed files are added
  2. under rrd, this will have to be changed to %dir and more directives for
  3. directories under rrd will have to be added.

%defattr(0770,root,ntop,-) %ntopdir/rrd/


%changelog

  • Tue Oct 28 2008 Rafa aka Chuma <chuma777@yahoo.com> 3.3-alt3

- enable DB (MySQL) support

  • Wed Nov 07 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3-alt2

- update Summary, description - remove chmod/chown from pre section, add ghost files to /var/lib/ntop - cleanup spec, add some ideas from FC specs (written by Bernard Johnson)

  • Sun Oct 21 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3-alt1

- fix compiling, update buildreq - add --enable-sslv3 --enable-jumbo-frames to configure

  • Thu Jun 28 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3rel-alt1

- new version (3.3rel)

  • Sat Apr 28 2007 Vitaly Lipatov <lav@altlinux.ru> 3.3rc1-alt1

- new version (3.3rc1)

  • Mon Sep 11 2006 Vitaly Lipatov <lav@altlinux.ru> 3.2-alt0.2

- change Packager, cleanup spec - unresolved=relaxed :(

  • Wed Dec 14 2005 Anton Korbin <ahtoh@altlinux.ru> 3.2-alt0.1

- First new version for Alt Linux

  • Wed Nov 02 2005 Vitaly Lipatov <lav@altlinux.ru> 3.1-alt0.1

- spec from PLD Team <feedback@pld-linux.org> (thanks)%% Шаблон:BackLinks

 
Личные инструменты