- cat keys/joesixpack.pub keys/marvinparanoid.pub > keys/double.pub
- cat keys/joesixpack.sec keys/marvinparanoid.sec > keys/double.sec
- cp -a keys/double.pub rootdir/etc/apt/trusted.gpg.d/double.gpg
- cp -a keys/testcase-multikey.pub rootdir/etc/apt/trusted.gpg.d/multikey.gpg
- testsuccess aptkey --quiet --keyring keys/double.pub --secret-keyring keys/double.sec --readonly \
- adv --batch --yes -u 'Marvin' -u 'Joe' --armor --detach-sign --sign --output signature.gpg signature
- testsuccess test -s signature.gpg -a -s signature
-
- for GPGV in '' 'gpgv' 'gpgv2'; do
- echo "APT::Key::GPGVCommand \"$GPGV\";" > rootdir/etc/apt/apt.conf.d/00gpgvcmd
+ cat "${KEYDIR}/joesixpack.pub" "${KEYDIR}/marvinparanoid.pub" > "${KEYDIR}/double.pub"
+ cat "${KEYDIR}/joesixpack.sec" "${KEYDIR}/marvinparanoid.sec" > "${KEYDIR}/double.sec"
+ cp -a "${KEYDIR}/double.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/double.gpg"
+ cp -a "${KEYDIR}/testcase-multikey.pub" "${ROOTDIR}/etc/apt/trusted.gpg.d/multikey.gpg"
+ rm -f "${SIGNATURE}.gpg"
+ testsuccess aptkey --quiet --keyring "${KEYDIR}/double.pub" --secret-keyring "${KEYDIR}/double.sec" --readonly \
+ adv --batch --yes -u 'Marvin' -u 'Joe' --armor --detach-sign --sign --output "${SIGNATURE}.gpg" "${SIGNATURE}"
+ testsuccess test -s "${SIGNATURE}.gpg" -a -s "${SIGNATURE}"
+
+ for GPGV in '' 'gpgv' 'gpgv1' 'gpgv2'; do
+ echo "APT::Key::GPGVCommand \"$GPGV\";" > "${ROOTDIR}/etc/apt/apt.conf.d/00gpgvcmd"
+ if [ -n "$GPGV" ] && ! command dpkg -l gnupg1 2>&1 | grep -q '^ii'; then continue; fi