3
# Once this package has passed review, a formal uid should be assigned.
4
# http://fedoraproject.org/wiki/PackageUserRegistry
5
%define registry_uid %nil
6
%define registry_name ntop
8
%define cvsversion 20070608cvs
12
Release: 0.13.%{cvsversion}%{?dist}
13
Summary: A network traffic probe similar to the UNIX top command
15
Group: Applications/Internet
17
URL: http://www.ntop.org
18
#Source0: http://downloads.sourceforge.net/ntop/ntop-3.3.tgz
19
# This source comes from the ntop cvs. It is a pre-release of the 3.3 source.
20
# It was taken on 2007-Jun-08. You can recreate this tarball with the
22
# CVSROOT=:pserver:anonymous@cvs.ntop.org:/export/home/ntop
23
# cvs login (enter 'ntop' as password)
24
# cvs checkout -D "2007-06-08 00:00:00 UTC" ntop
25
# tar -cvzf ntop-20070608cvs.tar.gz ntop
26
Source0: ntop-%{cvsversion}.tar.gz
29
Patch0: ntop-conf.patch
31
Patch2: ntop-running-user.patch
32
Patch3: ntop-dbfile-default-dir.patch
33
Patch4: ntop-remove-rc.patch
34
Patch10: ntop-shrext.patch
36
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
38
BuildRequires: autoconf, automake, pkgconfig, libtool, groff, libpcap-devel
39
BuildRequires: gdbm-devel, gd-devel, rrdtool-devel, openssl-devel
40
BuildRequires: net-snmp-devel, lm_sensors-devel, fedora-usermgmt-devel
41
BuildRequires: pcre-devel, mysql-devel
44
BuildRequires: tcp_wrappers-devel
46
BuildRequires: tcp_wrappers
50
Requires(post): /sbin/chkconfig
51
Requires(preun):/sbin/chkconfig
56
ntop is a network traffic probe that shows the network usage, similar to what
57
the popular top Unix command does. ntop is based on libpcap and it has been
58
written in a portable way in order to virtually run on every Unix platform and
61
ntop users can use a a web browser (e.g. netscape) to navigate through ntop
62
(that acts as a web server) traffic information and get a dump of the network
63
status. In the latter case, ntop can be seen as a simple RMON-like agent with
64
an embedded web interface. The use of:
67
* limited configuration and administration via the web interface
68
* reduced CPU and memory usage (they vary according to network size and
71
make ntop easy to use and suitable for monitoring various kind of networks.
73
ntop should be manually started the first time so that the administrator
74
password can be selected.
80
# While we are using CVS, kill all the CVS files and directories
81
find . -type d -name CVS | xargs rm -rf
83
# executable bits are set on some config files and docs that go into
84
# %%{_sysconfdir}/ntop and %%{_datadir}, and some debug source files. Remove
85
# the execute bits - in the build directory
86
find . \( -name \*\.gz -o -name \*\.c -o -name \*\.h -o -name \*\.pdf \
87
-o -name \*\.dtd -o -name \*\.html -o -name \*\.js \) -print \
93
%patch3 -p1 -b .dbfile-default-dir
94
%patch4 -p1 -b .remove-rc
95
%patch10 -R -p1 -b .shrext
101
#export CFLAGS="%{optflags} -DDEBUG"
102
%{configure} --enable-optimize \
104
--enable-largerrdpop \
111
%{__make} %{?_smp_mflags} faq.html ntop.txt ntop.html all
115
%{__rm} -rf $RPM_BUILD_ROOT
116
%{__make} install install-data-local install-data-as DESTDIR=$RPM_BUILD_ROOT
119
%{__install} -d $RPM_BUILD_ROOT/%{_initrddir}
120
%{__install} -p -m 0755 %SOURCE1 $RPM_BUILD_ROOT/%{_initrddir}/ntop
121
%{__install} -p -m 0644 packages/RedHat/ntop.conf.sample $RPM_BUILD_ROOT/%{_sysconfdir}/ntop.conf
123
# remove libtool archives and -devel type stuff (but leave dlopened modules)
124
#find $RPM_BUILD_ROOT -name \*\.la -print -o -name \*\.a -print | xargs rm -f
125
find $RPM_BUILD_ROOT -name \*\.la -print | xargs rm -f
126
# these are not dlopened modules, but -devel cruft
127
rm -f $RPM_BUILD_ROOT/%{_libdir}/lib{myrrd,ntop,ntopreport,*Plugin*}.so
129
# strip off version number from plugin .so files
130
for file in $RPM_BUILD_ROOT/%{_libdir}/%{name}/plugins/*so; do
131
if test -L $file; then
132
base=`basename $file .so`
133
mv $RPM_BUILD_ROOT/%{_libdir}/%{name}/plugins/$base-%{version}.so $file
137
# Create files to be %ghost'ed - %ghost'ed files must exist in the buildroot
138
%{__install} -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/{flows,graphics}
139
%{__install} -d $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/rrd/interfaces
140
touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/ntop/{addressQueue,dnsCache,fingerprint,LsWatch,macPrefix,ntop_pw,prefsCache}.db
143
%{__rm} -rf $RPM_BUILD_ROOT
147
%{__fe_groupadd} %{registry_uid} -r ntop &> /dev/null || :
148
%{__fe_useradd} %{registry_uid} -r -s /sbin/nologin \
149
-d %{_localstatedir}/lib/ntop -M -c 'ntop' \
150
-g %{registry_name} %{registry_name} &> /dev/null || :
155
/sbin/chkconfig --add %{name} &> /dev/null || :
160
/sbin/service %{name} stop &> /dev/null || :
161
/sbin/chkconfig --del %{name} &> /dev/null || :
165
if [ "$1" -ge "1" ]; then
166
/sbin/service %{name} condrestart &> /dev/null || :
168
%{__fe_userdel} %{registry_name} &> /dev/null || :
169
%{__fe_groupdel} %{registry_name} &> /dev/null || :
173
%defattr(-,root,root,-)
174
%doc AUTHORS ChangeLog COPYING MANIFESTO
175
%doc docs/BUG_REPORT docs/database/README docs/database/README.mySQL docs/FAQ
176
%doc docs/FAQarchive docs/FAQ docs/HACKING docs/KNOWN_BUGS docs/TODO
177
%doc docs/1STRUN.txt NEWS README SUPPORT_NTOP.txt THANKS
178
%config(noreplace) %{_sysconfdir}/ntop.conf
179
%config(noreplace) %{_sysconfdir}/ntop
182
%{_libdir}/lib*%{version}*.so
186
%dir %{_localstatedir}/lib/ntop
187
%defattr(0640,root,root,-)
188
%ghost %{_localstatedir}/lib/ntop/addressQueue.db
189
%ghost %{_localstatedir}/lib/ntop/dnsCache.db
190
%ghost %{_localstatedir}/lib/ntop/fingerprint.db
191
%ghost %{_localstatedir}/lib/ntop/LsWatch.db
192
%ghost %{_localstatedir}/lib/ntop/macPrefix.db
193
%ghost %{_localstatedir}/lib/ntop/ntop_pw.db
194
%ghost %{_localstatedir}/lib/ntop/prefsCache.db
195
# This will catch all the directories in rrd. If %ghost'ed files are added
196
# under rrd, this will have to be changed to %dir and more directives for
197
# directories under rrd will have to be added.
198
%defattr(0770,root,ntop,-)
199
%{_localstatedir}/lib/ntop/rrd
202
* Wed Jun 08 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.13.20070608cvs
203
- update to 20070608cvs
204
- update patch to remove rc version
205
- remove remove-gd-version-guess.patch (not needed anymore)
206
- remove xmldump plugin dependencies since it has been disabled (broken) in
207
default ntop installation
209
* Fri Apr 06 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.12.20070407cvs
210
- update to 20070407cvs
211
- compile with -DDEBUG for now to check for problems
212
- rework ntop-am.patch with recent changes
213
- patch to remove gdVersionGuessValue from plugin
214
- repatch with shrext patch
216
* Mon Mar 19 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.11.20070319cvs
217
- update to 20070319cvs
218
- remove patches that have been added upstream
220
* Fri Mar 16 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.10.20070314cvs
221
- fix rpmlint warning for initfile
222
- include 2 of Patrice's patches to cleanup builds
225
* Fri Mar 16 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.9.20070314cvs
226
- update to 20070314cvs
227
- add additional mysql patch from Patrice
228
- remove all of unused logrotate pieces
229
- use /sbin/service to start/stop services
230
- update scriptlets to be easier to read
231
- Better description to initfile summary
232
- add LSB bits to initfile
234
* Mon Mar 07 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.8.20070307cvs
235
- update to 20070307cvs
236
- move database files to %%{_localstatedir}/lib/ntop
237
- fix javascript files not being installed
238
- remove x bit from additional javascript files
240
* Sat Mar 03 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.6.20060207cvs
241
- add --enable-mysql to compile mysql support
243
* Sat Mar 03 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.5.20060207cvs
244
- prefix patches with ntop-
245
- explanation on how to retrieve cvs source
246
- fix removal of %%{_libdir}/.so plugin files no matter the version
247
- reduce dependency on mysql-server to just mysql
249
* Fri Mar 02 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.4.20060227cvs
250
- add pcre-devel to BR so payloads can be matched
251
- remove unused Source4 line
252
- enabled mysql storage of net flow data
254
* Tue Feb 27 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.3.20060227cvs
255
- update to ntop cvs 20060227
256
- kill all the CVS files/directories
257
- remove glib2-devel BR because gdome2-devel requires it
258
- tcp_wrappers vs. tcp_wrappers-devel no dependent on os release
259
- add initscripts to requires since init file uses daemon function
260
- patch .so files to just version 3.3 not 3.3rc0; otherwise rpmlint complains
261
- fix typo in init file
263
* Wed Feb 18 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.2.20060218cvs
264
- update to ntop cvs 20060208
266
* Wed Feb 07 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.3-0.1.20060207cvs
267
- update to ntop cvs 20060207
268
- remove gdbm, pidfile, and FEDORAextra patches
269
- ntopdump.dtd has fixed eol markers now
270
- update nolibs patch so there is no complaint about xmldump libraries/headers
272
* Tue Feb 06 2007 Bernard Johnson <bjohnson@symetrix.com> - 3.2-8.1.20060206cvs
273
- update to cvs 20060206
274
- update ntop-am.patch for cvs version
275
- get rid of plugins patch and just remove cruft in spec file
277
* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-7
278
- add missing net-snmp-devel, and lm_sensors-devel BR
280
* Thu Dec 14 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-6
281
- configure --disable-static
282
- configure --enable-snmp
283
- patch to fix permissions of created gdbm databases
284
- no more ntop-passwd
285
- fix OK printing in init file, redirect stdout of ntop command to null
286
- fix permissions on LsWatch.db database creation
287
- only listen on 127.0.0.1:3000 by default
289
* Mon Dec 11 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-5
290
- use ntop.conf.sample with some modifications
291
- change default syslog facilty to daemon in init file
292
- add repo tag for those who want to use it
293
- install as-data by default, at least for now
294
- fix package detection of gdome library
295
- remove extraneous ldconfig call
297
* Mon Dec 11 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-4
298
- fix detection of glib-2.0 and gdome2
299
- remove Requires: entries to let rpm figure them out
300
- remove BR libxml2, zlib-devel as they are pulled by other packages
301
- added scriplet requires for /sbin/chkconfig
302
- add logrotate to requires
303
- add BR dependency on pkgconfig since patch to fix missing files depends on it
305
* Mon Dec 11 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-3
306
- fix: do not package debug files in arch package
307
- fix: remove x bit from /usr/src debug files
308
- fix: direct source download link
309
- fix: don't package devel libraries in /usr/lib
310
- integrate previous package ntop.sysv to ntop.init
311
- remove sysconfig file
312
- clean up usage of fedora-usermgt
313
- remove ldconfig calls
314
- create a ntop-passwd wrapper to set the passwd
315
- fix: directory permission in directory, init, and passwd wrapper
317
* Sat Dec 09 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-2
318
- revert to 3.2 sources
319
- integrate changes from previous package
321
* Fri Dec 08 2006 Bernard Johnson <bjohnson@symetrix.com> - 3.2-1.20061208cvs