[csw-devel] SF.net SVN: opencsw:[394] buildfarm/bin/generate-catalog
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Wed Jul 20 04:00:22 CEST 2011
Revision: 394
http://opencsw.svn.sourceforge.net/opencsw/?rev=394&view=rev
Author: bdwalton
Date: 2011-07-20 02:00:22 +0000 (Wed, 20 Jul 2011)
Log Message:
-----------
add a rudimentary script to build a catalog, request the signature from the daemon and then place it
Added Paths:
-----------
buildfarm/bin/generate-catalog
Added: buildfarm/bin/generate-catalog
===================================================================
--- buildfarm/bin/generate-catalog (rev 0)
+++ buildfarm/bin/generate-catalog 2011-07-20 02:00:22 UTC (rev 394)
@@ -0,0 +1,40 @@
+#!/opt/csw/bin/bash
+
+
+export PATH=/opt/csw/bin:/opt/csw/sbin:/usr/bin:/usr/sbin
+
+set -u
+set -e
+set -x
+
+_cswsign_host=192.168.1.40
+_cswsign_port=9981
+_signtype=clearsign
+_catalog_path=$1
+_URL=http://${_cswsign_host}:${_cswsign_port}/${_signtype}/${_catalog_path}
+
+# bldcat prints a lot of output
+if ! bldcat --fast . >/dev/null
+then
+ echo "bldcat failed in $(pwd)."
+ false
+fi
+if chkcat -e --nocyclic catalog
+then
+ echo chkcat returned no errors
+else
+ r="$?"
+ if [[ "${r}" -eq 2 ]]; then
+ echo -n "chkcat returned an error in $(pwd) "
+ echo "when generating ${catalog}."
+ false
+ fi
+fi
+
+# The gpg daemon will expect catalog.signme to exist at the requested
+# URL path, relative to the mirror root.
+cp -p catalog catalog.signme
+# This request should return a signed catalog
+curl -s -f ${_URL} > catalog.new
+mv catalog.new catalog
+
Property changes on: buildfarm/bin/generate-catalog
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list