# # Cookbook:: gateway # Recipe:: _system_patch # # Copyright:: 2022, The Authors, All Rights Reserved. # patch_files = %w{ 0001-Fix-dkms-doesn-t-remove-modules.patch } patch_files.each do |patch_file| cache_path = ::File.join(::Chef::Config[:file_cache_path], patch_file) cookbook_file cache_path do source patch_file end execute "/usr/bin/git am #{cache_path}" do only_if "/usr/bin/git apply #{cache_path} --check" cwd '/etc' end end