Skip to content

Commit

Permalink
Add TSM_LD_LIBRARY_PATH to LD_LIBRARY_PATH before ldd
Browse files Browse the repository at this point in the history
  • Loading branch information
schabrolles committed Nov 6, 2017
1 parent 6256718 commit 2938c33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 9 additions & 2 deletions usr/share/rear/build/default/980_verify_rootfs.sh
Expand Up @@ -37,11 +37,18 @@ local broken_binaries=""
# FIXME: The following code fails if file names contain characters from IFS (e.g. blanks),
# see https://github.com/rear/rear/pull/1514#discussion_r141031975
# and for the general issue see https://github.com/rear/rear/issues/1372
# - You may need to update and export LD_LIBRARY_PATH if third-party software you want to include
# in the rescue image does not update ldconfig cache. (https://github.com/rear/rear/issues/1533).
local old_LD_LIBRARY_PATH
test $LD_LIBRARY_PATH && old_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
if test "$BACKUP" = "TSM" ; then
# Use a TSM-specific LD_LIBRARY_PATH to find TSM libraries
# see https://github.com/rear/rear/issues/1533
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSM_LD_LIBRARY_PATH
fi
for binary in $( find $ROOTFS_DIR -type f -executable -printf '/%P\n' ) ; do
chroot $ROOTFS_DIR /bin/ldd $binary | grep -q 'not found' && broken_binaries="$broken_binaries $binary"
done
test $old_LD_LIBRARY_PATH && export LD_LIBRARY_PATH=$old_LD_LIBRARY_PATH || unset LD_LIBRARY_PATH

if contains_visible_char "$broken_binaries" ; then
LogPrintError "There are binaries or libraries in the ReaR recovery system that need additional libraries"
KEEP_BUILD_DIR=1
Expand Down
2 changes: 2 additions & 0 deletions usr/share/rear/conf/default.conf
Expand Up @@ -1021,6 +1021,8 @@ GALAXY10_Q_ARGUMENTFILE=
COPY_AS_IS_TSM=( /etc/adsm /opt/tivoli/tsm/client /usr/local/ibm/gsk8* )
COPY_AS_IS_EXCLUDE_TSM=( )
PROGS_TSM=(dsmc)
# TSM library PATH that need to be added to LD_LIBRARY_PATH.
TSM_LD_LIBRARY_PATH="/opt/tivoli/tsm/client/ba/bin:/opt/tivoli/tsm/client/api/bin64:/opt/tivoli/tsm/client/api/bin:/opt/tivoli/tsm/client/api/bin64/cit/bin"
# where to copy the resulting files to and save them with TSM
TSM_RESULT_FILE_PATH=/opt/tivoli/tsm/rear
#
Expand Down

0 comments on commit 2938c33

Please sign in to comment.