Skip to content

Commit

Permalink
Fix: rpmsign error handling when gpg key is not imported in rpm database
Browse files Browse the repository at this point in the history
Signed-off-by: Miroslav Safr <Miroslav.Safr@gmail.com>
  • Loading branch information
safrm committed Jan 8, 2014
1 parent 7b120f2 commit b18a559
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rpmmake
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,15 @@ if [ $SIGN -eq 1 ]; then
else
rpm --addsign $VERBOSE -D "_signature gpg" -D "_gpg_name $GPG_NAME" "$ENTRY"
fi
rpm --checksig $VERBOSE "$ENTRY"
rpm --checksig $VERBOSE "$ENTRY"
if [ $? != 0 ]; then
echo "Signing rpms failed! "
echo " Maybe the key:$GPGKEY is not imported in rpm database:"
echo " gpg --export -a $GPGKEY > key.asc && rpm --import key.asc"
exit 1
fi
done
}
} || exit 1
fi

#verification
Expand Down

0 comments on commit b18a559

Please sign in to comment.