Subject: pkg/8764: squid package RFEs
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lukem@netbsd.org>
List: netbsd-bugs
Date: 11/08/1999 06:06:47
>Number: 8764
>Category: pkg
>Synopsis: request for enhancements to squid package
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Nov 8 06:06:01 1999
>Last-Modified:
>Originator: Luke Mewburn
>Organization:
TNFi
>Release: Tue Nov 9 00:43:44 EST 1999
>Environment:
System: NetBSD karybdis.cs.rmit.edu.au 1.4M NetBSD 1.4M (LUKEM_ALPHA) #11: Mon Nov 8 09:48:18 EST 1999 lukem@karybdis.cs.rmit.edu.au:/nfs/netbsd/current/src/sys/arch/alpha/compile/LUKEM_ALPHA alpha
>Description:
i have a couple of request for enhancements to the squid
package.
a) update the package from squid 2.2STABLE4 to 2.2STABLE5.
it looks like there's some fixes we probably want.
b) allow the user to specify in clean fashion extra environment
arguments to the configure script. i run my cache at port 8080
(instead of the squid default of 3128). whilst i can override
this in /etc/squid.conf, it's damn annoying to change it every
time i want to use cachemgr.cgi.
at ./configure time you can set CACHE_HTTP_PORT=8080 in the
environment to override this, but there's no clean way to
do this using the package
c) squid isn't as friendly as it could be to external log rotation
programs. i've got a patch which changes the order in which
files get rotated so that the metadata rebuild (which can
take a long time) gets done after the other logs are
rotated. the reason for this is my external rotation program
rotates the files to a temporary name, sends a signal to
squid, waits a few seconds longer than the `shutdown_lifetime'
time (to wait until squid reopens the fresh new logs), and
then the log rotator starts its work on compressing the old
logs. without this patch you can't be sure of how long it
will take for the rotation to take place (on some systems
i've seen the metadata rebuild take over 5 minutes). i've
attached a patch.
>How-To-Repeat:
a) inspect version #
b) inspect makefile
c) experience.
>Fix:
a) package g00r00 to update
b) come up with a funky /etc/mk.conf var name (e.g,
SQUID_CONFIGURE_ENV), and change the Makefile from
CONFIGURE_ENV+= CPPFLAGS=${CPPFLAGS} \
PERL=${LOCALBASE}/bin/perl
CONFIGURE_ENV+= CPPFLAGS=${CPPFLAGS} \
PERL=${LOCALBASE}/bin/perl \
${SQUID_CONFIGURE_ENV}
then i can add
SQUID_CONFIGURE_ENV='CACHE_HTTP_PORT=8080'
to /etc/mk.conf and reduce the amount of typing each time i
fire up cachemgr.cgi :-)
c) convert the following patch into a pkgsrc friendly one.
i've sent this off to squid-bugs, but who knows what
release they'll incorporate it into
*** src/main.c.orig Sat Nov 6 10:16:39 1999
--- src/main.c Sat Nov 6 10:16:57 1999
*************** mainRotate(void)
*** 351,360 ****
{
icmpClose();
_db_rotate_log(); /* cache.log */
- storeDirWriteCleanLogs(1);
storeLogRotate(); /* store.log */
accessLogRotate(); /* access.log */
useragentRotateLog(); /* useragent.log */
icmpOpen();
}
--- 351,360 ----
{
icmpClose();
_db_rotate_log(); /* cache.log */
storeLogRotate(); /* store.log */
accessLogRotate(); /* access.log */
useragentRotateLog(); /* useragent.log */
+ storeDirWriteCleanLogs(1);
icmpOpen();
}
>Audit-Trail:
>Unformatted: