[csw-devel] SF.net SVN: gar:[11648] csw/mgar/pkg/openldap/trunk
dmichelsen at users.sourceforge.net
dmichelsen at users.sourceforge.net
Wed Nov 17 17:00:37 CET 2010
Revision: 11648
http://gar.svn.sourceforge.net/gar/?rev=11648&view=rev
Author: dmichelsen
Date: 2010-11-17 16:00:37 +0000 (Wed, 17 Nov 2010)
Log Message:
-----------
openldap: Fix bdb directory in postinstall
Modified Paths:
--------------
csw/mgar/pkg/openldap/trunk/Makefile
csw/mgar/pkg/openldap/trunk/files/CSWoldap.postinstall
Modified: csw/mgar/pkg/openldap/trunk/Makefile
===================================================================
--- csw/mgar/pkg/openldap/trunk/Makefile 2010-11-17 15:14:59 UTC (rev 11647)
+++ csw/mgar/pkg/openldap/trunk/Makefile 2010-11-17 16:00:37 UTC (rev 11648)
@@ -21,6 +21,7 @@
DISTFILES += cswopenldap openldap.xml
EXPANDVARS = cswopenldap
+EXPANDVARS += CSWoldap.postinstall
PATCHFILES_isa-sparcv8-garversion-2.4.23 = patch-oldap-2.4.16-ntlm.diff
PATCHFILES_isa-sparcv9-garversion-2.4.23 = patch-oldap-2.4.16-ntlm.diff
@@ -58,10 +59,14 @@
EXTRA_DOCS = README.CSW $(PATCHFILES) openldaprc
+# This is old, stick to BerkeleyDB 4.4
EXTRA_LIB_garversion-2.3.43 = $(prefix)/bdb44/lib
EXTRA_INC_garversion-2.3.43 = $(prefix)/bdb44/include
-EXTRA_LIB_garversion-2.4.23 = $(prefix)/bdb48/lib
-EXTRA_INC_garversion-2.4.23 = $(prefix)/bdb48/include
+
+# This is also used during EXPANDVARS
+bdbdir = $(prefix)/bdb48
+EXTRA_LIB_garversion-2.4.23 = $(bdbdir)/lib
+EXTRA_INC_garversion-2.4.23 = $(bdbdir)/include
EXTRA_LIB = $(EXTRA_LIB_garversion-$(GARVERSION))
EXTRA_INC = $(EXTRA_INC_garversion-$(GARVERSION))
Modified: csw/mgar/pkg/openldap/trunk/files/CSWoldap.postinstall
===================================================================
--- csw/mgar/pkg/openldap/trunk/files/CSWoldap.postinstall 2010-11-17 15:14:59 UTC (rev 11647)
+++ csw/mgar/pkg/openldap/trunk/files/CSWoldap.postinstall 2010-11-17 16:00:37 UTC (rev 11648)
@@ -8,31 +8,33 @@
chroot $PKG_INSTALL_ROOT /opt/csw/bin/libtool --finish /opt/csw/libexec/openldap >/dev/null 2>&1
# Build log file name
-installlog=${BASEDIR}/opt/csw/var/openldap/install-`date '+%Y%m%d%H%M%S'`
+installdir=${BASEDIR}@localstatedir@/openldap
+installlog=${installdir}/install-`date '+%Y%m%d%H%M%S'`
# Upgrade and verify bdb database files for openldap.
#
-DB_HOME=${BASEDIR}/opt/csw/var/openldap-data
+DB_HOME=${BASEDIR}@localstatedir@/openldap-data
if [ -f ${BASEDIR}$DB_HOME/*.bdb ] ; then
cd ${BASEDIR}$DB_HOME
# Update the database environment to the new value
+ mkdir -p ${installdir}
echo "Running db_recover on $DB_HOME" >>$installlog
- chroot $PKG_INSTALL_ROOT /opt/csw/bdb4/bin/db_recover -h $DB_HOME >>$installlog 2>&1
+ chroot $PKG_INSTALL_ROOT @bdbdir@/bin/db_recover -h $DB_HOME >>$installlog 2>&1
# Upgrade each file. This does nothing if no upgrade is needed.
echo "Running db_upgrade on $DB_HOME" >>$installlog
for each_db in `ls *.bdb`
do
- chroot $PKG_INSTALL_ROOT /opt/csw/bdb4/bin/db_upgrade -h $DB_HOME $each_db >>$installlog 2>&1
+ chroot $PKG_INSTALL_ROOT @bdbdir@/bin/db_upgrade -h $DB_HOME $each_db >>$installlog 2>&1
done
# Verify each file
echo "Running db_verify on $DB_HOME" >>$installlog
for each_db in `ls *.bdb`
do
- chroot $PKG_INSTALL_ROOT /opt/csw/bdb4/bin/db_verify -h $DB_HOME -o $each_db >>$installlog 2>&1
+ chroot $PKG_INSTALL_ROOT @bdbdir@/bin/db_verify -h $DB_HOME -o $each_db >>$installlog 2>&1
done
fi
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