Bug 85985 - [NEW PORT] mail/couriergraph: A RRDtool frontend for Courier statistics
Summary: [NEW PORT] mail/couriergraph: A RRDtool frontend for Courier statistics
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-11 21:00 UTC by Xavier Beaudouin
Modified: 2005-12-28 20:53 UTC (History)
0 users

See Also:


Attachments
couriergraph-20041207.shar (10.00 KB, text/plain)
2005-09-11 21:00 UTC, Xavier Beaudouin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Beaudouin 2005-09-11 21:00:43 UTC
Couriergraph is a very simple mail statistics RRDtool frontend for Postfix
that produces daily, weekly, monthly and yearly graphs of Courier's POP3,
IMAP, POP3s and IMAPs logins.

WWW: http://www.stahl.bau.tu-bs.de/~hildeb/postfix/couriergraph/

Generated with FreeBSD Port Tools 0.63
Comment 1 Xavier Beaudouin 2005-09-20 13:43:48 UTC
Hello

Can someone have a look at this port ?

Thanks !

/Xavier
Comment 2 Björn König 2005-09-24 20:33:45 UTC
I tested it but the couriergraph.sh rcNG script appears to be totally 
broken on my FreeBSD 6.0-BETA2 machine.

I added the line

   couriergraph_enable="YES"

to /etc/rc.conf and started the daemon.

   # /usr/local/etc/rc.d/couriergraph.sh start
   Starting couriergraph.
   mailgraph: can't write to /var/db/couriergraph

This happened because I installed a package on another machine, but the 
install routine of the port created the directory only on the package 
build machine. These lines let the start script check for the presence 
of the data directory:

   start_precmd=start_precmd

   start_precmd()
   {
       if [ ! -d ${couriergraph_chdir} ]; then
           mkdir -p ${couriergraph_chdir}
           chown ${couriergraph_user}:${couriergraph_group} \
               ${couriergraph_chdir}
       fi
   }

The next thing is that it just doesn't start nevertheless:

   # /usr/local/etc/rc.d/couriergraph.sh start
   Starting couriergraph.

   # ps aux | grep perl
   [nothing]

   # /usr/bin/perl /usr/local/sbin/couriergraph.pl \
       --logfile /var/log/maillog --daemon-rrd=/var/db/couriergraph \
       --daemon --daemon-pid=/var/db/couriergraph/couriergraph.pid

   # ps aux | grep perl
   [process with pid 22332]

   # cat /var/db/couriergraph/couriergraph.pid
   22332

Alright. It's running now ...

   # /var/db/couriergraph/couriergraph.pid
   couriergraph not running? (check /var/db/couriergraph/couriergraph.pid).

... but it doesn't stop.


I'll look at it again if I have a little bit more time.

Regards Björn
Comment 3 Björn König 2005-09-24 20:36:23 UTC
I forgot yet another point: I would place the PID file in /var/run 
instead of /var/db/couriergraph.

Björn
Comment 4 Xavier Beaudouin 2005-09-25 10:55:11 UTC
Le 24 sept. 05 =E0 21:33, Bj=F6rn K=F6nig a =E9crit :

> I tested it but the couriergraph.sh rcNG script appears to be =20
> totally broken on my FreeBSD 6.0-BETA2 machine.

I didn't have test on FreeBSD 6.0-Beta

> I added the line
>
>   couriergraph_enable=3D"YES"
>
> to /etc/rc.conf and started the daemon.
>
>   # /usr/local/etc/rc.d/couriergraph.sh start
>   Starting couriergraph.
>   mailgraph: can't write to /var/db/couriergraph
>
> This happened because I installed a package on another machine, but =20=

> the install routine of the port created the directory only on the =20
> package build machine. These lines let the start script check for =20
> the presence of the data directory:
>
>   start_precmd=3Dstart_precmd
>
>   start_precmd()
>   {
>       if [ ! -d ${couriergraph_chdir} ]; then
>           mkdir -p ${couriergraph_chdir}
>           chown ${couriergraph_user}:${couriergraph_group} \
>               ${couriergraph_chdir}
>       fi
>   }

Thanks for hint.

> The next thing is that it just doesn't start nevertheless:
>
>   # /usr/local/etc/rc.d/couriergraph.sh start
>   Starting couriergraph.
>
>   # ps aux | grep perl
>   [nothing]
>
>   # /usr/bin/perl /usr/local/sbin/couriergraph.pl \
>       --logfile /var/log/maillog --daemon-rrd=3D/var/db/couriergraph \
>       --daemon --daemon-pid=3D/var/db/couriergraph/couriergraph.pid
>
>   # ps aux | grep perl
>   [process with pid 22332]
>
>   # cat /var/db/couriergraph/couriergraph.pid
>   22332
>
> Alright. It's running now ...
>
>   # /var/db/couriergraph/couriergraph.pid
>   couriergraph not running? (check /var/db/couriergraph/=20
> couriergraph.pid).
>
> ... but it doesn't stop.
>
>
> I'll look at it again if I have a little bit more time.


Do you need my help...


But it is very strange I use it on 5.4-RELEASE-p<whatever> and I =20
didn't get such problems... :/

/Xavier
Comment 5 Edwin Groothuis freebsd_committer freebsd_triage 2005-11-22 10:13:41 UTC
State Changed
From-To: open->feedback

Add, is possible, a version number to the distfiles so that this 
won't happen: 

fetch: http://www.stahl.bau.tu-bs.de/~hildeb/postfix/couriergraph/couriergraph.tar.gz: size mismatch: expected 7595, actual 7657 


Can you check if the new tarball still works as expected?
Comment 6 Sam Lawrance freebsd_committer freebsd_triage 2005-12-16 00:42:01 UTC
Any progress on addressing the directory creation, startup, and  
checksum mismatch issues with this PR?  Could you send an updated patch?
Comment 7 Sam Lawrance freebsd_committer freebsd_triage 2005-12-21 21:52:43 UTC
On 16/12/2005, at 7:39 PM, Xavier Beaudouin wrote:

>
>
> Sam Lawrance wrote:
>> Any progress on addressing the directory creation, startup, and   
>> checksum mismatch issues with this PR?  Could you send an updated  
>> patch?
>
> Hi Sam,
>
> The main problem is that I don't too mutch time yet to see that...
>
> The checksum mismatch is because author add a new release but...  
> with same tarball :/
>
> I will see about others as soon as possible :)
>

OK, thanks.
Comment 8 Edwin Groothuis freebsd_committer freebsd_triage 2005-12-28 20:51:41 UTC
State Changed
From-To: feedback->closed

Merged the patches into two files. 
Please use patch-name instead of patch-aa. 
For any of the problems mentioned in this PR please submit a new PR. 

Committed, thanks!