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

Russ Allbery rra at alioth.debian.org
Fri Dec 21 08:48:52 UTC 2007


Author: rra
Date: 2007-12-21 08:48:52 +0000 (Fri, 21 Dec 2007)
New Revision: 946

Removed:
   openldap/trunk/debian/fix_ldif
Modified:
   openldap/trunk/debian/changelog
   openldap/trunk/debian/po/cs.po
   openldap/trunk/debian/po/da.po
   openldap/trunk/debian/po/de.po
   openldap/trunk/debian/po/es.po
   openldap/trunk/debian/po/fr.po
   openldap/trunk/debian/po/gl.po
   openldap/trunk/debian/po/ja.po
   openldap/trunk/debian/po/nl.po
   openldap/trunk/debian/po/pt.po
   openldap/trunk/debian/po/pt_BR.po
   openldap/trunk/debian/po/ru.po
   openldap/trunk/debian/po/templates.pot
   openldap/trunk/debian/po/vi.po
   openldap/trunk/debian/rules
   openldap/trunk/debian/slapd.install
   openldap/trunk/debian/slapd.scripts-common
   openldap/trunk/debian/slapd.templates
Log:
* Removed fix_ldif and all remaining code to try running it on LDIF
  dumps. Schema checking has been imposed since 2.1 and it's highly
  unlikely that anyone still needs this.

Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/changelog	2007-12-21 08:48:52 UTC (rev 946)
@@ -55,6 +55,9 @@
     to statically link a dynamically-loaded slapi plugin.
 
   [ Russ Allbery ]
+  * Removed fix_ldif and all remaining code to try running it on LDIF
+    dumps. Schema checking has been imposed since 2.1 and it's highly
+    unlikely that anyone still needs this.
   * Create /etc/ldap/slapd.conf owned by the openldap group and mode 640
     by default so that slapindex and friends can read it when run as the
     openldap user. Fix permissions on upgrade if slapd.conf is owned by
@@ -74,7 +77,7 @@
   * Remove versioned dependency on an ancient dpkg-dev.
   * Wrap and reorder Build-Depends for readability.
 
- -- Russ Allbery <rra at debian.org>  Thu, 20 Dec 2007 23:50:46 -0800
+ -- Russ Allbery <rra at debian.org>  Fri, 21 Dec 2007 00:48:02 -0800
 
 openldap2.3 (2.3.39-1) unstable; urgency=medium
 

Deleted: openldap/trunk/debian/fix_ldif
===================================================================
--- openldap/trunk/debian/fix_ldif	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/fix_ldif	2007-12-21 08:48:52 UTC (rev 946)
@@ -1,658 +0,0 @@
-#!/usr/bin/perl -w
-# Copyright (c) Dave Horsfall.
-# All rights reserved.
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. Neither the name of the University nor the names of its contributors
-#    may be used to endorse or promote products derived from this software
-#    without specific prior written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-# 
-# 
-# @(#)$Id: rdnchk.e,v 1.12 2003-05-09 15:40:51+10 daveh Exp $
-# $Log: rdnchk.e,v $
-# Revision 1.12  2003-05-09 15:40:51+10  daveh
-# Enforce single-value attributes for CI stuff.
-#
-# Revision 1.11  2003-05-08 16:46:47+10  daveh
-# Add missing attributes when auto-fixing.
-#
-# Revision 1.10  2003-05-02 11:46:55+10  daveh
-# Sort DNs before writing out, and minor mods.
-#
-# Revision 1.9  2003-04-24 10:39:19+10  daveh
-# Always encode the userPassword attribute on output.
-#
-# Revision 1.8  2003-04-16 15:21:49+10  daveh
-# Don't use non-core LDIF module; treat values as case-insensitive; binary.
-#
-# Revision 1.7  2003-04-02 11:16:20+10  daveh
-# Delete ciComment (it's an attribute, not an objclass) and add ciLdapConfig
-#
-# Revision 1.6  2003-04-01 17:52:04+10  daveh
-# Fix errors on request, and minor mods.
-#
-# Revision 1.5  2003-03-28 17:15:34+11  daveh
-# More minor mods.
-#
-# Revision 1.4  2003-03-28 09:19:21+11  daveh
-# Use reference to ARGV typeglob for input.
-#
-# Revision 1.3  2003-03-27 16:08:57+11  daveh
-# Use Net::LDAP::LDIF, and minor speedups.
-#
-# Revision 1.2  2003-03-11 11:17:03+11  daveh
-# Look for orphan DNs.
-#
-# Revision 1.1  2003-02-27 14:28:09+11  daveh
-# Initial revision
-#
-#
-# RDNCHK
-#
-# Given a slapcat input file, check for mismatched DN/RDN pairs etc.
-# Optionally make fixes (use with care).
-#
-# The data structure is a hash of references to hashes of anonymous lists:
-#
-#   $entries{$dn} =	# $dn has been normalised
-#   {
-#     origDN => "original DN",
-#     attr1 => [ "value1-a", "value1-b" ],
-#     attr2 => [ "value2" ]
-#   }
-#
-# which is accessed as (e.g):
-#
-#   @{entries{$dn}{"attr1"}}
-#
-# to return an array of the value(s) of $dn's attr1.
-#
-# Note that this structure is optimised for access to the DNs, *not*
-# for searches.
-#
-# The DN is low-cased and leading/trailing/multiple spaces stripped
-# (and the original stored for posterity).
-#
-# I assume that caseIgnoreMatch applies across the board, as otherwise
-# it's too damned difficult.  This only fails, in practice, for encoded
-# fields such as passwords, but I'm not looking at those (passwords are
-# rarely, if ever, a candidate for being an RDN).  Remember: the specific
-# purpose of this program is to perform a quick but reasonably thorough
-# check for DN/RDN consistency, and it sorta grew from there.
-#
-# We can't use Perl Net::LDAP::LDIF, because it's not a core module
-# (too hard to maintain our remote branches when upgrading).
-#
-# TODO:
-#	Check custom stuff:
-#
-#	    ciDefPrinter is single-value per ciPrinterClass.
-#	    Fundamentally difficult, because these are keys
-#	    into printcap, not LDAP.
-#
-
-use Data::Dumper;
-use Getopt::Long;
-use MIME::Base64;
-
-my $origDN = '.origDN';	# Attribute stores original DN
-
-&parse_options;
-$opt_write = 1 if $opt_fix;
-
-#
-# Process each entry.
-# A list (returned in @_) holds each line, with the DN first.
-#
-while (@_ = &GetEntry)	# Loop per entry (exit on EOF)
-{
-    my $dn = shift @_;
-    # Check if base64 encoded
-    next if ! $dn =~ /^dn::? /i;
-    if($dn =~ /^dn:: /i) {
-      $dn =~ s/dn:: (.*)/$1/;
-      $dn = decode_base64($dn);
-      $dn =~ s/\s$//;
-      $encoded = 1;
-    } else {
-      $dn =~ s/dn: (.*)/$1/;
-      $encoded = 0;
-    }
-    my $cdn = &canon($dn);
-    $entries{$cdn}{$origDN} = $dn;
-    $entries{$cdn}{"encoded"} = $encoded;
-
-    #
-    # Infer the suffix.
-    # Assume it's the shortest DN.
-    #
-    if (!$opt_suffix)
-    {
-	$suffix = $cdn
-	    if (!defined $suffix) || (length $cdn < length $suffix);
-    }
-
-    #
-    # Extract the first component (the RDN)
-    # for later tests.
-    #
-    ($rdn, undef) = split(/,/, $cdn);
-    ($rdnattr, $rdnval) = split(/=/, $rdn);
-
-    #
-    # Get the attributes/values.
-    # Attributes are low-cased.
-    #
-    for (@_)
-    {
-	($attr, $val) = split(/\s/, $_, 2);	# In case of "::"
-	$attr =~ s/://;
-	if ($attr =~ /:/)			# Must be binary (base-64)
-	{
-	    $attr =~ s/://;
-	    $val = &demime($val);
-	}
-	push @{$entries{$cdn}{lc $attr}}, $val;
-    }
-
-    #
-    # Does the RDN exist?
-    #
-    if (!defined @{$entries{$cdn}{$rdnattr}})
-    {
-	print STDERR "dn: $dn\nMissing RDN";
-	if ($opt_fix)
-	{
-	    push @{$entries{$cdn}{$rdnattr}}, $rdnval;
-	    print STDERR "; inserted \"$rdnattr=$rdnval\"";
-	}
-	print STDERR "\n\n";
-    }
-
-    #
-    # And how many?  Multiples are permitted
-    # in some contexts, but not in ours.
-    #
-    my $attrs = $entries{$cdn}{$rdnattr};	# Actually a reference
-    my $nrdn = @{$attrs};
-    if ($nrdn > 1)
-    {
-	print STDERR "dn: $dn\nMultiple RDNs: \"@{$attrs}[0]\"";
-	for (my $i = 1; $i < $nrdn; $i++)
-	{
-	    print STDERR ", \"@{$attrs}[$i]\"";
-	}
-	if ($opt_fix)
-	{
-	    print STDERR "; using \"$rdnval\"";
-	    $entries{$cdn}{$rdnattr} = [ $rdnval ];
-	}
-	print STDERR "\n\n";
-    }
-
-    #
-    # Do they match?
-    #
-    if (defined @{$attrs} && $rdnval ne &canon(@{$attrs}[0]))
-    {
-	print STDERR "dn: $dn\nMismatched RDN: \"$rdnattr=@{$attrs}[0]\"";
-	if ($opt_fix)
-	{
-	    print STDERR "; using \"$rdnval\"";
-	    $entries{$cdn}{$rdnattr} = [ $rdnval ];
-	}
-	print STDERR "\n\n";
-    }
-
-    #
-    # Check single-value attributes.
-    #
-    foreach my $attr (@single)
-    {
-	my $nval = 0;
-	my $attrs = $entries{$cdn}{lc $attr};
-	$nval = @{$attrs} if defined @{$attrs};
-	if ($nval > 1)
-	{
-	    print STDERR "dn: $dn\nMultiple attrs for \"$attr\": \"@{$attrs}[0]\"";
-	    for (my $i = 1; $i < $nval; $i++)
-	    {
-		print STDERR ", \"@{$attrs}[$i]\"";
-	    }
-	    if ($opt_fix)
-	    {
-		print STDERR "; using \"@{$attrs}[0]\"";
-		$entries{$cdn}{lc $attr} = [ @{$attrs}[0] ];
-	    }
-	    print STDERR "\n\n";
-	}
-    }
-
-    #
-    # Check the objectclass inheritance.
-    #
-    if ($opt_inheritance)	# Will soon be mandatory
-    {
-	foreach my $i (@{$entries{$cdn}{"objectclass"}})
-	{
-	    next if $i eq "top";	# top is topless :-)
-	    if (!defined $sup{$i})
-	    {
-		print STDERR "dn: $dn\nUnknown objectclass: \"$i\"";
-		if ($opt_fix)
-		{
-		    print STDERR "; ignored";
-		    &remove($i, \@{$entries{$cdn}{"objectclass"}});
-		}
-		print STDERR "\n\n";
-	    }
-	    if (defined $sup{$i} &&
-		!&present($sup{$i}, \@{$entries{$cdn}{"objectclass"}}))
-	    {
-		print STDERR "dn: $dn\nNo sup for \"$i\": \"$sup{$i}\"";
-		if ($opt_fix)
-		{
-		    print STDERR "; inserted";
-		    push @{$entries{$cdn}{"objectclass"}}, $sup{$i};
-		}
-		print STDERR "\n\n";
-	    }
-	} # each objectclass
-    } # inheritance
-
-    #
-    # Check required attributes.
-    # Can't do in above loop, because the keys
-    # may have changed from inserting new classes.
-    #
-    foreach my $i (@{$entries{$cdn}{"objectclass"}})
-    {
-	&checkattrs($cdn, $i);
-    }
-} # main loop
-
-#
-# Make sure each entry has a parent.
-# For now, we kill orphans on sight...
-#
-$suffix = $opt_suffix if $opt_suffix;
-foreach my $thisdn (keys %entries)
-{
-    my $i = $thisdn;
-    $i =~ s/[^,]*,//;
-    if (!$entries{$i} && $thisdn ne &canon($suffix))
-    {
-	print STDERR "dn: $thisdn\nOrphan";
-	if ($opt_fix)
-	{
-	    print STDERR "; deleted";
-	    delete $entries{$thisdn};
-	}
-	print STDERR "\n\n";
-    }
-
-    # Fix up the suffix dn if it's our mess, adding a structural objectclass.
-    if ($thisdn eq &canon($suffix)) {
-	if (@{$entries{$thisdn}{'objectclass'}} == 1
-	    && lc $entries{$thisdn}{'objectclass'}[0] eq 'dcobject')
-	{
-		if (defined($opt_org))
-		{
-			push(@{$entries{$thisdn}{'objectclass'}}, 'organization');
-			push(@{$entries{$thisdn}{'o'}}, $opt_org);
-		} else {
-			push(@{$entries{$thisdn}{'objectclass'}}, 'domain');
-		}
-	}
-	# check for $classes == dcObject.
-    }
-}
-
-print STDERR Dumper(%entries) if $opt_dump;
-
-#
-# Write out (possibly fixed) file if requested.
-#
-# The DN keys are sorted by length, which ensures that
-# parents come before children.
-#
-if ($opt_write)
-{
-    foreach my $dn (sort { length($a) <=> length($b) } keys %entries)
-    {
-	&write_out($dn)
-    }
-}
-
-exit 0;
-
-###########################################################################
-
-#
-# Canonicalise a string.
-# Delete leading/trailing blanks around commas, and lowcase.
-#
-sub canon
-{
-    ($_) = @_;
-    s/\s+/ /g;	# Catch tabs as well
-    s/ ,/,/g;
-    s/, /,/g;
-    lc;
-}
-
-#
-# Check required attributes, and fix up known attributes for which the
-# syntax has changed
-# Bad hack: the "fix up" should be replaced by something which knows
-# about schemas and can fix all instances for all attributes of the
-# relevant attribute syntax (1.3.6.1.4.1.1466.115.121.1.27).  For now,
-# we only check the most commonly affected attributes, which we also
-# happen to know are SINGLE-VALUE (with the exception of
-# mailPreferenceOption and ipServiceProtocol).
-#
-sub checkattrs
-{
-    (my $dn, $class) = @_;
-    foreach my $attr (@{$reqd{lc $class}})
-    {
-	if (!defined @{$entries{$dn}{lc $attr}})
-	{
-	    my $odn = $entries{$dn}{$origDN};
-	    print STDERR "dn: $odn\nMissing reqd \"$class\" attr \"$attr\"";
-	    if ($opt_fix)
-	    {
-		# Quick hack for CI
-		my $fix = "UNKNOWN";
-		if ($attr eq "cn" && $fix ne "")
-		{
-		    $fix = $entries{$dn}{"givenname"}[0];
-		}
-		push @{$entries{$dn}{$attr}}, $fix;
-		print STDERR "; inserted \"$fix\"";
-	    }
-	    print STDERR "\n\n";
-	}
-    }
-    foreach my $attr (@integer) {
-	$entries{$dn}{lc $attr}[0] = 0
-	    if ($entries{$dn}{lc $attr} && $entries{$dn}{lc $attr}[0] =~ /^0+$/);
-    }
-}
-
-#
-# Write an entry to standard output.
-#
-# Ought to wrap at 78 cols as well.
-#
-sub write_out
-{
-    my ($dn) = @_;
-    my $odn = $entries{$dn}{$origDN};
-    if ($entries{$dn}{"encoded"} == 1) {
-      $encoded = encode_base64($odn,"");
-      print "dn:: $encoded\n";
-    } else {
-      print "dn: $odn\n";
-    }
-    foreach my $attr (keys %{$entries{$dn}})
-    {
-	next if $attr eq $origDN;
-	foreach my $value (@{$entries{$dn}{$attr}})
-	{
-	    print "$attr:";
-	    if ($attr =~ /userpassword/i
-		|| $value =~ /(^[ :]|[\x00-\x1f\x7f-\xff])/)
-	    {
-		print ": ", &enmime($value, "");
-	    }
-	    else
-	    {
-		print " $value";
-	    }
-	    print "\n";
-	}
-    }
-    print "\n";
-}
-
-#
-# Test for presence of element in list.
-#
-sub present
-{
-    my ($element, $list) = @_;
-    my $found = 0;
-
-    foreach my $i (@$list)
-    {
-        if ($i eq $element)
-        {
-            $found = 1;
-            last;
-        }
-    }
-    return $found;
-}
-
-#
-# Remove specified element from list.
-# It's a unique element, but multiple
-# occurances will be removed.  It will
-# change the order of the list.
-#
-sub remove
-{
-    my ($element, $list) = @_;
-
-    for (my $i = 0; $i < @$list; $i++)
-    {
-        if ($element eq @$list[$i])
-        {
-	    @$list[$i] = @$list[$#$list];
-            pop @$list;
-        }
-    }
-}
-
-#
-# Initialise some stuff (automatically called).
-#
-sub INIT
-{
-    #
-    # Initialise the superior objectclasses.
-    # Ought to get this from the schema.
-    #
-    $sup{"dcObject"} = "top";
-    $sup{"inetOrgPerson"} = "organizationalPerson";
-    $sup{"organizationalPerson"} = "person";
-    $sup{"organizationalRole"} = "top";
-    $sup{"organizationalUnit"} = "top";
-    $sup{"person"} = "top";
-    $sup{"posixAccount"} = "top";
-    $sup{"room"} = "top";
-    $sup{"simpleSecurityObject"} = "top";
-
-    #
-    # These are incomplete/wrong/WIP.
-    #
-    $sup{"ciAdministrator"} = "top";
-    $sup{"ciApplication"} = "top";
-    $sup{"ciEmployee"} = "inetOrgPerson";
-    $sup{"ciLdapConfig"} = "top";
-    $sup{"ciPrinter"} = "top";
-    $sup{"ciServer"} = "top";
-
-    #
-    # Required attributes.
-    #
-    $reqd{"person"} = [ "sn", "cn" ];	# Special - can be autofixed
-    $reqd{"ciadministrator"} = [ "uid", "userPassword" ];
-    $reqd{"ciapplication"} = [ "ciApp", "ciAppType", "ciHost", "ciStatus", "ciPortNum" ];
-    $reqd{"ciemployee"} = [ "employeeNumber", "sn" ];
-    $reqd{"cildapconfig"} = [ "ciHost" ];
-    $reqd{"ciprinter"} = [ "ciPrinterName" ];
-    $reqd{"ciserver"} = [ "name" ];
-
-    #
-    # Single-value attributes.
-    #
-    @single =
-    (
-	"ciAppType",
-	"ciDBPath",
-	"ciDomainName", 
-	"ciLdapEnabled",
-	"ciLdapServer",
-	"ciOSType",
-	"ciPortNum",
-	"ciPrinterClass",
-	"ciRegion",
-	"ciStatus",
-    );
-
-    #
-    # Integer attributes
-    #
-    @integer =
-    (
-	'uidNumber',
-	'gidNumber',
-	'mailPreferenceOption',
-	'shadowLastChange',
-	'shadowMin',
-	'shadowMax',
-	'shadowWarning',
-	'shadowInactive',
-	'shadowExpire',
-	'shadowFlag',
-	'ipServicePort',
-	'ipServiceProtocol',
-	'ipProtocolNumber',
-	'oncRpcNumber',
-    );
-
-    #
-    # Random stuff.
-    #
-    $/ = "";		# Read input in paragraph mode
-}
-
-#
-# Process options.
-#
-sub parse_options
-{
-    $SIG{'__WARN__'} = sub { die $_[0] };	# Exit on bad options
-
-    Getopt::Long::Configure("bundling");	# Old-style (-xyz, --word)
-    GetOptions
-    (
-	"--dump"	=> \$opt_dump,		# Dump data structure
-	"-D"		=> \$opt_dump,
-
-	"--fix"		=> \$opt_fix,		# Fix errors if possible
-	"-f"		=> \$opt_fix,		# (also implies "write")
-
-	"--inheritance"	=> \$opt_inheritance,	# Check obj inheritance
-	"-i"		=> \$opt_inheritance,	# (too many false alarms)
-
-	"--suffix=s"	=> \$opt_suffix,	# Specify directory suffix
-	"-s=s"		=> \$opt_suffix,
-
-	 "--write"	=> \$opt_write,		# Write ordered file
-	 "-w"		=> \$opt_write,
-
-	 "--org=s"	=> \$opt_org,		# Organization to use for
-	 "-o=s"		=> \$opt_org,		# fixing up the suffix
-    )
-}
-
-#
-# Get a complete entry as a list of lines.
-# We use the trick of setting the input delimiter
-# to "", to read a paragraph at a time, so we can
-# join continued lines.
-#
-sub GetEntry
-{
-    my @a;
-    do
-    {
-	$_ = (<>);
-	return () if !defined;	# EOF
-	s/$/\n/;	# In case we strip last newline below
-	s/^#.*\n//g;	# Comments
-	chomp;		# Always strips >= 2 newlines
-	s/\n //g;	# Join lines
-	@a = split /\n/;
-    }
-    while (@a < 2);	# Skips phantom entries (caused by comments)
-    return @a;
-}
-
-#
-# Given a string, return a de-mimed version.
-# Can't use MIME::Base64 because it's not a core module.
-# Instead, I pinched the code from it...
-#
-sub demime
-{
-    local($^W) = 0; # unpack("u",...) gives bogus warning in 5.00[123]
-
-    my $str = shift;
-    $str =~ tr|A-Za-z0-9+=/||cd;            # remove non-base64 chars
-    if (length($str) % 4) {
-	require Carp;
-	Carp::carp("Length of base64 data not a multiple of 4")
-    }
-    $str =~ s/=+$//;                        # remove padding
-    $str =~ tr|A-Za-z0-9+/| -_|;            # convert to uuencoded format
-
-    return join'', map( unpack("u", chr(32 + length($_)*3/4) . $_),
-	                $str =~ /(.{1,60})/gs);
-}
-
-#
-# En-mime same.
-# I didn't write this bletcherous code either.
-#
-sub enmime
-{
-    my $res = "";
-    my $eol = $_[1];
-    $eol = "\n" unless defined $eol;
-    pos($_[0]) = 0;                          # ensure start at the beginning
-
-    $res = join '', map( pack('u',$_)=~ /^.(\S*)/, ($_[0]=~/(.{1,45})/gs));
-
-    $res =~ tr|` -_|AA-Za-z0-9+/|;               # `# help emacs
-    # fix padding at the end
-    my $padding = (3 - length($_[0]) % 3) % 3;
-    $res =~ s/.{$padding}$/'=' x $padding/e if $padding;
-    # break encoded string into lines of no more than 76 characters each
-    if (length $eol) {
-	$res =~ s/(.{1,76})/$1$eol/g;
-    }
-    return $res;
-}

Modified: openldap/trunk/debian/po/cs.po
===================================================================
--- openldap/trunk/debian/po/cs.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/cs.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -289,7 +289,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Při pokusu o aktualizaci vašeho LDAP adresáře se vyskytla chyba. Chyba "
 "nastala při provádění příkazu 'slapcat', jenž se snažil získat obsah vašeho "
@@ -300,7 +300,7 @@
 "Budete-li chtít později zkusit provést tuto aktualizaci znovu, přesuňte "
 "staré databázové soubory zpět na jejich původní místo, spravte příčinu toho, "
 "proč slapcat selhal a spusťte:\n"
-"  slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+"  slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/da.po
===================================================================
--- openldap/trunk/debian/po/da.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/da.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -290,7 +290,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Der opstod en fejl under forsøget på at opgradere din LDAP-bog. Fejlen "
 "opstod under kørslen af 'slapcat', som forsøger at ekstrahere din LDAP-bog. "
@@ -300,7 +300,7 @@
 "flyttet til /var/backups. Hvis du vil forsøge denne opgradering igen, så "
 "flyt de gamle databasefiler tilbage, ret den fejl, der fik slapcat til at "
 "fejle, og kør:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/de.po
===================================================================
--- openldap/trunk/debian/po/de.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/de.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -300,7 +300,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Beim Versuch, ein Upgrade Ihres LDAP-Verzeichnisses durchzuführen, ist ein "
 "Fehler aufgetreten. Dieser Fehler trat bei der Ausführung von »slapcat« auf, "
@@ -311,8 +311,7 @@
 "»slapadd« fehlschlägt. Die alten Datenbanken werden jetzt nach /var/backups "
 "verschoben. Falls Sie dieses Upgrade erneut versuchen wollen, verschieben "
 "Sie die alten Datenbanken zurück an ihren Platz, korrigieren Sie, was auch "
-"immer den Fehlschlag von slapcat ausgelöst hat, und führen Sie »slapcat | /"
-"usr/share/slapd/fix_ldif -w -o \"$organization\" > $location« aus. "
+"immer den Fehlschlag von slapcat ausgelöst hat, und führen Sie »slapcat > $location« aus. "
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/es.po
===================================================================
--- openldap/trunk/debian/po/es.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/es.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -312,7 +312,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Se produjo un error mientras se intentaba actualizar su directorio LDAP. "
 "Este error ocurrió mientras se ejecutaba «slapcat» para intentar extraer su "
@@ -322,8 +322,7 @@
 "adelante. Se van a mover los ficheros de la base de datos antigua a «/var/"
 "backups». Si desea volver a intentar la actualización debe mover los "
 "ficheros de la base de datos a su ubicación normal, arreglar lo que hizo que "
-"fallara «slapcat» y ejecutar: slapcat | /usr/share/slapd/fix_ldif -w -o \\"
-"\"$organization\\\" > $location»."
+"fallara «slapcat» y ejecutar: slapcat > $location»."
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/fr.po
===================================================================
--- openldap/trunk/debian/po/fr.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/fr.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -300,7 +300,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Une erreur s'est produite lors de la mise à niveau de l'annuaire LDAP. La "
 "commande « slapcat » utilisée pour l'extraction de l'annuaire LDAP a échoué. "
@@ -311,7 +311,7 @@
 "déplacés dans /var/backups. Si vous souhaitez recommencer la mise à niveau, "
 "vous devrez remettre les anciens fichiers en place, corriger ce qui a "
 "provoqué l'échec, puis utiliser la commande :\n"
-"slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+"slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/gl.po
===================================================================
--- openldap/trunk/debian/po/gl.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/gl.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -283,7 +283,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Houbo un erro ao tentar actualizar o directorio LDAP. Este erro apareceu ao "
 "executar a orde \"slapcat\" que tenta extraer o seu directorio LDAP. Este "
@@ -293,7 +293,7 @@
 "mover os ficheiros antigos da base de datos a /var/backups. Se quere volver "
 "tentar esta actualización, traslade os ficheiros da base de datos antiga ao "
 "seu sitio, arranxe o que fixo que fallara slapcat e execute:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/ja.po
===================================================================
--- openldap/trunk/debian/po/ja.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/ja.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -289,7 +289,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "LDAP ディレクトリの更新を試みているときに、エラーが発生しました。このエラーは"
 "あなたの LDAP ディレクトリを展開することを試みる 'slapcat' の動作中に起きまし"
@@ -299,7 +299,7 @@
 "は /var/backups に移動されようとしています。この更新を再び試して古いデータ"
 "ベースファイルを元の場所に戻したいのであれば、slapcat が失敗する原因を修正"
 "し、次のように実行します:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/nl.po
===================================================================
--- openldap/trunk/debian/po/nl.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/nl.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -296,7 +296,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Er is een fout opgetreden tijdens de poging om uw LDAP-catalogus op te "
 "waarderen. Deze fout trad op tijdens de 'slapcat'-aanroep die uw LDAP-"
@@ -304,8 +304,7 @@
 "configuratie. Bijvoorbeeld als de regels, die de toepasselijke modules voor "
 "de gebruikte backend-databasetypes laden, ontbreken. Als u deze opwaardering "
 "nogmaals wilt proberen dient u: de oude databasebestanden terug te kopiëren, "
-"de oorzaak van de mislukte 'slapcat'-aanroep te repareren, en 'slapcat | /"
-"usr/share/slapd/fix_ldif -w -o \"$organization\" > $location' uit te voeren."
+"de oorzaak van de mislukte 'slapcat'-aanroep te repareren, en 'slapcat > $location' uit te voeren."
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/pt.po
===================================================================
--- openldap/trunk/debian/po/pt.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/pt.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -288,7 +288,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Ocorreu um erro durante a tentativa de actualização do seu directório LDAP. "
 "Este erro ocorreu durante a execução do 'slapcat', que tenta extrair o seu "
@@ -299,7 +299,7 @@
 "vão ser movidos para /var/backups. Se quiser tentar esta actualização de "
 "novo, mova os ficheiros da base de dados antiga de volta para o seu lugar, "
 "corrija o que causou a falha do slapcat, e execute:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\"> $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/pt_BR.po
===================================================================
--- openldap/trunk/debian/po/pt_BR.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/pt_BR.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -292,7 +292,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Um erro ocorreu durante a tentativa de atualizar o seu diretório LDAP. Este "
 "erro ocorreu enquanto executando o 'slapcat' que tenta extrair seu diretório "
@@ -304,7 +304,7 @@
 "atualização novamente então mova os arquivos da antiga base de dados de "
 "volta para o local original, corrija o que quer que tenha causado a falha do "
 "slapcat e execute:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/ru.po
===================================================================
--- openldap/trunk/debian/po/ru.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/ru.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -290,7 +290,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Произошла ошибка при попытке обновления каталога LDAP. Ошибка возникла при "
 "выполнении 'slapcat', которая пыталась распаковать ваш каталог LDAP. Это "
@@ -300,7 +300,7 @@
 "файлы базы данных были перенесены в /var/backups. Если вы хотите попытаться "
 "выполнить обновление ещё раз, переместите старые файлы базы данных обратно, "
 "исправьте ошибку, вызывающую отказ работы slapcat и выполните:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/po/templates.pot
===================================================================
--- openldap/trunk/debian/po/templates.pot	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/templates.pot	2007-12-21 08:48:52 UTC (rev 946)
@@ -239,7 +239,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 
 #. Type: note

Modified: openldap/trunk/debian/po/vi.po
===================================================================
--- openldap/trunk/debian/po/vi.po	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/po/vi.po	2007-12-21 08:48:52 UTC (rev 946)
@@ -284,7 +284,7 @@
 "old database files are about to be moved to /var/backups.  If you want to "
 "try this upgrade again then move the old database files back into place, fix "
 "whatever caused slapcat to fail, and run:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 msgstr ""
 "Gặp lỗi trong khi cố gắng nâng cấp thư mục LDAP của bạn. Lỗi này xảy ra khi "
 "chạy tiến trình « slapcat » mà cố gắng rút thư mục LDAP của bạn. Lỗi này có "
@@ -294,7 +294,7 @@
 "được di chuyển sang thư mục </var/backups>. Nếu bạn muốn thử lại nâng cấp, "
 "hãy di chuyển các tập tin cơ sở dữ liệu cũ về vị trí trước, sửa nguyên nhân "
 "lỗi của slapcat, rồi chạy lệnh:\n"
-" slapcat | /usr/share/slapd/fix_ldif -w -o \"$organization\" > $location"
+" slapcat > $location"
 
 #. Type: note
 #. Description

Modified: openldap/trunk/debian/rules
===================================================================
--- openldap/trunk/debian/rules	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/rules	2007-12-21 08:48:52 UTC (rev 946)
@@ -120,9 +120,8 @@
 	cp -al $(installdir) $(tmpdir)
 
 	dh_install -a
+	chmod 0755 $(CURDIR)/debian/slapd/usr/share/slapd/ldiftopasswd
 
-	# Make fix_ldif and ldiftopasswd executable.
-	chmod 0755 $(CURDIR)/debian/slapd/usr/share/slapd/fix_ldif $(CURDIR)/debian/slapd/usr/share/slapd/ldiftopasswd
 	dh_installchangelogs -a
 	dh_installdocs -a
 	dh_installexamples -a

Modified: openldap/trunk/debian/slapd.install
===================================================================
--- openldap/trunk/debian/slapd.install	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/slapd.install	2007-12-21 08:48:52 UTC (rev 946)
@@ -4,7 +4,6 @@
 debian/tmp/usr/lib/ldap/*.la usr/lib/ldap
 debian/tmp/usr/lib/libslapi-*.so.* usr/lib
 debian/lintian-overrides/slapd usr/share/lintian/overrides
-debian/fix_ldif usr/share/slapd
 debian/ldiftopasswd usr/share/slapd
 debian/DB_CONFIG usr/share/slapd
 debian/slapd.conf usr/share/slapd

Modified: openldap/trunk/debian/slapd.scripts-common
===================================================================
--- openldap/trunk/debian/slapd.scripts-common	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/slapd.scripts-common	2007-12-21 08:48:52 UTC (rev 946)
@@ -156,34 +156,6 @@
 # }}}
 # ----- Dumping and loading the data ------------------------------------ {{{
 
-automatic_ldif_fixing_wanted_for() {					# {{{ 
-# Check if the user wants us to automatically fix the given LDIF file.
-# Usage: if automatic_ldif_fixing_wanted_for "$file"; then ...
-# XXX: Use debconf to configure this
-
-	local file size maxsize
-	file="$1"
-	size=`wc -c < "$file"`
-	maxsize=$((1024 * 1024 * 20))
-
-	if [ "$size" -lt "$maxsize" ]; then 
-		return 0
-	else
-		return 1
-	fi
-}
-
-# }}}
-corrective_ldif_filter() {						# {{{
-# Try to fix any errors found in an LDIF stream.
-# Usage: source | corrective_ldif_filter | target
-# XXX: Store the stderr output of the script somewhere.
-
-	/usr/share/slapd/fix_ldif -f 2>/dev/null
-}
-
-# }}}
-
 dump_databases() {							# {{{
 # If the user wants us to dump the databases they are dumped to the 
 # configured directory.
@@ -239,28 +211,6 @@
 
 		capture_diagnostics slapadd -q -b "$suffix" -l "$file" \
 			|| failed=1
-		if [ "$failed" ] && \
-			  automatic_ldif_fixing_wanted_for "$file"; then
-			rm -f "$dbdir"/*
-			# If there is an old DB_CONFIG file, restore it 
-			# before running slapadd
-			if [ -e "$backupdir"/DB_CONFIG ]; then
-				cp -a "$backupdir"/DB_CONFIG "$dbdir"/
-			else
-				copy_example_DB_CONFIG "$dbdir"/
-			fi
-			failed=
-			echo -n "fixing" >&2
-			# This only works because we used capture_diag
-			# above already and the FD for the capture is 
-			# already assigned in the master shell. There 
-			# should be a cleaner way for this...
-			# -- Torsten
-			corrective_ldif_filter < "$file" \
-				| capture_diagnostics slapadd -q -b "$suffix" \
-				|| failed=1
-			echo -n ", " >&2
-		fi
 		if [ "$failed" ]; then
 			rm -f "$dbdir"/*
 			echo failed. >&2
@@ -792,23 +742,6 @@
 	perl -e "$script" || return 1
 }
 # }}}
-fix_ldif() {								# {{{
-# Fix the directory when upgrading from before 2.1 and the root
-# dn has no structural objectclass
-# Usage: fix_ldif <old-ldif-file> <new-ldif-file>
-
-	local location fixed_location
-	location="$1"
-	fixed_location="$2"
-
-	db_get shared/organization
-	organization="$RET"
-	if [ -z "$organization" ]; then organization=Unknown; fi
-	
-	/usr/share/slapd/fix_ldif -w -o "$organization" \
-		< "$location" > "$fixed_location"
-}
-# }}}
 assign_permissions() {							# {{{
 # Apply the same permissions as on a reference file to another file. 
 # Usage: apply_permissions <original> <new>

Modified: openldap/trunk/debian/slapd.templates
===================================================================
--- openldap/trunk/debian/slapd.templates	2007-12-21 08:34:45 UTC (rev 945)
+++ openldap/trunk/debian/slapd.templates	2007-12-21 08:48:52 UTC (rev 946)
@@ -121,7 +121,7 @@
  about to be moved to /var/backups.  If you want to try this upgrade
  again then move the old database files back into place, fix whatever
  caused slapcat to fail, and run:
-  slapcat | /usr/share/slapd/fix_ldif -w -o "$organization" > $location
+  slapcat > $location
  .
  Then move the database files back to a backup area and then try running
  slapadd from $location.




More information about the Pkg-openldap-devel mailing list