From 90bac69568bb5c198224317f51b04f8b02de8f30 Mon Sep 17 00:00:00 2001 From: Anirudha Bose Date: Wed, 25 Jun 2014 02:18:41 +0530 Subject: [PATCH] Show a warning to the user if GPG fingerprint is absent --- tools/packaging/README.md | 4 ++++ tools/packaging/debian/debianize.sh | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tools/packaging/README.md b/tools/packaging/README.md index a5750a94..f79f22e2 100644 --- a/tools/packaging/README.md +++ b/tools/packaging/README.md @@ -45,6 +45,10 @@ On a build machine (Electric Commander), make sure the fingerprint is of the person who is supposed to sign the official uploads. You might also want to configure GnuPG to not ask for the passphrase while signing the Debian package. +The [Ubuntu Packaging Guide] contains documentation about creating a GPG key +on an Ubuntu system. +[Ubuntu Packaging Guide]:http://packaging.ubuntu.com/html/getting-set-up.html#create-your-gpg-key + ####Windows (Cygwin) Below is a list of required packages for Windows (Win32-x86): diff --git a/tools/packaging/debian/debianize.sh b/tools/packaging/debian/debianize.sh index d237dc1f..aa3ebe5d 100755 --- a/tools/packaging/debian/debianize.sh +++ b/tools/packaging/debian/debianize.sh @@ -20,6 +20,8 @@ # Uncomment the following line to trace the execution of the shell commands # set -o xtrace +SIGNING_USER=$(gpg --fingerprint | grep uid | sed s/"uid *"//g | tr -s " ") + function tarball_deb { box_draw "Compressing compiled binaries to produce a bzip2 tarball" cd ${workdir} @@ -165,8 +167,6 @@ EOF echo "Create file: debian/changelog" - SIGNING_USER=$(gpg --fingerprint | grep uid | sed s/"uid *"//g | tr -s " ") - cat >> ${prefix}/debian/changelog << EOF cling (${VERSION}-1) unstable; urgency=low @@ -212,6 +212,10 @@ function check_ubuntu { then printf "%-10s\t\t[NOT INSTALLED]\n" "${1}" else - printf "%-10s\t\t[OK]\n" "${1}" + if [ ${1} = "gnupg" -a "${SIGNING_USER}" = "" ]; then + printf "%-10s\t\t[INSTALLED - NOT SETUP]\n" "${1}" + else + printf "%-10s\t\t[OK]\n" "${1}" + fi fi }