[Pkg-openldap-devel] r914 - openldap/trunk/debian

Steve Langasek vorlon at alioth.debian.org
Sun Dec 16 11:47:32 UTC 2007


Author: vorlon
Date: 2007-12-16 11:47:32 +0000 (Sun, 16 Dec 2007)
New Revision: 914

Modified:
   openldap/trunk/debian/changelog
   openldap/trunk/debian/slapd.config
   openldap/trunk/debian/slapd.preinst
   openldap/trunk/debian/slapd.scripts-common
Log:
whoops, configure_ldbm_to_bdb_migration /is/ common code; the preinst depends
on knowing this answer on upgrades, so we have to do the db_input in the
preinst before db_get to be sure the user sees the question.



Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog	2007-12-16 10:31:44 UTC (rev 913)
+++ openldap/trunk/debian/changelog	2007-12-16 11:47:32 UTC (rev 914)
@@ -17,23 +17,26 @@
     on per policy; ship the files under /usr/share/slapd and symlink the
     /other/ way, which also spares us from dh_compress trying to gzip
     slapd.conf.  Closes: #452749.
-  * drop libldap.so as was done for libldap2, making it a link to
+  * Drop libldap.so as was done for libldap2, making it a link to
     libldap_r.so to avoid unfortunate symbol collisions.
-  * add new patch, libldap-symbol-versions, to build libldap and liblber
+  * Add new patch, libldap-symbol-versions, to build libldap and liblber
     with symbol versions; needed to avoid segfaults when applications
     manage to pull both libldap2 and the new libldap-2.4-2 into the same
     process (as during a partial upgrade or the initial soname
     transition), and also when the library soname changes again in the
     future (as it's likely to do).
-  * reintroduce add-autogen-sh patch, with build deps on libtool, automake,
+  * Reintroduce add-autogen-sh patch, with build deps on libtool, automake,
     and autoconf, required due to the previous patch; this time around, take
     care to clean up the autogenerated files in the clean target as well
-  * build-depend on libgnutls-dev instead of on libssl-dev, so that at long
+  * Build-depend on libgnutls-dev instead of on libssl-dev, so that at long
     last we can build the server and lib from the same source package again
-    without licensing problems
+    without licensing problems.
   * slapd.prerm: drop no-longer-needed upgrade code for openldap < 2.1.22
+  * Ask about ldbm to bdb migration in the preinst, since there is no
+    guarantee that the debconf config script will be run before the unpack
+    phase.
 
- -- Steve Langasek <vorlon at debian.org>  Sun, 16 Dec 2007 01:48:15 -0800
+ -- Steve Langasek <vorlon at debian.org>  Sun, 16 Dec 2007 03:35:25 -0800
 
 openldap2.3 (2.3.39-1) unstable; urgency=medium
 

Modified: openldap/trunk/debian/slapd.config
===================================================================
--- openldap/trunk/debian/slapd.config	2007-12-16 10:31:44 UTC (rev 913)
+++ openldap/trunk/debian/slapd.config	2007-12-16 11:47:32 UTC (rev 914)
@@ -107,24 +107,6 @@
 }
 # }}}
 
-configure_ldbm_to_bdb_migration() {					# {{{
-# If there are any LDBM databases in use we suggest to the user to migrate
-# to the more stable and better maintained BDB backend.
-# Usage: configure_ldbm_to_bdb_migration
-
-	if [ -e "$SLAPD_CONF" ] && grep -qE \
-			-e '^moduleload[[:space:]]+back_ldbm' \
-			-e '^(database|backend)[[:space:]]+ldbm' \
-			"$SLAPD_CONF"; then
-		db_input critical slapd/migrate_ldbm_to_bdb || true
-		db_go || true
-	else
-		# Nothing to migrate
-		db_set slapd/migrate_ldbm_to_bdb false
-	fi
-}
-# }}}
-
 # ----- Configuration of LDIF dumping and reloading---------------------  {{{
 #
 # Dumping the database can have negative effects on the system we are

Modified: openldap/trunk/debian/slapd.preinst
===================================================================
--- openldap/trunk/debian/slapd.preinst	2007-12-16 10:31:44 UTC (rev 913)
+++ openldap/trunk/debian/slapd.preinst	2007-12-16 11:47:32 UTC (rev 914)
@@ -12,6 +12,7 @@
 # slapcat out the data so we can use it in postinst to do the upgrade
 
 if [ "$MODE" = upgrade ]; then
+	configure_ldbm_to_bdb_migration
 	break_on_ldbm_to_bdb_migration_disagree
 	stop_slapd
 	dump_databases

Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common	2007-12-16 10:31:44 UTC (rev 913)
+++ openldap/trunk/debian/slapd.scripts-common	2007-12-16 11:47:32 UTC (rev 914)
@@ -16,6 +16,23 @@
 # for example. Therefore we must give the user exact control over what we
 # are doing.
 
+configure_ldbm_to_bdb_migration() {					# {{{
+# If there are any LDBM databases in use we suggest to the user to migrate
+# to the more stable and better maintained BDB backend.
+# Usage: configure_ldbm_to_bdb_migration
+
+	if [ -e "$SLAPD_CONF" ] && grep -qE \
+			-e '^moduleload[[:space:]]+back_ldbm' \
+			-e '^(database|backend)[[:space:]]+ldbm' \
+			"$SLAPD_CONF"; then
+		db_input critical slapd/migrate_ldbm_to_bdb || true
+		db_go || true
+	else
+		# Nothing to migrate
+		db_set slapd/migrate_ldbm_to_bdb false
+	fi
+}
+# }}}
 break_on_ldbm_to_bdb_migration_disagree() { # {{{
   if [ -e "$SLAPD_CONF" ] && grep -qE \
       -e '^moduleload[[:space:]]+back_ldbm' \




More information about the Pkg-openldap-devel mailing list