[arch-projects] [devtools] [PATCH] Use GPGKEY to select signing key

Allan McRae allan at archlinux.org
Sun Apr 17 08:51:23 EDT 2011


Use the default key from the gpg keyring to sign packages unless
GPGKEY is specified (either in makepkg.conf or as an environmental
variable).

Signed-off-by: Allan McRae <allan at archlinux.org>
---
 commitpkg |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/commitpkg b/commitpkg
index 7d533a0..916bdfc 100755
--- a/commitpkg
+++ b/commitpkg
@@ -132,7 +132,10 @@ for _arch in ${arch[@]}; do
 
 		if [[ $SIGNPKG == 'y' ]]; then
 			echo "Signing package ${pkgfile}..."
-			gpg --detach-sign --use-agent -u "${PACKAGER}" "${pkgfile}" || abort
+			if [[ -n $GPGKEY ]]; then
+				SIGNWITHKEY="-u ${GPGKEY}"
+			fi
+			gpg --detach-sign --use-agent ${SIGNWITHKEY} "${pkgfile}" || abort
 		fi
 
 		sigfile="${pkgfile}.sig"
-- 
1.7.4.4



More information about the arch-projects mailing list