8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-02-02 09:20:39 +01:00

Fixed CORE-4031: make install wrong under Debian Ubuntu 64 (and fixed some unrelated bugs in linux install)

This commit is contained in:
alexpeshkoff 2013-03-04 15:29:05 +00:00
parent e613f39389
commit 4a661d9574
7 changed files with 90 additions and 46 deletions

View File

@ -118,11 +118,6 @@ buildDebugInfo: buildRoot
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

View File

@ -432,3 +432,25 @@ isStandaloneServerInstalled() {
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"
}

View File

@ -143,7 +143,6 @@ copyFiles() {
makeDirs @FB_MISCDIR@/upgrade/$i
done
makeDirs @libdir@
makeDirs /usr/include
#bin
@ -318,13 +317,6 @@ copyFiles() {
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@"

View File

@ -46,16 +46,19 @@ fixFilePermissions
# Install script in /etc/init.d (exact location is distro dependent)
installInitdScript
# Create libgds.so links
createLinksForBackCompatibility
# Prepare for uninstall
buildUninstallFile
# Create links to libraries in system lib directory
createLinksInSystemLib
# Create libgds.so links
createLinksForBackCompatibility
# 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.

View File

@ -39,7 +39,7 @@ if [ ! -z "$InteractiveInstall" ]
then
cat <<EOF
Firebird classic $Version Installation
Firebird $Version Installation
EOF
@ -49,6 +49,7 @@ fi
# 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"

View File

@ -42,6 +42,7 @@ Add2Path() {
Answer=""
OrigPasswd=""
TmpFile=""
MANIFEST_TXT=""
SecurityDatabase=security3.fdb
DefaultLibrary=libfbclient
UninstallScript=FirebirdUninstall.sh
@ -71,7 +72,7 @@ MakeTemp() {
AskQuestion() {
Test=$1
DefaultAns=$2
echo -n "${1}"
echo -n "$Test"
Answer="$DefaultAns"
read Answer
@ -203,7 +204,7 @@ removeInetdServiceEntry() {
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 @@ checkIfServerRunning() {
# 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 @@ checkIfServerRunning() {
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 @@ checkIfServerRunning() {
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 @@ checkIfServerRunning() {
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 @@ askForOrigDBAPassword() {
getNewDBAPasswordFromUser()
{
AskQuestion "Please enter new password for SYSDBA user: "
echo $Answer
NewPasswd=$Answer
}
@ -324,7 +325,7 @@ askUserForNewDBAPassword() {
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 @@ changeDBAPassword() {
setDBAPassword() {
if [ -z "$InteractiveInstall" ]
then
then
passwd=`createNewPassword`
else
passwd=`getNewDBAPasswordFromUser`
else
NewPasswd=""
getNewDBAPasswordFromUser
passwd=$NewPasswd
fi
if [ ! -z "$passwd" ]
@ -481,6 +484,7 @@ buildUninstallFile() {
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 @@ removeIfOnlyAlink() {
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 @@ createLinksForBackCompatibility() {
# 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 @@ removeInstalledFiles() {
fi
origDir=`pwd`
cd /
for i in `cat $manifestFile`

View File

@ -213,11 +213,7 @@ dnl CPU_TYPE=ppc64
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
;;