From aeb7bc193ff54729710fae01695e4a995c502557 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 1 Mar 2022 13:03:35 -0300 Subject: [PATCH] Fix importPrivateKey() bug --- pkgbuild.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index 502b7b5..3ad72a3 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -34,7 +34,7 @@ installAurDeps() { importPrivateKey() { echo "$gpgPrivateKey" > private.key gpgFlags=("--batch" "--pinentry-mode" "loopback" "--passphrase") - gpg "${gpgFlags[@]}" "$gpgPassphrase" --import private.key + sudo -u nobody gpg "${gpgFlags[@]}" "$gpgPassphrase" --import private.key rm private.key sedCommand="gpg ${gpgFlags[*]} \"$gpgPassphrase\"" makepkgSigFile="/usr/share/makepkg/integrity/generate_signature.sh" @@ -44,7 +44,6 @@ importPrivateKey() { buildPackage() { if [ -n "$gpgPrivateKey" ] && [ -n "$gpgPublicKey" ]; then importPrivateKey - gpg --list-sigs sudo -u nobody makepkg -s --sign --key "$gpgPublicKey" --noconfirm else sudo -u nobody makepkg -s --noconfirm