Return-Path: X-Original-To: apmail-aries-commits-archive@www.apache.org Delivered-To: apmail-aries-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B502995C for ; Tue, 26 Jun 2012 20:26:34 +0000 (UTC) Received: (qmail 35682 invoked by uid 500); 26 Jun 2012 20:26:34 -0000 Delivered-To: apmail-aries-commits-archive@aries.apache.org Received: (qmail 35594 invoked by uid 500); 26 Jun 2012 20:26:33 -0000 Mailing-List: contact commits-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list commits@aries.apache.org Received: (qmail 35581 invoked by uid 99); 26 Jun 2012 20:26:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 20:26:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jun 2012 20:26:31 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 87C752388A4A; Tue, 26 Jun 2012 20:26:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1354206 - /aries/scripts/verify_staged_release.sh Date: Tue, 26 Jun 2012 20:26:11 -0000 To: commits@aries.apache.org From: cumminsh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120626202611.87C752388A4A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cumminsh Date: Tue Jun 26 20:26:10 2012 New Revision: 1354206 URL: http://svn.apache.org/viewvc?rev=1354206&view=rev Log: [ARIES-862] Script for more easily checking staged artefacts. Added: aries/scripts/verify_staged_release.sh (with props) Added: aries/scripts/verify_staged_release.sh URL: http://svn.apache.org/viewvc/aries/scripts/verify_staged_release.sh?rev=1354206&view=auto ============================================================================== --- aries/scripts/verify_staged_release.sh (added) +++ aries/scripts/verify_staged_release.sh Tue Jun 26 20:26:10 2012 @@ -0,0 +1,99 @@ +#!/bin/sh + +# This script runs the steps described at http://aries.apache.org/development/verifyingrelease.html + +STAGING=${1} +DOWNLOAD=${2:-/tmp/aries-staging} +mkdir ${DOWNLOAD} 2>/dev/null + +# The following code automatically imports the signing KEYS, but it may actually be +# better to download them from a key server and/or let the user choose what keys +# he wants to import. +wget --no-check-certificate -P "${DOWNLOAD}" http://www.apache.org/dist/aries/KEYS +gpg --import "${DOWNLOAD}/KEYS" + +if [ -z "${STAGING}" -o ! -d "${DOWNLOAD}" ] +then + echo "Usage: check_staged_release.sh [temp-directory]" + exit +fi + +if [ ! -e "${DOWNLOAD}/${STAGING}" ] +then + echo "################################################################################" + echo " DOWNLOAD STAGED REPOSITORY " + echo "################################################################################" + +mkdir -p ${DOWNLOAD}/${STAGING} + + wget \ + -e "robots=off" --wait 1 -r -np "--reject=html,txt,css,css?2.0" "--follow-tags=" \ + -P "${DOWNLOAD}/${STAGING}" -nH "--cut-dirs=3" --ignore-length --no-check-certificate \ + "http://repository.apache.org/content/repositories/orgapachearies-${STAGING}/org/apache/aries/" + +else + echo "################################################################################" + echo " USING EXISTING STAGED REPOSITORY " + echo "################################################################################" + echo "${DOWNLOAD}/${STAGING}" +fi + +for i in `find ${DOWNLOAD}/${STAGING} -type f | egrep -v '.md5$|.sha1$|index.html|maven-metadata.xml'` +do + mymd5=`openssl md5 $i |cut -f 2 -d=` + repomd5=`cat $i.md5` + if [ "$mymd5" == ' '"$repomd5" ] + then echo "GOOD MD5 for $i" + else echo "*FAILURE - BAD MD5 for $i ***** (compared $mymd5 and $repomd5)" + fi +done + +for i in `find ${DOWNLOAD}/${STAGING} -type f | egrep -v '.md5$|.sha1$|index.html|maven-metadata.xml'` +do + mysha1=`openssl sha1 $i|cut -f 2 -d=` + reposha1=`cat $i.sha1` + if [ "$mysha1" == ' '"$reposha1" ] + then echo "GOOD SHA1 for $i" + else echo "*FAILURE - BAD SHA1 for $i ***** (compared $mysha1 and $reposha1)" + fi +done + +for i in `find ${DOWNLOAD}/${STAGING} -type f | egrep '.asc$'` +do + gpgoutput=`gpg $i` + echo ${gpgoutput/BAD/FAILURE: BAD} +done + + +mkdir ${DOWNLOAD}/${STAGING}-unzips + +for i in `find ${DOWNLOAD}/${STAGING} -name *-source-release.zip` +do + unzip -o -d ${DOWNLOAD}/${STAGING}-unzips $i + echo ************************** + echo Building ${i/-source-release.zip/} + echo ************************** + + cd ${DOWNLOAD}/${STAGING}-unzips/`basename ${i/-source-release.zip/}` + mvn clean install + + echo ************************** + echo Ratting ${i/-source-release.zip/} + echo ************************** + echo '(Suppressing RAT build output to avoid spurious failures)' + mvn -fn -Prat &> /dev/null + +# Strip out known excluded files (which aren't in the 1.0.0 parent from the rat report + + ratresults=`find . -name \*.rat | xargs grep \!\?\? | grep -v DEPENDENCIES | grep -v APPLICATION.MF | grep -v MANIFEST.MF` + echo ${ratresults} + echo RAT results: + echo ${ratresults/!/RAT FAILURE:} + + cd .. + +done + +echo ***** All done! Grep for FAIL in the output to see any issues ****** + + Propchange: aries/scripts/verify_staged_release.sh ------------------------------------------------------------------------------ svn:executable = *