From 09df54e61b554117b8c6fccf039f286d974dfad3 Mon Sep 17 00:00:00 2001 From: jan shahid shaik Date: Wed, 8 Dec 2021 16:46:27 +0530 Subject: [PATCH] Updated ruby27 in automate-cs-nginx and oc_erchef run hook for fixing the chef-server-ctl issues Signed-off-by: jan shahid shaik Signed-off-by: Kallol Roy Signed-off-by: Prajakta Purohit --- .license_scout.yml | 3 +++ components/automate-cs-nginx/habitat/plan.sh | 6 +++--- components/automate-cs-oc-erchef/habitat/hooks/run | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.license_scout.yml b/.license_scout.yml index c77b4968250..80cabb91396 100644 --- a/.license_scout.yml +++ b/.license_scout.yml @@ -308,6 +308,9 @@ fallbacks: - name: core/ruby26 license_id: BSD-2-Clause license_content: https://raw.githubusercontent.com/ruby/ruby/trunk/COPYING + - name: core/ruby27 + license_id: BSD-2-Clause + license_content: https://raw.githubusercontent.com/ruby/ruby/trunk/COPYING - name: core/cacerts license_id: MPL-2.0 license_content: https://curl.haxx.se/docs/caextract.html diff --git a/components/automate-cs-nginx/habitat/plan.sh b/components/automate-cs-nginx/habitat/plan.sh index 0353959fba9..cf67621206a 100644 --- a/components/automate-cs-nginx/habitat/plan.sh +++ b/components/automate-cs-nginx/habitat/plan.sh @@ -18,7 +18,7 @@ pkg_deps=( # chef-server-* packages. # core/curl/7.68.0/20200601114640 - core/ruby26/2.6.5/20200404043345 + core/ruby27/2.7.0/20200404045319 # WARNING: Version pin managed by .expeditor/update_chef_server.sh "${vendor_origin}/chef-server-nginx/14.11.36/20211227114734" "${vendor_origin}/chef-server-ctl/14.11.36/20211227114241" @@ -63,7 +63,7 @@ scaffolding_go_binary_list=( chef_automate_hab_binding_mode="relaxed" do_prepare() { - GO_LDFLAGS="-X main.RubyPath=$(pkg_path_for core/ruby26)" + GO_LDFLAGS="-X main.RubyPath=$(pkg_path_for core/ruby27)" GO_LDFLAGS="$GO_LDFLAGS -X main.ChefServerCtlPath=$(pkg_path_for chef/chef-server-ctl)" GO_LDFLAGS="$GO_LDFLAGS -X main.KnifePath=${pkg_prefix}/bin/knife" GO_LDFLAGS="$GO_LDFLAGS -X main.Version=${pkg_version}/${pkg_release}" @@ -79,5 +79,5 @@ do_install() { install "$PLAN_CONTEXT/bin/knife" "$wrapper_bin_path/knife" sed -i "s!__BUILDTIME_HAB_PKG_PATH_CHEF_SERVER_CTL__!$(pkg_path_for chef/chef-server-ctl)!g" "$wrapper_bin_path/knife" - sed -i "s!__BUILDTIME_HAB_PKG_PATH_RUBY__!$(pkg_path_for core/ruby26)!g" "$wrapper_bin_path/knife" + sed -i "s!__BUILDTIME_HAB_PKG_PATH_RUBY__!$(pkg_path_for core/ruby27)!g" "$wrapper_bin_path/knife" } diff --git a/components/automate-cs-oc-erchef/habitat/hooks/run b/components/automate-cs-oc-erchef/habitat/hooks/run index 5aed1b51d16..ba91b1d74d8 100644 --- a/components/automate-cs-oc-erchef/habitat/hooks/run +++ b/components/automate-cs-oc-erchef/habitat/hooks/run @@ -49,7 +49,7 @@ HOME="{{pkg.svc_data_path}}" BUNDLE_GEMFILE="{{pkgPathFor "chef/oc_erchef"}}/Gem bundle exec ruby "{{pkg.svc_config_path}}/chef_server_data_bootstrap.rb" # ruby vars are needed in order to make depselector start up -export PATH={{pkgPathFor "core/ruby26"}}/bin:${PATH} +export PATH={{pkgPathFor "core/ruby27"}}/bin:${PATH} export LD_LIBRARY_PATH={{pkgPathFor "core/libffi"}}/lib:${LD_LIBRARY_PATH} export GEM_HOME={{pkgPathFor "chef/oc_erchef"}}/vendor/bundle export GEM_PATH={{pkgPathFor "chef/oc_erchef"}}/vendor/bundle