From 0d7e23fe56d4047b5727c1dde742741598004e9f Mon Sep 17 00:00:00 2001 From: Chris Frey Date: Mon, 5 Dec 2011 20:11:41 -0500 Subject: [PATCH] maint: added signed repomd.xml file support to make-yum.sh, for opensuse --- maintainer/make-yum.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/maintainer/make-yum.sh b/maintainer/make-yum.sh index bd3b953d..f3a0ed83 100755 --- a/maintainer/make-yum.sh +++ b/maintainer/make-yum.sh @@ -12,16 +12,34 @@ if [ -z "$1" ] ; then exit 1 fi +if [ -z "$GPG_AGENT_INFO" ] ; then + echo "Press enter to continue if gpg-agent is running," + echo "Otherwise, run:" + echo + echo " eval \$(gpg-agent --daemon)" + echo + echo "to preserve your sanity." + read +fi + BUILDDIR="$1" # Sign all RPMs found under $BUILDDIR/ rpmsign --addsign $(find $BUILDDIR -name "*.rpm" -print) # Create the YUM repo files for each architecture -for arch in i386 source-i386 i686 source-i686 x86_64 source-x86_64 ; do +for arch in i386 source-i386 i586 source-i586 i686 source-i686 x86_64 source-x86_64 ; do for dir in $(find $BUILDDIR -name "$arch" -type d -print) ; do createrepo $dir cp yum/key $dir/RPM-GPG-KEY-binary-meta done done +# Sign the repomd.xml files (opensuse checks for this) +for rfile in $(find $BUILDDIR -type f -name "repomd.xml" -print) ; do + gpg --use-agent --default-key B6C2250E --armor \ + --output $rfile.asc \ + --detach-sign $rfile + cp yum/key $rfile.key +done + -- 2.11.4.GIT