From afc93f3430fae17291edabb8d280d1cb532d9c7c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 15 Feb 2012 20:11:03 +1000 Subject: Always sign unsigned packages We do not allow packages to be uploaded without signatures so force all unsigned packages to be signed. This has the bonus of not breaking makepkg signing support by requiring you use an internal makepkg variable. Signed-off-by: Allan McRae Signed-off-by: Pierre Schmitz --- commitpkg.in | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/commitpkg.in b/commitpkg.in index 8139090..4ce0f7b 100644 --- a/commitpkg.in +++ b/commitpkg.in @@ -143,21 +143,17 @@ for _arch in ${arch[@]}; do uploads+=("$pkgfile") sigfile="${pkgfile}.sig" - if [[ $SIGNPKG == 'y' && ! -f $sigfile ]]; then + if [[ ! -f $sigfile ]]; then msg "Signing package ${pkgfile}..." if [[ -n $GPGKEY ]]; then SIGNWITHKEY="-u ${GPGKEY}" fi gpg --detach-sign --use-agent ${SIGNWITHKEY} "${pkgfile}" || die fi - if [[ -f $sigfile ]]; then - if ! gpg --verify "$sigfile" >/dev/null 2>&1; then - die "Signature ${pkgfile}.sig is incorrect!" - fi - uploads+=("$sigfile") - else - die "Signature ${pkgfile}.sig was not found" + if ! gpg --verify "$sigfile" >/dev/null 2>&1; then + die "Signature ${pkgfile}.sig is incorrect!" fi + uploads+=("$sigfile") done done -- cgit v1.2.3