[pkg-gnupg-maint] Bug#818997: Bug#818997: gpgv.exe linked dynamically against zlib1, doesn't allow proper signature verification

Antonio Terceiro terceiro at debian.org
Thu Mar 24 17:41:54 UTC 2016


On Thu, Mar 24, 2016 at 03:07:01PM +0100, Didier 'OdyX' Raboud wrote:
> Le mercredi, 23 mars 2016, 23.14:59 Daniel Kahn Gillmor a écrit :
> > On Tue 2016-03-22 12:49:10 -0400, Didier 'OdyX' Raboud wrote:
> > > (By the way, the CI seems to have never run successfully in the last
> > > months: https://ci.debian.net/packages/g/gnupg/unstable/amd64/ …)
> > 
> > this appears to be because of uninstallable dependencies; the tests
> > can really only run on i386 systems or multiarch systems, right?  is
> > wine32 available in amd64?
> 
> As far as I understand it, wine32 is only available on i386, and the 
> current way to install it on amd64 hosts is through multiarch.
> 
> > I don't see any other architectures available at
> > https://ci.debian.net/packages/g/gnupg/unstable/, and i'm assuming
> > that the amd64 ci tester isn't multiarch.  or am i misinterpreting
> > something?
> 
> CC'ing Antonio: there's no way to setup multiarch within an autopkgtest, 
> right ?

there is a way to do almost anything :)

the caveat in this case is that since wine32 is not directly installable
in a plain amd64 system, you can't declare it as test dependency, but
you can say that the test requires root permissions, and do whatever
special setup you need from within the test itself.

You want something like this:

----------------8<----------------8<----------------8<-----------------
diff -Nru gnupg-1.4.20.orig/debian/tests/control gnupg-1.4.20/debian/tests/control
--- gnupg-1.4.20.orig/debian/tests/control	2016-03-24 14:12:58.824795760 -0300
+++ gnupg-1.4.20/debian/tests/control	2016-03-24 14:32:39.620589105 -0300
@@ -1,2 +1,4 @@
 Tests: gpgv-win32
-Depends: gpgv-win32, wine, wine32, gpg
+Depends: gpgv-win32, gnupg
+Restrictions: needs-root, allow-stderr
+
diff -Nru gnupg-1.4.20.orig/debian/tests/gpgv-win32 gnupg-1.4.20/debian/tests/gpgv-win32
--- gnupg-1.4.20.orig/debian/tests/gpgv-win32	2016-03-24 14:12:58.824795760 -0300
+++ gnupg-1.4.20/debian/tests/gpgv-win32	2016-03-24 14:22:55.133470431 -0300
@@ -4,6 +4,25 @@
 
 export GNUPGHOME=$(mktemp -d)
 
+arch=$(dpkg --print-architecture)
+
+case "$arch" in
+     amd64)
+          echo "I: setting up multiarch"
+          dpkg --add-architecture i386
+          apt-get update # FIXME you might want to try this up to some N times to avoid failures on temporary network issues
+          ;;
+     i386)
+          : nothing, tests should just work
+          ;;
+     *)
+          echo "I: skipping tests, only works on amd64 or i386"
+          exit
+          ;;
+esac
+
+DEBIAN_FRONTEND=noninteractive apt-get install -qy wine wine32 # FIXME ditto
+
 # Generate a minimal signing key:
 gpg --batch --quick-random --gen-key <<EOF
      %echo Generating a basic OpenPGP key
----------------8<----------------8<----------------8<-----------------

The above patch solves the installability issue, but the test still fails for
me. The portion of the log after the installation phase looks like this:

----------------8<----------------8<----------------8<-----------------
gpg: keyring `/tmp/tmp.x25uIeTpqk/secring.gpg' created
gpg: keyring `/tmp/tmp.x25uIeTpqk/pubring.gpg' created
gpg: Generating a basic OpenPGP key
..+++++
..+++++
gpg: /tmp/tmp.x25uIeTpqk/trustdb.gpg: trustdb created
gpg: key 297E78C0 marked as ultimately trusted
gpg: done
gpgv: Signature made Thu Mar 24 17:33:37 2016 UTC using RSA key ID 297E78C0
gpgv: Good signature from "Test key for gpgv-win32 <test-key at example.com>"
wine: created the configuration directory '/root/.wine'
Executing wine (wineserver32) 1.8.1 on Debian stretch/sid (amd64).
If something goes wrong, please rerun with "WINEDEBUG=err+all wine"
for more detailed debugging output.
Could not load wine-gecko. HTML rendering will be disabled.
wine: configuration in '/root/.wine' has been updated.
adt-run [14:33:38]: test gpgv-win32: -----------------------]
adt-run [14:33:39]: test gpgv-win32:  - - - - - - - - - - results - - - - - - - - - -
gpgv-win32           FAIL non-zero exit status 53
adt-run [14:33:39]: @@@@@@@@@@@@@@@@@@@@ summary
gpgv-win32           FAIL non-zero exit status 53
----------------8<----------------8<----------------8<-----------------

maybe you need to wrap the wine call with xvfb-run or something like
that? or maybe it's related to running wine as root (which is probably as
scary as it sounds), so you could also create a fresh user to run the
gpg commands as.

you may also want to do `set -x` in the test script, probably right
after the setup phase, to make every step obvious in the log output.

-- 
Antonio Terceiro <terceiro at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnupg-maint/attachments/20160324/7f5fbe78/attachment.sig>


More information about the pkg-gnupg-maint mailing list