<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 14-06-07 03:57 PM, Stephen Kitt
wrote:<br>
</div>
<blockquote cite="mid:20140607215748.0621a27f@heffalump.sk2.org"
type="cite">
<pre wrap="">From 283b89da292ad8a5743222baf33393d964cff54b Mon Sep 17 00:00:00 2001
From: Stephen Kitt <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:skitt@debian.org"><skitt@debian.org></a>
Date: Sun, 1 Jun 2014 14:46:01 +0200
Subject: [PATCH util/modular] Add gpg signing to release.sh
gpg-sign the git tag and the generated tarballs, and upload the signatures
along with the tarballs. Any existing tarball signatures are removed
beforehand.
Signed-off-by: Stephen Kitt <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:skitt@debian.org"><skitt@debian.org></a>
Modified by Alan Coopersmith to handle gpg vs. gpg2 paths for Solaris.
Signed-off-by: Alan Coopersmith <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:alan.coopersmith@oracle.com"><alan.coopersmith@oracle.com></a>
---
release.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 46 insertions(+), 2 deletions(-)
diff --git a/release.sh b/release.sh
index a4a725d..6389bc6 100755
--- a/release.sh
+++ b/release.sh
@@ -193,6 +193,29 @@ process_modules() {
}
#------------------------------------------------------------------------------
+# Function: sign_or_fail
+#------------------------------------------------------------------------------
+#
+# Sign the given file, if any
+# Output the name of the signature generated to stdout (all other output to
+# stderr)
+# Return 0 on success, 1 on fail
+#
+sign_or_fail() {
+ if [ -n "$1" ]; then
+ sig=$1.sig
+ rm -f $sig
+ $GPG -b $1 1>&2
+ if [ $? -ne 0 ]; then
+ echo "Error: failed to sign $1." >&2
+ return 1
+ fi
+ echo $sig</pre>
</blockquote>
This echo statement does not appear for me. Perhaps because the
function is called from $(). I do get the gpg message:<br>
<blockquote><tt>You need a passphrase to unlock the secret key for</tt><tt><br>
</tt><tt>user: "Gaetan Nadon <a class="moz-txt-link-rfc2396E" href="mailto:memsize@videotron.ca"><memsize@videotron.ca></a>"</tt><tt><br>
</tt><tt>1024-bit DSA key, ID FB9EC9FC, created 2008-12-16</tt><tt><br>
</tt></blockquote>
Not a big deal,<br>
<br>
Reviewed-by: Gaetan Nadon<a class="moz-txt-link-rfc2396E" href="mailto:memsize@videotron.ca"><memsize@videotron.ca></a><br>
<br>
<br>
</body>
</html>