From a7cc5d1d85151f3c136929b7c0e24b0af44d2c9c Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Fri, 6 Nov 2009 19:26:12 +0000 Subject: [PATCH] fix signing problems in build script git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4508 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- buildcore.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index c374d188c..02762c9fd 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -5,12 +5,13 @@ # - Check out the xcat-core svn repository (either the trunk or a branch) into # a dir called /src/xcat-core, where is the same as the release dir it will be # uploaded to in sourceforge (e.g. devel, or 2.3). -# - Run this script from the local svn repository you just created. It will create the other -# directories that are needed. # - You probably also want to put root's pub key from the build machine onto sourceforge for # the upload user listed below, so you don't have to keep entering pw's. You can do this # at https://sourceforge.net/account/ssh # - Also make sure createrepo is installed on the build machine +# - Copy the keys from http://pokgsa.ibm.com/projects/x/xcat/build/linux/keys/ to /root/.gnupg +# - Run this script from the local svn repository you just created. It will create the other +# directories that are needed. # Usage: buildcore.sh [attr=value attr=value ...] # PROMOTE=1 - if the attribute "PROMOTE" is specified, means an official dot release. @@ -28,7 +29,7 @@ for i in $*; do declare `echo $i|cut -d '=' -f 1`=`echo $i|cut -d '=' -f 2` done -export HOME=/root # i think this is for sudo purposes +export HOME=/root # This is so rpm and gpg will know home, even in sudo cd `dirname $0` # Strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release @@ -70,7 +71,7 @@ fi # If anything has changed, we should rebuild perl-xCAT BUILDIT=0 -if ! grep 'At revision' $SVNUP; then +if ! $GREP 'At revision' $SVNUP; then BUILDIT=1 fi @@ -168,6 +169,14 @@ else fi # Prepare the RPMs for pkging and upload +# tell rpm to use gpg to sign +MACROS=$HOME/.rpmmacros +if ! $GREP -q '%_signature gpg' $MACROS 2>/dev/null; then + echo '%_signature gpg' >> $MACROS +fi +if ! $GREP -q '%_gpg_name' $MACROS 2>/dev/null; then + echo '%_gpg_name Jarrod Johnson' >> $MACROS +fi build-utils/rpmsign.exp $DESTDIR/*rpm build-utils/rpmsign.exp $SRCDIR/*rpm createrepo $DESTDIR