-
Notifications
You must be signed in to change notification settings - Fork 494
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
(FACT-1294) Use relative path in facter.rb #1291
Conversation
This requires a change to puppet-agent builds on Windows to set the CMAKE_INSTALL_PREFIX appropriately. |
Change `facter.rb` to always use a relative path to find libfacter, based on the relative path of the install location of facter.rb and CMAKE_INSTALL_PREFIX. This fixes libfacter lookup when doing `make install` on a Windows machine, and removes hard-coding the MSI layout.
@@ -343,6 +338,12 @@ else() | |||
endif() | |||
|
|||
if(RUBY_VENDORDIR) | |||
file(RELATIVE_PATH LIBFACTER_INSTALL_RELATIVE ${RUBY_VENDORDIR} ${CMAKE_INSTALL_PREFIX}) |
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.
Do you need to quote RUBY_VENDORDIR
and CMAKE_INSTALL_PREFIX
here? I can never remember how exactly CMake behaves with variable expansion at function call sites
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.
We didn't other places, so I was hoping not. I'll try a run installing to "C:/Program Files" just to be sure.
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.
Testing "C:/Program Files" worked fine.
Did Windows and el-7 builds, both look good. |
👍 |
PA-252 was merged, this should be ready to go. |
(FACT-1294) Use relative path in facter.rb
Change
facter.rb
to always use a relative path to find libfacter, basedon the relative path of the install location of facter.rb and
CMAKE_INSTALL_PREFIX. This fixes libfacter lookup when doing
make install
on a Windows machine, and removes hard-coding the MSI layout.