Bug 1947971

Summary: Begin removing libdb dependency from cyrus-sasl
Product: Red Hat Enterprise Linux 9 Reporter: Simo Sorce <ssorce>
Component: cyrus-saslAssignee: Simo Sorce <ssorce>
Status: CLOSED CURRENTRELEASE QA Contact: Ivan Nikolchev <inikolch>
Severity: medium Docs Contact: Mirek Jahoda <mjahoda>
Priority: medium    
Version: CentOS StreamCC: anon.amish, asosedki, bstinson, carl, crypto-team, dbelyavs, extras-qa, fjanus, iboverma, inikolch, jfch, jjelen, jwboyer, mjahoda, plautrba, redhat-bugzilla, ssorce, tscherf, vanmeeuwen+fedora
Target Milestone: betaKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cyrus-sasl-2.1.27-12.el9 Doc Type: Enhancement
Doc Text:
.`cyrus-sasl` now uses GDBM instead of Berkeley DB The `cyrus-sasl` package is now built without the `libdb` dependency, and the `sasldb` plugin uses the GDBM database format instead of Berkeley DB. To migrate your existing Simple Authentication and Security Layer (SASL) databases stored in the old Berkeley DB format, use the `cyrusbdb2current` tool with the following syntax: [subs="quotes"] ---- cyrusbdb2current _&lt;sasldb_path&gt;_ _&lt;new_path&gt;_ ----
Story Points: ---
Clone Of: 1788186 Environment:
Last Closed: 2021-12-07 21:44:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1788186    
Bug Blocks: 1778802    

Description Simo Sorce 2021-04-09 16:02:10 UTC
+++ This bug was initially created as a clone of Bug #1788186 +++

According to more restrictive libdb licence policy exists effort to remove libdb's dependencies.
cyrus-sasl package is now built with libdb requirement, this package could be build without libdb. libdb could be replaced by gdbm.

--- Additional comment from Robert Scheck on 2020-01-16 00:21:18 UTC ---

Filip, is there a specific reason that you suggest gdbm rather lmdb?

--- Additional comment from Filip Januš on 2020-01-16 12:35:52 UTC ---

There are multiple choices(see: https://www.cyrusimap.org/sasl/sasl/installation.html#requirements). But from cyrus-sasl installation guide:
"If you are using SASLdb, you will need to pick your backend. libsasl2 can use gdbm, Berkeley db, or ndbm to implement its user/password lookup. Most systems come with ndbm." 
I am not sure, if cyrus-sasl with gdbm has same functionality as with lmdb. If so then lmdb could be used.

--- Additional comment from Ben Cotton on 2020-02-11 17:35:04 UTC ---

This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

--- Additional comment from Simo Sorce on 2021-01-14 17:15:39 UTC ---

Hi Filip,
we have a proposed change to address this issue here:
https://src.fedoraproject.org/rpms/cyrus-sasl/pull-request/3

I guess one question is how/when we should introduce this change in Fedora.

As you can see we have a migration script, but there is currently no automatic migration of the Database during an RPM upgrade. We can probably add a scriplet to catch a DB in the default path, but applications that may provide a bdb database in an alternative path would have to be changed to invoke the upgrade script I guess.

So guidance on how to proceed would be nice.

--- Additional comment from Filip Januš on 2021-01-18 09:36:42 UTC ---

Hi, Simo
first of all thanks for your effort. It's great that you include also the support of conversion.

In the current state isn't possible to make one big Fedora change for all components, because some components need more time to implement other database support. Therefore I would recommend creating a change Into Fedora 35 for your component. 
If I can help in any way, I'll be happy to help.

--- Additional comment from Simo Sorce on 2021-01-19 20:02:57 UTC ---

Dmitry did most of the work, so thanks go to him.

We will plan for a F35 change once they open up.

--- Additional comment from Ben Cotton on 2021-02-09 16:23:50 UTC ---

This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 6 Simo Sorce 2021-06-03 12:37:43 UTC
Agree with Ivan to move to ITM 18

Comment 7 Irina Boverman 2021-06-03 16:37:27 UTC
There is a problem with sasl authentication, please see this bug:
   https://bugzilla.redhat.com/show_bug.cgi?id=1967706

Comment 8 Simo Sorce 2021-06-04 00:15:31 UTC
Dima can you take a look at the bug mentioned in #7?
Specifically it mention a patch in the thread we may be missing in cyrus-sasl

Comment 9 Dmitry Belyavskiy 2021-06-04 11:36:08 UTC
Simo, I've added the patch from https://github.com/cyrusimap/cyrus-sasl/pull/554

Hopefully it will do the trick

Comment 11 Simo Sorce 2021-07-01 12:38:38 UTC
Agreed with Ivan to move ITM out