Your message dated Fri, 04 Dec 2020 21:39:44 +0000
with message-id <[email protected]>
and subject line Bug#974081: Removed package(s) from unstable
has caused the Debian Bug report #975872,
regarding Deletes trailing whitespace in e.g. "c: ZCA="
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
975872: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975872
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python3-ldif3
Version: 3.2.2-1
Severity: normal

I wrote a trivial ldifsort tool (attached).
I noticed it was not idempotent.
This is because python3-ldif3 is not preserving trailing space.

An easy way to see this is:

    diff -u <(printf 'dn: a=b\nc:: ZCAgIA==\n'|ldifsort) \
            <(printf 'dn: a=b\nc:: ZCAgIA==\n'|ldifsort|ldifsort) | cat -A
    --- /dev/fd/63^I2020-11-26 13:48:36.865826580 +1100$
    +++ /dev/fd/62^I2020-11-26 13:48:36.865826580 +1100$
    @@ -1,3 +1,3 @@$
     dn: a=b$
    -c: d   $
    +c: d$
     $

It *is* correctly preserving leading spaces, and leading and trailing newlines.

Please investigate why the ldif3 writer is not using base64 to preserve 
trailing space.


-- System Information:
Debian Release: 10.6
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'stable-updates'), (500, 
'proposed-updates')
Architecture: amd64 (x86_64)

Kernel: Linux 5.6.0-0.bpo.2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8), LANGUAGE=en_AU:en 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-ldif3 depends on:
ii  python3  3.7.3-1

python3-ldif3 recommends no packages.

python3-ldif3 suggests no packages.

-- no debconf information
#!/usr/bin/python3
import collections

import click
import ldif3

__doc__ == """GOAL: ldifsort.py, but less ugly/annoying/buggy

See also https://ldapwiki.com/wiki/LDIF%20Sort%20Tools

FIXME: ldif3 incorrectly fails to preserve base64 escaping of trailing spaces.
       Leading spaces and leading/trailing newlines ARE preserved.

       This is a simple test case:

           diff -u <(printf 'dn: a=b\nc:: ZCAgIA==\n'|ldifsort) \
                   <(printf 'dn: a=b\nc:: ZCAgIA==\n'|ldifsort|ldifsort)|cat -A
"""


@click.command(
    help="""
    To sort prior BEFORE git committing:

        ldapsearch -LLL -YEXTERNAL '*' + | ldifsort - backup.ldif

    To sort AFTER git committing (at "git log -p" time):

        git config --global diff.ldif.textconv ldifsort
    """)
@click.argument('src', type=click.File('rb'), default='-')
@click.argument('dst', type=click.File('wb'), default='-')
def main(src, dst):
    # Read everything into memory.
    reader = ldif3.LDIFParser(src)
    entities = sorted(          # sort objects (entities)
        (dn, collections.OrderedDict(
            sorted((attribute_name,           # sort attribute names
                    sorted(attribute_values))  # sort attribute values
                   for attribute_name, attribute_values in attributes.items())))
        for dn, attributes in reader.parse())
    # Write everything out again.
    writer = ldif3.LDIFWriter(dst)
    for pair in entities:
        writer.unparse(*pair)


if __name__ == '__main__':
    main()

--- End Message ---
--- Begin Message ---
Version: 3.2.2-3+rm

Dear submitter,

as the package ldif3 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/974081

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Joerg Jaspert (the ftpmaster behind the curtain)

--- End Message ---
_______________________________________________
Python-modules-team mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/python-modules-team

Reply via email to