diff options
author | Emiel Wiedijk <me@aimileus.nl> | 2018-02-27 11:16:24 -0500 |
---|---|---|
committer | Bartłomiej Piotrowski <bpiotrowski@archlinux.org> | 2018-03-24 20:54:17 +0100 |
commit | ffb5003fdacaece3540ba167f7e965a122133af0 (patch) | |
tree | 2b9ac56e1d968ada9ae63b6079e494920f99028f /makechrootpkg.in | |
parent | ab3368f06182cc3f11f672e63ad18f174ba58e02 (diff) | |
download | devtools32-ffb5003fdacaece3540ba167f7e965a122133af0.tar.xz |
makechrootpkg: respect GNUPGHOME
Previously, makechrootpkg hardcoded ~/.gnupg. Therefore, if a user
uses a custom GPG home directory, the siganture checking would fail.
Now makechrootpkg uses $GNUPGHOME, with a fallback to ~/.gnupg.
Signed-off-by: Emiel Wiedijk <me@aimileus.nl>
Diffstat (limited to 'makechrootpkg.in')
-rw-r--r-- | makechrootpkg.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/makechrootpkg.in b/makechrootpkg.in index afcd121..653847f 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -252,7 +252,8 @@ download_sources() { chmod 1777 "$builddir" # Ensure sources are downloaded - sudo -u "$makepkg_user" env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \ + sudo -u "$makepkg_user" --preserve-env=GNUPGHOME \ + env SRCDEST="$SRCDEST" BUILDDIR="$builddir" \ makepkg --config="$copydir/etc/makepkg.conf" --verifysource -o || die "Could not download sources." @@ -341,7 +342,7 @@ main() { [[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.' makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}} - check_root SOURCE_DATE_EPOCH + check_root SOURCE_DATE_EPOCH,GNUPGHOME # Canonicalize chrootdir, getting rid of trailing / chrootdir=$(readlink -e "$passeddir") |