Name: ntop Version: 3.3.9 Release: 7 Summary: A network traffic probe similar to the UNIX top command Group: Applications/Internet License: GPLv2 and BSD with advertising URL: http://www.ntop.org Source0: http://downloads.sourceforge.net/ntop/ntop-%{version}.tar.gz Source1: ntop.init Source2: ntop.conf Source3: http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz Source4: http://www.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz Patch1: ntop-am.patch Patch2: ntop-running-user.patch Patch3: ntop-dbfile-default-dir.patch Patch4: ntop-enable-sslv3.patch Patch5: ntop-geoip.patch Patch6: ntop-http_c.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, automake, pkgconfig, libtool, groff, libpcap-devel wget BuildRequires: gdbm-devel, gd-devel, rrdtool-devel, openssl-devel BuildRequires: net-snmp-devel, pcre-devel, mysql-devel BuildRequires: perl(ExtUtils::Embed) BuildRequires: GeoIP-devel BuildRequires: tcp_wrappers Requires: initscripts, graphviz Requires(post): /sbin/chkconfig Requires(post): openssl >= 0.9.7f-4, /bin/cat Requires(preun):/sbin/chkconfig %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 ntop-%{version} cp %SOURCE3 ./ && gunzip GeoLiteCity.dat.gz cp %SOURCE4 ./ && gunzip GeoIPASNum.dat.gz # executable bits are set on some config files and docs that go into # %%{_sysconfdir}/ntop and %%{_datadir}, and some debug source files. Remove # the execute bits - in the build directory find . \( -name \*\.gz -o -name \*\.c -o -name \*\.h -o -name \*\.pdf \ -o -name \*\.dtd -o -name \*\.html -o -name \*\.js \) -print \ | xargs chmod a-x %patch1 -p1 -b .am %patch2 -p1 -b .user %patch3 -p1 -b .dbfile-default-dir %patch4 -p1 -b .sslv3 %patch5 -p1 -b .geo %patch6 -p1 -b .http_c %build #run ntop own autoconf wrapper ./autogen.sh --noconfig %{configure} --enable-sslv3 \ --enable-i18n \ --enable-snmp \ --enable-mysql \ --disable-static make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' # Now add init, conf install -d $RPM_BUILD_ROOT/%{_initrddir} install -p -m 0755 %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}/ntop install -p -m 0644 %SOURCE2 $RPM_BUILD_ROOT/%{_sysconfdir}/ntop.conf ### CLEAN UP ### # remove libtool archives and -devel type stuff (but leave dlopened modules) find $RPM_BUILD_ROOT -name \*\.la -print | xargs rm -f # these are not dlopened modules, but -devel cruft rm -f $RPM_BUILD_ROOT/%{_libdir}/lib{myrrd,ntop,ntopreport,*Plugin*}.so # remove empty file rm -f $RPM_BUILD_ROOT/%{_datadir}/ntop/html/ntop.html # fix permissions chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/ntop/plugins/* # Create files to be %ghost'ed - %ghost'ed files must exist in the buildroot install -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd install -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/{flows,graphics,interfaces} touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db %clean rm -rf $RPM_BUILD_ROOT %pre if [ $1 = 1 ]; then getent group %{name} >/dev/null || groupadd -r %{name} getent passwd %{name} >/dev/null || \ useradd -r -g %{name} -d %{_localstatedir}/lib/ntop -s /sbin/nologin \ -c "ntop" %{name} fi %post if [ $1 = 1 ]; then /sbin/chkconfig --add %{name} &> /dev/null || : fi # create new self-signed certificate %define sslcert %{_sysconfdir}/ntop/ntop-cert.pem if [ ! -f %{sslcert} ] ; then #get hosname FQDN=`hostname` if [ "x${FQDN}" = "x" ]; then FQDN=localhost.localdomain fi #create key and certificate in one file cat << EOF | %{_bindir}/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout %{sslcert} -out %{sslcert} 2>/dev/null -- SomeState SomeCity SomeOrganization SomeOrganizationalUnit ${FQDN} root@${FQDN} EOF fi %preun if [ $1 = 0 ]; then /sbin/service %{name} stop &> /dev/null || : /sbin/chkconfig --del %{name} &> /dev/null || : fi %postun if [ "$1" -ge "1" ]; then /sbin/service %{name} condrestart &> /dev/null || : fi %files %defattr(-,root,root,-) %doc AUTHORS ChangeLog COPYING MANIFESTO %doc docs/BUG_REPORT docs/database/README docs/database/README %doc docs/FAQarchive docs/FAQ docs/HACKING docs/KNOWN_BUGS docs/TODO %doc docs/1STRUN.txt NEWS README SUPPORT_NTOP.txt THANKS %config(noreplace) %{_sysconfdir}/ntop.conf %config(noreplace) %{_sysconfdir}/ntop %{_initrddir}/ntop %{_sbindir}/* %{_libdir}/lib*%{version}*.so %{_libdir}/ntop %{_mandir}/man8/* %{_datadir}/ntop %dir %{_localstatedir}/lib/ntop %defattr(0644,root,root,-) %ghost %{_localstatedir}/lib/ntop/addressQueue.db %ghost %{_localstatedir}/lib/ntop/dnsCache.db %ghost %{_localstatedir}/lib/ntop/fingerprint.db %ghost %{_localstatedir}/lib/ntop/LsWatch.db %ghost %{_localstatedir}/lib/ntop/macPrefix.db %ghost %{_localstatedir}/lib/ntop/ntop_pw.db %ghost %{_localstatedir}/lib/ntop/prefsCache.db # This will catch all the directories in flows/graphics/interfaces. If # %ghost'ed files are added under these, this will have to be changed to %dir # and more directives for directories under these will have to be added. %defattr(0755,ntop,ntop,-) %{_localstatedir}/lib/ntop/rrd %changelog * Mon Oct 26 2009 Huzaifa Sidhpurwala - 3.3.9-7 - Remove compile patch - Add BR as tcp_wrappers - Version bump * Thu Apr 16 2009 Huzaifa Sidhpurwala - 3.3.9-5 - Bump to latest fedora version * Fri Aug 29 2008 Richard W.M. Jones - 3.3.6-6 - Removed tcp_wrappers-devel, lm_sensors-devel, not available in EL-5. * Fri Aug 08 2008 Peter Vrabec - 3.3.6-5 - fix typo in init * Fri Aug 08 2008 Peter Vrabec - 3.3.6-4 - some more init script tuning * Fri Aug 08 2008 Rakesh Pandit - 3.3.6-3 - ntop-am patch updated by Jakub H * Fri Aug 08 2008 Peter Vrabec - 3.3.6-2 - init script fix * Tue Aug 05 2008 Peter Vrabec - 3.3.6-1 - initial fedora package * Wed Jul 02 2008 Rakesh Pandit - 3.3-4 - removed ntop_safefree (temp solution) fix for lvale problem with net-snmp on - fix directory permission & license issues - removed unused-direct-shlib-dependency warning - rpath warning fixed. * Sun Nov 18 2007 Bernard Johnson - 3.3-3 - add 'yes' as argument to skip-version-check in /etc/ntop.conf - fix LSB section of init file to agree on default start runlevels - make install preserve timestamps - patch for location of throughput.rrd - force LANG to "C" to prevent errors in string handling - clean up init file - add Requires: on graphviz * Tue Jun 12 2007 Bernard Johnson - 3.3-2 - autotools patch to fix broken --disable-static switch - updated - remove find the removes CVS directories (no longer needed) * Mon Jun 11 2007 Bernard Johnson - 3.3-1 - update to ntop 3.3 release - remove patch to change release version (no longer needed) - fix initfile to use correct parameters to --skip-version-check * Fri Jun 08 2007 Bernard Johnson - 3.3-0.13.20070608cvs - update to 20070608cvs - update patch to remove rc version - remove remove-gd-version-guess.patch (not needed anymore) - remove xmldump plugin dependencies since it has been disabled (broken) in default ntop installation * Fri Apr 06 2007 Bernard Johnson - 3.3-0.12.20070407cvs - update to 20070407cvs - compile with -DDEBUG for now to check for problems - rework ntop-am.patch with recent changes - patch to remove gdVersionGuessValue from plugin - repatch with shrext patch * Mon Mar 19 2007 Bernard Johnson - 3.3-0.11.20070319cvs - update to 20070319cvs - remove patches that have been added upstream * Fri Mar 16 2007 Bernard Johnson - 3.3-0.10.20070314cvs - fix rpmlint warning for initfile - include 2 of Patrice's patches to cleanup builds - remove repotag * Fri Mar 16 2007 Bernard Johnson - 3.3-0.9.20070314cvs - update to 20070314cvs - add additional mysql patch from Patrice - remove all of unused logrotate pieces - use /sbin/service to start/stop services - update scriptlets to be easier to read - Better description to initfile summary - add LSB bits to initfile * Mon Mar 07 2007 Bernard Johnson - 3.3-0.8.20070307cvs - update to 20070307cvs - move database files to %%{_localstatedir}/lib/ntop - fix javascript files not being installed - remove x bit from additional javascript files * Sat Mar 03 2007 Bernard Johnson - 3.3-0.6.20060207cvs - add --enable-mysql to compile mysql support * Sat Mar 03 2007 Bernard Johnson - 3.3-0.5.20060207cvs - prefix patches with ntop- - explanation on how to retrieve cvs source - fix removal of %%{_libdir}/.so plugin files no matter the version - reduce dependency on mysql-server to just mysql * Fri Mar 02 2007 Bernard Johnson - 3.3-0.4.20060227cvs - add pcre-devel to BR so payloads can be matched - remove unused Source4 line - enabled mysql storage of net flow data * Tue Feb 27 2007 Bernard Johnson - 3.3-0.3.20060227cvs - update to ntop cvs 20060227 - kill all the CVS files/directories - remove glib2-devel BR because gdome2-devel requires it - tcp_wrappers vs. tcp_wrappers-devel no dependent on os release - add initscripts to requires since init file uses daemon function - patch .so files to just version 3.3 not 3.3rc0; otherwise rpmlint complains - fix typo in init file * Wed Feb 18 2007 Bernard Johnson - 3.3-0.2.20060218cvs - update to ntop cvs 20060208 * Wed Feb 07 2007 Bernard Johnson - 3.3-0.1.20060207cvs - update to ntop cvs 20060207 - remove gdbm, pidfile, and FEDORAextra patches - ntopdump.dtd has fixed eol markers now - update nolibs patch so there is no complaint about xmldump libraries/headers * Tue Feb 06 2007 Bernard Johnson - 3.2-8.1.20060206cvs - update to cvs 20060206 - update ntop-am.patch for cvs version - get rid of plugins patch and just remove cruft in spec file * Thu Dec 14 2006 Bernard Johnson - 3.2-7 - add missing net-snmp-devel, and lm_sensors-devel BR * Thu Dec 14 2006 Bernard Johnson - 3.2-6 - configure --disable-static - configure --enable-snmp - patch to fix permissions of created gdbm databases - no more ntop-passwd - fix OK printing in init file, redirect stdout of ntop command to null - fix permissions on LsWatch.db database creation - only listen on 127.0.0.1:3000 by default * Mon Dec 11 2006 Bernard Johnson - 3.2-5 - use ntop.conf.sample with some modifications - change default syslog facilty to daemon in init file - add repo tag for those who want to use it - install as-data by default, at least for now - fix package detection of gdome library - remove extraneous ldconfig call * Mon Dec 11 2006 Bernard Johnson - 3.2-4 - fix detection of glib-2.0 and gdome2 - remove Requires: entries to let rpm figure them out - remove BR libxml2, zlib-devel as they are pulled by other packages - added scriplet requires for /sbin/chkconfig - add logrotate to requires - add BR dependency on pkgconfig since patch to fix missing files depends on it * Mon Dec 11 2006 Bernard Johnson - 3.2-3 - fix: do not package debug files in arch package - fix: remove x bit from /usr/src debug files - fix: direct source download link - fix: don't package devel libraries in /usr/lib - integrate previous package ntop.sysv to ntop.init - remove sysconfig file - clean up usage of fedora-usermgt - remove ldconfig calls - create a ntop-passwd wrapper to set the passwd - fix: directory permission in directory, init, and passwd wrapper * Sat Dec 09 2006 Bernard Johnson - 3.2-2 - revert to 3.2 sources - integrate changes from previous package * Fri Dec 08 2006 Bernard Johnson - 3.2-1.20061208cvs - initial package