theforeman / foreman_scap_client

GNU General Public License v3.0
2 stars 21 forks source link

No rpm in Debian-based distributions #47

Closed PiRomant closed 3 months ago

PiRomant commented 3 months ago

Version 0.6.0 Running at Ubuntu 22.04

foreman_scap_client 2
/usr/lib/ruby/3.0.0/open3.rb:221:in `spawn': No such file or directory - rpm (Errno::ENOENT)
        from /usr/lib/ruby/3.0.0/open3.rb:221:in `popen_run'
        from /usr/lib/ruby/3.0.0/open3.rb:102:in `popen3'
        from /usr/lib/ruby/3.0.0/open3.rb:289:in `capture3'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/client.rb:48:in `supports_local_file_option?'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/client.rb:43:in `local_files_subcommand'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/client.rb:39:in `scan_command'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/base_client.rb:70:in `scan'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/base_client.rb:49:in `block in run_in_tmpdir'
        from /usr/lib/ruby/3.0.0/tmpdir.rb:96:in `mktmpdir'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/base_client.rb:47:in `run_in_tmpdir'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/lib/foreman_scap_client/base_client.rb:20:in `run'
        from /var/lib/gems/3.0.0/gems/foreman_scap_client-0.6.0/bin/foreman_scap_client:14:in `<top (required)>'
        from /usr/local/bin/foreman_scap_client:25:in `load'
        from /usr/local/bin/foreman_scap_client:25:in `<main>'
PiRomant commented 3 months ago

rpm is only used to check version of oscap https://github.com/theforeman/foreman_scap_client/blob/57b0a55dae1b5c5d826e1665d73a38d0be6b42fd/lib/foreman_scap_client/client.rb#L46-L51 Why not use:

oscap --version | grep "OpenSCAP command line tool (oscap)" |  awk '{print $NF}'
PiRomant commented 3 months ago

Meanwhile, version 0.5.0 works fine

adamruzicka commented 3 months ago

At the moment, we're considering a complete rewrite of foreman_scap_client to address various issues that are currently present so noone is really going to rush to fix an issue for a platform that we don't even package this for just to drop it in a foreseeable future.

At the same time, this is an open source project and patches are always welcome so if you feel strongly about this, that could be an option.

adamruzicka commented 3 months ago

Should be out on rubygems in foreman_scap_client-0.6.1