#1810 PR closed: Sesam integration: add sesam bin directory to LD_LIBRARY_PATH

Labels: enhancement, won't fix / can't fix / obsolete

abbbi opened issue at 2018-05-17 07:32:

  • Type: Bug Fix

  • Impact: Normal /

On some systems (for example centos6 and/or ubuntu) REAR backup with Backup type SESAM
fails during verify of the rootfs due to missing libraries:

/opt/sesam/bin/sesam/Crypto.Hash._SHA256.so requires additional libraries (fatal error)
libpython2.7.so.1.0 => not found
/opt/sesam/bin/sesam/cPickle.so requires additional libraries (fatal error)
libpython2.7.so.1.0 => not found
ERROR: ReaR recovery system in '/tmp/rear.LyKD3Rt2V4XgYs2/rootfs' not usable

these libraries are part of the Sesam client integration itself but unfortunately are not found
due to the sesam installation directory not beeing part of LD_LIBRARY_PATH.

For TSM an alike issue has already been fixed as TSM sets the LD_LIBRARY_PATH:

./usr/share/rear/prep/TSM/default/400_prep_tsm.sh:# Find gsk lib diriectory and add it to the TSM_LD_LIBRARY_PATH
./usr/share/rear/prep/TSM/default/400_prep_tsm.sh:      TSM_LD_LIBRARY_PATH=$TSM_LD_LIBRARY_PATH:$gsk_dir

This patch does the same for the sesam client, installation directory is used from the
configuration file and not hardcoded.

jsmeix commented at 2018-05-17 12:18:

@abbbi
in usr/share/rear/prep/SESAM/default/400_prep_sesam.sh
you set a global (i.e. global for all ReaR scripts and all programs called by them)

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SM_BIN_SESAM

which could have weird unexpected bad side-effects.

I fear setting such a global SESAM-specific LD_LIBRARY_PATH
for all programs in all ReaR scripts that run after
usr/share/rear/prep/SESAM/default/400_prep_sesam.sh
might lead to unexpected side effects like described in
https://github.com/rear/rear/issues/1533#issuecomment-336622504
because libraries via LD_LIBRARY_PATH have
precedence over the "normal" ones, cf.
https://github.com/rear/rear/pull/1562#issuecomment-342111737

See in
https://github.com/rear/rear/pull/1562
the initial commit
https://github.com/rear/rear/pull/1562/commits/a9d837027cf4c86d8971eff7a88d932ae8863800
how it was tried initially via a global LD_LIBRARY_PATH export
and in contrast the final state
https://github.com/rear/rear/commit/2938c334a37853bf1d0ec978d89d2806fd4c4d54
that was actually merged into the ReaR master code at that time.

I suggest to do it for SESAM in the same way as it was actually done for TSM via
https://github.com/rear/rear/commit/2938c334a37853bf1d0ec978d89d2806fd4c4d54

jsmeix commented at 2018-05-23 11:53:

This one is superseded by https://github.com/rear/rear/pull/1817


[Export of Github issue for rear/rear.]