diff --git a/.expeditor/release.omnibus.yml b/.expeditor/release.omnibus.yml index 1015acf94..eed3ddfce 100644 --- a/.expeditor/release.omnibus.yml +++ b/.expeditor/release.omnibus.yml @@ -12,6 +12,10 @@ builder-to-testers-map: debian-10-x86_64: - debian-10-x86_64 - debian-11-x86_64 + amazon-2023-aarch64: + - amazon-2023-aarch64 + amazon-2023-x86_64: + - amazon-2023-x86_64 el-7-x86_64: - el-7-x86_64 - amazon-2-x86_64 diff --git a/components/main-chef-wrapper/platform-lib/version_linux.go b/components/main-chef-wrapper/platform-lib/version_linux.go index 5a4f1944c..1b02d69bc 100644 --- a/components/main-chef-wrapper/platform-lib/version_linux.go +++ b/components/main-chef-wrapper/platform-lib/version_linux.go @@ -1,10 +1,9 @@ -// // Copyright (c) Chef Software, Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -18,15 +17,17 @@ package platform_lib import ( "encoding/json" "fmt" - "github.com/chef/chef-workstation/components/main-chef-wrapper/dist" - "github.com/chef/chef-workstation/components/main-chef-wrapper/lib" "io/ioutil" "log" "os" "os/exec" "path" "path/filepath" + "runtime" "strings" + + "github.com/chef/chef-workstation/components/main-chef-wrapper/dist" + "github.com/chef/chef-workstation/components/main-chef-wrapper/lib" ) var gemManifestMap map[string]interface{} @@ -56,6 +57,10 @@ func showVersionViaVersionManifest() { "Test Kitchen": "test-kitchen", "Cookstyle": "cookstyle", } + // TODO: once the hab package is available for linux aarch64, we can remove the below GOOS and GOARCH checks. + if runtime.GOOS == "linux" && runtime.GOARCH == "arm64" { + delete(productMap, dist.HabProduct) + } for prodName, component := range productMap { fmt.Printf("\n%v version: %v", prodName, componentVersion(component)) } diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index b0da54af5..f8f74cdbc 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -1,17 +1,17 @@ GIT remote: https://github.com/chef/omnibus-software.git - revision: 86649fa63c1c1ef83371404d5dd08b095ef9cbd8 + revision: 9d0fd56137fd5c790cd07c340dfc5ba30e554968 branch: main specs: - omnibus-software (24.1.309) + omnibus-software (24.1.310) omnibus (>= 9.0.0) GIT remote: https://github.com/chef/omnibus.git - revision: 82dae896a066542f1b66dc866186f856f37e518e + revision: 5c0122b185a65af3e93856cba6c394a68343818a branch: main specs: - omnibus (9.0.23) + omnibus (9.0.25) aws-sdk-s3 (~> 1.116.0) chef-cleanroom (~> 1.0) chef-utils (>= 15.4) @@ -34,14 +34,14 @@ GEM artifactory (3.0.15) awesome_print (1.9.2) aws-eventstream (1.3.0) - aws-partitions (1.882.0) - aws-sdk-core (3.190.3) + aws-partitions (1.884.0) + aws-sdk-core (3.191.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.76.0) - aws-sdk-core (~> 3, >= 3.188.0) + aws-sdk-kms (1.77.0) + aws-sdk-core (~> 3, >= 3.191.0) aws-sigv4 (~> 1.1) aws-sdk-s3 (1.116.0) aws-sdk-core (~> 3, >= 3.127.0) @@ -200,7 +200,7 @@ GEM ffi (~> 1.0) ffi-win32-extensions (1.0.4) ffi - ffi-yajl (2.4.0) + ffi-yajl (2.6.0) libyajl2 (>= 1.2) fuzzyurl (0.9.0) gssapi (1.3.1) diff --git a/omnibus/config/projects/chef-workstation.rb b/omnibus/config/projects/chef-workstation.rb index 9dcb7f113..9150ebce5 100644 --- a/omnibus/config/projects/chef-workstation.rb +++ b/omnibus/config/projects/chef-workstation.rb @@ -49,7 +49,8 @@ dependency "preparation" -dependency "habitat" +# TODO: unless check should be removed once hab package is available in linux aarch64 +dependency "habitat" unless RUBY_PLATFORM =~ /aarch64-linux/ dependency "openssl" if windows? diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh index 4dd4c3f63..6067b1487 100644 --- a/omnibus/omnibus-test.sh +++ b/omnibus/omnibus-test.sh @@ -6,6 +6,19 @@ is_darwin() uname -a | grep "^Darwin" 2>&1 >/dev/null } +# TODO: Need to remove the lin_aarch64 function once the hab package is available in linux aarch64 platform +lin_aarch="0" +lin_aarch64() +{ + unamestr=$(uname) + unamearchstr=$(uname -m) + if [[ "$unamestr" == 'Linux' ]]; then + if [[ "$unamearchstr" == 'aarch64' ]]; then + lin_aarch="1" + fi + fi +} + # Ensure user variables are set in git config git config --global user.email "you@example.com" git config --global user.name "Your Name" @@ -19,8 +32,13 @@ chef env echo "--- Ensure the 'chef report' subcommand cli works (chef report help)" chef report help -echo "--- Ensure that 'hab' cli is available" -hab help +# TODO: Need to remove the lin_aarch64 function call and the condition check once the hab package is available in linux aarch64 platform. +lin_aarch64 + +if [ "$lin_aarch" = "0" ]; then + echo "--- Ensure that 'hab' cli is available" + hab help +fi # We are commenting this code on a purpose. # We have to stop building chef-automate-collect in chef workstation temporarily. diff --git a/omnibus/verification/verify.rb b/omnibus/verification/verify.rb index 9e76068b3..f8ac8b27c 100644 --- a/omnibus/verification/verify.rb +++ b/omnibus/verification/verify.rb @@ -290,7 +290,9 @@ def components sh!("#{usr_bin_path("ohai")} -v") sh!("#{usr_bin_path("inspec")} version") - sh!("#{usr_bin_path("hab")} --version") + + # TODO: unless check should be removed once hab package is available in linux aarch64 + sh!("#{usr_bin_path("hab")} --version") unless RUBY_PLATFORM =~ /aarch64-linux/ end # Test blocks are expected to return a Mixlib::ShellOut compatible