-
Notifications
You must be signed in to change notification settings - Fork 180
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
Document openscap lib required for openscap gem to work #189
Conversation
Yes. It would be bug otherwise. |
developer_setup.md
Outdated
@@ -26,6 +26,7 @@ | |||
rpm -q --whatprovides npm || sudo dnf -y install npm # For CentOS 7, Fedora 23 and older | |||
sudo dnf -y install openssl-devel # For rubygems | |||
sudo dnf -y install cmake # For rugged Gem | |||
sudo dnf -y install openscap # For openscap Gem (the Gem installs without the lib but require fails) |
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.
👍 I would remove what's in the parenthesis as I think it is not interesting for someone setting up a development environment.
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.
done
Yes you do not need devel as we are only using the openscap binary, not building against it.
This was a requirement, when we first introduced openscap core told us that there will be no option to Note at appliance and podified the Binary is installed. I added some warning at require failures so that customers that encounter the problem on a new environment that has it's own dependency management (like we recently had with podified ManageIQ) will be able to easily report what is wrong. |
Unusually, since the gem uses FFI at runtime, you don't need this lib for `bundle install` to succeed, but `require 'openscap'` will fail.
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.
Thanks, LGTM 👍
(better assign this one to someone active on this file, I don't know if it is done automatically here)
Ping @isimluk |
@miq-bot assign isimluk |
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.
👍
I am sorry but I can't merge this. |
@roliveri can you merge this? |
@simon3z Sorry I can't merge this. It seems I don't have merge permission for the guides repo. |
@Fryguy @chessbyte please merge |
cc @carbonin I'll merge for now, but I really don't understand why this is required. We should not be requiring openscap unless it's needed, and this should be an optional dep. |
@Fryguy yes it should have been mentioned as optional in this doc change. |
@Fryguy it's optional as in manageiq will not crash, but some of the container SSA functionality will be skipped. AFAICT it affects not only display but also collection of IMHO developer setup should document how to get a fully functional MIQ. If we the code uses the dependency in prod, developers should also exercise it. FWIW, I've worked on container team for nearly a year until I even realized (by digging deep in log, and stepping through this code in byebug) that there is functionality I'm missing! Sure, opened #195 to clarify it's optional. |
Unusually, since the gem uses FFI at runtime, you don't need this lib
for
bundle install
to succeed, butrequire 'openscap'
will fail.Moreover, app/models/openscap_result.rb currently swallows the
require
failure,resulting in more confusing
undefined method `oscap_cleanup'
error:https://gist.github.com/cben/11af8299c6c85111f5355b6db8c750ce
@moolitayer please review.
openscap
package enough withoutopenscap-devel
? Seems to work.Could we maybe arrange for bundler or bin/setup to fail / give warning
without it?
with_openscap_arf
should validateopenscap_available?
returned true, but that's a separate discussion.