[Pkg-openldap-devel] r975 - in openldap/trunk/debian: . po

Steve Langasek vorlon at alioth.debian.org
Sat Jan 12 22:05:06 UTC 2008


Author: vorlon
Date: 2008-01-12 22:05:06 +0000 (Sat, 12 Jan 2008)
New Revision: 975

Modified:
   openldap/trunk/debian/changelog
   openldap/trunk/debian/po/templates.pot
   openldap/trunk/debian/slapd.postinst
   openldap/trunk/debian/slapd.scripts-common
   openldap/trunk/debian/slapd.templates
Log:
  - if the old slapd.conf included any replica commands, automatically
    enable syncprov for the corresponding database and print an error
    with debconf.

Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog	2008-01-12 12:28:43 UTC (rev 974)
+++ openldap/trunk/debian/changelog	2008-01-12 22:05:06 UTC (rev 975)
@@ -19,6 +19,9 @@
       LDAP opaque type.  Closes: #320072.
     - ldap-utils utilities find LDAP servers via SRV records when given a
       URL with -H and no host in the URL. Closes: #221173.
+    - if the old slapd.conf included any replica commands, automatically
+      enable syncprov for the corresponding database and print an error
+      with debconf.
   * slapd.conf and DB_CONFIG are used in the postinst, they shouldn't be
     shipped under doc/examples because /usr/share/doc can't be depended
     on per policy; ship the files under /usr/share/slapd and symlink the
@@ -103,7 +106,7 @@
   * Remove versioned dependency on an ancient dpkg-dev.
   * Wrap and reorder Build-Depends for readability.
 
- -- Steve Langasek <vorlon at debian.org>  Sat, 12 Jan 2008 02:22:54 -0800
+ -- Steve Langasek <vorlon at debian.org>  Sat, 12 Jan 2008 14:00:40 -0800
 
 openldap2.3 (2.3.39-1) unstable; urgency=medium
 

Modified: openldap/trunk/debian/po/templates.pot
===================================================================
--- openldap/trunk/debian/po/templates.pot	2008-01-12 12:28:43 UTC (rev 974)
+++ openldap/trunk/debian/po/templates.pot	2008-01-12 22:05:06 UTC (rev 975)
@@ -7,8 +7,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: pkg-openldap-devel at lists.alioth.debian.org\n"
-"POT-Creation-Date: 2007-11-11 19:49-0800\n"
+"Report-Msgid-Bugs-To: openldap2.3 at packages.debian.org\n"
+"POT-Creation-Date: 2008-01-11 00:15-0800\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -345,3 +345,28 @@
 "other features that offer improved concurrency and reliability. For more "
 "information, see /usr/share/doc/slapd/README.DB_CONFIG.gz"
 msgstr ""
+
+#. Type: note
+#. Description
+#: ../slapd.templates:19001
+msgid "slurpd is obsolete; replicas must be reconfigured by hand"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../slapd.templates:19001
+msgid ""
+"One or more slurpd \"replica\" options were found in your slapd config when "
+"upgrading.  Because slurpd is obsolete beginning with OpenLDAP  2.4, you "
+"will need to migrate your replicas to use the syncrepl protocol instead."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../slapd.templates:19001
+msgid ""
+"Since syncrepl is a pull-based protocol instead of a push-based one, your "
+"configuration cannot be automatically converted for you and you will need to "
+"configure your replica servers by hand.  Please see http://www.openldap.org/"
+"doc/admin24/syncrepl.html for details."
+msgstr ""

Modified: openldap/trunk/debian/slapd.postinst
===================================================================
--- openldap/trunk/debian/slapd.postinst	2008-01-12 12:28:43 UTC (rev 974)
+++ openldap/trunk/debian/slapd.postinst	2008-01-12 22:05:06 UTC (rev 975)
@@ -44,7 +44,10 @@
 	fi
 
 	if previous_version_older 2.4.7-1; then
-		migrate_bdb_checkpoint
+		if ! migrate_checkpoint_and_slurpd; then
+			db_input critical slapd/slurpd_obsolete || true
+			db_go || true
+		fi
 		config_obsolete_schemacheck
 	fi
 

Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common	2008-01-12 12:28:43 UTC (rev 974)
+++ openldap/trunk/debian/slapd.scripts-common	2008-01-12 22:05:06 UTC (rev 975)
@@ -424,9 +424,10 @@
 
 # }}}
 
-migrate_bdb_checkpoint() {						# {{{
+migrate_checkpoint_and_slurpd() {					# {{{
 # move any 'checkpoint' options from the backend stanza to the
-# per-database stanza
+# per-database stanza, and translate slurpd "replica" options into
+# syncrepl defaults
 
 	local script
 	script='
@@ -434,6 +435,7 @@
 		use File::Compare;
 		use File::Copy;
 
+		$has_replica = $seen_syncprov = 0;
 		$backend_bdb = $backend_hdb = 0;
 		$checkpoint_bdb = "";
 		$checkpoint_hdb = "";
@@ -474,6 +476,17 @@
 					print $fh $_ . $checkpoint_hdb;
 					next;
 				}
+				$seen_syncprov = 1 if /^moduleload\s+syncprov/;
+				if (/^replica\s+/)
+				{
+					if (!$has_replica && !$seen_syncprov) {
+						print $fh "moduleload syncprov\n";
+						$seen_syncprov = 1;
+					}
+					print $fh "overlay syncprov\n";
+					print $fh "syncprov-checkpoint 100 10\n";
+					$has_replica = 1;
+				}
 				print $fh $_;
 			}
 
@@ -489,13 +502,20 @@
 		}
 
 		$config = shift;
-		changeConfig ($config);'
+		changeConfig ($config);
+		exit $has_replica;'
 
 	echo -n "  Upgrading BDB 'checkpoint' options... " >&2
 
-	perl -e "$script" $SLAPD_CONF
+	if perl -e "$script" $SLAPD_CONF ; then
+		result=0
+	else
+		result=1
+	fi
 
 	echo . >&2
+
+	return $result
 }
 # }}}
 

Modified: openldap/trunk/debian/slapd.templates
===================================================================
--- openldap/trunk/debian/slapd.templates	2008-01-12 12:28:43 UTC (rev 974)
+++ openldap/trunk/debian/slapd.templates	2008-01-12 22:05:06 UTC (rev 975)
@@ -181,3 +181,16 @@
  features to offer transaction processing, fine grained locking, and other
  features that offer improved concurrency and reliability. For more
  information, see /usr/share/doc/slapd/README.DB_CONFIG.gz
+
+Template: slapd/slurpd_obsolete
+Type: error
+_Description: slurpd is obsolete; replicas must be reconfigured by hand
+ One or more slurpd "replica" options were found in your slapd config
+ when upgrading.  Because slurpd is obsolete beginning with OpenLDAP 
+ 2.4, you will need to migrate your replicas to use the syncrepl
+ protocol instead.
+ .
+ Since syncrepl is a pull-based protocol instead of a push-based one,
+ your configuration cannot be automatically converted for you and you
+ will need to configure your replica servers by hand.  Please see
+ http://www.openldap.org/doc/admin24/syncrepl.html for details.




More information about the Pkg-openldap-devel mailing list