|
From: <ale...@us...> - 2013-03-04 15:29:10
|
Revision: 57722
http://sourceforge.net/p/firebird/code/57722
Author: alexpeshkoff
Date: 2013-03-04 15:29:05 +0000 (Mon, 04 Mar 2013)
Log Message:
-----------
Fixed CORE-4031: make install wrong under Debian Ubuntu 64 (and fixed some unrelated bugs in linux install)
Modified Paths:
--------------
firebird/trunk/builds/install/arch-specific/linux/Makefile.in
firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in
firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in
firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in
firebird/trunk/builds/install/misc/posixLibrary.sh.in
firebird/trunk/configure.in
Modified: firebird/trunk/builds/install/arch-specific/linux/Makefile.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/builds/install/arch-specific/linux/Makefile.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -118,11 +118,6 @@
objcopy --strip-debug --strip-unneeded $${FIL}; \
fi; \
done
-# Work around GDB 6.0 bug
-# mkdir -p $(GEN_ROOT)/$(DebugDir)@libdir@/.debug
-# for x in `ls $(GEN_ROOT)/$(DebugDir)@prefix@/lib/.debug`; do \
-# ln -f -s @prefix@/lib/.debug/`basename $$x` $(GEN_ROOT)/$(DebugDir)@libdir@/.debug; \
-# done
# Use this line if you don't want to use separate debug info
#buildImageDir: buildRoot
Modified: firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/builds/install/arch-specific/linux/misc/linuxLibrary.sh.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -432,3 +432,25 @@
fi
return 1
}
+
+#------------------------------------------------------------------------
+# Corrects build-time "libdir" value
+
+CorrectLibDir() {
+ ld=${1}
+ l=/usr/lib
+ l64=/usr/lib64
+
+ if [ "$ld" = "$l64" ]
+ then
+ if [ -d "$l" ]
+ then
+ if [ ! -d "$l64" ]
+ then
+ ld="$l"
+ fi
+ fi
+ fi
+
+ echo "$ld"
+}
Modified: firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/builds/install/arch-specific/linux/misc/makeInstallImage.sh.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -143,7 +143,6 @@
makeDirs @FB_MISCDIR@/upgrade/$i
done
- makeDirs @libdir@
makeDirs /usr/include
#bin
@@ -318,13 +317,6 @@
chown root:root ${TargetDir}@FB_CONFDIR@/*License.txt
chmod 0444 ${TargetDir}@FB_CONFDIR@/*License.txt
-# Create links from @libdir@ to install area.
- origDir=`pwd`
- cd $BuiltFBDir/lib
- Libraries=`echo libfb*.so* libib_util.so`
- cd $origDir
- linkFiles "@FB_LIBDIR@" "$Libraries" "${TargetDir}@libdir@" "${TargetDir}@FB_LIBDIR@"
-
# link include files to /usr/include
linkFiles "@FB_INCDIR@" "iberror.h ibase.h ib_util.h" "${TargetDir}/usr/include" "${TargetDir}@FB_INCDIR@"
Modified: firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/builds/install/arch-specific/linux/misc/postinstall.sh.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -46,16 +46,19 @@
# Install script in /etc/init.d (exact location is distro dependent)
installInitdScript
+# Prepare for uninstall
+buildUninstallFile
+
+# Create links to libraries in system lib directory
+createLinksInSystemLib
+
# Create libgds.so links
createLinksForBackCompatibility
-# Prepare for uninstall
-buildUninstallFile
-
# Update the /etc/inetd.conf or xinetd entry
updateInetdServiceEntry
-# Change sysdba password (use embedded access)
+# Add sysdba and set password (use embedded access)
setDBAPassword
# Get inetd to reread new init files.
Modified: firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in
===================================================================
--- firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/builds/install/arch-specific/linux/misc/tarMainInstall.sh.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -39,7 +39,7 @@
then
cat <<EOF
-Firebird classic $Version Installation
+Firebird $Version Installation
EOF
@@ -49,6 +49,7 @@
# Here we are installing from a install tar.gz file
if [ -e scripts ]; then
+ MANIFEXT_TXT=`pwd`/manifest.txt
displayMessage "Extracting install data"
runAndCheckExit "./scripts/preinstall.sh"
runAndCheckExit "./scripts/tarinstall.sh"
Modified: firebird/trunk/builds/install/misc/posixLibrary.sh.in
===================================================================
--- firebird/trunk/builds/install/misc/posixLibrary.sh.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/builds/install/misc/posixLibrary.sh.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -42,6 +42,7 @@
Answer=""
OrigPasswd=""
TmpFile=""
+MANIFEST_TXT=""
SecurityDatabase=security3.fdb
DefaultLibrary=libfbclient
UninstallScript=FirebirdUninstall.sh
@@ -71,7 +72,7 @@
AskQuestion() {
Test=$1
DefaultAns=$2
- echo -n "${1}"
+ echo -n "$Test"
Answer="$DefaultAns"
read Answer
@@ -203,7 +204,7 @@
checkIfServerRunning() {
- checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard|fb_smp_server|firebird)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fbserver|fbguard|fb_smp_server|firebird)\b[[:space:]]" |grep -v grep`
if [ ! -z "$checkString" ]
then
serverMode=super
@@ -218,7 +219,7 @@
# Check is server is being actively used.
- checkString=`ps -ef$psOptions | egrep "\b(firebird)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(firebird)\b[[:space:]]" |grep -v grep`
if [ ! -z "$checkString" ]
then
echo "An instance of the Firebird server seems to be running."
@@ -226,7 +227,7 @@
exit 1
fi
- checkString=`ps -ef$psOptions | egrep "\b(fb_smp_server)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fb_smp_server)\b[[:space:]]" |grep -v grep`
if [ ! -z "$checkString" ]
then
echo "An instance of the Firebird SuperClassic server seems to be running."
@@ -234,7 +235,7 @@
exit 1
fi
- checkString=`ps -ef$psOptions | egrep "\b(fbserver|fbguard)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fbserver|fbguard)\b[[:space:]]" |grep -v grep`
if [ ! -z "$checkString" ]
then
echo "An instance of the Firebird Super server seems to be running."
@@ -242,7 +243,7 @@
exit 1
fi
- checkString=`ps -ef$psOptions | egrep "\b(fb_inet_server|gds_pipe)\b" |grep -v grep`
+ checkString=`ps -ef$psOptions | egrep "[[:space:]]\b(fb_inet_server|gds_pipe)\b[[:space:]]" |grep -v grep`
if [ ! -z "$checkString" ]
then
echo "An instance of the Firebird Classic server seems to be running."
@@ -303,7 +304,7 @@
getNewDBAPasswordFromUser()
{
AskQuestion "Please enter new password for SYSDBA user: "
- echo $Answer
+ NewPasswd=$Answer
}
@@ -324,7 +325,7 @@
NewPasswd=""
while [ -z "$NewPasswd" ]
do
- NewPasswd=`getNewDBAPasswordFromUser`
+ getNewDBAPasswordFromUser
if [ ! -z "$NewPasswd" ]
then
if ! runSilent "@FB_BINDIR@/gsec -user sysdba -password $OrigPasswd -modify sysdba -pw $NewPasswd"
@@ -452,10 +453,12 @@
setDBAPassword() {
if [ -z "$InteractiveInstall" ]
- then
+ then
passwd=`createNewPassword`
- else
- passwd=`getNewDBAPasswordFromUser`
+ else
+ NewPasswd=""
+ getNewDBAPasswordFromUser
+ passwd=$NewPasswd
fi
if [ ! -z "$passwd" ]
@@ -481,6 +484,7 @@
fi
cp manifest.txt @FB_MISCDIR@
+ MANIFEST_TXT=@FB_MISCDIR@/manifest.txt
cp -r scripts @FB_MISCDIR@
[ -f scripts/tarMainUninstall.sh ] && cp scripts/tarMainUninstall.sh @FB_SBINDIR@/$UninstallScript
@@ -508,18 +512,26 @@
safeLink() {
Source=$1
Target=$2
-
- removeIfOnlyAlink $Target
- if [ ! -e $Target ]
- then
- ln -s $Source $Target
+ Manifest=$3
+
+ if [ $Source != $Target ]
+ then
+ removeIfOnlyAlink $Target
+ if [ ! -e $Target ]
+ then
+ ln -s $Source $Target
+ if [ -f "$Manifest" ]
+ then
+ echo $Target >>$Manifest
+ fi
+ fi
fi
}
#------------------------------------------------------------------------
# createLinksForBackCompatibility
-# Create links for back compatibility to InterBase and Firebird1.0
+# Create links for back compatibility to InterBase and Firebird1.0
# linked systems.
createLinksForBackCompatibility() {
@@ -529,19 +541,42 @@
# to ensure it loads the fb equivalent. MOD 7-Nov-2002.
newLibrary=@FB_LIBDIR@/$DefaultLibrary.@SHRLIB_EXT@
- safeLink $newLibrary @libdir@/libgds.@SHRLIB_EXT@
- safeLink $newLibrary @libdir@/libgds.@SHRLIB_EXT@.0
+ LibDir=`CorrectLibDir @libdir@`
+ safeLink $newLibrary $LibDir/libgds.@SHRLIB_EXT@
+ safeLink $newLibrary $LibDir/libgds.@SHRLIB_EXT@.0
}
#------------------------------------------------------------------------
+# createLinksInSystemLib
+# Create links to firebird client library in system directory.
+
+createLinksInSystemLib() {
+ LibDir=`CorrectLibDir @libdir@`
+
+ origDirLinksInSystemLib=`pwd`
+ cd @FB_LIBDIR@
+ Libraries=`echo libfbclient.@SHRLIB_EXT@* libib_util.@SHRLIB_EXT@`
+
+ cd /
+ for l in $Libraries
+ do
+ safeLink @FB_LIBDIR@/$l .$LibDir/$l ${MANIFEST_TXT}
+ done
+
+ cd $origDirLinksInSystemLib
+}
+
+#------------------------------------------------------------------------
# removeLinksForBackCompatibility
-# Remove links for back compatibility to InterBase and Firebird1.0
+# Remove links for back compatibility to InterBase and Firebird1.0
# linked systems.
removeLinksForBackCompatibility() {
- removeIfOnlyAlink @libdir@/libgds.@SHRLIB_EXT@
- removeIfOnlyAlink @libdir@/libgds.@SHRLIB_EXT@.0
+ LibDir=`CorrectLibDir @libdir@`
+
+ removeIfOnlyAlink $LibDir/libgds.@SHRLIB_EXT@
+ removeIfOnlyAlink $LibDir/libgds.@SHRLIB_EXT@.0
}
@@ -692,7 +727,7 @@
fi
origDir=`pwd`
-
+
cd /
for i in `cat $manifestFile`
Modified: firebird/trunk/configure.in
===================================================================
--- firebird/trunk/configure.in 2013-03-04 15:18:26 UTC (rev 57721)
+++ firebird/trunk/configure.in 2013-03-04 15:29:05 UTC (rev 57722)
@@ -213,11 +213,7 @@
AC_DEFINE(LINUX, 1, [Define this if OS is Linux])
EDITLINE_FLG=Y
SHRLIB_EXT=so
- if test -L /usr/lib64; then
- libdir=/usr/lib
- else
- libdir=/usr/lib64
- fi
+ libdir=/usr/lib64
CPU_TYPE=amd64
;;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|