]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
build-ceph-rpm.sh: Sign rpms
authorGary Lowell <glowell@inktank.com>
Fri, 8 Mar 2013 05:07:29 +0000 (21:07 -0800)
committerGary Lowell <glowell@inktank.com>
Fri, 8 Mar 2013 05:07:29 +0000 (21:07 -0800)
Use the rpm-autosign.exp expect wrapper to handle the prompt
for the passphrase.

Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
build-ceph-rpm.sh

index 71d14bc8d514f0b9f3369ffb24a3635cafbdd602..15acf2ca3fa4b57e2a876624d8e390aa2d349ff8 100755 (executable)
@@ -6,8 +6,7 @@ git submodule foreach 'git clean -fdx && git reset --hard'
 rm -rf ceph-object-corpus
 rm -rf src/leveldb
 rm -rf src/libs3
-git submodule init
-git submodule update
+git submodule update --init
 git clean -fdx
 
 
@@ -58,7 +57,15 @@ cp -a ceph-*.tar.bz2 ${BUILDAREA}/SOURCES/.
 
 # Build RPMs
 BUILDAREA=`readlink -fn ${BUILDAREA}`   ### rpm wants absolute path
-rpmbuild -bb --define "_topdir ${BUILDAREA}" --define "_unpackaged_files_terminate_build 0" ceph.spec
+rpmbuild -ba --define "_topdir ${BUILDAREA}" --define "_unpackaged_files_terminate_build 0" ceph.spec
+
+# Sign RPMS
+export GNUPGHOME=/srv/gnupg
+echo "Signing RPMS ..."
+for file in `find ${BUILDAREA} -name "*.rpm"`
+do
+    /srv/autobuild-ceph/rpm-autosign.exp --define "_gpg_name 03C3951A" $file
+done
 
 REV="$(git rev-parse HEAD)"
 OUTDIR="../out/output/sha1/$REV"
@@ -81,7 +88,7 @@ do
         createrepo $dir
     fi
 done
-cp -a $BUILDAREA/RPMS $OUTDIR_TMP
+cp -a $BUILDAREA/{RPMS,SRPMS} $OUTDIR_TMP
 rm -rf -- "$BUILDAREA"
 
 # put our temp files inside .git/ so ls-files doesn't see them