[arch-projects] [devtools] [PATCH v2] makechrootpkg: respect GNUPGHOME
Emiel Wiedijk
me at aimileus.nl
Tue Feb 27 16:16:24 UTC 2018
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 at aimileus.nl>
---
makechrootpkg.in | 5 +++--
1 file 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")
--
2.16.2
More information about the arch-projects
mailing list