Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 21635

Summary: A patch to make php work with db4
Product: Gentoo Linux Reporter: Paul de Vrieze (RETIRED) <pauldv>
Component: [OLD] ServerAssignee: PHP Bugs <php-bugs>
Status: VERIFIED LATER    
Severity: critical    
Priority: Highest    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 23571    
Attachments: php-fix.diff (The fix)
php-fix.diff (updated version)

Description Paul de Vrieze (RETIRED) gentoo-dev 2003-05-24 16:32:35 UTC
I fixed up some patches to make php work in connection to db4. The default php4
only works with db3 although technically php can use db4. The configure script
is broken in that it doesn't work with versioned symbols. This patch will fix
the 4.3.1-r3 ebuild, the php eclass and add a patch to get a good conigure script.
By default php has a preference to db3. This patch will let the ebuild have a
preference for db4 as this is necessary for migration.

If the patch is ok for you I don't mind to submit it myself. I did want to have
your word on it though as I'm not a php dev.
Comment 1 Paul de Vrieze (RETIRED) gentoo-dev 2003-05-24 16:42:53 UTC
Created attachment 12373 [details, diff]
php-fix.diff (The fix)

This is an example, all relevant php ebuilds should include the same patches. 
The patch adds a --with-db4 option that mimmics --with-db3. This option has the
advantage of making sure that db4 is used in all cases and is not gentoo
specific (prone to failure) as patching --with-db3 would be
The eclass is smart enough not to use --with-db4 if it does not exist. Note
though that php does NOT build with only versioned db4 installed if the patch
is not used
Comment 2 Paul de Vrieze (RETIRED) gentoo-dev 2003-05-24 16:52:35 UTC
Created attachment 12374 [details, diff]
php-fix.diff (updated version)

The patch was unclean, and I also added a patch to dev-php/php. The actual
patches to the configuration sources are the same but need to be included
because of the different file dirs
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-26 02:46:06 UTC
The patch looks good to me. I'm going to test it out more before putting in CVS tho.
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-05-26 03:53:10 UTC
I don't like having two seperate copies of the same patch, or the duplication of ebuild code for this. I've moved the patch to the config.m4 file to $DISTDIR instead. 

The major reason for the creation of the PHP eclass was that the existing ebuilds of mod_php/php were horribly out of sync with fixes and the like. I want to avoid that happening again in future.

It seems to work fine on db3 machines, I haven't tested very hard with DB4 boxes.

I have commited it to CVS now. Please test it out more on your DB4 machines.
Comment 5 Paul de Vrieze (RETIRED) gentoo-dev 2003-05-26 04:17:50 UTC
This is ok. It is a small patch. I didn't like the copying either though. I'll test the ebuilds.
Comment 6 Paul de Vrieze (RETIRED) gentoo-dev 2003-05-27 05:31:47 UTC
The patch is not specified in src_uri, it doesn't work. I'm committing it to cvs.
Comment 7 Paul de Vrieze (RETIRED) gentoo-dev 2003-05-27 05:37:57 UTC
I've committed a fixed php.eclass that includes the patch in src_uri
Comment 8 Paul de Vrieze (RETIRED) gentoo-dev 2003-05-27 07:08:00 UTC
There was another problem in php.eclass. In the db4 evaluation it used test to test on output of grep -q and has_version . These commands do not produce output, so test should not be used.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-06-30 02:43:42 UTC
Just reopening this now as of php4.3.2, with an update on it.

PHP4.3.2 requires sys-libs/db-4.1.25 if you want berkeleky db support.
Since it needs to be a stable ebuild, and that was only in ~x86, then only amd64, I have removed support for berkely DB from PHP until such time as sys-libs/db-4.1.25 or newer is in stable.
Comment 10 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-07-10 15:51:19 UTC
BerkDB support will be added back to PHP when db4 is released.
Comment 11 Paul de Vrieze (RETIRED) gentoo-dev 2004-08-19 12:47:01 UTC
Closing the bug