gunnar: server cvs-kolab.sh,1.12,1.13

cvs at kolab.org cvs at kolab.org
Wed Oct 17 13:39:35 CEST 2007


Author: gunnar

Update of /kolabrepository/server
In directory doto:/tmp/cvs-serv27111

Modified Files:
	cvs-kolab.sh 
Log Message:
This is my current view on the release process poured into script form. Still untested but running at the moment.

Index: cvs-kolab.sh
===================================================================
RCS file: /kolabrepository/server/cvs-kolab.sh,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- cvs-kolab.sh	4 Oct 2007 09:47:55 -0000	1.12
+++ cvs-kolab.sh	17 Oct 2007 11:39:33 -0000	1.13
@@ -3,11 +3,15 @@
 KOLAB_PACKAGES=/kolab-packages
 KOLAB_DEV_USER=kolabdevel
 KOLAB_INSTALL_USER=kolabtest
+KOLAB_REL_USER=kolabrelease
+
+OPENPKG_USER=p at rdus.de
 
 ACTION_INSTALL=0
 ACTION_UPDATE=0
 ACTION_CLEAN=0
 ACTION_DOWNLOAD=0
+ACTION_RELEASE=0
 
 FLAG_HORDE=0
 FLAG_FBVIEW=0
@@ -23,6 +27,7 @@
     echo "  -u         Update the CVS and installed system"
     echo "  -D         Just download the source packages"
     echo "  -c         uninstall the Kolab CVS environment"
+    echo "  -r         Create a fresh Kolab source release"
     echo "  -h         (display this help)"
     echo
     echo "Options:"
@@ -146,6 +151,66 @@
     exit 0
 }
 
+release() {
+    echo
+    echo "Building release packages.... This will take a while!"
+    echo
+    if [ ! -e "/${KOLAB_DEV_USER}/CVS/server" ]; then
+	die "There exists no CVS environment at /${KOLAB_DEV_USER}/CVS/server! Did you run ./cvs-kolab.sh -i to setup the CVS based Kolab server?"
+    fi
+    cd "/${KOLAB_DEV_USER}/CVS/server"
+    cvs -q update -P -d
+    chown -R "${KOLAB_DEV_USER}:" "/${KOLAB_DEV_USER}/CVS"
+    su - "${KOLAB_DEV_USER}" -c "cd `pwd` && make clean" || die "Not releasing! Looks like the Kolab developers broke CVS. Bug them at https://www.intevation.de/roundup/kolab"
+    su - "${KOLAB_DEV_USER}" -c "cd `pwd` && make" || die "Not releasing! Looks like the Kolab developers broke CVS. Bug them at https://www.intevation.de/roundup/kolab"
+    mkdir -p "${KOLAB_PACKAGES}/source-release/RELEASE"
+    cd "${KOLAB_PACKAGES}/source-release/RELEASE"
+    cp "/${KOLAB_DEV_USER}/CVS/server/install-kolab.sh" .
+    cp /"${KOLAB_DEV_USER}"/CVS/server/stage/* .
+    wget "ftp://ftp.openpkg.org/current/SRC/CORE/openpkg-*.src.sh" || die "No OpenPKG installer found!"
+    ./install-kolab.sh -E -t "${KOLAB_REL_USER}" -I 23414 -F -H > ../kolab-build.log 2>&1
+    wget "ftp://ftp.openpkg.org/current/SRC/BASE/openpkg-tools*.src.rpm" || die "No OpenPKG tools found!"
+    "/${KOLAB_REL_USER}/bin/openpkg" build -k openpkg-tools | sh
+    "/${KOLAB_REL_USER}/bin/openpkg" register --mode=post --user=${OPENPKG_USER}
+    chown ${KOLAB_REL_USER} .
+    "/${KOLAB_REL_USER}/bin/openpkg" index -r . -o 00INDEX.rdf -i .
+    cd ..
+    cp RELEASE/install-kolab.sh .
+    echo > 00INDEX.rdf <<EOF
+<?xml version="1.0" encoding="iso-8859-1"?>
+ <rdf:RDF                                                                                                    
+      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+      xmlns="http://www.openpkg.org/xml-rdf-index/0.9">
+   <Repository rdf:resource="OpenPKG-CURRENT/">
+     <Repository rdf:resource="OpenPKG-CURRENT/Source/" href="ftp://ftp.openpkg.org/current/SRC/00INDEX.rdf.bz2"/>
+     <Repository rdf:resource="RELEASE/" href="RELEASE/00INDEX.rdf"/>
+   </Repository>
+</rdf:RDF>
+EOF
+    ./install-kolab.sh -t "${KOLAB_REL_USER}" -I 23414 -F -H > kolab-build.log2 2>&1
+    cp /"${KOLAB_REL_USER}"/RPM/PKG/*.src.rpm RELEASE/
+    cd RELEASE
+    "/${KOLAB_REL_USER}/bin/openpkg" index -r . -o 00INDEX.rdf -i .
+    md5sum *.sh *.rpm > MD5SUMS
+    cd ..
+
+    echo "Everything finished!"
+    echo "The release sources have been prepared in ${KOLAB_PACKAGES}/source-release/RELEASE"
+    echo "Your test installation resides in /${KOLAB_REL_USER}"
+    echo
+    echo "Configure the release installation with"
+    echo
+    echo " /${KOLAB_REL_USER}/sbin/kolabconf"
+    echo " /${KOLAB_REL_USER}/bin/openpkg rc all restart"
+    echo
+    echo "If everything is ready for a release, sign the md5 hashes in RELEASE with"
+    echo
+    echo " gpg --clearsign MD5SUMS"
+    echo
+    echo "and upload the packages."
+    exit 0
+}
+
 clean() {
     echo "This will completely wipe ${KOLAB_PACKAGES}, /${KOLAB_DEV_USER}, and /${KOLAB_INSTALL_USER}."
     echo "Are you certain you want to do that (YES/NO)?"
@@ -163,7 +228,7 @@
 
 
 
-while getopts hicuDHFb:d:t: ARGS; do
+while getopts hircuDHFb:d:t: ARGS; do
     case $ARGS in
 	h) # Display help
 	    usage
@@ -177,6 +242,9 @@
 	u) # Update
 	    ACTION_UPDATE=1
 	    ;;
+	r) # 
+	    ACTION_RELEASE=1
+	    ;;
 	D) # Download
 	    ACTION_DOWNLOAD=1
 	    ;;
@@ -216,6 +284,10 @@
 
 if [ "${ACTION_CLEAN}" == "1" ]; then
     clean
+fi
+
+if [ "${ACTION_RELEASE}" == "1" ]; then
+    release
 fi
 
 update





More information about the commits mailing list