On Sun, Sep 25, 2005 at 04:12:30PM -0500, Drew Scott Daniels wrote: > reopen 93208 = > done > > Hi, > I'm cc'ing the developers of peep. For the history of this bug see: > http://bugs.debian.org/93208 Ok. Developers, please read this mail and see attached patch as is fixes some bugs in your code. > > I'd still be interested in seeing a Debian package of peep, the "Network > Auralizer". Javi, I don't understand what you mean by "for > log-interpretation I do prefer log-analys/logcheck". Can these be made > to output sounds? No, it's just that (admin-wise) peep is not really that much useful. It's fancy, but not that useful. > If anyone knows of a better "auralizer" that I could use for network/log > events, please let me know. I'd be happy to find a less complicated > alternative to peep (and thus have reason to re-close the request for > package bug 93208). I'm not aware of any. > Upstream development is stalled. The developers are responsive, but it > seems they don't have time to do many new developments [1]. I believe > they can be convinced to help out with licensing or compilation problems. Understood. Attached is a patch which can be used to build a Debian package out of Peep and fixes a number of bugs in the latest release. If you don't know how to use it I could upload packages to people.debian.org/~jfs I just don't want to maintain more packages, so it would be best if you found a suitable maintainer for these. I can make the initial upload, however. Regards Javier
--- peep-0.5.0-rc2.orig/server/cmdline.c +++ peep-0.5.0-rc2/server/cmdline.c @@ -316,7 +316,7 @@ { printVersion (); - printf (" + printf ("\ Usage: %s [OPTIONS]...\n\ -h --help Print help and exit\n\ -V --version Print version and exit\n\ --- peep-0.5.0-rc2.orig/server/debug.c +++ peep-0.5.0-rc2/server/debug.c @@ -18,6 +18,9 @@ #include "config.h" #include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include "debug.h" /* For time formatting */ @@ -83,7 +86,7 @@ if (fclose (log_handle) != 0) perror ("Error closing server log file"); - + return 0; } void log (int level, char *s, ...) --- peep-0.5.0-rc2.orig/server/main.c +++ peep-0.5.0-rc2/server/main.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <signal.h> #include <errno.h> +#include <string.h> #include "main.h" #include "cmdline.h" @@ -30,6 +31,7 @@ #include "mixer.h" #include "playback.h" #include "debug.h" +#include "parser.h" static struct args_info args_info; static FILE *pid_file = NULL; @@ -84,7 +86,7 @@ else { /* Write our pid out to the file */ - fprintf (pid_file, "%d\n", pid_file); + fprintf (pid_file, "%d\n", pid); fflush (pid_file); fclose (pid_file); @@ -271,6 +273,8 @@ } + /* Should really return something useful here */ + return 1; } void printGreeting (void) --- peep-0.5.0-rc2.orig/server/thread.h +++ peep-0.5.0-rc2/server/thread.h @@ -19,6 +19,7 @@ #ifndef __PEEP_THREAD_H__ #define __PEEP_THREAD_H__ +#include <stdlib.h> #include <pthread.h> #include <semaphore.h> --- peep-0.5.0-rc2.orig/debian/changelog +++ peep-0.5.0-rc2/debian/changelog @@ -0,0 +1,11 @@ +peep (0.5.0-rc2-1) unstable; urgency=low + + * Initial release Closes: #93208 + * Fixed compilation error in cmdline + * Fixed compilation warnings due to some libraries not being included + and an error in the pidfile generation (the pid was not added to the + file) + * Provide an init.d and logrotate.d configuration files (UNTESTED) + + -- Javier Fernandez-Sanguino Pen~a <jfs@computer.org> Thu, 29 Sep 2005 21:19:16 +0200 + --- peep-0.5.0-rc2.orig/debian/compat +++ peep-0.5.0-rc2/debian/compat @@ -0,0 +1 @@ +4 --- peep-0.5.0-rc2.orig/debian/peep.init +++ peep-0.5.0-rc2/debian/peep.init @@ -0,0 +1,112 @@ +#! /bin/sh +# +# peep Start the sound server +# +# Author: Devin +# Modified for Debian by Javier Fernandez-Sanguino Peña +# +# description: Kickass Sound Server and network / log monitor +# processname: peepd +# pidfile: $RUNDIR/peepd.pid +# config: /etc/default/peep +# config: /etc/peep.conf + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/peep +NAME=peep +DESC="PEEP server" +LOGDIR=/var/log/peep +LOCKDIR=/var/lock/peep +RUNDIR=/var/run/peep +ARGS="-l $LOGDIR/$NAME.log" + +test -x $DAEMON || exit 0 + +# Include peep defaults if available +if [ -f /etc/default/peep ] ; then + . /etc/default/peep +fi + +set -e + +RETVAL=0 + +running() +{ + # No pidfile, probably no daemon present + # + [ ! -f "$PIDFILE" ] && return 1 + pid=`cat $PIDFILE` + # No pid, probably no daemon present + [ -z "$pid" ] && return 1 + [ ! -d /proc/$pid ] && return 1 + cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` + # TODO: This might be more portable than looking for /proc/pid/ + # if ps -p $pidval | grep -q $NAME; then + + # No daemon? + [ "$cmd" != "$DAEMON" ] && return 1 + return 0 +} + +# See how we were called. +case "$1" in + start) + echo -n "Starting $DESC.." + start-stop-daemon --start --quiet --pidfile $RUNDIR/$NAME.pid \ + --exec $DAEMON -- $ARGS + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + touch $LOCKDIR/peepd + echo "$NAME." + else + echo "failed." + fi + if [ -x /usr/bin/logparser ] ; then + echo -n "Starting Log Watcher:" + /usr/bin/logparser --pidfile=$RUNDIR/logparser.pid >>$LOGDIR/startup.log 2>&1 + RETVAL=$? + if [ $RETVAL -eq 0 ] ; then + touch $LOCKDIR/logparser + echo "done." + else + echo "failed." + fi + fi + ;; + stop) + echo -n "Stopping $DESC:" + start-stop-daemon --stop --quiet --pidfile $RUNDIR/$NAME.pid \ + --exec $DAEMON + if [ -x /usr/bin/logparser ] ; then + echo -n "Stopping Log Watcher: " + start-stop-daemon --stop --quiet --pidfile $RUNDIR/logparser.pid \ + --exec /usr/bin/logparser + if [ $RETVAL -eq 0 ]; then + rm -f $LOCKDIR/logparser + echo "done." + else + echo "failed." + fi + fi + ;; + status) + echo -n "$LABEL is " + if running ; then + echo "running" + else + echo " not running." + exit 1 + fi + ;; + restart|reload|force-reload) + $0 stop + $0 start + RETVAL=$? + ;; + *) + echo "Usage: peep {start|stop|status|restart|reload|force-reload}" + exit 1 +esac + +exit $REVAL --- peep-0.5.0-rc2.orig/debian/dirs +++ peep-0.5.0-rc2/debian/dirs @@ -0,0 +1,7 @@ +usr/bin +etc/init.d +etc/logrotate.d +usr/share/doc +var/log/peep +var/lock/peep +var/run/peep --- peep-0.5.0-rc2.orig/debian/peep.logrotate +++ peep-0.5.0-rc2/debian/peep.logrotate @@ -0,0 +1,11 @@ +/var/log/peep/startup.log { + missingok + notifempty + create 640 root adm + weekly + rotate 10 + compress + postrotate + [ -x /usr/bin/logparser ] && /etc/init.d/peep reload + endscript +} --- peep-0.5.0-rc2.orig/debian/rules +++ peep-0.5.0-rc2/debian/rules @@ -0,0 +1,99 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + CFLAGS="$(CFLAGS) -Wl,-z,defs" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info + + +build: build-stamp + +build-stamp: config.status + dh_testdir + $(MAKE) + #docbook-to-man debian/peep.sgml > peep.1 + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + -$(MAKE) distclean +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + $(MAKE) install DESTDIR=$(CURDIR)/debian/peep + mv $(CURDIR)/debian/peep/usr/doc/peep-0.5.0-rc2 $(CURDIR)/debian/peep/usr/share/doc/peep + # Not needed files/dirs + rm -rf $(CURDIR)/debian/peep/usr/doc/ + rm -f $(CURDIR)/debian/peep/usr/share/doc/peep/COPYING $(CURDIR)/debian/peep/usr/share/doc/CHANGELOG + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs CHANGELOG + dh_installdocs + dh_installexamples +# dh_install +# dh_installmenu +# dh_installdebconf + dh_installlogrotate + dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- peep-0.5.0-rc2.orig/debian/postinst +++ peep-0.5.0-rc2/debian/postinst @@ -0,0 +1,81 @@ +#! /bin/bash +# postinst script for peep +# +# TODO: This needs to be converted to debconf and needs to be reviewed +# since it was based in the 0.4.5 code +# +# see: dh_installdeb(1) + +set -e + +# MAINTAINER: Remove this when you review the code +exit 1 + +case "$1" in +configure) + # The following automatic configuration is taken from Peep's + # distribution's gen_conf + +################################################################## +# Section for generating an "out-of-the-box" Peep configuration +# file from a template. +# +# This is my initial pass at this and works great on a linux +# machine. It'll need to be expanded for portability at some +# point and we'll probably want to move it to its own script. + + ERR=0 + if test ! -s /etc/peep.conf; then + echo "Attempting to generate a localized peep.conf from template..." + +# Grab hostname + UNAME_NODENAME=`uname -n 2>/dev/null` || UNAME_NODENAME=hostname_unknown + +# First check if we can run ifconfig without args + if `ifconfig > /dev/null 2>&1`; then +# head -1 to make sure one one address is used if multiple is +# available + BCAST_ADDR=`$IFCONFIG | awk '/Bcast:/ { split($3, a, /:/); print a[2] }' | head -1` + else +# For now, just return unknown. We'll work on this + echo "Couldn't determine local broadcast address..." + echo "Setting address: broadcast_unknown" + ERR=1 + BCAST_ADDR=broadcast_unknown + fi + +# Do a 'quotemeta' on the prefix so we can sub with it + PREFIX=`echo /usr/share | sed -e 's/\//\\\\\//g'` + +# Perform substitutions + sed -e "s/__HOST/$UNAME_NODENAME/;" \ + -e "s/__BROADCAST/$BCAST_ADDR/;" \ + -e "s/__PREFIX/$PREFIX/" \ + < /etc/peep.conf.template > /etc/peep.conf + + if test ! $ERR -eq 0; then + echo "/etc/peep.conf was only partially generated..." + echo "Please review manually." + fi + else + echo "/etc/peep.conf already exists. Nothing done." + fi + + ;; + +abort-upgrade|abort-remove|abort-deconfigure) + + ;; + +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 +;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 --- peep-0.5.0-rc2.orig/debian/control +++ peep-0.5.0-rc2/debian/control @@ -0,0 +1,17 @@ +Source: peep +Section: admin +Priority: optional +Maintainer: Javier Fernandez-Sanguino Pen~a <jfs@computer.org> +Build-Depends: debhelper (>= 4.0.0), autotools-dev, libexpat1-dev +Standards-Version: 3.6.2 + +Package: peep +Architecture: any +Depends: libnet-perl, libfilesys-diskspace-perl, libproc-process-perl, libfile-tail-perl, libtime-hires-perl, ${shlibs:Depends} +Description: The Network Auralizer + Tool use for monitoring your network with sound. Peep is a network + monitoring tool that represents network information via an audio + interface. Network diagnostics are made not only based on single + network events but whether the network sounds "normal". + . + Homepage: http://sourceforge.net/projects/peep --- peep-0.5.0-rc2.orig/debian/README.Debian +++ peep-0.5.0-rc2/debian/README.Debian @@ -0,0 +1,16 @@ + +NOTES for peep +-------------- + +TODO: +- Install docs under docs/ in source and write a doc-base file for those +- Write a manpage for the peepd binary +- Provide the client (perl stuff) (in a separate package?) +- [CHECK] SystemMonitor might not start properly (needs the Filesys:DiskFree + CPAN Perl module) +- Enable the server? Use OpenSSL? +- Does the server need to Depend: on the peep-sounds package? + +--- Javier Fernandez-Sanguino +Thu, 29 Sep 2005 22:08:33 +0200 + --- peep-0.5.0-rc2.orig/debian/copyright +++ peep-0.5.0-rc2/debian/copyright @@ -0,0 +1,39 @@ +This package was debianized by Javier Fernandez-Sanguino Peña +Mon, 21 Oct 2002 15:05:18 +0200. + +It was downloaded from +http://sourceforge.net/project/showfiles.php?group_id=15807 +also at http://sourceforge.net/projects/peep + +Upstream Authors: +Michael Gilfix <mgilfix_AT_eecs.tufts.edu> +Collin Starkweather <collin.starkweather_AT_colorado.edu> +Xavier Renault (xavier_AT_ideasandassociates.com> + +Copyright: + +You are free to distribute this software under the terms of the GNU +General Public License version 2. + +On Debian systems, the complete text of the GNU General Public License can +be found in /usr/share/common-licenses/GPL file. + + Copyright (c) 2000 Michael Gilfix <mgilfix@eecs.tufts.edu> + some portions are: + Copyright (C) 2001 Collin Starkweather <collin.starkweather@colorado.edu> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA + --- peep-0.5.0-rc2.orig/debian/watch +++ peep-0.5.0-rc2/debian/watch @@ -0,0 +1,8 @@ +# watch control file for peep + +# Compulsory line, this is a version 3 file +version=3 + +http://sf.net/peep/Peep-(.*)\.tar\.gz + + --- peep-0.5.0-rc2.orig/debian/docs +++ peep-0.5.0-rc2/debian/docs @@ -0,0 +1,2 @@ +README +TODO
Attachment:
signature.asc
Description: Digital signature