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.
(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.
And its neither PIE nor SSP related. So it must be something else.
(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.
(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.
(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 #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
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
(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 :)
It's in the tree. Please test. Thanks for the report.
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