(switching the perl package CC to #621383) On Sun, Apr 17, 2011 at 12:52:53PM +0200, Ondřej Surý wrote: > On Sat, Apr 16, 2011 at 06:11, Niko Tyni <nt...@debian.org> wrote: > > On Fri, Apr 15, 2011 at 11:29:21PM +0200, Ondřej Surý wrote: > >> Niko, could you change the linking from -ldb to -ldb-4.7 instead? The > >> linkable .so file is provided by libdb4.7 package.
> > Still, I dislike having to apply this. Given a move to db4.8 is much > > less risky than 5.x, should we do that for the time being or are you > > going to do the same thing to libdb4.8-dev next? > > I would like to do this to db4.8 too (but much much later on). I see. I suppose in that case we just need to bite the bullet. > Anyway I don't think the move from 4.7 to 4.8 is any less riskier than > move from 4.7 to 5.1. The 4.x vs 5.x is nothing more than inability to > have 4.10 version number. Both require log format upgrade - See: > http://www.oracle.com/technetwork/database/berkeleydb/downloads/index-082944.html Thanks, no point in that approach then. > >> I just wanted to make linking to libdb-4.7 explicit, not to prevent > >> linking at all. > > > > I don't really see the advantage. The maintainers of the dependant > > packages are (hopefully) already aware of the transition, why the need > > to push them? Are you worried that new packages pick db4.7 by accident? > > Well, my reasoning is that if you want to depend on specific bdb > version, you need to be able to link with that specific version. The old way worked perfectly for us. The upstream code is able to link against any version with just -ldb, and we could control that in Debian with just the Build-Depends field. Now we need to also patch the upstream source to accomplish this, and keep the patch up to date when upgrading between upstream versions. Pushing the patch upstream isn't likely to go well as this is purely a Debian specific problem and -ldb works fine for everybody else. I'm attaching a generalized version of your patch that allows setting $DEBIAN_DB_VERSION in the environment so that at least we don't have to update the patch every time we change the db version. There's no need to patch DB_File as it prefers the environment variable $DB_FILE_NAME if that is set. I'm somewhat inclined to just throw in the towel, switch to libdb-dev (Ubuntu already does), and let somebody else worry about db transition risks. It's not like I know much about them anyway. Dominic, please let me know what you think. > >> However I gladly revert the change if it will be too big obstacle. > > > > Please do. > > I'll revert the change for now and I will prepare more detailed > schedule when I will reintroduce this move, so all packages can > prepare. Thanks for this. -- Niko Tyni nt...@debian.org
From: Niko Tyni <nt...@debian.org> Subject: Explicitly link against our chosen version of libdb Bug-Debian: http://bugs.debian.org/622916 Because of the vast number of packages depending on perl, we take a very conservative approach on Berkeley DB library transitions and do not build depend on the "always current" version offered by the libdb-dev package. Instead, we want full control over the transition and therefore explicitly build depend on our currently chosen version of the package, for instance libdb4.7-dev. As of April 2011, the libdb maintainer wants packages that build depend on older versions of the Berkeley database library to also explicitly link against that version. Patch based on the one submitted by the libdb maintainer, Ondřej Surý <ond...@sury.org>. Note that DB_File itself doesn't need to be patched as it looks at $ENV{DB_FILE_NAME} if present. --- Configure | 10 +++++----- hints/linux.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Configure b/Configure index 1fee5c1..9696c18 100755 --- a/Configure +++ b/Configure @@ -1354,7 +1354,7 @@ libswanted_uselargefiles='' : set usesocks on the Configure command line to enable socks. : List of libraries we want. : If anyone needs extra -lxxx, put those in a hint file. -libswanted='gdbm gdbm_compat db dl m c crypt' +libswanted="gdbm gdbm_compat db${DEBIAN_DB_VERSION} dl m c crypt" : We probably want to search /usr/shlib before most other libraries. : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` @@ -18917,10 +18917,10 @@ EOCP echo "I can't use Berkeley DB with your <db.h>. I'll disable Berkeley DB." >&4 i_db=$undef case " $libs " in - *"-ldb "*) + *"-ldb${DEBIAN_DB_VERSION} "*) : Remove db from list of libraries to use - echo "Removing unusable -ldb from library list" >&4 - set `echo X $libs | $sed -e 's/-ldb / /' -e 's/-ldb$//'` + echo "Removing unusable -ldb${DEBIAN_DB_VERSION} from library list" >&4 + set `echo X $libs | $sed -e "s/-ldb${DEBIAN_DB_VERSION} / /" -e "s/-ldb${DEBIAN_DB_VERSION}\$//"` shift libs="$*" echo "libs = $libs" >&4 @@ -22043,7 +22043,7 @@ sunos*X4*) ;; *) case "$usedl" in $define|true|[yY]*) - set X `echo " $libs " | sed -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e 's@ -ldb @ @'` + set X `echo " $libs " | sed -e 's@ -lgdbm @ @' -e 's@ -lgdbm_compat @ @' -e "s@ -ldb${DEBIAN_DB_VERSION} @ @"` shift perllibs="$*" ;; diff --git a/hints/linux.sh b/hints/linux.sh index c88f157..d5221e5 100644 --- a/hints/linux.sh +++ b/hints/linux.sh @@ -410,11 +410,11 @@ libdb_needs_pthread="N" if echo " $libswanted " | grep -v " pthread " >/dev/null then - if echo " $libswanted " | grep " db " >/dev/null + if echo " $libswanted " | grep " db${DEBIAN_DB_VERSION} " >/dev/null then for DBDIR in $glibpth do - DBLIB="$DBDIR/libdb.so" + DBLIB="$DBDIR/libdb${DEBIAN_DB_VERSION}.so" if [ -f $DBLIB ] then if nm -u $DBLIB | grep pthread >/dev/null -- tg: (2ed7302..) debian/explicit-db-version (depends on: debian/prune_libs)