Skip to content

Commit

Permalink
Implemented CORE-6366: Check presence of tomcrypt & curses libraries …
Browse files Browse the repository at this point in the history
…before installing firebird
  • Loading branch information
AlexPeshkoff committed Jul 16, 2020
1 parent 8c1ef78 commit acff3ad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 2 additions & 4 deletions builds/install/arch-specific/linux/linuxLibrary.sh.in
Expand Up @@ -509,10 +509,9 @@ CorrectLibDir() {
# Validate library name

checkLibName() {
libName=${1}
grepFlag=-v
[ "@CPU_TYPE@" = "amd64" ] && grepFlag=
ldconfig -p | grep -w "$libName" | grep $grepFlag 'x86-64'
ldconfig -p | grep -w "${1}" | grep $grepFlag 'x86-64'
}


Expand All @@ -527,8 +526,7 @@ haveLibrary() {

checkLibName "$libName" >/dev/null 2>/dev/null && return 0

libName="lib${libName}"
checkLibName "$libName" >/dev/null 2>/dev/null
checkLibName "lib$libName" >/dev/null 2>/dev/null

return $?
}
Expand Down
7 changes: 7 additions & 0 deletions builds/install/arch-specific/linux/makeInstallImage.sh.in
Expand Up @@ -54,6 +54,13 @@ addLibs() {
touch $libTarget
echo "#!/bin/sh" >>$libTarget
echo >>$libTarget

LIB=`objdump -p $libSdir/firebird|grep NEEDED|grep tomcrypt|awk '{print $2;}'`
[ "$LIB" ] && echo "export LIBTOMCRYPT=$LIB" >>$libTarget
LIB=`objdump -p $libSdir/isql|grep NEEDED|egrep "(curses|termcap|tinfo)"|awk '{print $2;}'`
[ "$LIB" ] && echo "export LIBCURSES=$LIB" >>$libTarget
echo >>$libTarget

for i in posixLibrary.sh linuxLibrary.sh
do
echo "# $i" >>$libTarget
Expand Down
9 changes: 6 additions & 3 deletions builds/install/posix-common/posixLibrary.sh.in
Expand Up @@ -219,19 +219,22 @@ checkLibrary() {
#------------------------------------------------------------------------
# Make sure we have required libraries installed
checkLibraries() {
if [ "@TOMMATH_BUILD@" != "Y" ]
if [ "@TOMMATH_BUILD@" != "Y" -o "${fb_install_prefix}" != "${default_prefix}" ]
then
fixTommath=
checkLibrary tommath
haveLibrary libtommath.so.0 || [ "$fixTommath" ] && $fixTommath
fi

if [ "@TOMCRYPT_BUILD@" != "Y" ]
if [ "@TOMCRYPT_BUILD@" != "Y" -o "${fb_install_prefix}" != "${default_prefix}" ]
then
checkLibrary tomcrypt
[ -z "$LIBTOMCRYPT" ] && LIBTOMCRYPT=tomcrypt
checkLibrary $LIBTOMCRYPT
fi

checkLibrary icudata

[ "$LIBCURSES" ] && checkLibrary $LIBCURSES
}


Expand Down

0 comments on commit acff3ad

Please sign in to comment.