Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192753 - dev-libs/cyrus-sasl-2.1.22-r2: saslpasswd2 can't create sasldb2 w/ USE=berkdb
Summary: dev-libs/cyrus-sasl-2.1.22-r2: saslpasswd2 can't create sasldb2 w/ USE=berkdb
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-17 00:03 UTC by Martin von Gagern
Modified: 2018-05-15 09:59 UTC (History)
3 users (show)

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


Attachments
cyrus-sasl-2.1.22-db4.patch (cyrus-sasl-2.1.22-db4.patch,684 bytes, patch)
2007-10-02 18:04 UTC, Tuan Van
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2007-09-17 00:03:52 UTC
The postinst phase of dev-libs/cyrus-sasl-2.1.22-r2 gave me this error message:

 * Generating an empty sasldb2 with correct permissions ...




saslpasswd2: generic failure
 *
 * ERROR: dev-libs/cyrus-sasl-2.1.22-r2 failed.
 * Call stack:
 *   ebuild.sh, line 1635:   Called qa_call 'pkg_postinst'
 *   ebuild.sh, line 44:   Called pkg_postinst
 *   cyrus-sasl-2.1.22-r2.ebuild, line 226:   Called die
 *
 * Failed to delete temp user
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/cyrus-sasl-2.1.22-r2/temp/build.log'.
 *
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info
!!! FAILED postinst: 1

Corresponding to that I found in my syslog:

[saslpasswd2] auxpropfunc error invalid parameter supplied_
[saslpasswd2] error closing sasldb: Unknown error: -1210664000
[saslpasswd2] error deleting entry from sasldb: Invalid argument
[saslpasswd2] error closing sasldb: Unknown error: -1210664000
[saslpasswd2] auxpropfunc error invalid parameter supplied_
[saslpasswd2] error deleting entry from sasldb: Invalid argument
[saslpasswd2] error closing sasldb: Unknown error: -1210459200
[saslpasswd2] setpass failed for login: generic failure
[saslpasswd2] error deleting entry from sasldb: Invalid argument
[saslpasswd2] error closing sasldb: Unknown error: -1210459200

/etc/sasl2/sasldb2 still doesn't exist. Trying to reproduce the steps manually, I only get more messages in syslog. It seems to be the first step already which fails, without returning a nonzero exit code. stracing this saslpass invocation, I find only one interesting open call referring to /etc, besides ld.so.cache and localtime:
open("/etc/sasl2/saslpasswd.conf", O_RDONLY) = -1 ENOENT

/etc/sasl2 exists, has a keep file in it, has mode 755 and is owned by root. Of course I tried to reproduce the postinst phase as root.

The whole machine is currently transitioning to hardened profile, so it might well be that some special hardening interferes here, although I can't think of any right now.
Comment 1 Christian Heim (RETIRED) gentoo-dev 2007-09-19 18:50:35 UTC
(In reply to comment #0)
> The postinst phase of dev-libs/cyrus-sasl-2.1.22-r2 gave me this error message:
> 
>  * Generating an empty sasldb2 with correct permissions ...
> 
> saslpasswd2: generic failure
> The whole machine is currently transitioning to hardened profile, so it might
> well be that some special hardening interferes here, although I can't think of
> any right now.

And it is definitely something related to hardened (or at least gcc related, since it even fails on gcc-3.4.6) as the database isn't even created.
Comment 2 Christian Heim (RETIRED) gentoo-dev 2007-09-19 19:06:20 UTC
And its neither PIE nor SSP related. So it must be something else.
Comment 3 Christian Heim (RETIRED) gentoo-dev 2007-09-19 19:29:56 UTC
(In reply to comment #0)
> The postinst phase of dev-libs/cyrus-sasl-2.1.22-r2 gave me this error message:
> 
>  * Generating an empty sasldb2 with correct permissions ...
> saslpasswd2: generic failure

Martin, could you please try this:

 USE=-berkdb emerge -1 cyrus-sasl

At least that got me around the issue.
Comment 4 Martin von Gagern 2007-09-19 21:15:59 UTC
(In reply to comment #3)
>  USE=-berkdb emerge -1 cyrus-sasl

Yes, with neither berkdb nor gdbm support, the ebuild won't try to build a sasldb and consequently won't fail. I tried it, emerges without errors.
Comment 5 RDWest 2007-09-24 15:48:28 UTC
(In reply to comment #4)
> (In reply to comment #3)
> >  USE=-berkdb emerge -1 cyrus-sasl
> 
> Yes, with neither berkdb nor gdbm support, the ebuild won't try to build a
> sasldb and consequently won't fail. I tried it, emerges without errors.
> 

Hello guys,
I've built a new 2u with Intel 840 pD Dual Coer and went with amd64 bit system.
I got the same build error as this one...

USE=-berkdb emerge -1 cyrus-sasl

This merge worked and it built just fine!
Thanks,
RD
Comment 6 RDWest 2007-09-24 15:54:23 UTC
(In reply to comment #4)
> (In reply to comment #3)
> >  USE=-berkdb emerge -1 cyrus-sasl
> 
> Yes, with neither berkdb nor gdbm support, the ebuild won't try to build a
> sasldb and consequently won't fail. I tried it, emerges without errors.
> 

Hello guys,
I've built a new 2u with Intel 840 pD Dual Coer and went with amd64 bit system.
I got the same build error as this one...

USE=-berkdb emerge -1 cyrus-sasl

This merge worked and it built just fine!
Thanks,
RD(In reply to comment #5)
> (In reply to comment #4)
> > (In reply to comment #3)
> > >  USE=-berkdb emerge -1 cyrus-sasl
> > 
> > Yes, with neither berkdb nor gdbm support, the ebuild won't try to build a
> > sasldb and consequently won't fail. I tried it, emerges without errors.
> > 
> 
> Hello guys,
> I've built a new 2u with Intel 840 pD Dual Coer and went with amd64 bit system.
> I got the same build error as this one...
> 
> USE=-berkdb emerge -1 cyrus-sasl
> 
> This merge worked and it built just fine!
> Thanks,
> RD
> 

PS:
I did build the amd64 Hardened 2007.0 without multilib
Fresh install with hardened sources and have not emerged any security apps

I'm not a developer so I don't know if it is within the security of hardened or not...

But it built fine with the above command so Thanks
RD
Comment 7 Tuan Van 2007-10-02 18:04:26 UTC
Created attachment 132408 [details, diff]
cyrus-sasl-2.1.22-db4.patch

this bug is caused by db-4.5 went stable. If your system has db-4.3, cyrus-sasl will be built using db-4.5.h but linked against older db. The ebuilds in portage don't support db-4.5.
attached is the patch to fix this.

ebuild diff

--- cyrus-sasl-2.1.22-r2.orig.ebuild    2007-10-02 10:33:10.000000000 -0700
+++ cyrus-sasl-2.1.22-r2.ebuild 2007-10-02 10:36:07.000000000 -0700
@@ -80,6 +80,9 @@
        # Fix QA issues.
        epatch "${FILESDIR}/${P}-qa.patch"

+       # db-45. patch
+       epatch "${FILESDIR}/${P}-db4.patch"
+
        # Recreate configure.
        rm -f "${S}/config/libtool.m4" || die "rm libtool.m4 failed"
        AT_M4DIR="${S}/cmulocal ${S}/config" eautoreconf
Comment 8 Torsten Veller (RETIRED) gentoo-dev 2007-10-28 18:55:15 UTC
(In reply to comment #7)
> this bug is caused by db-4.5 went stable. If your system has db-4.3, cyrus-sasl
> will be built using db-4.5.h but linked against older db. The ebuilds in
> portage don't support db-4.5.
> attached is the patch to fix this.

Thanks, Tuan Van. I'll commit it.

But first I'd like to ask:
Should we add db-4.6 too? (Currently masked in the tree.)
Does it also work with db-4.6? Have you (or anyone else) tested it by chance?


BTW: I hope you are doing fine. You know where to find us :)
Comment 9 Torsten Veller (RETIRED) gentoo-dev 2007-10-28 21:51:04 UTC
It's in the tree. Please test.

Thanks for the report.
Comment 10 PetaMem R&D 2015-06-25 09:40:53 UTC
This bug was still present in dev-libs/cyrus-sasl-2.1.26-r9

USE="-berkdb*" is still the solution. Without it:

>>> Done.
 * Generating an empty sasldb2 with correct permissions ...
illegal flag specified to DB_ENV->set_encrypt
DB->fd: method not permitted before handle's open method
illegal flag specified to DB_ENV->set_encrypt
DB->fd: method not permitted before handle's open method
saslpasswd2: generic failure
 * ERROR: dev-libs/cyrus-sasl-2.1.26-r9::gentoo failed (postinst phase):
 *   Failed to generate sasldb2