Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528858 - net-proxy/squidguard-1.5_beta - squidguard: FATAL: sgDbLoadTextFile: put: Invalid argument
Summary: net-proxy/squidguard-1.5_beta - squidguard: FATAL: sgDbLoadTextFile: put: Inv...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergey Popov
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-11-10 17:52 UTC by account-removed
Modified: 2017-05-12 09:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Ebuild containing epatch for db version check (squidguard-1.5_beta-r2.ebuild,1.68 KB, text/plain)
2017-02-01 06:18 UTC, Stefan Beier
Details
patch file for db version (squidguard-1.5_beta-db-version.patch,442 bytes, patch)
2017-02-01 06:18 UTC, Stefan Beier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description account-removed 2014-11-10 17:52:56 UTC
Hi,

my squidgurd crashes with the following message:

2014-11-10 18:19:53 [4412] INFO: New setting: logdir: /media/daten/system/software/squidGurad/logs/
2014-11-10 18:19:53 [4412] INFO: New setting: dbhome: /media/daten/system/software/squidGuard/db
2014-11-10 18:19:53 [4412] init domainlist /media/daten/system/software/squidGuard/db/BL/adv/domains
BDB1565 DB->put: method not permitted before handle's open method
2014-11-10 18:19:53 [4412] FATAL: sgDbLoadTextFile: put: Invalid argument
2014-11-10 18:19:53 [4412] ERROR: Going into emergency mode

I searched the Web and found the following Bug report:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=185737

as it seems the ebuild is missing a view patches, which would fix the problem.

I emerged the package and canceled it at installing process to view the sources.
And it seems that even more patches as the mentioned are missing because 
the higest DB_VERSION_MAJOR == 4 in the current ebuild version the patch 
includes a tree with DB_VERSION_MAJOR == 6

I'am sorry that i can't provide more informaion but may be the maintainer of 
the ebuild could have a look over this situation.

My installed package is:
*  net-proxy/squidguard
      Latest version available: 1.5_beta
      Latest version installed: 1.5_beta
      Size of files: 1.937 KiB
      Homepage:      http://www.squidguard.org
      Description:   Combined filter, redirector and access controller plugin for Squid
      License:       GPL-2

Best regards

Thomas
Comment 1 account-removed 2014-11-10 18:09:31 UTC
It seems to be enough to change this:

File: src/sgDb.c
Line: 115
From: #if DB_VERSION_MAJOR == 4
To:   #if DB_VERSION_MAJOR >= 4

This worked for me
Comment 2 account-removed 2015-11-05 19:48:40 UTC
Said to see, that this working patch couldn't find its way to the Gentoo Repo :-( Today I had to patch the version again on my own :-(
Comment 3 Pacho Ramos gentoo-dev 2015-11-05 20:19:41 UTC
This is because this package has no maintainer currently at all :/

Are you willing to proxy maintain it?
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers
Comment 4 René Fuchs 2016-11-23 14:55:14 UTC
still not patched ....
Comment 5 Christophe PEREZ 2017-01-25 20:15:28 UTC
A very big problem !
I spent 3 hours to find why squidguard stopped working after emerge --depclean removing sys-libs/db-4.8.30-r2

Applying patch :
--- src/sgDb.c.orig     2010-09-09 06:35:22.000000000 -0400
+++ src/sgDb.c  2017-01-25 16:07:26.671998197 -0400
@@ -112,7 +112,7 @@
     }
   }
 #endif
-#if DB_VERSION_MAJOR == 4
+#if DB_VERSION_MAJOR >= 4
   if(globalUpdate || createdb || (dbfile != NULL && stat(dbfile,&st))){
     flag = DB_CREATE;
     if(createdb)

worked for me too.

Please, patch it !
Comment 6 Stefan Beier 2017-02-01 06:18:26 UTC
Created attachment 462046 [details]
Ebuild containing epatch for db version check
Comment 7 Stefan Beier 2017-02-01 06:18:50 UTC
Created attachment 462048 [details, diff]
patch file for db version
Comment 8 Felix Janda 2017-04-24 23:13:59 UTC
Pull request addressing this bug @ https://github.com/gentoo/gentoo/pull/4481
Comment 9 Sergey Popov gentoo-dev 2017-05-12 09:22:38 UTC
commit e5d53d7d4b90920f3b30a88536a4fa65694aca62
Author: Sergey Popov <pinkbyte@gentoo.org>
Date:   Fri May 12 12:19:24 2017 +0300

    net-proxy/squidguard: revision bump

    Bump EAPI to 6, restrict linking with unsupported versions of sys-libs/db
    Committing straight to stable

    Gentoo-Bug: 528858

    Package-Manager: Portage-2.3.5, Repoman-2.3.1
    RepoMan-Options: --force