• Unable to reproduce: libdbd-ldap-perl: always produces warning on state

    From Andreas Tille@21:1/5 to All on Wed Jul 23 14:40:01 2025
    XPost: linux.debian.maint.perl

    Control: tags -1 help
    Thanks

    Hi,

    I came across this old bug of libdbd-ldap-perl since it was a candidate
    for the Bug of the Day[1]. I just migrated the package to the Debian Perl team[2] and upgraded the repository to the latest upstream version. Both,
    the current version in unstable as well as the package that builds from the repository, are failing your test:

    $ ls -l
    insgesamt 8
    -rw-r--r-- 1 andreas admin 156 23. Jul 14:18 bugs.debian.org.ldb
    -rw-r--r-- 1 andreas admin 632 23. Jul 14:18 test.pl
    $ perl test.pl
    Could not connect to "bugs.debian.org" (Connection refused)! at /usr/share/perl5/DBD/LDAP.pm line 534, <DBFILE> line 2.
    DBI connect('bugs.debian.org','',...) failed: Could not connect to "bugs.debian.org" (Connection refused)! at test.pl line 4.
    Cannot connect as guest (readonly): Could not connect to "bugs.debian.org" (Connection refused)! at test.pl line 4, <DBFILE> line 2.

    This is true for libdbd-ldap-perl 0.20-1.1 as well as the freshly build
    version 1.00-1.

    Any hints are welcome.

    Kind regards
    Andreas.


    [1] https://salsa.debian.org/qa/tiny_qa_tools/-/wikis/Tiny-QA-tasks#bug-of-the-day
    [2] https://salsa.debian.org/perl-team/modules/packages/libdbd-ldap-perl

    --
    https://fam-tille.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Roland Rosenfeld@21:1/5 to Andreas Tille on Thu Jul 24 12:20:01 2025
    XPost: linux.debian.maint.perl

    Source: libdbd-ldap-perl
    Source-Version: 0.20-1.1
    Done: Roland Rosenfeld <[email protected]>

    On Wed, 23 Jul 2025, Andreas Tille wrote:

    $ ls -l
    insgesamt 8
    -rw-r--r-- 1 andreas admin 156 23. Jul 14:18 bugs.debian.org.ldb
    -rw-r--r-- 1 andreas admin 632 23. Jul 14:18 test.pl
    $ perl test.pl
    Could not connect to "bugs.debian.org" (Connection refused)! at /usr/share/perl5/DBD/LDAP.pm line 534, <DBFILE> line 2.
    DBI connect('bugs.debian.org','',...) failed: Could not connect to "bugs.debian.org" (Connection refused)! at test.pl line 4.
    Cannot connect as guest (readonly): Could not connect to
    "bugs.debian.org" (Connection refused)! at test.pl line 4, <DBFILE>
    line 2.

    The root cause for reproducibility of the issue seems to be, that bugs.debian.org does not have an LDAP interface. There was one in the
    early 2000s (see for example https://lists.debian.org/debian-devel/2004/03/msg00388.html), which
    may have existed, when this bug report was issued, but which no longer
    exists. So the test case is no longer valid. As a replacement I
    coded a similar test case based on db.debian.org (files attached).

    This test doesn't throw any warnings, neither with 0.20-1.1 nor with
    1.00-1.

    Then I pulled 0.05-1 from snapshot.debian.org and with this ancient
    version I can reproduce the following warnings:
    DBD::LDAP::db prepare warning: at ./test-db.pl line 6, <DBFILE> line 2. (before the output)
    DBD::LDAP::db disconnect warning: at ./test-db.pl line 19, <DBFILE> line 2. (after the output).

    So from my perspective 310230 is fixed at least in 0.20-1.1 and I
    close this bug report.

    Greetings
    Roland

    db.debian.org users:ou=users,dc=debian,dc=org:(objectclass=inetOrgPerson):uid:uid:cn,sn,gecos,uidNumber,keyFingerPrint,gidNumber,ircNic,labeledURI

    #!/usr/bin/perluse DBI;use strict;my $dbh = DBI->connect("DBI:LDAP:db.debian.org") or die "Cannot connect as guest (readonly): " . $DBI::errstr;my $sth = $dbh->prepare("select cn, gecos, dkimPubKey from users where cn='Roland'") or
    die "Cannot prepare: " . $dbh->errstr();$sth->execute() or die "Cannot execute: " . $sth->errstr();my $cnt; while ((my @results) = $sth->fetchrow_array){ print "--------------------------------------------------------\n"; ++$cnt; while (@
    results) { print "------>".join('|',split(/\0/, shift(@results)))."\n"; }}$sth->finish();$dbh->disconnect();

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Tille@21:1/5 to All on Thu Jul 24 13:50:01 2025
    XPost: linux.debian.maint.perl

    Hi Roland,

    Am Thu, Jul 24, 2025 at 12:13:02PM +0200 schrieb Roland Rosenfeld:
    So from my perspective 310230 is fixed at least in 0.20-1.1 and I
    close this bug report.

    Thanks a lot
    Andreas.

    --
    https://fam-tille.de

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)