[Pkg-openldap-devel] r860 - openldap/trunk-2.3/debian

Russ Allbery rra at alioth.debian.org
Mon Nov 12 02:33:04 UTC 2007


Author: rra
Date: 2007-11-12 02:33:04 +0000 (Mon, 12 Nov 2007)
New Revision: 860

Modified:
   openldap/trunk-2.3/debian/changelog
   openldap/trunk-2.3/debian/slapd.config
   openldap/trunk-2.3/debian/slapd.postinst
   openldap/trunk-2.3/debian/slapd.preinst
   openldap/trunk-2.3/debian/slapd.prerm
   openldap/trunk-2.3/debian/slapd.scripts-common
   openldap/trunk-2.3/debian/slapd.templates
Log:
* Drop the code to check for and upgrade ldbm databases.  The etch
  release of slapd had already dropped support for them and direct
  upgrades from sarge are not supported.

Modified: openldap/trunk-2.3/debian/changelog
===================================================================
--- openldap/trunk-2.3/debian/changelog	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/changelog	2007-11-12 02:33:04 UTC (rev 860)
@@ -16,8 +16,11 @@
   * Drop debconf questions, warnings, and maintainer script functions
     dealing with upgrades from OpenLDAP 2.1, which is now too hold for
     supported direct upgrades.  (Closes: #444806)
+  * Drop the code to check for and upgrade ldbm databases.  The etch
+    release of slapd had already dropped support for them and direct
+    upgrades from sarge are not supported.
 
- -- Russ Allbery <rra at debian.org>  Sun, 11 Nov 2007 17:57:57 -0800
+ -- Russ Allbery <rra at debian.org>  Sun, 11 Nov 2007 18:32:18 -0800
 
 openldap2.3 (2.3.38-1) unstable; urgency=low
 

Modified: openldap/trunk-2.3/debian/slapd.config
===================================================================
--- openldap/trunk-2.3/debian/slapd.config	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/slapd.config	2007-11-12 02:33:04 UTC (rev 860)
@@ -19,9 +19,9 @@
 	fi
 fi
 
-# Configure the dumping component if we are upgrading some older version
+# Configure the dumping and v2 binds components if we are upgrading some older
+# version.
 if [ "$1" = configure ] && [ -n "$2" ]; then
-	configure_ldbm_to_bdb_migration
 	configure_dumping
 	configure_allow_v2_binds
 fi

Modified: openldap/trunk-2.3/debian/slapd.postinst
===================================================================
--- openldap/trunk-2.3/debian/slapd.postinst	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/slapd.postinst	2007-11-12 02:33:04 UTC (rev 860)
@@ -36,8 +36,9 @@
 	if previous_version_older 2.3.25-1; then
 		update_path_argsfile_pidfile
 
-		# Directory /var/run/slapd is suddenly gone, dpkg removes it because it's
-		# now generated from the postinst scripts. See create_ldap_directories.
+		# Directory /var/run/slapd is suddenly gone, dpkg removes it
+		# because it's now generated from the postinst scripts. See
+		# create_ldap_directories.
 		if [ ! -d "/var/run/slapd" ]; then
 			mkdir -m 0755 /var/run/slapd
 		fi
@@ -46,14 +47,6 @@
 	if database_format_changed; then
 		# During upgrading we have to load the old data
 		move_incompatible_databases_away
-		# Change the configuration if we want to migrate DBs
-		db_get slapd/migrate_ldbm_to_bdb
-		if [ "$RET" = "true" ]; then
-			config_migrate_backend ldbm bdb
-			# Make sure we don't dump the DB for migration 
-			# again...
-			db_set slapd/migrate_ldbm_to_bdb false
-		fi
 		load_databases
 	fi
 

Modified: openldap/trunk-2.3/debian/slapd.preinst
===================================================================
--- openldap/trunk-2.3/debian/slapd.preinst	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/slapd.preinst	2007-11-12 02:33:04 UTC (rev 860)
@@ -12,7 +12,6 @@
 # slapcat out the data so we can use it in postinst to do the upgrade
 
 if [ "$MODE" = upgrade ]; then
-	break_on_ldbm_to_bdb_migration_disagree
 	stop_slapd
 	dump_databases
 fi

Modified: openldap/trunk-2.3/debian/slapd.prerm
===================================================================
--- openldap/trunk-2.3/debian/slapd.prerm	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/slapd.prerm	2007-11-12 02:33:04 UTC (rev 860)
@@ -60,10 +60,6 @@
 fi
 # }}}
 
-# Set seen flag of this question to false to get it asked if someone disagrees
-# with the upgrade from ldbm to bdb backend.
-db_fset slapd/migrate_ldbm_to_bdb seen false
-
 #DEBHELPER#
 
 exit 0

Modified: openldap/trunk-2.3/debian/slapd.scripts-common
===================================================================
--- openldap/trunk-2.3/debian/slapd.scripts-common	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/slapd.scripts-common	2007-11-12 02:33:04 UTC (rev 860)
@@ -46,23 +46,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
-}
-# }}}
 configure_allow_v2_binds() {                        # {{{
 # Ask if the user would like their package to support LDAPv2..
 # This was the default in older versions but we want to ask
@@ -71,20 +54,6 @@
     db_input medium slapd/allow_ldap_v2 || true
 }
 # }}}
-break_on_ldbm_to_bdb_migration_disagree() { # {{{
-  if [ -e "$SLAPD_CONF" ] && grep -qE \
-      -e '^moduleload[[:space:]]+back_ldbm' \
-      -e '^(database|backend)[[:space:]]+ldbm' \
-      "$SLAPD_CONF"; then
-    db_get slapd/migrate_ldbm_to_bdb
-    if [ "$RET" = "false" ]; then
-      db_fset slapd/migrate_ldbm_to_bdb seen false
-      return 1
-    fi
-    return 0
-  fi
-  return 0
-} # }}}
 database_dumping_enabled() {						# {{{
 # Check if the user has enabled database dumping for the current situation.
 # Return success if yes.
@@ -114,9 +83,7 @@
 # Return success if yes.
 # Usage: if database_format_changed; then
 
-	db_get slapd/migrate_ldbm_to_bdb
-	if [ "$RET" = "true" ] || dpkg --compare-versions \
-			"$OLD_VERSION" lt-nl "2.3.19"; then
+	if previous_version_older 2.3.19; then
 		return 0
 	else
 		return 1
@@ -137,22 +104,6 @@
 }
 
 # }}}
-configure_ldbm_to_bdb_transition() {					# {{{
-# The LDBM backend seems to be quite unusable with OpenLDAP 2.2. Therefore
-# we ask the user if he wants to switch to BDB which is the recommended
-# backend for 2.2.
-
-	if grep -q '^moduleload[[:space:]]\+back_ldbm' $SLAPD_CONF ||
-			grep -q '^database[[:space:]]\+ldbm' $SLAPD_CONF ||
-			grep -q '^backend[[:space:]]\+ldbm' $SLAPD_CONF; then
-		db_input critical slapd/convert_ldbm_to_bdb || true
-		db_go || true
-	else
-		db_set slapd/convert_ldbm_to_bdb false
-	fi
-}
-
-# }}}
 create_new_user() { # {{{
 	if [ -z "`getent group openldap`" ]; then
 		addgroup --quiet --system openldap
@@ -755,7 +706,7 @@
 config_migrate_backend() {						# {{{
 # Changes all uses of one backend to another (like ldbm to bdb) in the 
 # configuration file. This includes the moduleload, backend and database
-# directives.  
+# directives.  This function is currently unused.
 # Usage: migrate_databases <old-backend> <new-backend>
 
 	local old new
@@ -1145,7 +1096,7 @@
 # our scripts.
 # Usage: if upgrade_supported_from_backend "backend"; then ... fi
 
-	case "$1" in ldbm|bdb|hdb) return 0; esac
+	case "$1" in bdb|hdb) return 0; esac
 	return 1
 }
 

Modified: openldap/trunk-2.3/debian/slapd.templates
===================================================================
--- openldap/trunk-2.3/debian/slapd.templates	2007-11-12 01:59:19 UTC (rev 859)
+++ openldap/trunk-2.3/debian/slapd.templates	2007-11-12 02:33:04 UTC (rev 860)
@@ -139,19 +139,6 @@
  too) or due to a problem in the LDIF file.  If the problem was with the
  LDIF file, you may be able to fix it and attempt the slapadd again.
 
-Template: slapd/migrate_ldbm_to_bdb
-Type: boolean
-Default: true
-_Description: Change backend type from LDBM to BDB?
- The LDBM backend type has been deprecated in OpenLDAP 2.2 and has shown to not
- work well. BDB is the recommended choice of the OpenLDAP developers.
- .
- When using the BDB backend make sure you configure BDB properly. For
- information to do so, see /usr/share/doc/slapd/README.DB_CONFIG.gz
- .
- If you enable this option an attempt will be made to update your
- configuration to use BDB instead of LDBM and convert your databases.
-
 Template: slapd/backend
 Type: select
 Choices: BDB, HDB




More information about the Pkg-openldap-devel mailing list