-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change health check to fail on absolute link paths on osx #1
Change health check to fail on absolute link paths on osx #1
Conversation
Please rebase and retarget to |
e2f924d
to
181d6d1
Compare
log.debug(log_key) { " --> Dependency: #{name}" } | ||
log.debug(log_key) { " --> Provided by: #{linked}" } | ||
|
||
if !safe && linked !~ Regexp.new(project.install_dir) | ||
if !safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just an initial approach, and the implementation wouldn't be generic enough to land upstream. I've created a ticket over there to discuss further chef#947
Can we convert this to be a build option similar to how we introduced See chef#843 |
f1b206b
to
2d6f944
Compare
@jmartin-r7 I've added a second commit to make this configurable, the calling project will now have to use: if mac_os_x?
require_relative_links true
end |
2d6f944
to
bfbe18e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Test on linux using ruby 2.6.5 also show failures for
|
@jmartin-r7 Thanks for taking a look 👍 I've got some fixes to push up for the tests - just wasn't able get the free cycles today, hope to have that sorted tomorrow 🤞 |
9c57f92
to
68dde31
Compare
68dde31
to
0a2c71d
Compare
Description
This pull request changes the health check mechanism for omnibus, as part of the effort of running msfconsole at arbitrary locations - rapid7/metasploit-omnibus#127
The current implementation could not be landed in its current form upstream, the current implementation is too specific to our use case.
Before
Omibus verifies that all osx build libs are either whitelisted files, or that their links match the project's root dir.
For instance, an example of a happy path lib. There is a reference directly to
/opt/metasploit-framework
- the project install dir.Unfortunately the current check does not correctly handle the scenario of
@executable_path
being present in linked files:Example Healthcheck failure:
After
Two changes have been made for osx omnibus builds:
@executable_path
to linked filesMaintainers
Please ensure that you check for:
serial number
corresponding change is reviewed and there is a release plan
corresponding change is reviewed and there is a release plan