chef-workstation
chef-workstation copied to clipboard
Chef Workstation with embedded ruby doesn't work on MacOS (Code has to be at least ad-hoc signed.)
Description
Following this and this docs ended up with a broken chef setup on MacOS
not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. -
failed to load the ffi-yajl c-extension, falling back to ffi interface
FATAL: to use the ffi extension instead of the compiled C extension, the ffi gem must be installed
(it is optional, so you must include it in your bundle manually)
% gem list | grep ffi
cheffish (17.0.0)
ffi (1.15.5)
ffi-libarchive (1.1.3)
ffi-yajl (2.4.0)
public_suffix (4.0.6)
% irb
irb(main):001:0> require "ffi"
<internal:/opt/chef-workstation/embedded/lib/ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require': dlopen(/Users/username/.chefdk/gem/ruby/3.0.0/gems/ffi-1.15.5/lib/ffi_c.bundle, 9): no suitable image found. Did find: (LoadError)
/Users/username/.chefdk/gem/ruby/3.0.0/gems/ffi-1.15.5/lib/ffi_c.bundle: code signature in (/Users/username/.chefdk/gem/ruby/3.0.0/gems/ffi-1.15.5/lib/ffi_c.bundle) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed. - /Users/username/.chefdk/gem/ruby/3.0.0/gems/ffi-1.15.5/lib/ffi_c.bundle
Chef Workstation Version
Chef Workstation version: 22.4.861 Chef InSpec version: 4.56.19 Chef CLI version: 5.6.1 Chef Habitat version: 1.6.420 Test Kitchen version: 3.2.2 Cookstyle version: 7.32.1 Chef Infra Client version: 17.10.0
Platform Version
MacOS 11.6.5
Linking https://github.com/chef/chef-workstation/issues/999