Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 39562 - apache2 doesn't use latest Berkeley DB
Summary: apache2 doesn't use latest Berkeley DB
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 All
: High normal (vote)
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-27 07:22 UTC by Kevin Williams
Modified: 2004-04-15 06:50 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Williams 2004-01-27 07:22:38 UTC
Berkeley DB 4.0.14 (ebuild r2) is marked stable, but the latest stable Apache2 build (2.0.48-r1) doesn't bind to it. I've had to add "--with-dbm=db4 --with-berkeley-db=/usr \" to the Apache2 ebuild file. Ideally it should check for db4 and use only if installed.
Comment 1 Kevin Williams 2004-02-12 07:20:35 UTC
I've inserted the following near the beginning of the src_compile() function in the ebuild:


	#detect if db >= 4 is installed
	db_ver=`grep 'DB_VERSION_MAJOR' /usr/include/db.h | cut -f3`

	if [ $db_ver >= 4 ]; then
		myconf="${myconf} --with-dbm=db4 --with-berkeley-db=/usr"
	fi


I haven't had a chance to actually run the ebuild to make sure the 'myconf' handling is right (system is borked), but the rest works.
Comment 2 Chuck Short (RETIRED) gentoo-dev 2004-04-01 14:30:42 UTC
What errors do you get when your are compiling apache?
Comment 3 Kevin Williams 2004-04-01 21:39:01 UTC
I didn't get any fatal compile errors, if that's what you mean. If I run 'apu-config --db-version' it returns '3' although Berkeley DB 4.0.14 is installed. Subversion (with mod_dav_svn) depends on Apache2 being compiled with Berkeley DB >= 4.0.14. It makes sense to me to have Apache use the appropriate configure flags when possible.

I settled on this in my tweaks of the build file:

        if use berkdb; then
                db_ver=`grep 'DB_VERSION_MAJOR' /usr/include/db.h | cut -f3`
                if $db_ver == 4; then
                        myconf="${myconf} --with-dbm=db4\ --with-berkeley-db=/usr"
                fi
        fi
Comment 4 Chuck Short (RETIRED) gentoo-dev 2004-04-15 06:50:52 UTC
This should be fixed in 2.0.49-r1. Thanks for the bug report.

Regards,
chuck