On Wed, Apr 12, 2006, Bill Campbell wrote: > I just heard about iftop at a Seattle Unix Group meeting last > night, and it appears to be a very useful tool for diagnosing > network issues. Basically it's like the ``top'' program, but for > network interfaces.
Yes, is a really neat tool. > As Ralf suggested bringing new packages up on openpkg-dev before > committing them to the current tree, our SPRMS for this is here: > > ftp://ftp.celestial.com/tmp/iftop-0.17-20060412.src.rpm > > I have built and tested this on SuSE Linux Enterprise 9 and > FreeBSD 4.8 (the freebsd version doesn't automatically pick up > the correct interface but works fine when it's specified with the > -i option). Thanks, Bill. I've reviewed the package and here are my suggestions to further improve it before you commit it to OpenPKG-CURRENT: ========================================================================= --- iftop.spec.orig 2006-04-12 22:36:52 +0200 +++ iftop.spec 2006-04-13 07:59:17 +0200 @@ -24,9 +24,9 @@ # package information Name: iftop -Summary: Display network activity like ``top''. +Summary: Display Network Interface Activity URL: http://www.ex-parrot.com/~pdw/iftop -Vendor: Bill Campbell +Vendor: Paul Warren & Chris Lightfoot Packager: OpenPKG Distribution: OpenPKG Class: EVAL @@ -41,13 +41,17 @@ # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20040130, libpcap -PreReq: OpenPKG, openpkg >= 20040130, libpcap +BuildPreReq: OpenPKG, openpkg >= 20040130 +PreReq: OpenPKG, openpkg >= 20040130 +BuildPreReq: libpcap, ncurses +PreReq: libpcap, ncurses AutoReq: no AutoReqProv: no %description - iftop is a utility to display network activity similar to top. + iftop does for network usage what top(1) does for CPU usage. It + listens to network traffic on a named interface and displays a table + of current bandwidth usage by pairs of hosts. %track prog iftop = { @@ -61,9 +65,7 @@ %build CC="%{l_cc}" \ - CXX="%{l_cxx}" \ CFLAGS="%{l_cflags -O}" \ - CXXFLAGS="%{l_cxxflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ @@ -73,7 +75,7 @@ %install rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" - strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files ========================================================================= In summary: - The "Summary" in OpenPKG is usually an "all caps" sentence and should be understandable by mostly everyone (hence I removed the reference to top(1) here as top(1) might be not known to everyone and is references in %description anyway). - The "Vendor" is not the packager (you) but the vendor of the software we are packaging. Here it is the authors of iftop. - iftop links against ncurses which in turn we cannot assume to exist on all platforms (although FreeBSD and Linux include it in their base system). Hence we need to add an "ncurses" dependency. That I moved "libpcap" and "ncurses" onto own dependency headers is just to align the style of what we do in other packages to more visually separate regular dependencies on the special library dependencies (where for "openpkg build" reasons we need both "BuildPreReq" and "PreReq"). - The %description headers I've extended a little bit more with the longer text from the vendor webpage as it really should _describe_ iftop a little bit for non-experts. Here referencing top(1) is fine, of course. - According to the logfiles the software doesn't use C++ hence I've removed the C++ related build flags. - The software installs into <prefix>/sbin/ and hence I fixed the path on the strip(1) line. Please feel free to commit this new package to OpenPKG-CURRENT with "openpkg dev release" aka "opd rel" from within the OpenPKG Foundation setup... Yours, Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com
## ## iftop.spec -- OpenPKG RPM Package Specification ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/> ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://engelschall.com/> ## ## Permission to use, copy, modify, and distribute this software for ## any purpose with or without fee is hereby granted, provided that ## the above copyright notice and this permission notice appear in all ## copies. ## ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ## SUCH DAMAGE. ## # package information Name: iftop Summary: Display Network Interface Activity URL: http://www.ex-parrot.com/~pdw/iftop Vendor: Paul Warren & Chris Lightfoot Packager: OpenPKG Distribution: OpenPKG Class: EVAL Group: Network License: GPL Version: 0.17 Release: 20060412 # list of sources Source0: http://www.ex-parrot.com/~pdw/iftop/download/iftop-%{version}.tar.gz # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} BuildPreReq: OpenPKG, openpkg >= 20040130 PreReq: OpenPKG, openpkg >= 20040130 BuildPreReq: libpcap, ncurses PreReq: libpcap, ncurses AutoReq: no AutoReqProv: no %description iftop does for network usage what top(1) does for CPU usage. It listens to network traffic on a named interface and displays a table of current bandwidth usage by pairs of hosts. %track prog iftop = { version = %{version} url = http://www.ex-parrot.com/~pdw/iftop/download/ regex = iftop-(__VER__)\.tar\.gz } %prep %setup -q %build CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ CPPFLAGS="%{l_cppflags}" \ LDFLAGS="%{l_ldflags}" \ ./configure \ --prefix=%{l_prefix} %{l_make} %{l_mflags -O} %install rm -rf $RPM_BUILD_ROOT %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} %files -f files %clean rm -rf $RPM_BUILD_ROOT