[Pkg-gnupg-maint] Bug#778877: Bug#778877: making the gnupg package reproducible

Daniel Kahn Gillmor dkg at fifthhorseman.net
Sun Mar 22 22:34:57 UTC 2015

On Sun 2015-03-22 15:46:31 -0500, Ian Jackson wrote:
> Daniel Kahn Gillmor writes ("Re: [Pkg-gnupg-maint] Bug#778877: Bug#778877: making the gnupg package	reproducible"):
>> (adding Ian, Iustin, and Stefano to Cc here, since this involves
>> autopkgtest and they're drivers of DEP8; adding wine at packages.debian.org
>> since it involves wine; see https://bugs.debian.org/778877 for
>> background)
> ...
>> right, this is what i see on a minimal amd64 system with wine and
>> gpgv-win32 installed:
>> dkg at test:~$ wine /usr/share/win32/gpgv.exe --keyring Z:\\/tmp/tmp.7hMKKepWqq/pubring.gpg Z:\\/home/dkg/gpgv-win32.gpg Z:\\/home/dkg/gpgv-win32
>> it looks like multiarch needs to be enabled.  as root, please
>> execute "dpkg --add-architecture i386 && apt-get update &&
> So on amd64 "wine" is a dummy package which prints that error
> message ?  That's not really particularly helpful.
> I would have thought that the answer would be to include a proer
> dependency in the Depends for the particular test.  Eg, "Depends:
> wine32".

hm, that does seem like the simplest answer, except that wine32
apparently doesn't provide /usr/bin/wine, so i guess we need to Depends:
wine, wine32 together.

I've gone with the following patch (not yet uploaded to experimental).
Please let me know if you see any problems with it.

Thanks for the review and discussion.


diff --git a/debian/control b/debian/control
index ce07ac9..e0b518d 100644
--- a/debian/control
+++ b/debian/control
@@ -17,6 +17,7 @@ Build-Depends: debhelper (>> 9),
                libusb-dev [!hurd-i386],
 Build-Depends-Indep: mingw-w64
+XS-Testsuite: autopkgtest
 Homepage: https://www.gnupg.org
 Vcs-Browser: https://anonscm.debian.org/gitweb/?p=pkg-gnupg/gnupg.git
 Vcs-Git: git://anonscm.debian.org/pkg-gnupg/gnupg.git
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..cea1cf6
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,2 @@
+Tests: gpgv-win32
+Depends: gpgv-win32, wine, wine32, gpg
diff --git a/debian/tests/gpgv-win32 b/debian/tests/gpgv-win32
new file mode 100644
index 0000000..d00ece1
--- /dev/null
+++ b/debian/tests/gpgv-win32
@@ -0,0 +1,28 @@
+set -e
+export GNUPGHOME=$(mktemp -d)
+# Generate a minimal signing key:
+gpg --batch --quick-random --gen-key <<EOF
+     %echo Generating a basic OpenPGP key
+     Key-Type: RSA
+     Key-Length: 1024
+     Key-Usage: sign
+     Name-Real: Test key for gpgv-win32
+     Name-Email: test-key at example.com
+     Expire-Date: 2d
+     %commit
+     %echo done
+# Sign this very script
+rm -f "${0}.gpg"
+gpg --output "${0}.gpg" --detach-sign "${0}"
+# Verify using gpgv
+gpgv --keyring "$GNUPGHOME/pubring.gpg" "${0}.gpg" "${0}"
+# Verify using gpgv.exe
+wine /usr/share/win32/gpgv.exe --keyring "Z:\\\\${GNUPGHOME}/pubring.gpg" "Z:\\\\$(pwd)/${0}.gpg" "Z:\\\\$(pwd)/${0}"

More information about the autopkgtest-devel mailing list