Bug 556148 - Cant create access.db, seems related to db4 version.
Summary: Cant create access.db, seems related to db4 version.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sendmail
Version: 13
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 575989 577136 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-16 19:07 UTC by Eliran Itzhak
Modified: 2010-08-25 15:04 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2010-08-25 15:04:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch for sendmail to build with DB 5.0. (402 bytes, patch)
2010-04-15 16:34 UTC, Jaroslav Škarvada
no flags Details | Diff

Description Eliran Itzhak 2010-01-16 19:07:50 UTC
Description of problem:
Trying to use sendmail's access/access.db file (for authinfo) but access.db is nver created.
running 
makemap hash /etc/mail/access < /etc/mail/access
gives
/etc/mail/access.db: Invalid type 5 specified
makemap: error opening type hash map /etc/mail/access: Invalid argument

Searching google i found that replacing the BerkeleyDB version might help.

Version-Release number of selected component (if applicable):
sendmail-8.14.3-10.fc13.i686
db4-4.8.26-1.fc13.i686

How reproducible:
try to compile /etc/mail/access, making sure the data is put into access.db

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Paul Howarth 2010-03-08 10:50:22 UTC
This bug has also been noticed in gentoo:
http://bugs.gentoo.org/show_bug.cgi?id=294819

And debian:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565242

Similar bug in PHP:
http://bugs.php.net/bug.php?id=51086

Similar bug in nvi:
http://bugs.gentoo.org/286352

Brief discussion in upstream forum for Berkeley DB:
http://forums.oracle.com/forums/thread.jspa?threadID=1031805

It seems that everybody is relying on undefined behaviour of DB4, and it *may* be getting reverted to the old behaviour in the next release of that, whenever that will be.

In the meantime, sendmail with BDB 4.8 is rather broken.

Comment 2 Bug Zapper 2010-03-15 14:05:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Jaroslav Škarvada 2010-03-23 07:56:19 UTC
*** Bug 575989 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2010-03-29 15:19:41 UTC
sendmail-8.14.4-4.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/sendmail-8.14.4-4.fc13

Comment 5 Jaroslav Škarvada 2010-03-29 15:23:10 UTC
Fixing this in sendmail seems to be little tricky (locking, race
conditions...). That's why I rather rebuilt with compatdb-4.7.25 that resulted
in sendmail-8.14.4-4.fc13. I pushed it through Bodhi and I will wait how this
issue evolves. I leave this bug in modified state until fixed by upstream
(sendmail or bdb).

Comment 6 Jaroslav Škarvada 2010-03-29 19:07:56 UTC
*** Bug 577136 has been marked as a duplicate of this bug. ***

Comment 7 Paul Howarth 2010-03-31 10:23:31 UTC
Why the manual dependency on compat-db47? Is the automatic dependency on libdb-4.7.so not sufficient?

Comment 8 Jaroslav Škarvada 2010-03-31 10:36:22 UTC
It should be sufficient. Thank you, I will correct this if there will be update. Please think about this as temporal solution, I will revert back to db-4.8 as soon as possible.

Comment 9 Jaroslav Škarvada 2010-04-12 08:38:24 UTC
Seems fixed in Berkeley DB 11gR2 (aka DB5):

http://www.oracle.com/technology/documentation/berkeley-db/db/installation/changelog_5_0.html#id3379472

>> 16. Fixed a bug that would generate an error if a non-BDB file was used to create a database and the DB_TRUNCATE flag was specified. [#18373]

Not tested with sendmail, this BDB is not in Rawhide for now - Bug 580220.

Comment 10 Jindrich Novy 2010-04-12 10:56:11 UTC
In the mean time you could try the BDB 5.0 which is planned to be included in rawhide as a separate package:

https://bugzilla.redhat.com/show_bug.cgi?id=580873

Also it would be nice if someone can help me with the review so that it occurs in rawhide as soon as possible. Thanks.

Comment 11 Jaroslav Škarvada 2010-04-15 12:13:26 UTC
Thanks Jindrich, I tried to review it.

The bad new, the sendmail doesn't build with BDB 5.0 and needs patching. Also same with Sendmail 8.14.5.Alpha0. I will look on it later.

Comment 12 Jaroslav Škarvada 2010-04-15 16:34:14 UTC
Created attachment 406854 [details]
Patch for sendmail to build with DB 5.0.

The patch is trivial: The cpp doesn't use short-circuit evaluation for logical operators, thus another expression must be added (as in attachment) to DB version evaluation or in case if there is no problem with 4.0 version (I don't know), the patch can be more simplified with minor version check removed. I will submit the patch upstream.

Sendmail basic functionality test passed, thus looking forward for DB 5.0.

For testing, the sendmail scratch builds are here:
http://jskarvad.fedorapeople.org/sendmail/

Comment 13 Fedora Update System 2010-04-22 22:31:26 UTC
sendmail-8.14.4-4.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Paul Howarth 2010-05-05 08:25:01 UTC
DB 4.8.30 is out now, with a changelog indicating that this problem may be resolved there too:

 * Allow any file to be truncated even if its not a db file. [#18373]

Comment 15 Jaroslav Škarvada 2010-08-25 15:04:21 UTC
Sendmail in F13 uses compat-db, sendmail in F14 and rawhide uses db5 and all work, thus closing this.


Note You need to log in before you can comment on or make changes to this bug.