summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arendsen Hein <thomas@intevation.de>2010-06-29 10:10:08 (GMT)
committerThomas Arendsen Hein <thomas@intevation.de>2010-06-29 10:10:08 (GMT)
commit6800e02595d09743adb8574e889ac8d421a4fcf1 (patch)
tree0d7bcd9307ac956a7ac4806018af31baafbd184b
parenta8fdbe2c8bf005bef6ce21ea185e33541b1adf2e (diff)
downloadserver-6800e02595d09743adb8574e889ac8d421a4fcf1.tar.gz
install-kolab.sh: Use clean /kolab/RPM/PKG directory
This way existing files with identical version numbers do not disturb the build process. Needed for unchanged packages that have to be recompiled to link against new openssl. Side effect of this that we can move the temporary files into this directory, important for the openpkg base files.
-rw-r--r--1st.README6
-rwxr-xr-xinstall-kolab.sh27
-rw-r--r--release-notes.txt11
3 files changed, 35 insertions, 9 deletions
diff --git a/1st.README b/1st.README
index 3011e30..7edf338 100644
--- a/1st.README
+++ b/1st.README
@@ -420,10 +420,8 @@ where you only want to compile the new .src.rpm files instead of everything).
To generate this file, you always need all .src.rpm files, so link or copy
them in a new directory (needs to be writable by the kolab user of your
installation). After this you can link/copy the install-kolab.sh file and
-your binary rpm files (e.g. openpkg-20071227-20071227_kolab1.*-kolab.rpm from
-/tmp/install-kolab.*/ and the others from /kolab/RPM/PKG/) into this
-directory and run the following command as user kolab or root to create the
-new 00INDEX.rdf file:
+your binary rpm files (from /kolab/RPM/PKG/) into this directory and run the
+following command as user kolab or root to create the new 00INDEX.rdf file:
$ sh install-kolab.sh -X
diff --git a/install-kolab.sh b/install-kolab.sh
index c6e7055..d464aaf 100755
--- a/install-kolab.sh
+++ b/install-kolab.sh
@@ -18,6 +18,7 @@ KID="19414"
TAG="kolab"
USER=""
PREFIX=""
+UNIQEXT="$RANDOM.$RANDOM.$RANDOM.$$"
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 -D imapd::with_crossdomain_acl -D kolab-webclient::with_activesync=no"
@@ -71,7 +72,7 @@ else
fi
mktmpdir() {
- newtmp="${TMPDIR-/tmp}/install-kolab.$RANDOM.$RANDOM.$RANDOM.$$"
+ newtmp="${TMPDIR-/tmp}/install-kolab.$UNIQEXT"
mkdir "$newtmp" || {
echo "Could not create temporary directory! Exiting." 1>&2
exit 1
@@ -79,6 +80,16 @@ mktmpdir() {
echo "$newtmp"
}
+mkpkgbackup() {
+ pkgbackup="$1.$UNIQEXT"
+ mkdir "$pkgbackup" || {
+ echo "Could not create PKG backup directory! Exiting." 1>&2
+ exit 1
+ }
+ mv "$1/"* "$pkgbackup"
+ echo "$pkgbackup"
+}
+
shtool_get_plattag() {
[ -f shtool ] || sh "$INSTALLER" -t | tar xf - shtool
echo `sh shtool platform --type=binary`-$TAG
@@ -305,6 +316,10 @@ if [ -n "$BIN" ]; then
fi
if [ -n "$DIR" ]; then
+ PKGDIR="$PREFIX/RPM/PKG"
+ PKGBACKUP=`mkpkgbackup "$PKGDIR"`
+ cd "$PKGDIR" && mv "$WORKDIR"/* "$PKGDIR" && rmdir "$WORKDIR" || exit $?
+
[ -z "$PLATTAG" ] && PLATTAG=`"$PREFIX/bin/openpkg" rpm -q --qf="%{ARCH}-%{OS}" openpkg`-$TAG
if [ -n "$KOLAB_VERSION" ]; then
DEFINE="$DEFINE
@@ -314,16 +329,18 @@ if [ -n "$DIR" ]; then
fi
PACKAGES=`remove_from_list "$EXCLUDEPKGS" "$PACKAGES"`
-
- find "$DIR" $FIND1 -name "*.$PLATTAG.rpm" -exec ln -sf '{}' "$PREFIX/RPM/PKG/" \;
echo "----------- SETUP COMPLETED -----------"
echo
echo " Now running:"
echo
- echo " $PREFIX/bin/openpkg build -kKBuZ -r \"$DIR\" -p \"$PLATTAG\" $DEFINE $PACKAGES | sh"
+ echo " $PREFIX/bin/openpkg build -kKBuZ -r \"$PKGDIR\" -p \"$PLATTAG\" $DEFINE $PACKAGES | sh"
echo
echo "---------------------------------------"
- "$PREFIX/bin/openpkg" build -kKBuZ -r "$DIR" -p "$PLATTAG" $DEFINE $PACKAGES | sh || exit $?
+ "$PREFIX/bin/openpkg" build -kKBuZ -r "$PKGDIR" -p "$PLATTAG" $DEFINE $PACKAGES | sh
+ rc=$?
+ echo "$PKGDIR now contains the installed packages."
+ echo "Previous contents were moved to $PKGBACKUP"
+ exit $?
fi
exit 0
diff --git a/release-notes.txt b/release-notes.txt
index 40f8304..5ce0668 100644
--- a/release-notes.txt
+++ b/release-notes.txt
@@ -101,6 +101,17 @@ Changes between 2.2.3 and 2.2.4:
which is from a now *not* shared, before
shared calendar folder)
+ - install-kolab.sh
+
+ Add defines for build options of imapd and kolab-webclient:
+ imapd::with_crossdomain_acl and kolab-webclient::with_activesync=no
+
+ Use clean /kolab/RPM/PKG directory so existing files with identical
+ version numbers do not disturb the build process. Needed for unchanged
+ packages that have to be recompiled to link against new openssl.
+ Side effect of this that we can move the temporary files into this
+ directory, important for the openpkg base files.
+
- imapd-2.3.13-20081020_kolab5
kolab/issue1141 (Cannot give users from other domains access