[80462] contrib/buildbot/deploy_archives.sh

jmr at macports.org jmr at macports.org
Wed Jul 13 07:49:28 PDT 2011


Revision: 80462
          http://trac.macports.org/changeset/80462
Author:   jmr at macports.org
Date:     2011-07-13 07:49:28 -0700 (Wed, 13 Jul 2011)
Log Message:
-----------
copy deploy_archives.sh from MPAB to buildbot

Added Paths:
-----------
    contrib/buildbot/deploy_archives.sh

Copied: contrib/buildbot/deploy_archives.sh (from rev 80459, contrib/mpab/deploy_archives.sh)
===================================================================
--- contrib/buildbot/deploy_archives.sh	                        (rev 0)
+++ contrib/buildbot/deploy_archives.sh	2011-07-13 14:49:28 UTC (rev 80462)
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+if [[ -z "$PORTLISTFILE" ]]; then
+    PORTLISTFILE=portlist
+fi
+
+if [[ -z "$PREFIX" ]]; then
+    PREFIX="/opt/local"
+fi
+
+# download server hostname
+if [[ -z "$DLHOST" ]]; then
+    DLHOST=""
+fi
+
+# path where it keeps archives
+if [[ -z "$DLPATH" ]]; then
+    DLPATH="/archives"
+fi
+
+# path where archives get uploaded to master
+if [[ -z "$ULPATH" ]]; then
+    ULPATH="${PREFIX}/var/macports/software"
+fi
+
+# private key to use for signing
+if [[ -z "$PRIVKEY" ]]; then
+    PRIVKEY=""
+fi
+
+
+for portname in `cat $PORTLISTFILE`; do
+    if ls logs-*/success/${portname}.log > /dev/null 2>&1 ; then
+        if ./mpexport/base/portmgr/jobs/port_binary_distributable.tcl ${portname}; then
+            echo $portname is distributable
+            portversion=$(${PREFIX}/bin/port info --version --line ${portname})
+            portrevision=$(${PREFIX}/bin/port info --revision --line ${portname})
+            for archive in ${ULPATH}/${portname}/${portname}-${portversion}_${portrevision}[+.]*; do
+                aname=$(basename $archive)
+                echo deploying archive: $aname
+                if [[ -n "$PRIVKEY" ]]; then
+                    openssl dgst -ripemd160 -sign "${PRIVKEY}" -out ./${aname}.rmd160 ${archive}
+                fi
+                if [[ -n "$DLHOST" ]]; then
+                    ssh ${DLHOST} mkdir -p ${DLPATH}/${portname};
+                    rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLHOST}:${DLPATH}/${portname};
+		else
+                    mkdir -p ${DLPATH}/${portname};
+                    rsync -av --ignore-existing ./${aname}.rmd160 ${archive} ${DLPATH}/${portname};
+                fi
+                rm -f ./${aname}.rmd160
+            done
+        else
+            echo $portname is not distributable
+        fi
+    fi
+done
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110713/70b4fee0/attachment.html>


More information about the macports-changes mailing list