thomas: server install-kolab.sh, 1.54.2.8, 1.54.2.9 release-notes.txt, 1.398.2.91, 1.398.2.92

cvs at kolab.org cvs at kolab.org
Wed Dec 16 17:30:37 CET 2009


Author: thomas

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

Modified Files:
      Tag: kolab_2_2_branch
	install-kolab.sh release-notes.txt 
Log Message:
Backported kolab/issue2924 from HEAD
(install-kolab.sh: -maxdepth/-mindepth not supported by all find implementations)


Index: install-kolab.sh
===================================================================
RCS file: /kolabrepository/server/install-kolab.sh,v
retrieving revision 1.54.2.8
retrieving revision 1.54.2.9
diff -u -d -r1.54.2.8 -r1.54.2.9
--- install-kolab.sh	15 Dec 2009 15:09:10 -0000	1.54.2.8
+++ install-kolab.sh	16 Dec 2009 16:30:35 -0000	1.54.2.9
@@ -36,6 +36,9 @@
     echo
     echo "Options:"
     echo
+    echo "  Some of these options (for example UID, installation prefix)"
+    echo "  only work as expected when installing from source packages."
+    echo
     echo "  -t TAG     (alternate binary tag;          default is kolab)"
     echo "  -I UID     (alternate base uid;            default is 19414)"
     echo
@@ -59,6 +62,16 @@
     echo "  -h         (display this help)"
 }
 
+# check if find command supports -mindepth and -maxdepth, see
+# kolab/issue2924 (install-kolab.sh: -maxdepth/-mindepth not supported by all find implementations)
+if [ "`find / -mindepth 0 -maxdepth 0 2>/dev/null`" = "/" ]; then
+    FIND1="-mindepth 1 -maxdepth 1"
+else
+    echo "WARNING: Your find does not support -mindepth/-maxdepth, make sure" >&2
+    echo "you are in the correct directory, see issues.kolab.org/issue2924" >&2
+    FIND1=""
+fi
+
 mktmpdir() {
   newtmp="${TMPDIR-/tmp}/install-kolab.$RANDOM.$RANDOM.$RANDOM.$$"
   mkdir "$newtmp" || {
@@ -81,7 +94,7 @@
   cp "$SRCDIR"/openpkg-2*.rpm "$WORKDIR"
   cp "$SRCDIR"/openpkg-*.sh "$WORKDIR"
   ln -sf "$SRCDIR/00INDEX.rdf" "$WORKDIR"
-  find "$SRCDIR" -mindepth 1 -maxdepth 1 -name "*.rpm" \! -name "openpkg-2*.rpm" -exec ln -sf '{}' "$WORKDIR" \;
+  find "$SRCDIR" $FIND1 -name "*.rpm" \! -name "openpkg-2*.rpm" -exec ln -sf '{}' "$WORKDIR" \;
 }
 
 remove_from_list() {
@@ -174,7 +187,7 @@
                 exit 0
             fi
         elif [ "$FLAG_INDEX" ]; then
-            BINARY=`find . -mindepth 1 -maxdepth 1 -name "openpkg-2*.rpm" \! -name "openpkg-*.src.rpm" -print`
+            BINARY=`find . $FIND1 -name "openpkg-2*.rpm" \! -name "openpkg-*.src.rpm" -print`
             if [ -z "$BINARY" ]; then
                 echo "Generating 00INDEX.rdf for source distribution ..."
                 exec "$PREFIX/bin/openpkg" index -r . -o 00INDEX.rdf -C $PREFIX/RPM/DB/00INDEX-cache.db -i .
@@ -216,8 +229,8 @@
         INSTALL=`pwd`
         echo "Found an OpenPKG environment. Assuming upgrade..."
     else
-        INSTALLER=`find . -name "openpkg-*.src.sh" -print`
-        BINARY=`find . -name "openpkg-*.sh" \! -name "openpkg-*.src.sh" -print`
+        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
@@ -302,7 +315,7 @@
 
     PACKAGES=`remove_from_list "$EXCLUDEPKGS" "$PACKAGES"`
 
-    find "$DIR" -mindepth 1 -maxdepth 1 -name "*.$PLATTAG.rpm" -exec ln -sf '{}' "$PREFIX/RPM/PKG/" \;
+    find "$DIR" $FIND1 -name "*.$PLATTAG.rpm" -exec ln -sf '{}' "$PREFIX/RPM/PKG/" \;
     echo "----------- SETUP COMPLETED -----------"
     echo
     echo " Now running:"

Index: release-notes.txt
===================================================================
RCS file: /kolabrepository/server/release-notes.txt,v
retrieving revision 1.398.2.91
retrieving revision 1.398.2.92
diff -u -d -r1.398.2.91 -r1.398.2.92
--- release-notes.txt	16 Dec 2009 15:29:18 -0000	1.398.2.91
+++ release-notes.txt	16 Dec 2009 16:30:35 -0000	1.398.2.92
@@ -59,6 +59,11 @@
 
 	kolab/issue3838 (no logging for pop3)
 
+    - install-kolab.sh
+
+	kolab/issue2924 (install-kolab.sh: -maxdepth/-mindepth not supported by all
+	                 find implementations)
+
     - kolabd-2.2.3-2009????
 
 	kolab/issue919  (kolab server has problems with some characters in





More information about the commits mailing list