PaulHowarth/Blog/2009-09-13

Sunday 13th September 2009

Fedora Project

  • Updated perl-Crypt-DSA to 1.16, the first production release. The package has had quite an overhaul upstream, with a few dependency changes, but it built fine on my Fedora 11 box. However, a Rawhide build failed:

  • Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.2NKwX6
    + umask 022
    + cd /builddir/build/BUILD
    + cd Crypt-DSA-1.16
    + unset DISPLAY
    + /usr/bin/make test AUTOMATED_TESTING=1
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
    # Testing Crypt::DSA 1.16
    t/00-compile.t .. ok
    t/01-util.t ..... ok
    Use of uninitialized value $parts{"p"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 68.
    Use of uninitialized value $parts{"q"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 69.
    Use of uninitialized value $parts{"g"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 70.
    Can't locate object method "copy" via package "NaN" (perhaps you forgot to load "NaN"?) at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/Util.pm line 43.
    # Looks like your test exited with 255 before it could output anything.
    t/02-sign.t .....
    Dubious, test returned 255 (wstat 65280, 0xff00)
    Failed 4/4 subtests
    Use of uninitialized value $parts{"p"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 68.
    Use of uninitialized value $parts{"q"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 69.
    Use of uninitialized value $parts{"g"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 70.
    Can't locate object method "copy" via package "NaN" (perhaps you forgot to load "NaN"?) at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/Util.pm line 43.
    # Looks like your test exited with 255 before it could output anything.
    t/03-keygen.t ...
    Dubious, test returned 255 (wstat 65280, 0xff00)
    Failed 18/18 subtests
    Use of uninitialized value $parts{"p"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 68.
    Use of uninitialized value $parts{"q"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 69.
    Use of uninitialized value $parts{"g"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 70.
    Can't locate object method "copy" via package "NaN" (perhaps you forgot to load "NaN"?) at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/Util.pm line 43.
    # Looks like your test exited with 255 before it could output anything.
    t/04-pem.t ......
    Dubious, test returned 255 (wstat 65280, 0xff00)
    Failed 26/26 subtests
    # This takes a couple of minutes on slower machines.
    t/06-fips.t ..... ok
    t/07-openid.t ... ok
    t/97_meta.t ..... ok
    t/98_pod.t ...... ok
    t/99_pmv.t ...... ok
    Test Summary Report
    -------------------
    t/02-sign.t   (Wstat: 65280 Tests: 0 Failed: 0)
      Non-zero exit status: 255
      Parse errors: Bad plan.  You planned 4 tests but ran 0.
    t/03-keygen.t (Wstat: 65280 Tests: 0 Failed: 0)
      Non-zero exit status: 255
      Parse errors: Bad plan.  You planned 18 tests but ran 0.
    t/04-pem.t    (Wstat: 65280 Tests: 0 Failed: 0)
      Non-zero exit status: 255
      Parse errors: Bad plan.  You planned 26 tests but ran 0.
    Files=10, Tests=61, 27 wallclock secs ( 0.08 usr  0.05 sys + 26.34 cusr  0.37 csys = 26.84 CPU)
    Result: FAIL
    Failed 3/10 test programs. 0/61 subtests failed.
    make: *** [test_dynamic] Error 255
    RPM build errors:
    error: Bad exit status from /var/tmp/rpm-tmp.2NKwX6 (%check)
  • A look at the code suggested that openssl might be producing different output on Rawhide compared with older OS releases, and that indeed proved to be the case. Crypt::DSA::KeyChain runs openssl dsaparam -text -noout 512, which produces output like this on Fedora 11 (openssl 0.9.8k):

  • $ openssl dsaparam -text -noout 512
    Generating DSA parameters, 512 bit long prime
    This could take some time
    ........+..+++++++++++++++++++++++++++++++++++++++++++++++++++*
    ..+....................+................+.+................+................................+...+..+...........+.....+.............+.......+....+..............+.......+...+.....+.................+....+.............................+.......+..........+..+...+........+...............+......+..........+..+.....+............+.+..+...+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++*
    DSA-Parameters: (512 bit)
        p:
            00:e6:6c:38:ce:8d:9f:1d:f0:7a:12:50:1e:ef:5c:
            73:fe:2e:7a:b0:ed:27:a0:96:c3:37:98:de:e9:b6:
            a2:e6:3a:97:9d:d5:c1:f8:1e:f4:2d:38:29:d8:08:
            ac:f1:20:28:51:54:cb:7a:a1:36:f6:e7:07:b1:cf:
            23:8d:6e:a1:33
        q:
            00:f4:7b:0c:a8:98:d7:e0:d0:3e:92:94:95:30:f5:
            21:0a:86:db:16:55
        g:
            00:c6:81:8d:32:72:6b:6b:a5:d2:90:fb:c2:31:c4:
            73:e0:1b:05:bb:17:5c:b2:b2:09:69:17:78:41:fc:
            99:a1:9b:07:ca:a7:02:5f:0e:1f:dd:35:05:90:ac:
            e8:66:47:ca:9a:1a:77:a4:f4:5e:65:66:64:bf:34:
            7d:fe:30:bf:5a
  • On Rawhide (openssl 1.0 beta 3), the output looks like this:

  • $ openssl dsaparam -text -noout 512
    Generating DSA parameters, 512 bit long prime
    This could take some time
    .+........+++++++++++++++++++++++++++++++++++++++++++++++++++*
    ...+................+.....+..........+.+.+...........+.+............+............+......+...+.........................................+......+......+...............+...+....+..............+++++++++++++++++++++++++++++++++++++++++++++++++++*
        P:   
            00:82:ab:91:c2:9e:8e:c1:cd:cb:70:68:12:c9:44:
            90:20:97:e4:69:77:fc:53:ce:78:2c:3d:01:5c:69:
            42:45:bc:e7:06:2f:4e:75:d4:10:3b:ae:de:43:6f:
            d8:86:6d:1e:f9:1d:c5:8e:0d:92:ca:e7:23:2e:5b:
            42:26:09:88:3b
        Q:   
            00:f9:dc:55:fd:ca:48:8c:d4:e9:df:8a:25:6d:f7:
            82:5d:f8:34:34:3f
        G:   
            6b:75:a7:e5:ac:2e:3a:79:65:01:51:cb:78:a3:06:
            73:47:0a:b8:9c:de:68:36:c5:5e:44:02:fe:8a:73:
            73:bc:d3:1a:ec:08:40:da:b3:f6:e2:0b:14:e6:1c:
            0d:f5:ef:62:0e:bf:64:18:96:ee:87:f7:13:89:42:
            cc:69:6e:be
  • The change to labelling the parameters in upper case is what broke things, and was easily fixed with this simple patch:
  • --- Crypt-DSA-1.16/lib/Crypt/DSA/KeyChain.pm    2009-09-11 13:45:37.000000000 +0100
    +++ Crypt-DSA-1.16/lib/Crypt/DSA/KeyChain.pm    2009-09-12 22:56:31.000000000 +0100
    @@ -53,7 +53,7 @@
                 my $cur_part;
                 foreach (@res) {
                     if (/^\s+(\w):\s*$/) {
    -                    $cur_part = $1;
    +                    $cur_part = lc($1);
                         next;
                     }
                     if (/^\s*((?:[0-9a-f]{2,2}:?)+)\s*$/) {
  • I raised CPAN RT#49668 to get this fixed upstream too.


Recent