[pkg-ggz-maintainers] Bug#490420: Interdiff

Neil Williams codehelp at debian.org
Fri Aug 29 14:06:30 UTC 2008

For the benefit of the release team and the bug logs, this is the full
interdiff for ggz-server, closing 478812 (merged with 473350) and

debian/patches/database-m4.patch comes from upstream (isolated to only
fix the current problem), see:

The change to database-m4 requires running the autotools so these are
added as Build-Depends; autoconf, automake | automake1.9, libtool.

The effect of database-m4.patch is to tighten the build-dependencies on
libdb-dev such that ggzd ends up linked against libdb4.4 so the
build-depends for libdb-dev has been replaced by libdb4.4-dev. (Support
for libdb4.6 and later is being implemented upstream.)

'autoreconf -if' overwrites INSTALL so a tweak to debian/rules replaces
the upstream one and handles the files generated by rerunning the

Thankfully, running the autotools didn't turn out to cause too much
bloat in the .diff.gz.

The new preinst was developed in consultation with ggz upstream [0].

diff -u ggz-server- ggz-server-
--- ggz-server-
+++ ggz-server-
@@ -4,7 +4,8 @@
 Maintainer: Debian GGZ Maintainers <pkg-ggz-maintainers at lists.alioth.debian.org>
 Uploaders: Josef Spillner <josef at ggzgamingzone.org>, Peter Eisentraut <petere at debian.org>
 Standards-Version: 3.7.3
-Build-Depends: cdbs, debhelper (>= 5), libavahi-client-dev, libggz-dev (>= 0.0.14), libexpat1-dev (>= 1.95.6), libdb-dev, libfam-dev, lsb-base (>= 3.0-3)
+Build-Depends: autoconf, automake | automake1.9, cdbs, debhelper (>= 5), libtool, libavahi-client-dev, libggz-dev (>= 0.0.14),
+ libexpat1-dev (>= 1.95.6), libdb4.4-dev, libfam-dev, lsb-base (>= 3.0-3)
 Vcs-Svn: svn://svn.debian.org/pkg-ggz/trunk/ggz-server/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-ggz/trunk/ggz-server/
 Homepage: http://www.ggzgamingzone.org/
diff -u ggz-server- ggz-server-
--- ggz-server-
+++ ggz-server-
@@ -17,5 +17,13 @@
+	cp INSTALL INSTALL.upstream
+	autoreconf -if
+	mv INSTALL.upstream INSTALL
 	install -d -o games -g games debian/ggzd/var/lib/ggzd
 	rm debian/$(cdbs_curpkg)/etc/ggzd/rooms/entry.room
+	rm -f config.sub config.guess config.log
diff -u ggz-server- ggz-server-
--- ggz-server-
+++ ggz-server-
@@ -1,3 +1,16 @@
+ggz-server ( unstable; urgency=low
+  * Non-maintainer upload.
+  * Add preinst to fix permissions on /var/lib/ggzd,
+    Fixes: ggzd Fails to install (Closes: #478812)
+    (LP: #149583)
+  * Move from libdb-dev to libdb4.4-dev and add upstream patch
+    for m4/database.m4 to tighten build-deps. Fixes  FTBFS: 
+    ggzdb_db4.c:335: undefined reference to `db_create' 
+    (Closes: #490420) (LP: #241913)
+ -- Neil Williams <codehelp at debian.org>  Fri, 29 Aug 2008 13:51:20 +0100
 ggz-server ( unstable; urgency=low
   * New upstream release
only in patch2:
--- ggz-server-
+++ ggz-server-
@@ -0,0 +1,9 @@
+set -e
+if [ -d /var/lib/ggzd ]; then
+	chown games:games -R /var/lib/ggzd/
only in patch2:
--- ggz-server-
+++ ggz-server-
@@ -0,0 +1,48 @@
+diff -Nur -x '*.orig' -x '*~' ggz-server- ggz-server-
+--- ggz-server-	2008-01-05 19:02:52.000000000 +0000
++++ ggz-server-	2008-08-29 12:46:15.000000000 +0100
+@@ -130,7 +130,7 @@
+ 	dnl Check for db4 libraries
+ 	dnl Version priority: db4.4, db4.3, db4.2, db4.1, db4.0, db (unversioned)
+-	if test "$db4lib" = "" || test "$minor" = "4"; then
++	if test "$db4lib" = "" && test "$minor" = "4"; then
+ 		AC_CHECK_LIB(db-4.4, db_env_create_4004,
+ 		[
+ 			db4lib="-ldb-4.4"
+@@ -153,7 +153,7 @@
+ 		])
+ 	fi
+-	if test "$db4lib" = "" || test "$minor" = "3"; then
++	if test "$db4lib" = "" && test "$minor" = "3"; then
+ 		AC_CHECK_LIB(db-4.3, db_env_create_4003,
+ 		[
+ 			db4lib="-ldb-4.3"
+@@ -176,7 +176,7 @@
+ 		])
+ 	fi
+-	if test "$db4lib" = "" || test "$minor" = "2"; then
++	if test "$db4lib" = "" && test "$minor" = "2"; then
+ 		AC_CHECK_LIB(db-4.2, db_env_create_4002,
+ 		[
+ 			db4lib="-ldb-4.2"
+@@ -199,7 +199,7 @@
+ 		])
+ 	fi
+-	if test "$db4lib" = "" || test "$minor" = "1"; then
++	if test "$db4lib" = "" && test "$minor" = "1"; then
+ 		AC_CHECK_LIB(db-4.1, db_env_create_4001,
+ 		[
+ 			db4lib="-ldb-4.1"
+@@ -222,7 +222,7 @@
+ 		])
+ 	fi
+-	if test "$db4lib" = "" || test "$minor" = "0"; then
++	if test "$db4lib" = "" && test "$minor" = "0"; then
+ 		AC_CHECK_LIB(db-4.0, db_env_create_4000,
+ 		[
+ 			db4lib="-ldb-4.0"

[0] IRC details for preinst:
<josef|vista> it's to make sure that the header will match the library, otherwise the segfault you saw might happen
 db 4.4 is the latest version supported by the 0.0.14 branch, although if needed we could patch in support for 4.5 to 4.7 as well
 they all use the same code anyway
<codehelp> 4.4 is fine
<codehelp> I need to check that with debian-release first - only the fixes for the known bugs will get into Lenny, that change might have to go into the next version in unstable
 what is the story with /var/lib/ggzd/ggzdb.ver ?
 if it exists, I still get the old failure. Is it safe to remove that file without any kind of checks?
<josef|vista> for Lenny I'd say yes, it is there to check if the database layout changed, but it hasn't changed in ages
<codehelp> where is it created?
<josef|vista> by ggzd itself in the db4 database plugin
 it creates it, write the version 0.7 into the file, and then when there is a new version of ggzd which needs version 0.8 it would bail out
 I remember patching this line and then reverting (in trunk only), not sure what the reasons were, might need to take another look
<codehelp> thanks - testing continues
<josef|vista> yet I'd say simply rm -rf in the postinst should be enough for now
 rm -f, sorry
<codehelp> I think it needs to be rm -rf $directory in the preinst
 the daemon falls over if it exists
<josef|vista> hm ok
 thank you for looking into this
<codehelp> (<errorsysexit>) fopen(w) failed in ggzdb_init(): Permission denied
 /etc/init.d/ggzd: line 21: 14141 Aborted 
 so the preinst isn't right either
 (the file does not now exist)
 I'll just try rm -f $file
 it might be sufficient merely to chown games.games /var/lib/ggzd/ !
 yes, that does the trick
 chmod is the right fix for the installation problem if /var/lib/ggzd/ exists
 and the database.m4 change is sufficient to get ggzd to depend on libdb4.4
<josef|vista> hm, I thought it was already games:games?
 it definitely should be!
<codehelp> sadly, if it is not, the ggzd_init func just fails, hence the install problem and the need for chmod in the preinst
 the func checks if it exists then tries to write. It doesn't test that it is ok to write
 (or it does but then bails out)
<josef|vista> I remember the debian packages to include a call to chmod... but anyway, what we can do in the code is to at least spell out which file could not be written to
<codehelp> ok
 I've got a few more tests to run but this looks like I can fix all the release critical issues and get a minimally modified version into Lenny with your other improvements going into the next version in unstable
 I'll check with the release team but I think only changes to database.m4 and ggzd.preinst will be allowed as a freeze exception
<josef|vista> ok
 anyway there will be a lenny point release and those usually include such fixes along with security fixes, right?
<codehelp> yes, they can do
 josef|vista: can I post (at least some) of this IRC log to one of the bug reports to help the release team ?
<josef|vista> sure


Neil Williams

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.alioth.debian.org/pipermail/pkg-ggz-maintainers/attachments/20080829/1d0ff798/attachment-0003.pgp 

More information about the pkg-ggz-maintainers mailing list