diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-05-30 11:38:15 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-05-30 14:11:18 -0400 |
commit | d28376fb2af27cb65fd8c4253079ec65d646275a (patch) | |
tree | 0660335a851080d617c1c9a770c60d5a778b8926 /test/testenv | |
parent | e82b5cfd25ea3164e33ac584b48e51f48f0c95c0 (diff) |
test/libremakepkg: Verify that it correctly handles source signatures [ci-skip]
Diffstat (limited to 'test/testenv')
-rwxr-xr-x | test/testenv | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/testenv b/test/testenv index 36ae826..9357269 100755 --- a/test/testenv +++ b/test/testenv @@ -45,14 +45,29 @@ export LIBRETOOLS_LIBDIR="$destdir/usr/lib/libretools" export XBS_LIBDIR="$destdir/usr/lib/xbs" export HOME=$TMPDIR/home + export GNUPGHOME="$HOME/.gnupg" export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" export _librelib_conf_sh_sysconfdir="$destdir/etc" export _librelib_conf_sh_pkgconfdir="$destdir/etc/libretools.d" + mkdir -p -- "$GNUPGHOME" + chmod 700 -- "$GNUPGHOME" + unset GPGKEY + gpg --quiet --no-tty --batch --gen-key <<-eot + Key-Type: default + Key-Usage: sign + Name-Real: Bob Tester + Name-Email: tester@localhost + Expire-Date: 0 + %no-protection + %commit + eot + export GPGKEY="$(gpg --quiet --list-secret-keys --with-colons | awk -F: '/^sec:/{print substr($5,9)}')" + # Hack to respect our variables in sudo _sudo() { - local vars=(TMPDIR PATH LIBRETOOLS_LIBDIR XDG_CACHE_HOME XDG_CONFIG_HOME _librelib_conf_sh_sysconfdir) + local vars=(TMPDIR PATH LIBRETOOLS_LIBDIR GNUPGHOME XDG_CACHE_HOME XDG_CONFIG_HOME _librelib_conf_sh_sysconfdir GPGKEY) local env=() local var for var in "${vars[@]}"; do |