Pin parser dependency in chef-bin

Installing chef-bin via `gem install` makes all of its dependencies floating,
including the `parser` gem. Because the `parser` gem is *also* used by other
Ruby modules, the floating dependencies can cause failures, such as a recent
problem that caused `gitlab-ctl` to fail because `inspec-core` depends on
`parser` as well. This is a temporary fix to correct the floating dependency
on `parser` until a more permanent fix is in place.
This commit is contained in:
Ryan Egesdahl 2024-04-27 01:11:20 +00:00 committed by Robert Marshall
parent 32ad31df9c
commit bc8d3785aa
1 changed files with 11 additions and 0 deletions

View File

@ -32,6 +32,17 @@ build do
env = with_standard_compiler_flags(with_embedded_path)
patch source: 'add-license-file.patch'
# TODO: rubocop-ast installs a later version of parser, which omits the AST::Processor
# mixin, causing breakage. This is a temporary workaround until a more permanent fix
# is in place: https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7362
gem 'install parser' \
" --clear-sources" \
" -s https://packagecloud.io/cinc-project/stable" \
" -s https://rubygems.org" \
" --version '3.3.0.5'" \
" --bindir '#{install_dir}/embedded/bin'" \
' --no-document', env: env
# Temporary workaround because upstream inspec-core does not list this as
# a requirement and it causes failures during gitlab-ctl reconfigure in
# the QA job pipelines