Skip to content

avoid rewrapping already wrapped compiler/linker command with RPATH wrapper script#2022

Merged
boegel merged 2 commits intoeasybuilders:developfrom
boegel:rpath_fix_fork_bomb_extensions
Nov 26, 2016
Merged

avoid rewrapping already wrapped compiler/linker command with RPATH wrapper script#2022
boegel merged 2 commits intoeasybuilders:developfrom
boegel:rpath_fix_fork_bomb_extensions

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Nov 23, 2016

fix for #2010

cc @pescobar

@boegel boegel added this to the 3.0.1 milestone Nov 23, 2016
@boegel
Copy link
Copy Markdown
Member Author

boegel commented Nov 23, 2016

@wpoely86, @rjeschmi: please review?

Check whether command at specified location already is an RPATH wrapper script rather than the actual command
"""
in_rpath_wrappers_dir = os.path.basename(os.path.dirname(path)) == RPATH_WRAPPERS_SUBDIR
calls_rpath_args = 'rpath_args.py $CMD' in read_file(path)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use hash?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RPATH wrapper script that is in place is a templated version of easybuild/scripts/rpath_wrapper_template.sh.in. That doesn't mean we can't hash it, but I'd rather have a stupid yet safe check in place to really avoid wrapping an existing wrapper. We really really REALLY don't want to include a fork bomb in EasyBuild...

Checking a hash is really strict, you just need a single byte changed somehow to have a hash mismatch...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, so it's very very strict, like you want?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't necessarily want the check to see whether the command I'm wrapping is a wrapper script already to be strict. On the contrary, I'd rather do a less strict non-hash check (like I'm doing now), which limits the chance of running into a false negative and wrapping an existing wrapper...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wpoely86 So, do we still disagree on this?

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Nov 26, 2016

Thanks for the review @wpoely86!

@boegel boegel merged commit fc458a8 into easybuilders:develop Nov 26, 2016
@boegel boegel deleted the rpath_fix_fork_bomb_extensions branch November 26, 2016 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants