thomas: server install-kolab.sh, 1.63, 1.64 release-notes.txt, 1.479, 1.480

cvs at kolab.org cvs at kolab.org
Thu Dec 17 11:15:14 CET 2009


Author: thomas

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

Modified Files:
	install-kolab.sh release-notes.txt 
Log Message:
Fix handling of -B and -E with existing OpenPKG installations.
(and cleanups)


Index: install-kolab.sh
===================================================================
RCS file: /kolabrepository/server/install-kolab.sh,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- install-kolab.sh	17 Jul 2009 14:53:05 -0000	1.63
+++ install-kolab.sh	17 Dec 2009 10:15:12 -0000	1.64
@@ -19,14 +19,12 @@
 USER=""
 PREFIX=""
 
-INSTALL=""
-
 PACKAGES="openpkg-tools openldap postfix kolabd kolab-webadmin kolab-fbview kolab-webclient"
 DEFINE="-D openldap::with_pth=no -D sasl::with_ldap -D sasl::with_login -D sasl::with_ntlm -D postfix::with_sasl -D postfix::with_ssl -D postfix::with_ldap -D imapd::with_kolab_nocaps"
 EXCLUDEPKGS=""
 
 #Flags
-FLAG_BASE=""
+FLAG_BOOTSTRAP=""
 FLAG_ENV=""
 FLAG_CLEAN=""
 
@@ -54,10 +52,10 @@
     echo "  -X         (generate 00INDEX.rdf for packages in the current directory"
     echo "              using the OpenPKG installation in /\$PREFIX)"
     echo
-    echo "  -B         (abort after generating the basic openpkg binary)"
-    echo "  -E         (abort after generating the openpkg environment)"
+    echo "  -B         (abort after generating the OpenPKG bootstrap packages)"
+    echo "  -E         (abort after generating the OpenPKG environment)"
     echo
-    echo "  -O         (additional build options, used for openpkg bootstraping from source)"
+    echo "  -O         (additional build options, used for OpenPKG bootstraping from source)"
     echo
     echo "  -h         (display this help)"
 }
@@ -88,8 +86,8 @@
 
 populate_workdir() {
   if [ -z "$SRCDIR" -o -z "$WORKDIR" ] ; then
-    echo "Source- or working-directory missing." 1>&2 
-    exit 1 
+    echo "Source or working directory missing." 1>&2
+    exit 1
   fi
   cp "$SRCDIR"/openpkg-2*.rpm "$WORKDIR"
   cp "$SRCDIR"/openpkg-*.sh "$WORKDIR"
@@ -106,7 +104,7 @@
       if [ "$element" = "$remove" ] ; then
         delelt="t"
         break
-      fi      
+      fi
     done
     [ "$delelt" ] || newlist="$newlist $element"
   done
@@ -134,13 +132,13 @@
         t) # User specified an alternative tag
             TAG="$OPTARG"
             ;;
-        B) # User only wants the basic openpkg package in binary form
-            FLAG_BASE="Yes"
+        B) # User only wants the OpenPKG bootstrap packages
+            FLAG_BOOTSTRAP="Yes"
             ;;
-        E) # User only wants the basic openpkg environment
+        E) # User only wants the OpenPKG environment
             FLAG_ENV="Yes"
             ;;
-        c) # User wants to erase the openpkg environment
+        c) # User wants to erase the OpenPKG environment
             FLAG_CLEAN="Yes"
             ;;
         x) # exclude from installation
@@ -221,40 +219,41 @@
 echo "Exclude following Kolab packages:   $EXCLUDEPKGS"
 echo
 
-if [ -z "$INSTALL" ]; then
-    # Hm, user wants us to figure out what we should do
-    echo "Received no instructions. Trying to determine required action..."
-    if [ -d "$PREFIX/etc/openpkg" ]; then
-        # Assume an upgrade based on the current directory
-        INSTALL=`pwd`
-        echo "Found an OpenPKG environment. Assuming upgrade..."
+echo "Received no instructions. Trying to determine required action..."
+if [ -d "$PREFIX/etc/openpkg" -a -z "$FLAG_BOOTSTRAP" ]; then
+    # Assume an upgrade based on the current directory
+    INSTALL=`pwd`
+    if [ "$FLAG_ENV" ]; then
+        echo "The OpenPKG environment already exists!"
+        exit 1
+    fi
+    echo "Found an OpenPKG environment. Assuming upgrade..."
+else
+    INSTALLER=`find . $FIND1 -name "openpkg-*.src.sh" -print`
+    BINARY=`find . $FIND1 -name "openpkg-*.sh" \! -name "openpkg-*.src.sh" -print`
+    if [ -z "$INSTALLER" ]; then
+        # No install script? Determine if there is a binary script
+        if [ -z "$BINARY" ]; then
+            echo "Sorry there is no OpenPKG installation script in the current directory!"
+            usage
+            exit 0
+        else
+            # Looks like we only have a binary. Hope that it matches the plattform and install it
+            INSTALL="$BINARY"
+            echo "Found a binary OpenPKG package. This will be installed now."
+        fi
     else
-        INSTALLER=`find . $FIND1 -name "openpkg-*.src.sh" -print`
-        BINARY=`find . $FIND1 -name "openpkg-*.sh" \! -name "openpkg-*.src.sh" -print`
-        if [ -z "$INSTALLER" ]; then
-            # No install script? Determine if there is a binary script
-            if [ -z "$BINARY" ]; then
-                echo "Sorry there is no OpenPKG installation script in the current directory!"
-                usage
-                exit 0
-            else
-                # Looks like we only have a binary. Hope that it matches the plattform and install it
-                INSTALL="$BINARY"
-                echo "Found a binary OpenPKG package. This will be installed now."
-            fi
+        # We have a source package. Check for a matching binary
+        PLATTAG=`shtool_get_plattag`
+        BIN=`basename "$INSTALLER" .src.sh`.$PLATTAG.sh
+        if [ "$BINARY" = "$BIN" ]; then
+            # There is a binary with the correct tag. Install it
+            INSTALL=$BIN
+            echo "Found a binary OpenPKG package with a correct tag. This will be installed now."
         else
-            # We have a source package. Check for a matching binary
-            PLATTAG=`shtool_get_plattag`
-            BIN=`basename "$INSTALLER" .src.sh`.$PLATTAG.sh
-            if [ "$BINARY" = "$BIN" ]; then
-                # There is a binary with the correct tag. Install it
-                INSTALL=$BIN
-                echo "Found a binary OpenPKG package with a correct tag. This will be installed now."
-            else
-                # Install from source
-                INSTALL=$INSTALLER
-                echo "Found a source based OpenPKG installer. Trying to install Kolab from source."
-            fi
+            # Install from source
+            INSTALL=$INSTALLER
+            echo "Found a source based OpenPKG installer. Trying to install Kolab from source."
         fi
     fi
 fi
@@ -290,8 +289,9 @@
         --muid="$KID" --ruid="$R_KID" --nuid="$N_KID" \
         --mgid="$KID" --rgid="$R_KID" --ngid="$N_KID" \
         || exit $?
-    if [ "$FLAG_BASE" ]; then
-        echo "Created basic openpkg binary for you platform!"
+    if [ "$FLAG_BOOTSTRAP" ]; then
+        echo "Created the OpenPKG bootstrap packages, they are available in"
+        echo "$DIR"
         exit 0
     fi
 fi
@@ -299,7 +299,7 @@
 if [ -n "$BIN" ]; then
     sh "$BIN" || exit $?
     if [ "$FLAG_ENV" ]; then
-        echo "Created basic openpkg environment!"
+        echo "Created the OpenPKG environment!"
         exit 0
     fi
 fi

Index: release-notes.txt
===================================================================
RCS file: /kolabrepository/server/release-notes.txt,v
retrieving revision 1.479
retrieving revision 1.480
diff -u -d -r1.479 -r1.480
--- release-notes.txt	16 Dec 2009 16:31:04 -0000	1.479
+++ release-notes.txt	17 Dec 2009 10:15:12 -0000	1.480
@@ -173,6 +173,8 @@
 
     - install-kolab.sh
 
+	Fix handling of -B and -E with existing OpenPKG installations.
+
 	kolab/issue2924 (install-kolab.sh: -maxdepth/-mindepth not supported by all
 	                 find implementations)
 





More information about the commits mailing list