[Pkg-rust-maintainers] libreoffice test failure with gpg-for-sq
Alexander Kjäll
alexander.kjall at gmail.com
Sun Aug 17 12:39:05 BST 2025
Hi
I tried tracing through the libreoffice code to find out what gpg
invocation is used, but that was a bit too hard.
My guess is that gpg gets invoked with a combination of command line
arguments that gpg-from-sq doesn't support yet, but that's just a
guess.
Is there a simple way to only run that test, if so it would be
possible to verify that with the help of strace.
best regards
Alexander Kjäll
Den sön 13 apr. 2025 kl 20:26 skrev Rene Engelhard <rene at debian.org>:
>
> Hi,
>
> before filing a important(?) bug, let's ask here first (especially because of the issues asked at the end):
>
> I got the following surprising test failure in libreoffice 4:25.2.3~rc1-1 uploaded to experimental[1]:
>
> [build CUT] xmlsecurity_signing
> S=/build/reproducible-path/libreoffice-25.2.3~rc1 && I=$S/instdir && W=$S/workdir && mkdir -p $W/CppunitTest/ && rm -fr $W/CppunitTest/xmlsecurity_signing.test.user && cp -r $W/unittest $W/CppunitTest/xmlsecurity_signing.test.user && rm -fr $W/CppunitTest/xmlsecurity_signing.test.core && mkdir $W/CppunitTest/xmlsecurity_signing.test.core && cd $W/CppunitTest/xmlsecurity_signing.test.core && ( MAX_CONCURRENCY=4 MOZILLA_CERTIFICATE_FOLDER=dbm: SAL_DISABLE_SYNCHRONOUS_PRINTER_DETECTION=1 SAL_USE_VCLPLUGIN=svp LIBO_LANG=C LIBO_LD_PATH=$LD_LIBRARY_PATH LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}"$I/program:$I/program":$W/UnpackedTarball/cppunit/src/cppunit/.libs LO_RUNNING_UNIT_TEST=1 $W/LinkTarget/Executable/cppunittester $W/LinkTarget/CppunitTest/libtest_xmlsecurity_signing.so --headless "-env:BRAND_BASE_DIR=file://$S/instdir" "-env:BRAND_SHARE_SUBDIR=share" "-env:BRAND_SHARE_RESOURCE_SUBDIR=program/resource" "-env:UserInstallation=file://$W/CppunitTest/xmlsecurity_signing.test.user" "-env:CONFIGURATION_LAYERS=xcsxcu:file://$I/share/registry xcsxcu:file://$W/unittest/registry-common xcsxcu:file://$W/unittest/registry-user-ui" "-env:UNO_TYPES=file://$I/program/types.rdb file://$I/program/types/offapi.rdb" "-env:UNO_SERVICES=file://$W/Rdb/ure/services.rdb file://$W/Rdb/services.rdb" -env:URE_BIN_DIR=file://$I/program -env:URE_INTERNAL_LIB_DIR=file://$I/program -env:LO_LIB_DIR=file://$I/program -env:LO_JAVA_DIR=file://$I/program/classes --protector $W/LinkTarget/Library/unoexceptionprotector.so unoexceptionprotector --protector $W/LinkTarget/Library/unobootstrapprotector.so unobootstrapprotector --protector $W/LinkTarget/Library/libvclbootstrapprotector.so vclbootstrapprotector -env:arg-env=LD_LIBRARY_PATH"${LD_LIBRARY_PATH+=$LD_LIBRARY_PATH}" "-env:CPPUNITTESTTARGET=$W/CppunitTest/xmlsecurity_signing.test" ) 2>&1
> [_RUN_____] aaa_testODFX509CertificateChain::TestBody
> aaa_testODFX509CertificateChain::TestBody finished in: 284ms
> [_RUN_____] test96097Calc::TestBody
> test96097Calc::TestBody finished in: 212ms
> [_RUN_____] test96097Doc::TestBody
> test96097Doc::TestBody finished in: 179ms
> [_RUN_____] testDNCompatibility::TestBody
> testDNCompatibility::TestBody finished in: 1ms
> [_RUN_____] testDescription::TestBody
> testDescription::TestBody finished in: 108ms
> [_RUN_____] testDropMacroTemplateSignature::TestBody
> testDropMacroTemplateSignature::TestBody finished in: 293ms
> [_RUN_____] testECDSA::TestBody
> testECDSA::TestBody finished in: 101ms
> [_RUN_____] testECDSAOOXML::TestBody
> testECDSAOOXML::TestBody finished in: 33ms
> [_RUN_____] testECDSAPDF::TestBody
> testECDSAPDF::TestBody finished in: 31ms
> [_RUN_____] testImplicitScriptSign::TestBody
> testImplicitScriptSign::TestBody finished in: 16ms
> [_RUN_____] testInvalidZIP::TestBody
> testInvalidZIP::TestBody finished in: 38ms
> [_RUN_____] testODFBroken::TestBody
> testODFBroken::TestBody finished in: 30ms
> [_RUN_____] testODFBrokenDsigGPG::TestBody
> testODFBrokenDsigGPG::TestBody finished in: 230ms
> [_RUN_____] testODFBrokenStreamGPG::TestBody
> testODFBrokenStreamGPG::TestBody finished in: 234ms
> [_RUN_____] testODFDoubleX509Certificate::TestBody
> testODFDoubleX509Certificate::TestBody finished in: 42ms
> [_RUN_____] testODFDoubleX509Data::TestBody
> testODFDoubleX509Data::TestBody finished in: 46ms
> [_RUN_____] testODFGood::TestBody
> testODFGood::TestBody finished in: 29ms
> [_RUN_____] testODFGoodGPG::TestBody
> ./xmlsecurity/qa/unit/signing/signing.cxx:1259:testODFGoodGPG::TestBody
> equality assertion failed
> - Expected: 1
> - Actual : 2
> - 2
>
> testODFGoodGPG::TestBody finished in: 233ms
> [_RUN_____] testODFMacroDoubleX509Data::TestBody
> testODFMacroDoubleX509Data::TestBody finished in: 70ms
> [_RUN_____] testODFNo::TestBody
> testODFNo::TestBody finished in: 31ms
> [_RUN_____] testODFTripleX509Data::TestBody
> testODFTripleX509Data::TestBody finished in: 33ms
> [_RUN_____] testODFUnsignedTimestamp::TestBody
> testODFUnsignedTimestamp::TestBody finished in: 35ms
> [_RUN_____] testODFUntrustedGoodGPG::TestBody
> testODFUntrustedGoodGPG::TestBody finished in: 97ms
> [_RUN_____] testOOXMLAppend::TestBody
> testOOXMLAppend::TestBody finished in: 14ms
> [_RUN_____] testOOXMLBroken::TestBody
> testOOXMLBroken::TestBody finished in: 33ms
> [_RUN_____] testOOXMLDescription::TestBody
> testOOXMLDescription::TestBody finished in: 32ms
> [_RUN_____] testOOXMLPartial::TestBody
> testOOXMLPartial::TestBody finished in: 33ms
> [_RUN_____] testOOXMLRemove::TestBody
> testOOXMLRemove::TestBody finished in: 9ms
> [_RUN_____] testOOXMLRemoveAll::TestBody
> testOOXMLRemoveAll::TestBody finished in: 5ms
> [_RUN_____] testPDFAddVisibleSignature::TestBody
> testPDFAddVisibleSignature::TestBody finished in: 100ms
> [_RUN_____] testPDFBad::TestBody
> testPDFBad::TestBody finished in: 98ms
> [_RUN_____] testPDFGood::TestBody
> testPDFGood::TestBody finished in: 107ms
> [_RUN_____] testPDFHideAndReplace::TestBody
> testPDFHideAndReplace::TestBody finished in: 131ms
> [_RUN_____] testPDFNo::TestBody
> testPDFNo::TestBody finished in: 90ms
> [_RUN_____] testPreserveMacroTemplateSignature10::TestBody
> testPreserveMacroTemplateSignature10::TestBody finished in: 582ms
> [_RUN_____] testPreserveMacroTemplateSignature12_ODF::TestBody
> ./xmlsecurity/qa/unit/signing/signing.cxx:1374:testPreserveMacroTemplateSignature12_ODF::TestBody
> equality assertion failed
> - Expected: 1
> - Actual : 2
> - ./xmlsecurity/qa/unit/signing/signing.cxx:1401
>
> testPreserveMacroTemplateSignature12_ODF::TestBody finished in: 260ms
> [_RUN_____] testSignatureLineODF::TestBody
> testSignatureLineODF::TestBody finished in: 47ms
> [_RUN_____] testSignatureLineOOXML::TestBody
> testSignatureLineOOXML::TestBody finished in: 4ms
> [_RUN_____] testSigningMultipleTimes_ODT::TestBody
> testSigningMultipleTimes_ODT::TestBody finished in: 173ms
> [_RUN_____] testSigningMultipleTimes_OOXML::TestBody
> testSigningMultipleTimes_OOXML::TestBody finished in: 85ms
> [_RUN_____] testXAdES::TestBody
> testXAdES::TestBody finished in: 105ms
> [_RUN_____] testXAdESGood::TestBody
> testXAdESGood::TestBody finished in: 33ms
> [_RUN_____] testXAdESNotype::TestBody
> testXAdESNotype::TestBody finished in: 17ms
> signing.cxx:1259:Assertion
> Test name: testODFGoodGPG::TestBody
> equality assertion failed
> - Expected: 1
> - Actual : 2
> - 2
>
> signing.cxx:1374:Assertion
> Test name: testPreserveMacroTemplateSignature12_ODF::TestBody
> equality assertion failed
> - Expected: 1
> - Actual : 2
> - ./xmlsecurity/qa/unit/signing/signing.cxx:1401
>
> Failures !!!
> Run: 43 Failure total: 2 Failures: 2 Errors: 0
> make[3]: *** [/build/reproducible-path/libreoffice-25.2.3~rc1/solenv/gbuild/CppunitTest.mk:130: /build/reproducible-path/libreoffice-25.2.3~rc1/workdir/CppunitTest/xmlsecurity_signing.test] Error 1
> make[3]: Leaving directory '/build/reproducible-path/libreoffice-25.2.3~rc1'
> make[2]: *** [Makefile:301: build] Error 2
> make[2]: Leaving directory '/build/reproducible-path/libreoffice-25.2.3~rc1'
> make[1]: *** [/build/reproducible-path/libreoffice-25.2.3~rc1/debian/rules:2645: check] Error 2
> make[1]: Leaving directory '/build/reproducible-path/libreoffice-25.2.3~rc1'
> make: *** [debian/rules:2513: debian/stampdir/build-arch] Error 2
> dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
>
> There hasn't been any changes between 4:25.2-2-1 from sid and this which would explain this. A local
> sbuild build even worked with 4:25.2.3~rc1-1.
>
> libreoffice has
>
> $ grep gpg control
> gpg [!alpha !armel !armhf !hppa !i386 !ia64 !kfreebsd-amd64 !kfreebsd-i386 !loong64 !m68k !mips !mipsel !mips64 !mips64el !powerpc !powerpcspe !ppc64 !ppc64el !riscv64 !s390x !sparc !sparc64] <!nocheck>,
> gpg-agent [!alpha !armel !armhf !hppa !i386 !ia64 !kfreebsd-amd64 !kfreebsd-i386 !loong64 !m68k !mips !mipsel !mips64 !mips64el !powerpc !powerpcspe !ppc64 !ppc64el !riscv64 !s390x !sparc !sparc64] <!nocheck>,
> gpgconf [!alpha !armel !armhf !hppa !i386 !ia64 !kfreebsd-amd64 !kfreebsd-i386 !loong64 !m68k !mips !mipsel !mips64 !mips64el !powerpc !powerpcspe !ppc64 !ppc64el !riscv64 !s390x !sparc !sparc64] <!nocheck>,
> libgpg-error-dev,
> libgpgme-dev,
> libgpgmepp-dev,
>
> in Build-Depends-Arch:
>
> The difference between both is that on the buildd gpg-for-sq 0.13.1-3 etc. got installed whereas in my local sbuild build gpg as in gpg 2.4.7-14 was installed,
> and that one passed.
> Indeed, after installing gpg-for-sq in a container which had a working build before makes it fail, removing it makes it work again.
>
> That test is
> https://cgit.freedesktop.org/libreoffice/core/tree/xmlsecurity/qa/unit/signing/signing.cxx?h=libreoffice-25-2-3#n1247
>
> key material is
> https://cgit.freedesktop.org/libreoffice/core/tree/test/signing-keys?h=libreoffice-25-2-3
>
> I wonder whether it has to do with
> // Our local gpg config fully trusts the signing cert, so in
> // contrast to the X509 test we can fail on NOTVALIDATED here
> but that "local gpg conf" is apparently simply what gpgconf outputs (but that said, gpgconf is from gpgconf,
> and that one is not diverted).
>
> Is that the explanation or is there some other incompatibility here?
>
> I could do
>
> diff --git a/changelog b/changelog
> index 9dbe0778b..28785cba4 100644
> --- a/changelog
> +++ b/changelog
> @@ -7,6 +7,9 @@ libreoffice (4:25.2.2-2) UNRELEASED; urgency=medium
> - allow /etc/paperspecs (used by paperconf) (closes: #1100930)
> * debian/po:
> - add ca.po (closes: #1102089)
> + * debian/rules:
> + - add Build-Conflicts: gpg-from-sq <!nocheck> [$(OOO_CHECK_ARCHS)], since
> + xmlsecurity_signing fails with gpg being gpg-from-sq
>
> -- Rene Engelhard <rene at debian.org> Sun, 30 Mar 2025 11:35:54 +0200
>
> diff --git a/control b/control
> index 38592e9f2..f96c04a65 100644
> --- a/control
> +++ b/control
> @@ -247,6 +247,7 @@ Build-Depends-Indep: ant [!armel !armhf !hppa !kfreebsd-amd64 !kfreebsd-i386 !mi
> symlinks
> Build-Conflicts: amd-libopencl1,
> clang [alpha hppa ia64 m68k mips mipsel mips64 mips64el powerpc powerpcspe ppc64 ppc64el s390x sparc sparc64],
> + gpg-from-sq [amd64 arm64] <!nocheck>,
> nvidia-glx-dev,
> nvidia-glx-legacy-dev,
> nvidia-libopencl1
> diff --git a/rules b/rules
> index a14f40dd3..447fef711 100755
> --- a/rules
> +++ b/rules
> @@ -2354,6 +2354,10 @@ else
> perl -pi -e "s/(Build-Conflicts: .*)/\1,clang [$(filter-out $(OOO_CLANG_SUPPORTED_ARCHS),$(OOO_ARCHS))],/" debian/control.new
> endif
>
> +ifeq "$(RUN_MAKE_CHECK)" "y"
> + perl -pi -e "s/(Build-Conflicts: .*)/\1,gpg-from-sq [$(OOO_CHECK_ARCHS)] <!nocheck>,/" debian/control.new
> +endif
> +
> $(PYTHON) debian/scripts/joinctrl.py < debian/control.new > debian/control.tmp
> mv debian/control.tmp debian/control.new
>
> as a workaround, but...
>
> Regards,
>
> Rene
More information about the Pkg-rust-maintainers
mailing list