• Bug#1103787: gpgme1.0: Testsuite error on 32bit archs with 64bit time (

    From Andreas Metzler@21:1/5 to All on Mon Apr 21 17:10:01 2025
    Source: gpgme1.0
    Version: 1.24.2-1
    Severity: serious
    Tags: ftbfs
    Justification: fails to build from source (but built successfully in the past) X-Debbugs-Cc: debian-arm@lists.debian.org, ametzler@bebt.de
    User: debian-arm@lists.debian.org
    Usertags: armel armhf

    Hello,

    upgrading gpg from 2.2 to 2.4 changed the outcome of
    t-addexistingsubkey5 (and ..6) from
    ********* Start testing of AddExistingSubkeyJobTest *********
    Config: Using QtTest library 5.15.15, Qt 5.15.15 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 14.2.0), debian unknown
    PASS : AddExistingSubkeyJobTest::initTestCase()
    SKIP : AddExistingSubkeyJobTest::testAddExistingSubkeyAsync() gpg does not yet support adding an existing subkey to another key via the command API
    Loc: [../../../../lang/qt/tests/t-addexistingsubkey.cpp(137)]
    SKIP : AddExistingSubkeyJobTest::testAddExistingSubkeySync() gpg does not yet support adding an existing subkey to another key via the command API
    Loc: [../../../../lang/qt/tests/t-addexistingsubkey.cpp(137)]
    SKIP : AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration() gpg does not yet support adding an existing subkey to another key via the command API
    Loc: [../../../../lang/qt/tests/t-addexistingsubkey.cpp(137)]
    PASS : AddExistingSubkeyJobTest::cleanupTestCase()
    Totals: 2 passed, 0 failed, 3 skipped, 0 blacklisted, 164ms
    ********* Finished testing of AddExistingSubkeyJobTest *********

    to

    ********* Start testing of AddExistingSubkeyJobTest *********
    Config: Using QtTest library 5.15.15, Qt 5.15.15 (arm-little_endian-ilp32-eabi-hardfloat shared (dynamic) release build; by GCC 14.2.0), debian unknown
    PASS : AddExistingSubkeyJobTest::initTestCase()
    PASS : AddExistingSubkeyJobTest::testAddExistingSubkeyAsync()
    PASS : AddExistingSubkeyJobTest::testAddExistingSubkeySync()
    FAIL! : AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration() Compared values are not the same
    Actual (result.code()) : 0
    Expected (static_cast<int>(GPG_ERR_INV_TIME)): 161
    Loc: [../../../../lang/qt/tests/t-addexistingsubkey.cpp(238)]
    PASS : AddExistingSubkeyJobTest::cleanupTestCase()
    Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 3564ms
    ********* Finished testing of AddExistingSubkeyJobTest *********

    This shows up on all 32 bit archs with 64bit time that had the build-deps (armhf, armel and as non-relase arch powerpc).

    It is not Debian specific, it also shows up against vanilla gnupg 2.4.7 or 2.5.5.

    cu Andreas

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andreas Metzler@21:1/5 to ametzler@bebt.de on Wed Apr 23 19:20:02 2025
    On 2025-04-21 Andreas Metzler <ametzler@bebt.de> wrote:
    Source: gpgme1.0
    [...]
    FAIL! : AddExistingSubkeyJobTest::testAddExistingSubkeyWithExpiration() Compared values are not the same
    Actual (result.code()) : 0
    Expected (static_cast<int>(GPG_ERR_INV_TIME)): 161
    Loc: [../../../../lang/qt/tests/t-addexistingsubkey.cpp(238)]
    [...]
    This shows up on all 32 bit archs with 64bit time that had the build-deps (armhf, armel and as non-relase arch powerpc).
    [...]

    Hello,

    I think this is probably a real 64bit time issue with gpgmeqt on 32 bit
    archs. Adding a debugging
    printf("DEBUG1 sourceSubkey.expirationTime=%lli\n",
    sourceSubkey.expirationTime());
    to lang/qt/tests/t-addexistingsubkey.cpp L268 after
    const auto result = job->exec(key, sourceSubkey);

    shows this output:
    amd64
    DEBUG1 sourceSubkey.expirationTime=4102488000

    i386
    DEBUG1 sourceSubkey.expirationTime=-18348044646416448

    i386 with -D_TIME_BITS=64
    DEBUG1 sourceSubkey.expirationTime=-192479296

    armhf
    DEBUG1 sourceSubkey.expirationTime=-192479296

    Looking at the respective key we find on amd64 and armhf:
    pub ed25519 2022-01-13 [SC]
    1CB8C6A0317AA83F44FE009932392C82B814C8E0
    uid [ unknown] source-key@example.net
    sub cv25519 2022-01-13 [E]
    sub cv25519 2022-01-13 [E] [expires: 2100-01-01]
    which matches
    ametzler@amdahl:~$ LANG=C date -d @4102488000
    Fri Jan 1 12:00:00 UTC 2100

    (gnupg on i386 says [expires: ????-??-??])

    The tests passes on amd64 and i386 and fails on armhf.

    It also succeeds on i386 with -D_TIME_BITS=64 but I somehow doubt its
    worth investigating deeper there, since I only rebuilt gpgme* itself
    with -D_TIME_BITS=64 but not its rdeps or the gnupg and its rdeps I
    would not expect totally sane behavior.

    cu Andreas
    --
    `What a good friend you are to him, Dr. Maturin. His other friends are
    so grateful to you.'
    `I sew his ears on from time to time, sure'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Debian Bug Tracking System@21:1/5 to All on Wed May 7 18:30:01 2025
    This is a multi-part message in MIME format...

    Your message dated Wed, 07 May 2025 16:19:13 +0000
    with message-id <E1uChUH-00E7kc-4j@fasolo.debian.org>
    and subject line Bug#1103787: fixed in gpgme1.0 1.24.2-3
    has caused the Debian Bug report #1103787,
    regarding gpgme1.0: Testsuite error on 32bit archs with 64bit time (FAIL with gnupg 2.4, SKIP with 2.2)
    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 owner@bugs.debian.org
    immediately.)


    --
    1103787: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103787
    Debian Bug Tracking System
    Contact owner@bugs.debian.org with problems

    Received: (at submit) by bugs.debian.org; 21 Apr 2025 14:59:47 +0000 X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
    (2021-04-09) on buxtehude.debian.org
    X-Spam-Level:
    X-Spam-Status: No, score=-4.1 required=4.0 tests=BAYES_00,DKIM_SIGNED,
    DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FOURLA,SPF_HELO_NONE,SPF_NONE
    autolearn=ham autolearn_force=no
    version=3.4.6-bugs.debian.org_2005_01_02
    X-Spam-Bayes: score:0.0000 Tokens: new, 14; hammy, 150; neutral, 84; spammy,
    0. spammytokens: hammytokens:0.000-+--XDebbugsCc,
    0.000-+--X-Debbugs-Cc, 0.000-+--armhf, 0.000-+--builddeps,
    0.000-+--build-deps
    Return-path: <ametzler@bebt.de>
    Received: from vsrv21575.customer.vlinux.de ([31.15.64.248]:54162)
    by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
    (Exim 4.94.2)
    (envelope-from <ametzler@beb