Git fork

tests: create gpg homedir on the fly

GnuPG 2.1 homedir looks different, so just create it on the fly by
importing needed private and public keys and ownertrust.

This solves an issue with gnupg 2.1 running interactive pinentry
when old secret key is present.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

authored by

Christian Hesse and committed by
Junio C Hamano
b41a36e6 8213d87a

+11 -3
+7 -3
t/lib-gpg.sh
··· 16 16 # Type DSA and Elgamal, size 2048 bits, no expiration date. 17 17 # Name and email: C O Mitter <committer@example.com> 18 18 # No password given, to enable non-interactive operation. 19 - cp -R "$TEST_DIRECTORY"/lib-gpg ./gpghome 20 - chmod 0700 gpghome 21 - chmod 0600 gpghome/* 19 + mkdir ./gpghome 20 + chmod 0700 ./gpghome 22 21 GNUPGHOME="$(pwd)/gpghome" 23 22 export GNUPGHOME 23 + gpg --homedir "${GNUPGHOME}" --import \ 24 + "$TEST_DIRECTORY"/lib-gpg/pubring.gpg \ 25 + "$TEST_DIRECTORY"/lib-gpg/secring.gpg 26 + gpg --homedir "${GNUPGHOME}" --import-ownertrust \ 27 + "$TEST_DIRECTORY"/lib-gpg/ownertrust 24 28 test_set_prereq GPG 25 29 ;; 26 30 esac
+4
t/lib-gpg/ownertrust
··· 1 + # List of assigned trustvalues, created Thu 11 Dec 2014 01:26:28 PM CET 2 + # (Use "gpg --import-ownertrust" to restore them) 3 + 73D758744BE721698EC54E8713B6F51ECDDE430D:6: 4 + D4BE22311AD3131E5EDA29A461092E85B7227189:3:
t/lib-gpg/random_seed

This is a binary file and will not be displayed.

t/lib-gpg/trustdb.gpg

This is a binary file and will not be displayed.