Description of problem: SquidGuard cannot update its own DB files. Version-Release number of selected component (if applicable): squidGuard-1.4-15.fc18.x86_64 How reproducible: Always. Steps to Reproduce: 1. /usr/bin/squidGuard -C all 2. BDB1565 DB->put: method not permitted before handle's open method Actual results: Databases never updated. Expected results: Worked in F-17. Additional info:
According to http://www.squidguard.org/Doc/known_issues.html, squidGuard 1.4-alpha and below: Compilation error with BerkeleyDB 4.7 Reason: Some old stuff has (finally) been removed from the db sources. SquidGuard unfortunately still uses the old syntax (historical reasons). Fix/Workaround: BerkeleyDB up to version 4.6 is known to work properly. Will be fixed in the next version. Fedora 18 has libdb 5.3.21-3.fc18 and libdb4 4.8.30-5.fc18, so the fix may be to wait for upstream.
Waiting for upstream may suck - if it was not addressed by now, it probably won't be any time soon. Also, having a non-working package in Fedora proper is no good. I will try to work on a patch when I get a bit of free time.
In the mean time, I've posted f18 builds of 1.5 beta here: http://fedorapeople.org/~limb/squidGuard/ If those work for you I'll push this to rawhide and f18.
I tried the 386 version of the 1,5 beta squidGuard package. Unfortunately, it fails with the same error message as the 1,4 version in the Fedora 18 repository: /usr/bin/squidGuard -d -C all -c /etc/squid/squidGuard.conf 2013-01-16 13:13:32 [4487] INFO: New setting: dbhome: /var/squidGuard/blacklists/blacklists 2013-01-16 13:13:32 [4487] INFO: New setting: logdir: /var/log/squidGuard 2013-01-16 13:13:32 [4487] init domainlist /var/squidGuard/blacklists/blacklists/ads/domains BDB1565 DB->put: method not permitted before handle's open method 2013-01-16 13:13:32 [4487] FATAL: sgDbLoadTextFile: put: Invalid argument 2013-01-16 13:13:32 [4487] ERROR: Going into emergency mode
I also tried using the x86_64 version and had the same issue. I also had a requirement to enable LDAP, so recompiled a src RPM with 1.5 beta. 2013-01-19 02:26:17 [39551] INFO: New setting: dbhome: /var/squidGuard/BL 2013-01-19 02:26:17 [39551] INFO: New setting: logdir: /var/log/squidGuard 2013-01-19 02:26:17 [39551] INFO: New setting: ldapbinddn: cn=*snip* 2013-01-19 02:26:17 [39551] INFO: New setting: ldapbindpass: *************** 2013-01-19 02:26:17 [39551] INFO: New setting: ldapcachetime: 300 2013-01-19 02:26:17 [39551] INFO: New setting: ldapprotover: 3 2013-01-19 02:26:17 [39551] init domainlist /var/squidGuard/BL/adv/domains BDB1565 DB->put: method not permitted before handle's open method 2013-01-19 02:26:17 [39551] FATAL: sgDbLoadTextFile: put: Invalid argument 2013-01-19 02:26:17 [39551] ERROR: Going into emergency mode
Created attachment 684010 [details] Proposed patch for squidGuard RPM
Bojan The above x86_64 RPM produces the same error for me. As I only deals with RPM (no source/diffs//compiling/etc), could you post the binary RPM with above diff applied ?
(In reply to comment #7) > could you post > the binary RPM with above diff applied ? The package maintainer will surely build the packages soon, now that the patch is available. If you want to build one yourself, just: - download the patch (https://bugzilla.redhat.com/attachment.cgi?id=684010) - fedpkg clone squidGuard - apply the patch to that git repo - fedpkg local That should build the package for you.
Thanks Bojan for your prompt reply. I stopped at "apply the patch to that git repo". How I do thar ?
Thanks Bojan for your prompt reply. I stopped at "apply the patch to that git repo". How I do that ?
(In reply to comment #10) > I stopped at "apply the patch to that git repo". > How I do that ? cd squidGuard (this is the git repo you just cloned) patch -p1 < /path/to/the/downloaded/squidGuard-rpm-db5.patch
I applied the patch, rebuilt the RPM, installed it, but no change in the error: /usr/bin/squidGuard -d -C all -c /etc/squid/squidGuard.conf 2013-01-22 19:18:07 [4331] New setting: dbhome: /var/squidGuard/blacklists/blacklists 2013-01-22 19:18:07 [4331] New setting: logdir: /var/log/squidGuard 2013-01-22 19:18:07 [4331] init domainlist /var/squidGuard/blacklists/blacklists/ads/domains BDB1565 DB->put: method not permitted before handle's open method 2013-01-22 19:18:07 [4331] sgDbLoadTextFile: put: Invalid argument 2013-01-22 19:18:07 [4331] Going into emergency mode This is the 32 bit version. libdb-devel-5.3.21-3.fc18.i686 is installed.
(In reply to comment #12) > I applied the patch, rebuilt the RPM, installed it, but no change in the > error: I cannot explain it, other than to say that it runs on my x86_64 bit system just fine: # rpm -q squidGuard squidGuard-1.4-16.fc19.x86_64 # ps -ef | grep squidGuard root 967 895 0 11:38 pts/0 00:00:00 grep --color=auto squidGuard squid 30531 12713 0 03:40 ? 00:00:01 (squidGuard) -c /etc/squid/squidGuard.conf squid 31775 12713 0 07:46 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31808 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31809 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31810 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31811 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31812 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31813 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 31814 12713 0 07:52 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32394 12713 0 09:19 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32557 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32558 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32559 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32560 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32561 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32562 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32563 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32564 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32565 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf squid 32566 12713 0 09:43 ? 00:00:00 (squidGuard) -c /etc/squid/squidGuard.conf From the log: --------------- 2013-01-23 09:43:42 [32564] squidGuard 1.4 started (1358894622.445) 2013-01-23 09:43:42 [32564] squidGuard ready for requests (1358894622.480) ---------------
I looked over my actions again and found that I had made an error in applying the patch. I rebuilt the i686 version and now it is working as expected. Thank you.
Pay attention... I copied all my DBs from Fedora 17 into Fedora 18 and they works fine (squidGuard -c cfg) So... the problem ONLY occurs when you try to build the DBs (squidGuard -C all)
(In reply to comment #11) > (In reply to comment #10) > > > I stopped at "apply the patch to that git repo". > > How I do that ? > > cd squidGuard (this is the git repo you just cloned) > patch -p1 < /path/to/the/downloaded/squidGuard-rpm-db5.patch SOLVED ! I was able to rebuild the RPM. The new patched binary worked fine. It was able do create the DBs files correctly. Thanks for support.
Got it, thanks for the patch and testing, I'll get this out ASAP.
squidGuard-1.4-16.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/squidGuard-1.4-16.fc18
Package squidGuard-1.4-16.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing squidGuard-1.4-16.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-1394/squidGuard-1.4-16.fc18 then log in and leave karma (feedback).
squidGuard-1.4-16.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.