Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
View Bug Activity | Format For Printing | XML | Clone This Bug
The squidGuard ebuild has a bug. The config file location and log dir are not defined in the ebuild. This prevents integration with other packages such as adzapper. I have changed src_compile() to the following, re-emerged and the problem seems to have been cured. src_compile() { econf || die "configure problem" ./configure --prefix=/usr --with-sg- config=/etc/squidGuard/squidGuard.conf --with-sg-logdir=/var/log/squidGuard || die "configure problem" emake || die "compile problem" } I don't know if I did it right as it is the first time I have tinkered with an ebuild. I think the econf line should probably get deleted, but it worked with it there. Also if there is a way to do it, the logdir isn't created either (needs to be owned by squid) and the squidGuard.cgi file is created during build but seems to disappear. Sorry if I haven't filed this properly - I did try to read through the docs on it.
blizzy any news ?
Hmm. I can't quite see why specifying --with-sg-config and --with-sg-logdir should be necessary. On my box, /etc/squidGuard/squidGuard.conf and /var/log/squidGuard are used automatically since the first time I've installed it. Marcus, perhaps you can enlighten us a bit?
On my box the ebuild compiled fine. I then tried to use squidguard with squid as described in the docs and it wouldn't work at all. I then found that it was running in emergency mode because it couldn't find it's config file or log directory. I found the switch '-c /path/to/squidGuard.conf' would allow me to specify the config file location, and in there I could specify the log directory too. I also wanted to be able to use AdZapper, and this wouldn't work if I tried to chain the two together and use the -c option. After hunting around on the squidguard.org site I found that the config file was expected at /usr/local/squid/etc by default, and this was what was causing the problem. This is a copy of what happens when typing squidGuard at the prompt, wcs-maltby root # squidGuard 2003-08-04 19:07:09 [19160] squidGuard: can't write to logfile /usr/squidGuard/log/squidGuard.log 2003-08-04 19:07:09 [19160] squidGuard: can't open configfile /usr/squidGuard/squidGuard.conf 2003-08-04 19:07:09 [19160] going into emergency mode I added the lines I found on their installation guide so that -c no longer needed to be used to start squidGuard and it already had the location compiled in. I thought that it would be a good idea to set the log directory at the same time. This makes the binary work so much better out of the box. Although if /var/log/squidGuard could be created with the right permissions for the squid user too that would be great. I hope that helps - I will try to read through the ebuild docs if you like to try and give you a modified ebuild.
> After hunting around on the squidguard.org site > I found that the config file was expected at > /usr/local/squid/etc by default, and this was what > was causing the problem. Eek, you're right. Now that I took a closer look I saw the mention of the -c option in the ebuild. Attached patch should do the trick.
Created an attachment (id=15494) [edit] patch from squidguard-1.2.0.ebuild to squidguard-1.2.0-r1.ebuild
in cvs
Just looked over the patch, and from my understanding of it you seem to have covered everything in there now. Using those configure flags seems to make using squidGuard so much easier right after building. Thanks for producing the patch, and even adding the squidGuard log directory to the ebuild :)
You're welcome. Quite like being a dev back then ;)