From b56b56dae25d59aa5fa7c1e169bc84796de31790 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Fri, 6 Nov 2009 20:53:22 +0000 Subject: [PATCH] get build script keys from gsa automatically git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4511 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- buildcore.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index d8d6434e5..d4e6a8c0e 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -9,8 +9,6 @@ # 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 gpg keys from http://pokgsa.ibm.com/projects/x/xcat/build/linux/keys/ to /root/.gnupg -# - Copy repomd.xml.key from http://pokgsa.ibm.com/projects/x/xcat/build/linux/keys/ to /src # - Run this script from the local svn repository you just created. It will create the other # directories that are needed. @@ -23,6 +21,8 @@ # you can change this if you need to UPLOADUSER=bp-sawyers +GSA=http://pokgsa.ibm.com/projects/x/xcat/build/linux + set -x # Process cmd line variable assignments, assigning each attr=val pair to a variable of same name @@ -170,6 +170,13 @@ else fi # Prepare the RPMs for pkging and upload +# get gpg keys in place +mkdir -p $HOME/.gnupg +for i in pubring.gpg secring.gpg trustdb.gpg; do + if [ ! -f $HOME/.gnupg/$i ] || [ `wc -c $HOME/.gnupg/$i|cut -f 1 -d' '` == 0 ]; then + wget -P $HOME/.gnupg $GSA/keys/$i + fi +done # tell rpm to use gpg to sign MACROS=$HOME/.rpmmacros if ! $GREP -q '%_signature gpg' $MACROS 2>/dev/null; then @@ -187,10 +194,10 @@ rm -f $DESTDIR/repodata/repomd.xml.asc gpg -a --detach-sign $DESTDIR/repodata/repomd.xml gpg -a --detach-sign $SRCDIR/repodata/repomd.xml if [ ! -f $DESTDIR/repodata/repomd.xml.key ]; then - cp ../repomd.xml.key $DESTDIR/repodata/repomd.xml.key # copy it from the src dir + wget -P $DESTDIR/repodata $GSA/keys/repomd.xml.key fi if [ ! -f $SRCDIR/repodata/repomd.xml.key ]; then - cp ../repomd.xml.key $SRCDIR/repodata/repomd.xml.key # copy it from the src dir + wget -P $SRCDIR/repodata $GSA/keys/repomd.xml.key fi # make everything have a group of xcat, so anyone can manage them once they get on SF groupadd -f xcat