Skip to content

Commit 0a5a598

Browse files
committed
Enhance rpath sanity check to skip anything whose absolute path
resolves to outside of the installation directory
1 parent 3a82615 commit 0a5a598

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

easybuild/framework/easyblock.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,6 +3395,13 @@ def sanity_check_rpath(self, rpath_dirs=None, check_readelf_rpath=True):
33953395
self.log.debug(f"Sanity checking RPATH for files in {dirpath}")
33963396

33973397
for path in [os.path.join(dirpath, x) for x in os.listdir(dirpath)]:
3398+
# skip the check for any symlinks that resolve to outside the installation directory
3399+
if not is_parent_path(self.installdir, path):
3400+
msg = f("Skipping RPATH sanity check for {path}, since its absolute path resolves to outside "
3401+
"the installation directory")
3402+
self.log.debug(msg)
3403+
continue
3404+
33983405
self.log.debug(f"Sanity checking RPATH for {path}")
33993406

34003407
out = get_linked_libs_raw(path)

0 commit comments

Comments
 (0)